Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- md/train/--GJkm7nt0/--GJkm7nt0.md +0 -0
- md/train/-N7PBXqOUJZ/-N7PBXqOUJZ.md +656 -0
- md/train/0z1HScLBEpb/0z1HScLBEpb.md +360 -0
- md/train/0zXJRJecC_/0zXJRJecC_.md +287 -0
- md/train/1Kof-nkmQB8/1Kof-nkmQB8.md +272 -0
- md/train/2j_cut38wv/2j_cut38wv.md +288 -0
- md/train/3X8qZL4_WO/3X8qZL4_WO.md +464 -0
- md/train/5jRVa89sZk/5jRVa89sZk.md +288 -0
- md/train/5la5tka8a4-/5la5tka8a4-.md +551 -0
- md/train/66H4g_OHdnl/66H4g_OHdnl.md +0 -0
- md/train/6MaBrlQ5JM/6MaBrlQ5JM.md +384 -0
- md/train/6RB77-6-_oI/6RB77-6-_oI.md +242 -0
- md/train/7J-fKoXiReA/7J-fKoXiReA.md +266 -0
- md/train/7dpmlkBuJFC/7dpmlkBuJFC.md +0 -0
- md/train/9az9VKjOx00/9az9VKjOx00.md +381 -0
- md/train/Arn2E4IRjEB/Arn2E4IRjEB.md +377 -0
- md/train/B1-q5Pqxl/B1-q5Pqxl.md +307 -0
- md/train/B1EPYJ-C-/B1EPYJ-C-.md +194 -0
- md/train/B1VZqjAcYX/B1VZqjAcYX.md +330 -0
- md/train/B1eWbxStPH/B1eWbxStPH.md +301 -0
- md/train/B1eXygBFPH/B1eXygBFPH.md +312 -0
- md/train/B1exrnCcF7/B1exrnCcF7.md +527 -0
- md/train/B1gqipNYwH/B1gqipNYwH.md +373 -0
- md/train/B1l8BtlCb/B1l8BtlCb.md +318 -0
- md/train/B1lxH20qtX/B1lxH20qtX.md +243 -0
- md/train/B1lz-3Rct7/B1lz-3Rct7.md +523 -0
- md/train/B1mAJI9gl/B1mAJI9gl.md +529 -0
- md/train/B1xxAJHFwS/B1xxAJHFwS.md +0 -0
- md/train/BJO-BuT1g/BJO-BuT1g.md +357 -0
- md/train/BJepcaEtwB/BJepcaEtwB.md +306 -0
- md/train/BJgy96EYvr/BJgy96EYvr.md +561 -0
- md/train/BJl6TjRcY7/BJl6TjRcY7.md +339 -0
- md/train/BJlrF24twB/BJlrF24twB.md +623 -0
- md/train/BJlxmAKlg/BJlxmAKlg.md +236 -0
- md/train/BJlzm64tDH/BJlzm64tDH.md +258 -0
- md/train/Bk8BvDqex/Bk8BvDqex.md +371 -0
- md/train/BkJ3ibb0-/BkJ3ibb0-.md +382 -0
- md/train/BkeStsCcKQ/BkeStsCcKQ.md +259 -0
- md/train/BkfbpsAcF7/BkfbpsAcF7.md +426 -0
- md/train/BklEFpEYwS/BklEFpEYwS.md +500 -0
- md/train/BklhAj09K7/BklhAj09K7.md +431 -0
- md/train/BkrsAzWAb/BkrsAzWAb.md +263 -0
- md/train/BkxfaTVFwH/BkxfaTVFwH.md +348 -0
- md/train/BkxfshNYwB/BkxfshNYwB.md +333 -0
- md/train/ByME42AqK7/ByME42AqK7.md +424 -0
- md/train/ByZvfijeg/ByZvfijeg.md +209 -0
- md/train/ByeZ5jC5YQ/ByeZ5jC5YQ.md +576 -0
- md/train/BygWRaVYwH/BygWRaVYwH.md +352 -0
- md/train/Bygq-H9eg/Bygq-H9eg.md +139 -0
- md/train/Bys_NzbC-/Bys_NzbC-.md +242 -0
md/train/--GJkm7nt0/--GJkm7nt0.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/-N7PBXqOUJZ/-N7PBXqOUJZ.md
ADDED
|
@@ -0,0 +1,656 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LIPSCHITZ RECURRENT NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
N. Benjamin Erichson ICSI and UC Berkeley erichson@berkeley.edu
|
| 4 |
+
|
| 5 |
+
Omri Azencot Ben-Gurion University azencot@cs.bgu.ac.il
|
| 6 |
+
|
| 7 |
+
Alejandro Queiruga Google Research afq@google.com
|
| 8 |
+
|
| 9 |
+
Liam Hodgkinson
|
| 10 |
+
ICSI and UC Berkeley
|
| 11 |
+
liam.hodgkinson@berkeley.edu
|
| 12 |
+
Michael W. Mahoney
|
| 13 |
+
ICSI and UC Berkeley
|
| 14 |
+
mmahoney@stat.berkeley.edu
|
| 15 |
+
|
| 16 |
+
# ABSTRACT
|
| 17 |
+
|
| 18 |
+
Viewing recurrent neural networks (RNNs) as continuous-time dynamical systems, we propose a recurrent unit that describes the hidden state’s evolution with two parts: a well-understood linear component plus a Lipschitz nonlinearity. This particular functional form facilitates stability analysis of the long-term behavior of the recurrent unit using tools from nonlinear systems theory. In turn, this enables architectural design decisions before experimentation. Sufficient conditions for global stability of the recurrent unit are obtained, motivating a novel scheme for constructing hidden-to-hidden matrices. Our experiments demonstrate that the Lipschitz RNN can outperform existing recurrent units on a range of benchmark tasks, including computer vision, language modeling and speech prediction tasks. Finally, through Hessian-based analysis we demonstrate that our Lipschitz recurrent unit is more robust with respect to input and parameter perturbations as compared to other continuous-time RNNs.
|
| 19 |
+
|
| 20 |
+
# 1 INTRODUCTION
|
| 21 |
+
|
| 22 |
+
Many interesting problems exhibit temporal structures that can be modeled with recurrent neural networks (RNNs), including problems in robotics, system identification, natural language processing, and machine learning control. In contrast to feed-forward neural networks, RNNs consist of one or more recurrent units that are designed to have dynamical (recurrent) properties, thereby enabling them to acquire some form of internal memory. This equips RNNs with the ability to discover and exploit spatiotemporal patterns, such as symmetries and periodic structures (Hinton, 1986). However, RNNs are known to have stability issues and are notoriously difficult to train, most notably due to the vanishing and exploding gradients problem (Bengio et al., 1994; Pascanu et al., 2013).
|
| 23 |
+
|
| 24 |
+
Several recurrent models deal with the vanishing and exploding gradients issue by restricting the hidden-to-hidden weight matrix to be an element of the orthogonal group (Arjovsky et al., 2016; Wisdom et al., 2016; Mhammedi et al., 2017; Vorontsov et al., 2017; Lezcano-Casado & MartinezRubio, 2019). While such an approach is advantageous in maintaining long-range memory, it limits the expressivity of the model. To address this issue, recent work suggested to construct hidden-tohidden weights which have unit norm eigenvalues and can be nonnormal (Kerg et al., 2019). Another approach for resolving the exploding/vanishing gradient problem has recently been proposed by Kag et al. (2020), who formulate the recurrent units as a differential equation and update the hidden states based on the difference between predicted and previous states.
|
| 25 |
+
|
| 26 |
+
In this work, we address these challenges by viewing RNNs as dynamical systems whose temporal evolution is governed by an abstract system of differential equations with an external input. The data are formulated in continuous-time where the external input is defined by the function $x = x ( t ) \in \mathbb { R } ^ { p }$ , and the target signal is defined as $\boldsymbol { y } = \boldsymbol { y } ( t ) \in \mathbb { R } ^ { d }$ . Based on insights from dynamical systems theory, we propose a continuous-time Lipschitz recurrent neural network with the functional form
|
| 27 |
+
|
| 28 |
+
$$
|
| 29 |
+
\left\{ \begin{array} { r c l } { { \dot { h } } } & { { = } } & { { A _ { \beta _ { A } , \gamma _ { A } } h + \operatorname { t a n h } ( W _ { \beta _ { W } , \gamma _ { W } } h + U x + b ) , } } \\ { { y } } & { { = } } & { { D h , } } \end{array} \right.
|
| 30 |
+
$$
|
| 31 |
+
|
| 32 |
+
where the hidden-to-hidden matrices $A _ { \beta , \gamma } \in \mathbb { R } ^ { N \times N }$ and $W _ { \beta , \gamma } \in \mathbb { R } ^ { N \times N }$ are of the form
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\left\{ \begin{array} { r l } { A _ { \beta _ { A } , \gamma _ { A } } } & { = ( 1 - \beta _ { A } ) ( M _ { A } + M _ { A } ^ { T } ) + \beta _ { A } ( M _ { A } - M _ { A } ^ { T } ) - \gamma _ { A } I } \\ { W _ { \beta _ { W } , \gamma _ { W } } } & { = ( 1 - \beta _ { W } ) ( M _ { W } + M _ { W } ^ { T } ) + \beta _ { W } ( M _ { W } - M _ { W } ^ { T } ) - \gamma _ { W } I , } \end{array} \right.
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where $\beta _ { A } , \beta _ { W } \in [ 0 , 1 ]$ , $\gamma _ { A } , \gamma _ { W } > 0$ are tunable parameters and $M _ { A } , M _ { W } \in \mathbb { R } ^ { N \times N }$ are trainable matrices. Here, $h = h ( t ) \in \mathbb { R } ^ { N }$ is a function of time $t$ that represents an internal (hidden) state, and $\begin{array} { r } { \dot { h } = \frac { \partial h ( t ) } { \partial t } } \end{array}$ is its time derivative. The hidden state represents the memory that the system has of its past. The function in Eq. (1) is parameterized by the hidden-to-hidden weight matrices $A \in \mathbb { R } ^ { N \times N }$ and $W \in \mathbb { R } ^ { N \times N }$ , the input-to-hidden encoder matrix $U \in \mathbb { R } ^ { N \times p }$ , and an offset $b$ . The function in Eq. (1b) is parameterized by the hidden-to-output decoder matrix $D \in \mathbb { R } ^ { d \times N }$ . Nonlinearity is introduced via the 1-Lipschitz tanh activation function. While RNNs that are governed by differential equations with an additive structure have been studied before (Zhang et al., 2014), the specific formulation that we propose in (1) and our theoretical analysis are distinct.
|
| 39 |
+
|
| 40 |
+
Treating RNNs as dynamical systems enables studying the long-term behavior of the hidden state with tools from stability analysis. From this point of view, an unstable unit presents an exploding gradient problem, while a stable unit has well-behaved gradients over time (Miller & Hardt, 2019). However, a stable recurrent unit can suffer from vanishing gradients, leading to catastrophic forgetting (Hochreiter & Schmidhuber, 1997b). Thus, we opt for a stable model whose dynamics do not (or only slowly do) decay over time. Importantly, stability is also a statement about the robustness of neural units with respect to input perturbations, i.e., stable models are less sensitive to small perturbations compared to unstable models. Recently, Chang et al. (2019) explored the stability of linearized RNNs and provided a local stability guarantee based on the Jacobian. In contrast, the particular structure of our unit (1) allows us to obtain guarantees of global exponential stability using control theoretical arguments. In turn, the sufficient conditions for global stability motivate a novel symmetric-skew decomposition based scheme for constructing hidden-to-hidden matrices. This scheme alleviates exploding and vanishing gradients, while remaining highly expressive.
|
| 41 |
+
|
| 42 |
+
In summary, the main contributions of this work are as follows:
|
| 43 |
+
|
| 44 |
+
• First, in Section 3, using control theoretical arguments in a direct Lyapunov approach, we provide sufficient conditions for global exponential stability of the Lipschitz RNN unit (Theorem 1). Global stability is advantageous over local stability results since it guarantees non-exploding gradients regardless of the state. In the special case where $A$ is symmetric, we find that these conditions agree with those in classical theoretical analyses (Lemma 1). • Next, in Section 4, drawing from our stability analysis, we propose a novel scheme based on the symmetric-skew decomposition for constructing hidden-to-hidden matrices. This scheme mitigates the vanishing and exploding gradients problem, while obtaining highly expressive hidden-to-hidden matrices. • In Section 6, we show that our Lipschitz RNN has the ability to outperform state-of-theart recurrent units on computer vision, language modeling and speech prediction tasks. Further, our results show that the higher-order explicit midpoint time integrator improves the predictive accuracy as compared to using the simpler one-step forward Euler scheme. Finally, in Section 7), we study our Lipschitz RNN via the lens of the Hessian and show that it is robust with respect to parameter perturbations; we also show that our model is more robust with respect to input perturbations, compared to other continuous-time RNNs.
|
| 45 |
+
|
| 46 |
+
# 2 RELATED WORK
|
| 47 |
+
|
| 48 |
+
The problem of vanishing and exploding gradients (and stability) have a storied history in the study of RNNs. Below, we summarize two particular approaches to the problem (constructing unitary/orthogonal RNNs and the dynamical systems viewpoint) that have gained significant attention.
|
| 49 |
+
|
| 50 |
+
Unitary and orthogonal RNNs. Unitary recurrent units have received attention recently, largely due to Arjovsky et al. (2016) showing that unitary hidden-to-hidden matrices alleviate the vanishing and exploding gradients problem. Several other unitary and orthogonal models have also been proposed (Wisdom et al., 2016; Mhammedi et al., 2017; Jing et al., 2017; Vorontsov et al., 2017; Jose et al., 2018). While these approaches stabilize the training process of RNNs considerably, they also limit their expressivity and their prediction accuracy. Further, unitary RNNs are expensive to train, as they typically involve the computation of a matrix inverse at each step of training. Recent work by Lezcano-Casado & Martinez-Rubio (2019) overcame some of these limitations. By leveraging concepts from Riemannian geometry and Lie group theory, their recurrent unit exhibits improved expressivity and predictive accuracy on a range of benchmark tasks while also being efficient to train. Another competitive recurrent design was recently proposed by Kerg et al. (2019). Their approach is based on the Schur decomposition, and it enables the construction of general nonnormal hidden-to-hidden matrices with unit-norm eigenvalues.
|
| 51 |
+
|
| 52 |
+
Dynamical systems inspired RNNs. The continuous time view of RNNs has a long history in the neurodynamics community as it provides higher flexibility and increased interpretability (Pineda, 1988; Pearlmutter, 1995; Zhang et al., 2014). In particular, RNNs that are governed by differential equations with an additive structure have been extensively studied from a theoretical point of view (Funahashi & Nakamura, 1993; Kim et al., 1996; Chow & Li, 2000; Hu & Wang, 2002; Li et al., 2005; Trischler & D’Eleuterio, 2016). See Zhang et al. (2014) for a comprehensive survey of continuous-time RNNs and their stability properties.
|
| 53 |
+
|
| 54 |
+
Recently, several works have adopted the dynamical systems perspective to alleviate the challenges of training RNNs which are related to the vanishing and exploding gradients problem. For nonsequential data, Ciccone et al. (2018) proposed a negative-definite parameterization for enforcing stability in the RNN during training. Chang et al. (2019) introduced an antisymmetric hidden-tohidden weight matrix and provided guarantees for local stability. Kag et al. (2020) have proposed a differential equation based formulation for resolving the exploding/vanishing gradients problem by updating the hidden states based on the difference between predicted and previous states. Niu et al. (2019) employed numerical methods for differential equations to study the stability of RNNs.
|
| 55 |
+
|
| 56 |
+
Another line of recent work has focused on continuous-time models that deal with irregular sampled time-series, missing values and multidimensional time series. Rubanova et al. (2019) and De Brouwer et al. (2019) formulated novel recurrent models based on the theory of differential equations and their discrete integration. Lechner & Hasani (2020) extended these ordinary differential equation (ODE) based models and addresses the issue of vanishing and exploding gradients by designing an ODE-model that is based on the idea of long short-term memory (LSTM). This ODE-LSTM outperforms the continuous-time LSTM (Mei & Eisner, 2017) as well as the GRU-D model (Che et al., 2018) that is based on a gated recurrent unit (GRU).
|
| 57 |
+
|
| 58 |
+
The link between dynamical systems and models for forecasting sequential data also provides the opportunity to incorporate physical knowledge into the learning process which improves the generalization performance, robustness, and ability to learn with limited data (Chen et al., 2019).
|
| 59 |
+
|
| 60 |
+
# 3 STABILITY ANALYSIS OF LIPSCHITZ RECURRENT UNITS
|
| 61 |
+
|
| 62 |
+
One of the key contributions in this work is that we prove that model (1) is globally exponentially stable under some mild conditions on $A$ and $W$ . Namely, for any initial hidden state we can guarantee that our Lipschitz unit converges to an equilibrium if it exists, and therefore, gradients can never explode. We improve upon recent work on stability in recurrent models, which provide only a local analysis, see e.g., (Chang et al., 2019). In fact, global exponential stability is among the strongest notions of stability in nonlinear systems theory, implying all other forms of Lyapunov stability about the equilibrium $h ^ { * }$ (Khalil, 2002, Definitions 4.4 and 4.5).
|
| 63 |
+
|
| 64 |
+
Definition 1. A point $h ^ { * }$ is an equilibrium point of $\dot { h } = f ( h , t )$ if $f ( h ^ { * } , t ) = 0$ for all $t$ . Such a point is globally exponentially stable if there exists some $C > 0$ and $\lambda > 0$ such that for any choice of initial values $h ( 0 ) \in \mathbb { R } ^ { N }$ ,
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\| h ( t ) - h ^ { * } \| \leq C e ^ { - \lambda t } \| h ( 0 ) - h ^ { * } \| , \quad f o r a n y t \geq 0 .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
The presence of a Lipschitz nonlinearity in (1) plays an important role in our analysis. While we focus on tanh in our experiments, our proof is more general and is applicable to models whose nonlinearity $\sigma ( \cdot )$ is an $M$ -Lipschitz function. Specifically, we consider the general model
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\dot { h } = A h + \sigma ( W h + U x + b ) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
for which we have the following stability result. In the following, we let $\sigma _ { \mathrm { m i n } }$ and $\sigma _ { \mathrm { m a x } }$ denote the smallest and largest singular values of the hidden-to-hidden matrices, respectively.
|
| 77 |
+
|
| 78 |
+
Theorem 1. Let $h ^ { * }$ be an equilibrium point of a differential equation of the form (4) for some $x \in \mathbb { R } ^ { p }$ . The point $h ^ { * }$ is globally exponentially stable if the eigenvalues of $A ^ { \mathrm { s y m } } : = \textstyle { \frac { 1 } { 2 } } ( { \dot { A } } + A ^ { T } )$ are strictly negative, $W$ is non-singular, and either (a) $\sigma _ { \mathrm { m i n } } ( A ^ { \mathrm { s y m } } ) > M \sigma _ { \mathrm { m a x } } ( W )$ ; or (b) $\sigma$ is monotone non-decreasing, $W + W ^ { \ ' T }$ is negative definite, and $\Dot { A } ^ { T } W + W ^ { T } A$ is positive definite.
|
| 79 |
+
|
| 80 |
+
The two cases show that global exponential stability is guaranteed if either (a) the matrix $A$ has eigenvalues with real parts sufficiently negative to counteract expanding trajectories in the nonlinearity; or (b) the nonlinearity is monotone, both $A$ and $W$ yield stable linear systems ${ \dot { u } } = A u$ , $\dot { v } = W v$ , and $A , W$ have sufficiently similar eigenvectors. In practice, case (b) occasionally holds, but is challenging to ensure without assuming specific structure on $A$ , W . Because such assumptions could limit the expressiveness of the model, the next section will develop a tunable formulation for $A$ and $W$ with the capacity to ensure that case (a) holds.
|
| 81 |
+
|
| 82 |
+
In Appendix A.1, we provide a proof of Theorem 1 using a direct Lyapunov approach. One advantage of this approach is that the driving input $x$ is permitted to evolve in time arbitrarily in the analysis. The proof relies on the classical Kalman-Yakubovich-Popov lemma and circle criterion from control theory — to our knowledge, these tools have not been applied in the modern RNN literature, and we hope our proof can illustrate their value to the community.
|
| 83 |
+
|
| 84 |
+
In the special case where $A$ is symmetric and $x ( t )$ constant, we show that we can also inherit criteria for both local and global stability from a class of well-studied Cohen–Grossberg–Hopfield models.
|
| 85 |
+
|
| 86 |
+
Lemma 1. Suppose that $A$ is symmetric and $W$ is nonsingular. There exists a diagonal matrix $D \in \mathbb { R } ^ { N \times N }$ , and nonsingular matrices $L , V \in \mathbb { R } ^ { N \times N }$ such that an equilibrium of (4) is (globally exponentially) stable if and only if there is a corresponding (globally exponentially) stable equilibrium for the system
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\dot { z } = D z + L \sigma ( V z + U x + b ) .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
For a thorough review of analyses of (5), see (Zhang et al., 2014). In this special case, the criteria in Theorem 1 coincide with those obtained for the corresponding model (5). However, in practice, we will not choose $A$ to be symmetric.
|
| 93 |
+
|
| 94 |
+
# 4 SYMMETRIC-SKEW HIDDEN-TO-HIDDEN MATRICES
|
| 95 |
+
|
| 96 |
+
In this section we propose a novel scheme for constructing hidden-to-hidden matrices. Specifically, based on the successful application of skew-symmetric hidden-to-hidden weights in several recent recurrent architectures, and our stability criteria in Theorem 1, we propose an effective symmetricskew decomposition for hidden matrices. Our decomposition allows for a simple control of the matrix spectrum while retaining its wide expressive range, enabling us to satisfy the spectral constraints derived in the previous section on both $A$ and $W$ . The proposed scheme also accounts for the issue of vanishing gradients by reducing the magnitude of large negative eigenvalues.
|
| 97 |
+
|
| 98 |
+
Recently, several methods used skew-symmetric matrices, i.e., $S + S ^ { T } = 0$ to parameterize the recurrent weights $W \in \mathbb { R } ^ { N \times N }$ , see e.g., (Wisdom et al., 2016; Chang et al., 2019). From a stability analysis viewpoint, there are two main advantages for using skew-symmetric weights: these matrices generate the orthogonal group whose elements are isometric maps and thus preserve norms (Lezcano-Casado & Martinez-Rubio, 2019); and the spectrum of skew-symmetric matrices is purely imaginary which simplifies stability analysis (Chang et al., 2019). The main shortcoming of this parametrization is its reduced expressivity, as these matrices have fewer than half of the parameters of a full matrix (Kerg et al., 2019). The latter limiting aspect can be explained from a dynamical systems perspective: skew-symmetric matrices can only describe oscillatory behavior, whereas a matrix whose eigenvalues have nonzero real parts can also encode viable growth and decay information.
|
| 99 |
+
|
| 100 |
+
To address the expressivity issue, we aim for hidden matrices which on the one hand, allow to control the expansion and shrinkage of their associated trajectories, and on the other hand, will be sampled from a superset of the skew-symmetric matrices. Our analysis in Theorem 1 guarantees that Lipschitz recurrent units maintain non-expanding trajectories under mild conditions on $A$ and $W$ . Unfortunately, this proposition does not provide any information with respect to the shrinkage of paths. Here, we opt for a system whose expansion and shrinkage can be easily controlled. Formally, the latter requirement is equivalent to designing hidden weights $S$ with small $\mathcal { R } \lambda _ { i } ( S ) , i = 1 , 2 , \ldots , N .$ , where $\bar { \mathcal { R } } ( z )$ denotes the real part of $z$ . A system of the form (4) whose matrices $A$ and $W$ exhibit small spectra and satisfy the conditions of Theorem 1, will exhibit dynamics with moderate decay and growth behavior and alleviate the problem of exploding and vanishing gradients. To this end, we propose the following symmetric-skew decomposition for constructing hidden matrices:
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 1: Vector fields of hidden states that are governed by Eq. (1) trained for simple pendulum dynamics. In (a), an unstable model is shown. In (b) and (c), it can be seen that we yield models that are asymptotically stable,i.e., all trajectories are attracted by an equilibrium point. In contrast, in (d), a skew-symmetric parameterization leads to a stable model without an attracting equilibrium.
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
S _ { \beta , \gamma } : = ( 1 - \beta ) \cdot ( M + M ^ { T } ) + \beta \cdot ( M - M ^ { T } ) - \gamma I ,
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where $M$ is a weight matrix, and $\beta \in [ 0 . 5 , 1 ]$ , $\gamma > 0$ are tuning parameters. In the case $( \beta , \gamma ) =$ $( 1 , 0 )$ , we recover a skew-symmetric matrix, i.e., $S _ { 1 , 0 } + S _ { 1 , 0 } ^ { T } = 0$ . The construction $S _ { \beta , \gamma }$ is useful as we can easily bound its spectrum via the parameters $\beta$ and $\gamma$ , as we show in the next proposition.
|
| 110 |
+
|
| 111 |
+
eigenvalues of Proposition 1. Let $S _ { \beta , \gamma }$ , as well as the eigenvalues of satisfy $( 6 )$ , and let $M ^ { \mathrm { s y m } } = \textstyle \frac { 1 } { 2 } ( M + M ^ { T } )$ $S _ { \beta , \gamma } ^ { \mathrm { s y m } } = S _ { \beta , \gamma } + S _ { \beta , \gamma } ^ { T } ,$ . The real parts , lie in the interval $\Re \lambda _ { i } ( S _ { \beta , \gamma } )$ of the
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
[ ( 1 - \beta ) \lambda _ { \mathrm { m i n } } ( M ^ { \mathrm { s y m } } ) - \gamma , ( 1 - \beta ) \lambda _ { \mathrm { m a x } } ( M ^ { \mathrm { s y m } } ) - \gamma ] .
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
A proof is provided in Appendix A.2. We infer that $\beta$ controls the width of the spectrum, while increasing $\gamma$ shifts the spectrum to the left along the real axis, thus enforcing eigenvalues with nonpositive real parts. Choosing our hidden-to-hidden matrices to be $A _ { \beta _ { A } , \gamma _ { A } }$ and $W _ { \beta _ { W } , \gamma _ { W } }$ of the form (6) for different values of $\beta _ { A } , \beta _ { W }$ and $\gamma _ { A } , \gamma _ { W }$ , we can ensure small spectra and satisfy the conditions of Theorem 1 as desired. Note, that different tuning parameters $\beta$ and $\gamma$ affect the stability behavior of the Lipschitz recurrent unit. This is illustrated in Figure 1, where different values for $\beta$ and $\gamma$ are used to construct both $A _ { \beta , \gamma }$ and $W _ { \beta , \gamma }$ and applied to learning simple pendulum dynamics.
|
| 118 |
+
|
| 119 |
+
One cannot guarantee that model parameters will remain in the stability region during training. However, we can show that when $\beta$ is taken to be close to one, the eigenvalues of $A _ { \beta , \gamma } ^ { \mathrm { s y m } }$ mγ and W symβ,γ (which dictate the stability of the RNN) change slowly during training. Let $\Delta _ { \delta } F$ denote the change in a function $F$ depending on the parameters of the RNN (1) after one step of gradient descent with step size $\delta$ with respect to some loss $L ( y )$ . For a matrix $A$ , we let $\lambda _ { k } ( A )$ denote the $k$ -th singular value of $A$ . We have the following lemma.
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mathbf { L e m m a } 2 . \ A s \ \beta \to 1 ^ { - } , \operatorname* { m a x } _ { k } \left| \Delta _ { \delta } \lambda _ { k } ( A _ { \beta , \gamma } ^ { \mathrm { s y m } } ) \right| + \operatorname* { m a x } _ { k } \left| \Delta _ { \delta } \lambda _ { k } ( W _ { \beta , \gamma } ^ { \mathrm { s y m } } ) \right| = \mathcal { O } ( \delta ( 1 - \beta ) ^ { 2 } ) .
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
Therefore, provided both the initial and optimal parameters lie within the stability region, the model parameters will remain in the stability region for longer periods of time with high probability as $\beta 1$ . Further empirical evidence of parameters often remaining in the stability region during training are provided alongside the proof of Lemma 2 in the Appendix (see Figure 5).
|
| 126 |
+
|
| 127 |
+
# 5 TRAINING CONTINUOUS-TIME LIPSCHITZ RECURRENT UNITS
|
| 128 |
+
|
| 129 |
+
ODEs such as Eq. (1) can be approximately solved by employing numerical integrators. In scientific computing, numerical integration is a well studied field that provides well understood techniques (LeVeque, 2007). Recent literature has also introduced new approaches which are designed with neural network frameworks in mind (Chen et al., 2018).
|
| 130 |
+
|
| 131 |
+
To learn the weights $A , W , U$ and $b$ , we discretize the continuous model using one step of a numerical integrator between sequence entries. In what follows, a subscript $t$ denotes discrete time indices, $\Delta t$ represents the time difference between a pair of consecutive data points. Letting $f ( h , t ) =$ $A h + \operatorname { t a n h } ( W h + U x ( s ) + b )$ so that $\dot { h } ( t ) = f ( h , t )$ , the exact and approximate solutions for $h _ { t + 1 }$ given $h _ { t }$ are given by
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\begin{array} { r l r } { { h _ { t + 1 } = h _ { t } + \int _ { t } ^ { t + \Delta t } f ( h ( s ) , s ) \mathrm { d } s : = h _ { t } + \int _ { t } ^ { t + \Delta t } A h ( s ) + \operatorname { t a n h } ( W h ( s ) + U x ( s ) + b ) \mathrm { d } s } } \\ & { } & { \approx h _ { t } + \Delta t \cdot \mathrm { s c h e m e } [ f , h _ { t } , \Delta t ] , } \end{array}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where scheme represents one step of a numerical integration scheme whose application yields an approximate solution for $\begin{array} { r } { \frac { 1 } { \Delta t } \int _ { t } ^ { t + \Delta t } f ( h ( s ) , s ) \mathrm { d } s } \end{array}$ given $h _ { t }$ using one or more evaluations of $f$ .
|
| 138 |
+
|
| 139 |
+
We consider both the explicit (forward) Euler scheme,
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
h _ { t + 1 } = h _ { t } + \Delta t \cdot A h _ { t } + \Delta t \cdot \operatorname { t a n h } ( z _ { t } ) ,
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
as well as the midpoint method which is a two-stage explicit Runge-Kutta scheme (RK2),
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
h _ { t + 1 } = h _ { t } + \Delta t \cdot A { \tilde { h } } + \Delta t \cdot \operatorname { t a n h } ( W { \tilde { h } } + U x _ { t } + b ) ,
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
where $\tilde { h } = h _ { t } + \Delta t / 2 \cdot A h _ { t } + \Delta t / 2 \cdot \operatorname { t a n h } ( z _ { t } )$ is an intermediate hidden state. The RK2 scheme can potentially improve the performance since the scheme is more accurate, however, this scheme also requires twice as many function evaluations as compared to the forward Euler scheme. Given a $\beta$ and $\gamma$ that yields a globally exponentially stable continuous model, $\Delta t$ can always be chosen so that the model remains in the stability region of forward Euler and RK2 (LeVeque, 2007).
|
| 152 |
+
|
| 153 |
+
# 6 EMPIRICAL EVALUATION
|
| 154 |
+
|
| 155 |
+
In this section, we evaluate the performance of the Lipschitz RNN and compare it to other state-ofthe-art methods. The model is applied to ordered and permuted pixel-by-pixel MNIST classification, as well as to audio data using the TIMIT dataset. We show the sensitivity with respect to to random initialization in Appendix B. Appendix B also contains additional results for: pixel-by-pixel CIFAR10 and a noise-padded version of CIFAR-10; as well as for character level and word level prediction using the Penn Tree Bank (PTB) dataset. All of these tasks require that the recurrent unit learns long-term dependencies: that is, the hidden-to-hidden matrices need to have sufficient memory to remember information from far in the past.
|
| 156 |
+
|
| 157 |
+
# 6.1 ORDERED AND PERMUTED PIXEL-BY-PIXEL MNIST
|
| 158 |
+
|
| 159 |
+
The pixel-by-pixel MNIST task tests long range dependency by sequentially presenting 784 pixels to the recurrent unit, i.e., the RNN processes one pixel at a time (Le et al., 2015). At the end of the sequence, the learned hidden state is used to predict the class membership probability of the input image. This task requires that the RNN has a sufficient long-term memory in order to discriminate between different classes. A more challenging variation to this task is to operate on a fixed random permutation of the input sequence.
|
| 160 |
+
|
| 161 |
+
Table 1: Evaluation accuracy on ordered and permuted pixel-by-pixel MNIST.
|
| 162 |
+
|
| 163 |
+
<table><tr><td>Name</td><td>ordered</td><td> permuted</td><td>N</td><td># params</td></tr><tr><td>LSTM baseline by (Arjovsky et al., 2016)</td><td>97.3%</td><td>92.7%</td><td>128</td><td>~68K</td></tr><tr><td>MomentumLSTM (Nguyen et al.,2020)</td><td>99.1%</td><td>94.7%</td><td>256</td><td>~270K</td></tr><tr><td>Unitary RNN (Arjovsky et al., 2016)</td><td>95.1%</td><td>91.4%</td><td>512</td><td>~9K</td></tr><tr><td>Full Capacity Unitary RNN (Wisdom et al., 2016)</td><td>96.9%</td><td>94.1%</td><td>512</td><td>~270K</td></tr><tr><td>Soft orth. RNN (Vorontsov et al.,2017)</td><td>94.1%</td><td>91.4%</td><td>128</td><td>~18K</td></tr><tr><td>Kronecker RNN(Jose et al.,2018)</td><td>96.4%</td><td>94.5%</td><td>512</td><td>~11K</td></tr><tr><td>Antisymmteric RNN (Chang et al., 2019)</td><td>98.0%</td><td>95.8%</td><td>128</td><td>~10K</td></tr><tr><td>Incremental RNN (Kag et al., 2020)</td><td>98.1%</td><td>95.6%</td><td>128</td><td>~4K/8K</td></tr><tr><td>Exponential RNN (Lezcano-Casado & Martinez-Rubio,2019)</td><td>98.4%</td><td>96.2%</td><td>360</td><td>~69K</td></tr><tr><td>Sequential NAIS-Net (Ciccone et al., 2018)</td><td>94.3%</td><td>90.8%</td><td>128</td><td>~18K</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>99.0%</td><td>94.2%</td><td>64</td><td>~9K</td></tr><tr><td>Lipschitz RNN using RK2 (ours)</td><td>99.1%</td><td>94.2%</td><td>64</td><td>~9K</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>99.4%</td><td>96.3%</td><td>128</td><td>~34K</td></tr><tr><td>Lipschitz RNN using RK2 (ours)</td><td>99.3%</td><td>96.2%</td><td>128</td><td>~34K</td></tr></table>
|
| 164 |
+
|
| 165 |
+
Table 2: Evaluation on TIMIT using 1 layer models. The mean squared error (MSE) is computes the distance between the predicted and actual log-magnitudes of each predicted frame in the sequence.
|
| 166 |
+
|
| 167 |
+
<table><tr><td>Name</td><td>val. MSE</td><td>test MSE</td><td>N</td><td># params</td></tr><tr><td>LSTM (Helfrich et al., 2018)</td><td>13.66</td><td>12.62</td><td>158</td><td>~200K</td></tr><tr><td>LSTM (Nguyen et al., 2020)</td><td>9.33</td><td>9.37</td><td>158</td><td>~200K</td></tr><tr><td>MomentumLSTM (Nguyen et al., 2020)</td><td>5.86</td><td>5.87</td><td>158</td><td>~200K</td></tr><tr><td>SRLSTM (Nguyen et al., 2020)</td><td>5.81</td><td>5.83</td><td>158</td><td>~200K</td></tr><tr><td>Full-capacity Unitary RNN (Wisdom et al., 2016)</td><td>14.41</td><td>14.45</td><td>256</td><td>~200K</td></tr><tr><td>Cayley RNN (Helfrich et al.,2018)</td><td>7.97</td><td>7.36</td><td>425</td><td>~200K</td></tr><tr><td>Exponential RNN (Lezcano-Casado & Martinez-Rubio,2019)</td><td>5.52</td><td>5.48</td><td>425</td><td>~200K</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>2.95</td><td>2.82</td><td>256</td><td>~198K</td></tr><tr><td>Lipschitz RNN using RK2 (ours)</td><td>2.86</td><td>2.76</td><td>256</td><td>~198K</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 1 provides a summary of our results. The Lipschitz RNN, with hidden dimension of $N = 1 2 8$ and trained with the forward Euler and RK2 scheme, achieves $9 9 . 4 \%$ and $9 9 . 3 \%$ accuracy on the ordered pixel-by-pixel MNIST task. For the permuted task, the model trained with forward Euler achieves $9 6 . 3 \%$ accuracy, whereas the model trained with RK2 achieves $9 6 . 2 \%$ accuracy. Hence, our Lipschitz recurrent unit outperforms state-of-the-art RNNs on both tasks and is competitive even when a hidden dimension of $N = 6 4$ is used, however, it can be seen that a larger unit with more capacity is advantageous for the permuted task. Our results show that we significantly outperform the Antisymmetric RNN (Chang et al., 2019) on the ordered tasks, while using fewer weights. That shows that the antisymmetric weight paramterization is limiting the expressivity of the recurrent unit. The exponential RNN is the next most competitive model, yet this model requires a larger hidden-to-hidden unit to perform well on the two considered tasks.
|
| 170 |
+
|
| 171 |
+
# 6.2 TIMIT
|
| 172 |
+
|
| 173 |
+
Next, we consider the TIMIT dataset (Garofolo, 1993) to study the capabilities of the Lipschitz RNN for speech prediction using audio data. For our experiments, we used the publicly available implementation of this task by Lezcano-Casado & Martinez-Rubio (2019). This implementation applies the preprocessing steps suggested by Wisdom et al. (2016): (i) downsample each audio sequence to 8kHz; (ii) process the downsampled sequences with a short-time Fourier transform using a Hann window of 256 samples and a window hop of 128 samples; and (iii) normalize the logmagnitude of the Fourier amplitudes. We obtain a set of frames that each have 129 complex-valued Fourier amplitudes and the task is to predict the log-magnitude of future frames. To compare our results with those of other models, we used the common train / validation / test split: 3690 utterances from 462 speakers for training, 192 utterances for validation, and 400 utterances for testing.
|
| 174 |
+
|
| 175 |
+
Table 2 lists the results for the Lipschitz recurrent unit as well as for several benchmark models. It can be seen that the Lipschitz RNN outperforms other state-of-the-art models for a fixed number of parameters $( \approx 2 0 0 \mathrm { { K } ) }$ ). In particular, LSTMs do not perform well on this task, however, the recently proposed momentum based LSTMs (Nguyen et al., 2020) have improvemed performance. Interestingly, the RK2 scheme leads to a better performance since this scheme provides more accurate approximations for the intermediate states.
|
| 176 |
+
|
| 177 |
+
# 7 ROBUSTNESS WITH RESPECT TO PERTURBATIONS
|
| 178 |
+
|
| 179 |
+
An important consideration beyond accuracy is robustness with respect to input and parameter perturbations. We consider a Hessian-based analysis and noise-response analysis of different continuous-time recurrent units and train the models on MNIST. Here, we reshape each MNIST thumbnail into sequences of length 98 so that each input has dimension $x \in \mathbb { R } ^ { 8 }$ . We consider this simpler problem so that all models obtain roughly the same training loss. Here we use stochastic gradient decent (SGD) with momentum to train the models.
|
| 180 |
+
|
| 181 |
+
Eigenanalysis of the Hessian provides a tool for studying various aspects of neural networks (Hochreiter & Schmidhuber, 1997a; Sagun et al., 2017; Ghorbani et al., 2019). Here, we study the Hessian $H$ spectrum with respect to the model parameters of the recurrent unit using PyHessian (Yao et al., 2019). The Hessian provides us with insights about the curvature of the loss function $\mathcal { L }$ . This is because the Hessian is defined as the derivatives of the gradients, and thus the Hessian eigenvalues describe the change in the gradient of $\mathcal { L }$ as we take an infinitesimal step into a given direction. The eigenvectors span the (local) surface of the loss function at a given point, and the corresponding eigenvalue determines the curvature in the direction of the eigenvectors. This means that larger eigenvalues indicate a larger curvature, i.e., greater sensitivity, and the sign of the eigenvalues determines whether the curvature will be positive or negative.
|
| 182 |
+
|
| 183 |
+
To demonstrate the advantage of the additional linear term and our weight parameterization, we compare the Lipschitz RNN to two other continuous-time recurrent units. First, we consider a simple neural ODE RNN (Rubanova et al., 2019) that takes the form
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
\dot { h } = \operatorname { t a n h } ( W h + U x + b ) , \qquad y = D h ,
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
where $W$ is a simple hidden-to-hidden matrix. As a second model we consider the antisymmetric RNN (Chang et al., 2019), that takes the same form as (11), but uses a skew-symmetric scheme to parameterize the hidden-to-hidden matrix as $W : = ( M - M ^ { T } ) - \gamma I$ , where $M$ is a trainable weight matrix and $\gamma$ is a tunable parameter.
|
| 190 |
+
|
| 191 |
+
Table 3 reports the largest eigenvalue $\lambda _ { \operatorname* { m a x } } ( H )$ and the trace of the Hessian $\operatorname { t r } ( H )$ .The largest eigenvalue being smaller indicates that our Lipschitz RNN found a flatter minimum, as compared to the simple neural ODE and Antisymmetric RNN. It is known that such flat minima can be perturbed without significantly changing the loss value (Hochreiter & Schmidhuber, 1997a). Table 3 also reports the condition number κ(H) := λmax(H)λmin(H) of the Hessian. The condition number $\kappa ( H )$ provides a measure for the spread of the eigenvalues of the Hessian. It is known that first-order methods can slow down in situations where $\kappa$ is large (Bottou & Bousquet, 2008). The condition number and trace of our Lipshitz RNN being smaller also indicates improved robustness properties.
|
| 192 |
+
|
| 193 |
+
Next, we study the sensitivity of the response $y _ { T }$ at time $T$ in terms of the test accuracy with respect to a sequence of perturbed inputs $\{ \tilde { x } _ { 1 } , \dots , \tilde { x } _ { T } \} \in \mathbb { R } ^ { 8 }$ . We consider three different perturbations. The results for the artificially constructed perturbations are presented in Table 3, showing that the Lipschitz RNN is more resilient to adversarial perturbation. Here, we have considered the projected gradient decent (PGD) (Goodfellow et al., 2014) method with $l _ { \infty }$ , and the DeepFool method (Moosavi-Dezfooli et al., 2016) with $l _ { 2 }$ and $l _ { \infty }$ norm ball perturbations. We construct the adversarial examples with full access to the models, using 7 iterations. The step size for PGD is set to 0.01.
|
| 194 |
+
|
| 195 |
+
Table 3: Summary of Hessian-based robustness metrics and resilience to adversarial attacks.
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Model</td><td>PGD</td><td>DF2</td><td>DF</td><td>Xmax(H)</td><td>tr(H)</td><td>K(H)</td></tr><tr><td>Neural ODE RNN</td><td>88.5%</td><td>69.6%</td><td>44.5%</td><td>0.30</td><td>4.7</td><td>37.6</td></tr><tr><td>Antisymmetric RNN</td><td>84.7%</td><td>83.4%</td><td>44.3%</td><td>0.24</td><td>4.8</td><td>35.5</td></tr><tr><td>Lipschitz RNN (ours)</td><td>93.0%</td><td>89.2%</td><td> 54.1%</td><td>0.14</td><td>3.1</td><td>23.2</td></tr></table>
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
Figure 2: Sensitivity with respect to different input perturbations.
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
Figure 3: The ablation study examines the effect of the linear term $A h$ (in (a)) and the importance of the Skew-Symmetric Decomposition for constructing the hidden-to-hidden matrices (in (b)).
|
| 204 |
+
|
| 205 |
+
Further, Figure 2 shows the results for white noise and salt and pepper noise. It can be seen that the Lipschitz unit is less sensitive to input perturbations, as compared to the simple neural ODE RNN, and the antisymmetric RNN. In addition, we also show the results for an unitary RNN here.
|
| 206 |
+
|
| 207 |
+
# 7.1 ABLATION STUDY
|
| 208 |
+
|
| 209 |
+
The performance of the Lipschitz recurrent unit is due to two main innovations: (i) the additional linear term; and (ii) the scheme for constructing the hidden-to-hidden matrices $A$ and $W$ in Eq. (6). Thus, we investigate the effect of both innovations, while keeping all other conditions fixed. More concretely, we consider the following ablation recurrent unit
|
| 210 |
+
|
| 211 |
+
$$
|
| 212 |
+
h _ { t + 1 } = h _ { t } + \alpha \cdot \epsilon \cdot A h _ { t } + \epsilon \cdot \operatorname { t a n h } ( z _ { t } ) , \quad \mathrm { w i t h } \quad z _ { t } = W h _ { t } + U x _ { t } + b ,
|
| 213 |
+
$$
|
| 214 |
+
|
| 215 |
+
where $\alpha$ controls the effect of the linear hidden unit. Both $A$ and $W$ depend on the parameters $\beta , \gamma$
|
| 216 |
+
|
| 217 |
+
Figure 3a studies the effect of the linear hidden unit, with $\beta = 0 . 6 5$ for the ordered task and $\beta = 0 . 8$ for the permuted task. In both cases we use $\gamma = 0 . 0 0 1$ . It can be seen that the test accuracies of both the ordered and permuted pixel-by-pixel MNIST tasks clearly depend on the linear hidden unit. For $\alpha = 0$ , our models reduces to simple neural ODE recurrent units (Eq. (11)). The recurrent unit degenerates for $\alpha > 1 . 6$ , since the external input is superimposed by the hidden state. Figure 3b studies the effect of the hidden-to-hidden matrices with respect to $\beta$ . It can be seen that $\beta \ =$ $\{ 0 . 6 5 , 0 . 7 0 \}$ achieves peak performance for the ordered task, and $\beta = \{ 0 . 8 , 0 . 8 5 \}$ does so for the permuted task. Note that $\beta = 1 . 0$ recovers an skew-symmetric hidden-to-hidden matrix.
|
| 218 |
+
|
| 219 |
+
# 8 CONCLUSION
|
| 220 |
+
|
| 221 |
+
Viewing RNNs as continuous-time dynamical systems with input, we have proposed a new Lipschitz recurrent unit that excels on a range of benchmark tasks. The special structure of the recurrent unit allows us to obtain guarantees of global exponential stability using control theoretical arguments. In turn, the insights from this analysis motivated the symmetric-skew decomposition scheme for constructing hidden-to-hidden matrices, which mitigates the vanishing and exploding gradients problem. Due to the nice stability properties of the Lipschitz recurrent unit, we also obtain a model that is more robust with respect to input and parameter perturbations as compared to other continuoustime units. This behavior is also reflected by the Hessian analysis of the model. We expect that the improved robustness will make Lipschitz RNNs more reliable for sensitive applications. The theoretical results for our symmetric-skew decomposition of parameterizing hidden-to-hidden matrices also directly extend to the convolutional setting. Future work will explore this extension and study the potential advantages of these more parsimonious hidden-to-hidden matrices in combination with our parameterization in practice. Research code is shared via github.com/erichson/LipschitzRNN.
|
| 222 |
+
|
| 223 |
+
# ACKNOWLEDGMENTS
|
| 224 |
+
|
| 225 |
+
We would like to thank Ed H. Chi for fruitful discussions about physics-informed machine learning and the Antisymmetric RNN. We are grateful to the generous support from Amazon AWS and Google Cloud. NBE and MWM would like to acknowledge IARPA (contract W911NF20C0035), NSF, ONR and CLTC for providing partial support of this work. Our conclusions do not necessarily reflect the position or the policy of our sponsors, and no official endorsement should be inferred.
|
| 226 |
+
|
| 227 |
+
# REFERENCES
|
| 228 |
+
|
| 229 |
+
Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In International Conference on Machine Learning, pp. 1120–1128, 2016.
|
| 230 |
+
|
| 231 |
+
Yoshua Bengio, Patrice Simard, and Paolo Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2):157–166, 1994.
|
| 232 |
+
|
| 233 |
+
Rajendra Bhatia. Matrix analysis, volume 169. Springer Science & Business Media, 2013.
|
| 234 |
+
|
| 235 |
+
Leon Bottou and Olivier Bousquet. The tradeoffs of large scale learning. In ´ Advances in Neural Information Processing Systems, pp. 161–168, 2008.
|
| 236 |
+
|
| 237 |
+
Bo Chang, Minmin Chen, Eldad Haber, and Ed Chi. AntisymmetricRNN: A dynamical system view on recurrent neural networks. In International Conference on Learning Representations, 2019.
|
| 238 |
+
|
| 239 |
+
Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu. Recurrent neural networks for multivariate time series with missing values. Scientific reports, 8(1):1–12, 2018.
|
| 240 |
+
|
| 241 |
+
Tian Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems, pp. 6571–6583, 2018.
|
| 242 |
+
|
| 243 |
+
Zhengdao Chen, Jianyu Zhang, Martin Arjovsky, and Leon Bottou. Symplectic recurrent neural ´ networks. In International Conference on Learning Representations, 2019.
|
| 244 |
+
|
| 245 |
+
Tommy W. S. Chow and Xiao-Dong Li. Modeling of continuous time dynamical systems with input by recurrent neural networks. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, 47(4):575–578, 2000.
|
| 246 |
+
|
| 247 |
+
Marco Ciccone, Marco Gallieri, Jonathan Masci, Christian Osendorfer, and Faustino Gomez. Nais-net: Stable deep networks from non-autonomous differential equations. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 31, pp. 3025–3035. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper/2018/file/ 7bd28f15a49d5e5848d6ec70e584e625-Paper.pdf.
|
| 248 |
+
|
| 249 |
+
Edward De Brouwer, Jaak Simm, Adam Arany, and Yves Moreau. GRU-ODE-Bayes: Continuous modeling of sporadically-observed time series. In Advances in Neural Information Processing Systems, pp. 7379–7390. 2019.
|
| 250 |
+
|
| 251 |
+
Ken-ichi Funahashi and Yuichi Nakamura. Approximation of dynamical systems by continuous time recurrent neural networks. Neural Networks, 6(6):801–806, 1993.
|
| 252 |
+
|
| 253 |
+
John S. Garofolo. TIMIT acoustic phonetic continuous speech corpus. Linguistic Data Consortium, 1993.
|
| 254 |
+
|
| 255 |
+
Behrooz Ghorbani, Shankar Krishnan, and Ying Xiao. An investigation into neural net optimization via Hessian eigenvalue density. In International Conference on Machine Learning, pp. 2232– 2241, 2019.
|
| 256 |
+
|
| 257 |
+
Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
|
| 258 |
+
|
| 259 |
+
Wolfgang Hahn. Stability of motion, volume 138. Springer, 1967.
|
| 260 |
+
|
| 261 |
+
Kyle Helfrich, Devin Willmott, and Qiang Ye. Orthogonal recurrent neural networks with scaled Cayley transform. In International Conference on Machine Learning, pp. 1969–1978, 2018.
|
| 262 |
+
|
| 263 |
+
Mikael Henaff, Arthur Szlam, and Yann LeCun. Recurrent orthogonal networks and long-memory tasks. volume 48 of Proceedings of Machine Learning Research, pp. 2034–2042, New York, New York, USA, 20–22 Jun 2016. PMLR. URL http://proceedings.mlr.press/v48/ henaff16.html.
|
| 264 |
+
|
| 265 |
+
Geoffrey E. Hinton. Learning distributed representations of concepts. In Conference of the Cognitive Science Society, volume 1, pp. 12, 1986.
|
| 266 |
+
|
| 267 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997a.
|
| 268 |
+
|
| 269 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997b.
|
| 270 |
+
|
| 271 |
+
Roger A. Horn and Charles R. Johnson. Matrix analysis. Cambridge University Press, 2012.
|
| 272 |
+
|
| 273 |
+
Sanqing Hu and Jun Wang. Global stability of a class of continuous-time recurrent neural networks. IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, 49 (9):1334–1347, 2002.
|
| 274 |
+
|
| 275 |
+
Li Jing, Yichen Shen, Tena Dubcek, John Peurifoy, Scott Skirlo, Yann LeCun, Max Tegmark, and Marin Soljaciˇ c. Tunable efficient unitary neural networks (EUNN) and their application to RNNs. ´ In International Conference on Machine Learning, pp. 1733–1741, 2017.
|
| 276 |
+
|
| 277 |
+
Cijo Jose, Moustapha Cisse, and Francois Fleuret. Kronecker recurrent units. In International Conference on Machine Learning, pp. 2380–2389, 2018.
|
| 278 |
+
|
| 279 |
+
Anil Kag, Ziming Zhang, and Venkatesh Saligrama. RNNs incrementally evolving on an equilibrium manifold: A panacea for vanishing and exploding gradients? In International Conference on Learning Representations, 2020.
|
| 280 |
+
|
| 281 |
+
Giancarlo Kerg, Kyle Goyette, Maximilian Puelma Touzel, Gauthier Gidel, Eugene Vorontsov, Yoshua Bengio, and Guillaume Lajoie. Non-normal recurrent neural network (nnRNN): Learning long time dependencies while improving expressivity with transient dynamics. In Advances in Neural Information Processing Systems, pp. 13591–13601, 2019.
|
| 282 |
+
|
| 283 |
+
Hassan K. Khalil. Nonlinear Systems. Pearson Education. Prentice Hall, 2002.
|
| 284 |
+
|
| 285 |
+
Young H. Kim, Frank L. Lewis, and Chaouki T. Abdallah. Nonlinear observer design using dynamic recurrent neural networks. In Proceedings of 35th IEEE Conference on Decision and Control, volume 1, pp. 949–954. IEEE, 1996.
|
| 286 |
+
|
| 287 |
+
Aditya Kusupati, Manish Singh, Kush Bhatia, Ashish Kumar, Prateek Jain, and Manik Varma. Fastgrnn: A fast, accurate, stable and tiny kilobyte sized gated recurrent neural network. In Advances in Neural Information Processing Systems, pp. 9017–9028, 2018.
|
| 288 |
+
|
| 289 |
+
Quoc V. Le, Navdeep Jaitly, and Geoffrey E. Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015.
|
| 290 |
+
|
| 291 |
+
Mathias Lechner and Ramin Hasani. Learning long-term dependencies in irregularly-sampled time series. arXiv preprint arXiv:2006.04418, 2020.
|
| 292 |
+
|
| 293 |
+
Randall J. LeVeque. Finite Difference Methods for Ordinary and Partial Differential Equations. Society for Industrial and Applied Mathematics, 2007. doi: 10.1137/1.9780898717839.
|
| 294 |
+
|
| 295 |
+
Mario Lezcano-Casado and David Martinez-Rubio. Cheap orthogonal constraints in neural networks: A simple parametrization of the orthogonal and unitary group. In International Conference on Machine Learning, pp. 3794–3803, 2019.
|
| 296 |
+
|
| 297 |
+
Xiao-Dong Li, John K. L. Ho, and Tommy W. S. Chow. Approximation of dynamical time-variant systems by continuous-time recurrent neural networks. IEEE Transactions on Circuits and Systems II: Express Briefs, 52(10):656–660, 2005.
|
| 298 |
+
|
| 299 |
+
Mitchell Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. Building a large annotated corpus of English: the Penn Treebank. 1993.
|
| 300 |
+
|
| 301 |
+
Hongyuan Mei and Jason M Eisner. The neural hawkes process: A neurally self-modulating multivariate point process. In Advances in Neural Information Processing Systems, pp. 6754–6764, 2017.
|
| 302 |
+
|
| 303 |
+
Zakaria Mhammedi, Andrew Hellicar, Ashfaqur Rahman, and James Bailey. Efficient orthogonal parametrisation of recurrent neural networks using Householder reflections. In International Conference on Machine Learning, pp. 2401–2409, 2017.
|
| 304 |
+
|
| 305 |
+
John Miller and Moritz Hardt. Stable recurrent models. In International Conference on Learning Representations, 2019.
|
| 306 |
+
|
| 307 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. In Conference on Computer Vision and Pattern Recognition, pp. 2574–2582, 2016.
|
| 308 |
+
|
| 309 |
+
Tan M. Nguyen, Richard G. Baraniuk, Andrea L. Bertozzi, Stanley J. Osher, and Bao Wang. Momentumrnn: Integrating momentum into recurrent neural networks. arXiv preprint arXiv:2006.06919, 2020.
|
| 310 |
+
|
| 311 |
+
Murphy Yuezhen Niu, Lior Horesh, and Isaac Chuang. Recurrent neural networks in the eye of differential equations. arXiv preprint arXiv:1904.12933, 2019.
|
| 312 |
+
|
| 313 |
+
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.
|
| 314 |
+
|
| 315 |
+
Barak A. Pearlmutter. Gradient calculations for dynamic recurrent neural networks: A survey. IEEE Transactions on Neural networks, 6(5):1212–1228, 1995.
|
| 316 |
+
|
| 317 |
+
Fernando J. Pineda. Dynamics and architecture for neural computation. Journal of Complexity, 4 (3):216–245, 1988.
|
| 318 |
+
|
| 319 |
+
Yulia Rubanova, Tian Chen, and David Duvenaud. Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems, pp. 5321–5331, 2019.
|
| 320 |
+
|
| 321 |
+
Levent Sagun, Utku Evci, V. Ugur Guney, Yann Dauphin, and Leon Bottou. Empirical analysis of the Hessian of over-parametrized neural networks. arXiv preprint arXiv:1706.04454, 2017.
|
| 322 |
+
|
| 323 |
+
Shankar Sastry. Nonlinear systems: Analysis, stability, and control, volume 10. Springer Science, 2013.
|
| 324 |
+
|
| 325 |
+
Adam P. Trischler and Gabriele M. T. D’Eleuterio. Synthesis of recurrent neural networks for dynamical system simulation. Neural Networks, 80:67–78, 2016.
|
| 326 |
+
|
| 327 |
+
Eugene Vorontsov, Chiheb Trabelsi, Samuel Kadoury, and Chris Pal. On orthogonality and learning recurrent networks with long term dependencies. In International Conference on Machine Learning, pp. 3570–3578, 2017.
|
| 328 |
+
|
| 329 |
+
Scott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 4880–4888, 2016.
|
| 330 |
+
|
| 331 |
+
Zhewei Yao, Amir Gholami, Kurt Keutzer, and Michael W. Mahoney. PyHessian: Neural networks through the lens of the Hessian. arXiv preprint arXiv:1912.07145, 2019.
|
| 332 |
+
|
| 333 |
+
Huaguang Zhang, Zhanshan Wang, and Derong Liu. A comprehensive review of stability analysis of continuous-time recurrent neural networks. IEEE Transactions on Neural Networks and Learning Systems, 25(7):1229–1262, 2014.
|
| 334 |
+
|
| 335 |
+
# A PROOFS
|
| 336 |
+
|
| 337 |
+
# A.1 PROOFS OF THEOREM 1 AND LEMMA 1
|
| 338 |
+
|
| 339 |
+
There are numerous ways that one can analyze the global stability of (4) through the related model (5), many of which are discussed in Zhang et al. (2014). Instead, here we shall conduct a direct approach and avoid appealing to diagonalization in order to obtain cleaner conditions, and a more straightforward proof that readily applies in the time-inhomogeneous setting.
|
| 340 |
+
|
| 341 |
+
Our method of choice relies on Lyapunov arguments summarized in the following theorem, which can be found as (Khalil, 2002, Theorem 4.10). For more details on related Lyapunov theory, see also Hahn (1967); Sastry (2013).
|
| 342 |
+
|
| 343 |
+
Theorem 2. An equilibrium $h ^ { * }$ for $\dot { h } = f ( t , h )$ is globally exponentially stable if there exists $a$ continuously differentiable function $V : [ 0 , \infty ) \times \mathbb { R } ^ { N } \stackrel { } { \to } [ 0 , \infty )$ such that for all $h \in \mathbb { R } ^ { N }$ and $t \geq 0$ ,
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
k _ { 1 } \| h - h ^ { * } \| ^ { \alpha } \leq V ( t , h ) \leq k _ { 2 } \| h - h ^ { * } \| ^ { \alpha } , \quad a n d \quad \frac { \partial V } { \partial t } + \frac { \partial V } { \partial h } \leq - k _ { 3 } \| h - h ^ { * } \| ^ { \alpha } ,
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
for some constants $k _ { 1 } , k _ { 2 } , k _ { 3 } , \alpha > 0 .$ . and $\dot { V } ( h ) < 0$ for $h \neq h ^ { * }$ .
|
| 350 |
+
|
| 351 |
+
To simplify matters, we shall choose a Lyapunov function $V : \mathbb { R } ^ { N } \to [ 0 , \infty )$ that is independent of time. The most common type of Lyapunov function satisfying the conditions of Theorem 2 is of the form $V ( h ) = ( h - h ^ { * } ) ^ { T } \dot { P } ( h - \dot { h ^ { * } } )$ , where $P$ is a positive definite matrix. One need only show that $\dot { V } ( h ) \leq - ( h - h ^ { * } ) ^ { T } Q ( h - h ^ { * } )$ for some other positive definite matrix $Q$ to guarantee global exponential stability.
|
| 352 |
+
|
| 353 |
+
The construction of the Lyapunov function $V$ that satisfies the conditions of Theorem 2 is accomplished using the Kalman-Yakubovich-Popov lemma, which is a statement regarding strictly positive real transfer functions. We use the following definition, equivalent to other standard definitions by (Khalil, 2002, Lemma 6.1).
|
| 354 |
+
|
| 355 |
+
Definition 2. A function $G : \mathbb { C } \to \mathbb { C } ^ { N \times N }$ is strictly positive real if it satisfies the following:
|
| 356 |
+
|
| 357 |
+
(i) The poles of $G ( s )$ have negative real parts.
|
| 358 |
+
(ii) $G ( i \omega ) + G ( - i \omega ) ^ { T }$ is positive definite for all $\omega \in \mathbb { R }$ , where $i = \sqrt { - 1 }$ .
|
| 359 |
+
(iii) Either $G ( \infty ) \ + \ G ( \infty ) ^ { T }$ is positive definite or it is positive semidefinite and $\begin{array} { r } { \operatorname* { l i m } _ { \omega \infty } \omega ^ { 2 } M ^ { T } [ G ( i \omega ) _ { - } + G ( - i \omega ) ^ { T } ] M } \end{array}$ is positive definite for any $N \times ( N - q )$ full-rank matrix $M$ such that $M ^ { T } [ G ( \infty ) + \dot { G ( \infty ) } ^ { T } ] M = 0$ , where $q = \mathrm { r a n k } [ G ( \infty ) + G ( \infty ) ^ { T } ]$ .
|
| 360 |
+
|
| 361 |
+
The following is presented in (Khalil, 2002, Lemma 6.3).
|
| 362 |
+
|
| 363 |
+
Lemma 3 (Kalman-Yakubovich-Popov). Let $A , W : \mathbb { R } ^ { N } \to \mathbb { R } ^ { N }$ be full-rank square matrices. There exists a symmetric positive-definite matrix $P$ and matrices $L , U$ and a constant $\epsilon > 0$ such that
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
\begin{array} { c } { { P A + A ^ { T } P = - L ^ { T } L - \epsilon P } } \\ { { } } \\ { { P = L ^ { T } U - W ^ { T } } } \\ { { } } \\ { { U ^ { T } U = 0 , } } \end{array}
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
if and only if the transfer function $G ( s ) = { \cal W } ( s I - A ) ^ { - 1 }$ is strictly positive real. In this case, we may take $\epsilon = 2 \mu$ , where $\mu > 0$ is chosen so that $G ( s - \mu )$ remains strictly positive real.
|
| 370 |
+
|
| 371 |
+
A shorter proof for case (a) is available to us through the (multivariable) circle criterion — the following theorem is a corollary of (Khalil, 2002, Theorem 7.1) suitable for our purposes.
|
| 372 |
+
|
| 373 |
+
Theorem 3 (Circle Criterion). The system of differential equations
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\dot { h } = A h + \psi ( t , W h )
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
is globally exponentially stable towards an equilibrium at the origin if $\| \psi ( t , y ) \| \le M \| y \|$ for some $M > 0$ and $Z ( s ) = [ I + M G ( s ) ] [ I - \overline { { { M G ( s ) } } } ] ^ { - 1 }$ is strictly positive real, where $G ( s ) =$ $W ( s I - A ) ^ { - 1 }$ .
|
| 380 |
+
|
| 381 |
+
Both the Kalman-Yakubovich-Popov lemma and the circle criterion are classical results in control theory, and are typically discussed in the setting of feedback systems (Khalil, 2002, Chapter 6, 7). Our presentation here is less general than the complete formulation, but makes clearer the connection to RNNs. With these tools, we state our proof of Theorem 1.
|
| 382 |
+
|
| 383 |
+
Proof of Theorem $^ { l }$ . To begin, we shall center the differential equation about the equilibrium. By assumption, there exists $h ^ { * }$ such that $A h ^ { * } = - \sigma ( W h ^ { * } + U x ( t ) + b )$ . Letting $\bar { h } = h ^ { ^ { \ast } } - h ^ { \ast }$ , we find that
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\begin{array} { r l } & { \dot { \bar { h } } = A h + \sigma ( W h + U x ( t ) + b ) } \\ & { \quad = A \bar { h } + A h ^ { * } + \sigma ( W \bar { h } + W h ^ { * } + U x ( t ) + b ) } \\ & { \quad = A \bar { h } + \sigma ( W h + W h ^ { * } + U x ( t ) + b ) - \sigma ( W h ^ { * } + U x ( t ) + b ) . } \end{array}
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
It will suffice to show that (13) is globally exponentially stable at the origin.
|
| 390 |
+
|
| 391 |
+
Let us begin with case (a). The proof follows arguments analogous to (Khalil, 2002, Example 7.1). Let $G ( s ) { \dot { = } } W ( A - s I ) ^ { - 1 }$ denote the transfer function for the system (13). Letting
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\psi ( t , x ) = \sigma ( x + W h ^ { \ast } + U x ( t ) + b ) - \sigma ( W h ^ { \ast } + U x ( t ) + b ) ,
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
since $\sigma$ is $M$ -Lipschitz, we know that $\| \psi ( t , x ) \| \leq M \| x \|$ for any $\boldsymbol { x } \in \mathbb { R } ^ { N }$ . Therefore, let $Z ( s ) =$ $[ I + M G ( s ) ] [ \bar { I } - M G ( s ) ] ^ { - 1 }$ denote the transfer function in the circle criterion. Our objective is to show that $Z ( s )$ is strictly positive real — by Theorem 3, this will guarantee the desired global exponential stability of (4). First, we need to show that the poles of $Z ( s )$ have negative real parts. This can only occur when $G ( s )$ itself has poles or $I - M G ( s )$ is singular. The former case occurs precisely where $A - s I$ is singular, which occurs when $s$ is an eigenvalue of $A$ . Since $A + A ^ { T }$ is assumed to be negative definite, $A$ must have eigenvalues with negative real part by Lemma 4, and so the poles of $G ( s )$ also have negative real parts. The latter case is more difficult to treat. First, since $\bar { \sigma _ { \operatorname* { m a x } } } ( A B ) \leq \sigma _ { \operatorname* { m a x } } ( A ) \sigma _ { \operatorname* { m a x } } \bar { ( B ) }$ and $\dot { \sigma _ { \mathrm { m a x } } } ( B ^ { - 1 } ) = \sigma _ { \mathrm { m i n } } ( B ) ^ { - 1 }$ ,
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\sigma _ { \operatorname* { m a x } } ( G ( s ) ) \leq \frac { \sigma _ { \operatorname* { m a x } } ( W ) } { \sigma _ { \operatorname* { m i n } } ( A - s I ) } .
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
Therefore, we observe that
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\begin{array} { r l r } & { } & { \sigma _ { \operatorname* { m i n } } ( I - M G ( s ) ) \geq 1 - \sigma _ { \operatorname* { m a x } } ( M G ( s ) ) } \\ & { } & { \geq 1 - M \sigma _ { \operatorname* { m a x } } ( G ( s ) ) } \\ & { } & { \geq 1 - \cfrac { M \sigma _ { \operatorname* { m a x } } ( W ) } { \sigma _ { \operatorname* { m i n } } ( A - s I ) } . } \end{array}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
From the Fan-Hoffman inequality (Bhatia, 2013, Proposition III.5.1), we have that
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\sigma _ { \operatorname* { m i n } } \bigl ( A - s I \bigr ) = \sigma _ { \operatorname* { m i n } } \bigl ( s I - A \bigr ) \geq \lambda _ { \operatorname* { m i n } } \left( \Re ( s ) I - \frac { A + A ^ { T } } { 2 } \right) = \Re ( s ) + \lambda _ { \operatorname* { m i n } } \left( - \frac { A + A ^ { T } } { 2 } \right) ,
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
and since $A + A ^ { T }$ is negative definite, for any $s$ with $\Re ( s ) \geq 0$ ,
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\sigma _ { \operatorname* { m i n } } ( A - s I ) \geq \Re ( s ) + \sigma _ { \operatorname* { m i n } } \left( { \frac { A + A ^ { T } } { 2 } } \right) \geq \sigma _ { \operatorname* { m i n } } ( A ^ { \operatorname { s y m } } ) .
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
Since $\sigma _ { \mathrm { m i n } } ( A ^ { \mathrm { s y m } } ) > M \sigma _ { \mathrm { m a x } } ( W )$ , it follows that $\sigma _ { \operatorname* { m i n } } ( I - M G ( s ) ) > 0$ whenever $s$ has nonnegative real part, and so the poles of $Z ( s )$ must have negative real parts.
|
| 422 |
+
|
| 423 |
+
Next, we need to show that $Z ( i \omega ) + Z ( - i \omega ) ^ { T }$ is positive definite for all $\omega \in \mathbb { R }$ . Observe that
|
| 424 |
+
|
| 425 |
+
$$
|
| 426 |
+
\begin{array} { r l } & { Z ( i \omega ) + Z ( - i \omega ) ^ { T } = [ I + M G ( i \omega ) ] [ I - M G ( i \omega ) ] ^ { - 1 } + [ I - M G ( - i \omega ) ^ { T } ] ^ { - 1 } [ I + M G ( - i \omega ) ^ { T } ] } \\ & { \qquad = 2 [ I - M G ( - i \omega ) ^ { T } ] ^ { - 1 } [ I - M ^ { 2 } G ( - i \omega ) ^ { T } G ( i \omega ) ] [ I - M G ( i \omega ) ] ^ { - 1 } . } \end{array}
|
| 427 |
+
$$
|
| 428 |
+
|
| 429 |
+
From Sylvester’s law of inertia, we may infer that $Z ( i \omega ) + Z ( - i \omega ) ^ { T }$ is positive definite if and only if $I + Y _ { \omega }$ is positive definite, where $\begin{array} { r } { Y _ { \omega } = M ^ { 2 } G ( - i \dot { \omega } ) ^ { T } G ( i \omega ) } \end{array}$ . If we can show that the eigenvalues of $Y _ { \omega }$ lie strictly within the unit circle, that is, $\sigma _ { \operatorname* { m a x } } ( Y _ { \omega } ) < 1$ for all $\omega \in \mathbb { R }$ , then $I + Y _ { \omega }$ will necessarily be positive definite. From (14) and (15), we may verify that
|
| 430 |
+
|
| 431 |
+
$$
|
| 432 |
+
\operatorname* { s u p } _ { \omega \in \mathbb { R } } \sigma _ { \operatorname* { m a x } } ( G ( i \omega ) ) \leq \operatorname* { s u p } _ { \omega \in \mathbb { R } } \frac { \sigma _ { \operatorname* { m a x } } ( W ) } { \sigma _ { \operatorname* { m i n } } ( A - i \omega I ) } \leq \frac { \sigma _ { \operatorname* { m a x } } ( W ) } { \sigma _ { \operatorname* { m i n } } ( A ^ { \mathrm { s y m } } ) } .
|
| 433 |
+
$$
|
| 434 |
+
|
| 435 |
+
Therefore,
|
| 436 |
+
|
| 437 |
+
$$
|
| 438 |
+
\sigma _ { \operatorname* { m a x } } ( Y _ { \omega } ) \leq M ^ { 2 } \sigma _ { \operatorname* { m a x } } ( G ( - i \omega ) ^ { T } ) \sigma _ { \operatorname* { m a x } } ( G ( i \omega ) ) \leq \bigg ( \frac { M \sigma _ { \operatorname* { m a x } } ( W ) } { \sigma _ { \operatorname* { m i n } } ( A ^ { \mathrm { s y m } } ) } \bigg ) ^ { 2 } < 1 ,
|
| 439 |
+
$$
|
| 440 |
+
|
| 441 |
+
by assumption. Finally, since $Z ( \infty ) + Z ( \infty ) ^ { T } = 2 I$ is positive definite, $Z ( s )$ is strictly positive real and Theorem 3 applies.
|
| 442 |
+
|
| 443 |
+
Now, consider case (b). The proof proceeds in two steps. First, we verify that the transfer function $G ( s ) = { \cal W } ( A - s I ) ^ { - 1 }$ satisfies the conditions of the Kalman-Yakubovich-Popov lemma. Then, using the matrices $P , L , U$ , and the constant $\epsilon$ inferred from the lemma, a Lyapunov function is constructed which satisfies the conditions of Theorem 2, guaranteeing global exponential stability. Once again, condition (i) of Lemma 3 is straightforward to verify: $G ( s )$ exhibits poles when $s$ is an eigenvalue of $A$ , and so the poles of $G ( s )$ also have negative real parts. Furthermore, condition (iii) is easily satisfied with $M = I$ since $\dot { G } ( \infty ) + G ( \infty ) ^ { \check { T } } = 0$ . To show that condition (ii) holds, observe that for any $\omega \in \mathbb { R }$ , letting $A ^ { - T } = ( A ^ { - 1 } ) ^ { T }$ for brevity,
|
| 444 |
+
|
| 445 |
+
$$
|
| 446 |
+
\begin{array} { r l } & { G ( i \omega ) + G ( - i \omega ) ^ { T } = W ( A - i \omega I ) ^ { - 1 } + ( A + i \omega I ) ^ { - T } W ^ { T } } \\ & { \qquad = ( A + i \omega I ) ^ { - T } [ ( A + i \omega I ) ^ { T } W + W ^ { T } ( A - i \omega I ) ] ( A - i \omega I ) ^ { - 1 } . } \end{array}
|
| 447 |
+
$$
|
| 448 |
+
|
| 449 |
+
Since the inner matrix factor is Hermitian, Sylvester’s law of inertia implies that $G ( i \omega ) + G ( - i \omega ) ^ { T }$ is positive definite if and only if
|
| 450 |
+
|
| 451 |
+
$$
|
| 452 |
+
B _ { \omega } : = ( A + i \omega I ) ^ { T } W + W ^ { T } ( A - i \omega I ) .
|
| 453 |
+
$$
|
| 454 |
+
|
| 455 |
+
is positive definite. Since $B _ { \omega }$ is a Hermitian matrix, it has real eigenvalues, with minimal eigenvalue given by the infimum of the Rayleigh quotient:
|
| 456 |
+
|
| 457 |
+
$$
|
| 458 |
+
\begin{array} { r l } & { \lambda _ { \operatorname* { m i n } } \big ( B _ { \omega } \big ) = \underset { \| v \| = 1 } { \operatorname* { i n f } } v ^ { T } B _ { \omega } v } \\ & { \quad \quad = \underset { \| v \| = 1 } { \operatorname* { i n f } } v ^ { T } ( A ^ { T } W + W ^ { T } A ) v + i \omega v ^ { T } ( W - W ^ { T } ) v } \\ & { \quad \quad = \underset { \| v \| = 1 } { \operatorname* { i n f } } v ^ { T } ( A ^ { T } W + W ^ { T } A ) v } \\ & { \quad \quad = \lambda _ { \operatorname* { m i n } } \big ( A ^ { T } W + W ^ { T } A \big ) . } \end{array}
|
| 459 |
+
$$
|
| 460 |
+
|
| 461 |
+
By assumption, $A ^ { T } W + W ^ { T } A$ has strictly positive eigenvalues, and hence $B _ { \omega }$ and $G ( i \omega ) +$ $\dot { G } ( - i \omega ) ^ { T }$ are positive definite. Therefore, Lemma 3 applies, and we obtain matrices $P , L , U$ and a constant $\epsilon > 0$ with the corresponding properties.
|
| 462 |
+
|
| 463 |
+
Now we may construct our Lyapunov function $V$ . Let $v = W { \bar { h } }$ and
|
| 464 |
+
|
| 465 |
+
$$
|
| 466 |
+
u ( t ) = \sigma ( v ( t ) + W h ^ { \ast } + U x ( t ) + b ) - \sigma ( W h ^ { \ast } + U x ( t ) + b ) ,
|
| 467 |
+
$$
|
| 468 |
+
|
| 469 |
+
so that ${ \dot { \bar { h } } } = A { \bar { h } } + u$ . Since $\sigma$ is monotone non-decreasing, $\sigma ( x ) - \sigma ( y ) \geq 0$ for any $x \geq y$ . This implies that for each $i = 1 , \ldots , N ,$ $v _ { i }$ and $u _ { i }$ have the same sign. In particular, $v ^ { T } u \geq 0$ . Now, let $\dot { V ( h ) } = h ^ { T } P h$ be our Lyapunov function, noting that $V$ is independent of $t$ . Taking the derivative of the Lyapunov function over (13) and using the properties of $P , L , U , \epsilon$ ,
|
| 470 |
+
|
| 471 |
+
$$
|
| 472 |
+
\begin{array} { r l } & { \dot { V } ( \bar { h } ) = \bar { h } ^ { T } P \dot { \bar { h } } + \dot { \bar { h } } ^ { T } P \bar { h } } \\ & { \quad \quad = \bar { h } ^ { T } ( P A + A ^ { T } P ) \bar { h } + 2 \bar { h } ^ { T } P u } \\ & { \quad \quad = \bar { h } ^ { T } ( - L ^ { T } L - \epsilon P ) \bar { h } + 2 \bar { h } ^ { T } ( L ^ { T } U - W ^ { T } ) u } \\ & { \quad \quad = - ( L \bar { h } ) ^ { T } ( L \bar { h } ) + ( L \bar { h } ) ^ { T } U u + ( U u ) ^ { T } ( L \bar { h } ) - u ^ { T } U ^ { T } U u - 2 v ^ { T } u } \\ & { \quad \quad = - ( L \bar { h } + U u ) ^ { T } ( L \bar { h } + U u ) - \epsilon \bar { h } ^ { T } P \bar { h } - 2 v ^ { T } u . } \end{array}
|
| 473 |
+
$$
|
| 474 |
+
|
| 475 |
+
Since $v ^ { T } u \geq 0$ and $( L \bar { h } + U u ) ^ { T } ( L \bar { h } + U u ) \ge 0$ , it follows that $\dot { V } ( \bar { h } ) \leq - \epsilon \lambda _ { \operatorname* { m i n } } ( P ) \| h \| ^ { 2 }$ , and hence global exponential stability follows from Theorem 2 and positive-definiteness of $P$ . □
|
| 476 |
+
|
| 477 |
+
To finish off discussion regarding the results from Sec. 3, we provide a quick proof of Lemma 1 using a simple diagonalization argument.
|
| 478 |
+
|
| 479 |
+
Proof of Lemma $^ { l }$ . Since $A$ is symmetric and real-valued, by (Horn & Johnson, 2012, Theorem 4.1.5), there exists an orthogonal matrix $P$ and a real diagonal matrix $D$ such that $A = P D P ^ { T }$ . Letting $z = P ^ { T } h$ where $h$ satisfies (4), since $h = P z$ , we see that
|
| 480 |
+
|
| 481 |
+
$$
|
| 482 |
+
\begin{array} { r l } & { \dot { z } = P ^ { T } P D P ^ { T } h + P ^ { T } \sigma ( W h + U x + b ) } \\ & { \quad = D z + P ^ { T } \sigma ( W P z + U x + b ) . } \end{array}
|
| 483 |
+
$$
|
| 484 |
+
|
| 485 |
+
Therefore, $z$ satisfies (5) with $L = P ^ { T }$ and $V = W P$ , both of which are nonsingular by orthogonality of $P$ . By the same argument, for any equilibrium $h ^ { * }$ , taking $z ^ { * } = P ^ { T } h ^ { * }$ ,
|
| 486 |
+
|
| 487 |
+
$$
|
| 488 |
+
\begin{array} { r } { D z ^ { * } + P ^ { T } \sigma ( W P z ^ { * } + U x + b ) = P ^ { T } ( P D P ^ { T } h ^ { * } + \sigma ( W h ^ { * } + U x + b ) ) } \\ { = P ^ { T } ( A h ^ { * } + \sigma ( W h ^ { * } + U x + b ) ) = 0 , } \end{array}
|
| 489 |
+
$$
|
| 490 |
+
|
| 491 |
+
implying that $z ^ { * }$ is an equilibrium of (5). Furthermore, since
|
| 492 |
+
|
| 493 |
+
$$
|
| 494 |
+
\begin{array} { r l } & { \| \boldsymbol { z } - \boldsymbol { z } ^ { * } \| ^ { 2 } = ( P ^ { T } h - P ^ { T } h ^ { * } ) ^ { T } ( P ^ { T } h - P ^ { T } h ^ { * } ) } \\ & { \qquad = ( h - h ^ { * } ) ^ { T } P P ^ { T } ( h - h ^ { * } ) = \| h - h ^ { * } \| ^ { 2 } , } \end{array}
|
| 495 |
+
$$
|
| 496 |
+
|
| 497 |
+
from orthogonality of $P$ . Because every form of Lyapunov stability, both local and global, including global exponential stability, depend only on the norm $\| h - h ^ { * } \|$ (Khalil, 2002, Definitions 4.4 and 4.5), $h ^ { * }$ is stable under any of these forms if and only if $z ^ { * }$ is also stable. □
|
| 498 |
+
|
| 499 |
+
We remark that the proof of Lemma 1 can extend to matrices $A$ which have real eigenvalues and are diagonalizable. These attributes are implied for symmetric matrices. However, they can be difficult to ensure in practice for nonsymmetric matrices without imposing difficult structural constraints.
|
| 500 |
+
|
| 501 |
+
# A.2 PROOF OF PROPOSITION 1
|
| 502 |
+
|
| 503 |
+
The proof of Proposition 1 relies on the following lemma, which we also have made use of several times throughout this work.
|
| 504 |
+
|
| 505 |
+
Lemma 4. For any matrix $A \in \mathbb { R } ^ { N \times N }$ , the real parts of the eigenvalues $\Re \lambda _ { i } ( A )$ are contained in the interval $[ \lambda _ { \operatorname* { m i n } } ( A ^ { \mathrm { s y m } } ) , \lambda _ { \operatorname* { m a x } } ( A ^ { \mathrm { s y m } } ) ]$ , where $\begin{array} { r } { A ^ { \mathrm { { { s y m } } } } = \frac { 1 } { 2 } ( A + \mathbf { \bar { { A } } } ^ { T } ) } \end{array}$ .
|
| 506 |
+
|
| 507 |
+
Proof. Recall by the min-max theorem, for $\langle u , v \rangle = u ^ { \ast } v$ , where $u ^ { * }$ is the conjugate transpose of $u$ , the upper and lower eigenvalues of $A + A ^ { T }$ satisfy
|
| 508 |
+
|
| 509 |
+
$$
|
| 510 |
+
\begin{array} { r l } & { \lambda _ { \operatorname* { m i n } } ( A + A ^ { T } ) = \underset { v \in \mathbb { C } ^ { N } , \| v \| = 1 } { \operatorname* { i n f } } \langle v , ( A + A ^ { T } ) v \rangle = \underset { v \in \mathbb { C } ^ { N } , \| v \| = 1 } { \operatorname* { i n f } } \langle v , A v \rangle + \langle A v , v \rangle , } \\ & { \lambda _ { \operatorname* { m a x } } ( A + A ^ { T } ) = \underset { v \in \mathbb { C } ^ { N } , \| v \| = 1 } { \operatorname* { s u p } } \langle v , ( A + A ^ { T } ) v \rangle = \underset { v \in \mathbb { C } ^ { N } , \| v \| = 1 } { \operatorname* { s u p } } \langle v , A v \rangle + \langle A v , v \rangle . } \end{array}
|
| 511 |
+
$$
|
| 512 |
+
|
| 513 |
+
Let $\lambda _ { i } ( A ) = u + i \omega$ be an eigenvalue of $A$ with corresponding eigenvector $v$ satisfying $\lVert \boldsymbol { v } \rVert = 1$ . Since $\overset { \triangledown } { A \boldsymbol { v } } = ( u + i \omega ) \boldsymbol { v }$ ,
|
| 514 |
+
|
| 515 |
+
$$
|
| 516 |
+
\langle v , A v \rangle + \langle A v , v \rangle = \langle v , A v \rangle + { \overline { { \langle v , A v \rangle } } } = 2 \Re \langle v , A v \rangle = 2 u \| v \| ^ { 2 } = 2 u .
|
| 517 |
+
$$
|
| 518 |
+
|
| 519 |
+
Hence, $\lambda _ { \operatorname* { m i n } } ( A + A ^ { T } ) \leq u \leq \lambda _ { \operatorname* { m a x } } ( A + A ^ { T } )$ .
|
| 520 |
+
|
| 521 |
+
Proof of Proposition $^ { l }$ . By construction, $S _ { \beta , \gamma } ^ { \mathrm { s y m } } = S _ { \beta , \gamma } + S _ { \beta , \gamma } ^ { T } = ( 1 - \beta ) M ^ { \mathrm { s y m } } - \gamma I$ , and so from Lemma 4, both the real parts $S _ { \beta , \gamma } ^ { \mathrm { s y m } }$ lie in the interval $\Re \lambda _ { i } ( S _ { \beta , \gamma } )$ of the eigenvalues of $S _ { \beta , \gamma }$ as well as the eigenvalues of
|
| 522 |
+
|
| 523 |
+
$$
|
| 524 |
+
[ \lambda _ { \operatorname* { m i n } } ( S _ { \beta , \gamma } ^ { \mathrm { s y m } } ) , \lambda _ { \operatorname* { m a x } } ( S _ { \beta , \gamma } ^ { \mathrm { s y m } } ) ] = [ \lambda _ { \operatorname* { m i n } } ( ( 1 - \beta ) M ^ { \mathrm { s y m } } - \gamma I ) , \lambda _ { \operatorname* { m a x } } ( ( 1 - \beta ) M ^ { \mathrm { s y m } } - \gamma I ) ] .
|
| 525 |
+
$$
|
| 526 |
+
|
| 527 |
+
If $\beta < 1$ , for any eigenvalue $\lambda$ of $S _ { \beta , \gamma } ^ { \mathrm { s y m } }$ with corresponding eigenvector $v$ ,
|
| 528 |
+
|
| 529 |
+
$$
|
| 530 |
+
( 1 - \beta ) M ^ { \mathrm { s y m } } v - \gamma v = \lambda v , \quad \mathrm { a n d \ s o } \quad M ^ { \mathrm { s y m } } v = \frac { \lambda + \gamma } { 1 - \beta } v
|
| 531 |
+
$$
|
| 532 |
+
|
| 533 |
+
implying that $\frac { \lambda + \gamma } { 1 - \beta }$ is an eigenvalue of $M ^ { \mathrm { s y m } }$ , and therefore contained in $[ \lambda _ { \operatorname* { m i n } } ( M ^ { \mathrm { s y m } } ) , \lambda _ { \operatorname* { m a x } } ( \dot { M } ^ { \mathrm { s y m } } ) ]$ . In particular, we find that
|
| 534 |
+
|
| 535 |
+
$$
|
| 536 |
+
\begin{array} { r } { [ \lambda _ { \operatorname* { m i n } } ( S _ { \beta , \gamma } ^ { \mathrm { s y m } } ) , \lambda _ { \operatorname* { m a x } } ( S _ { \beta , \gamma } ^ { \mathrm { s y m } } ) ] \subseteq [ ( 1 - \beta ) \lambda _ { \operatorname* { m i n } } ( M ^ { \mathrm { s y m } } ) - \gamma , ( 1 - \beta ) \lambda _ { \operatorname* { m a x } } ( M ^ { \mathrm { s y m } } ) ] , } \end{array}
|
| 537 |
+
$$
|
| 538 |
+
|
| 539 |
+
as required. Finally, if $\beta = 1$ , then (16) still holds, since both intervals collapse to the single point $\{ - \gamma \}$ . □
|
| 540 |
+
|
| 541 |
+

|
| 542 |
+
Figure 4: Empirical evaluation of the theoretical bounds (16). The red lines track the largest real part and the blue lines track the smallest real part of the eigenvalues of the hidden-to-hidden matrix $A _ { \beta }$ . Each line corresponds to a different hidden-to-hidden matrix of dimension $N = 6 4$ in (a) and $N = 1 2 8$ in (b). The dashed black lines indicate the theoretical bound for each trial.
|
| 543 |
+
|
| 544 |
+
Figure 4 illustrates the effect of $\beta$ onto the eigenvalues of $A _ { \beta , \gamma }$ with the largest and smallest real parts. It can be seen, both empirically and theoretically, that the real part of the eigenvalues converges towards zero as $\beta$ tends towards one, i.e., we yield a skew-symmetric matrix with purely imaginary eigenvalues in the limit. Thus, for a sufficiently large parameter $\beta$ we yield a system that approximately preserves an “energy” for a limited time-horizon
|
| 545 |
+
|
| 546 |
+
$$
|
| 547 |
+
\mathcal { R } \lambda _ { i } ( A _ { \beta , \gamma } ) \approx 0 , \quad \mathrm { f o r } \quad i = 1 , 2 , \ldots , N .
|
| 548 |
+
$$
|
| 549 |
+
|
| 550 |
+
# A.3 PROOF OF LEMMA 2
|
| 551 |
+
|
| 552 |
+
First, it follows from Gronwall’s inequality that the norm of the final hidden state $\| h ( T ) \|$ is bounded uniformly in $\beta$ . From Weyl’s inequalities and the definition of $A _ { \beta , \gamma }$ ,
|
| 553 |
+
|
| 554 |
+
$$
|
| 555 |
+
\operatorname* { m a x } _ { k } | \Delta _ { \delta } \lambda _ { k } ( A _ { \beta , \gamma } ^ { \mathrm { s y m } } ) | \leq \| \Delta _ { \delta } A _ { \beta , \gamma } ^ { \mathrm { s y m } } \| = ( 1 - \beta ) \| \Delta _ { \delta } M _ { A } ^ { \mathrm { s y m } } \| .
|
| 556 |
+
$$
|
| 557 |
+
|
| 558 |
+
By the chain rule, for each element $M _ { A } ^ { i j }$ of the matrix $M _ { A }$
|
| 559 |
+
|
| 560 |
+
$$
|
| 561 |
+
\frac { \partial L } { \partial M _ { A } ^ { i j } } = \frac { \partial L } { \partial y ( T ) } \frac { \partial y ( T ) } { \partial h ( T ) } \frac { \partial h ( T ) } { \partial M _ { A } ^ { i j } } = \frac { \partial L } { \partial y ( T ) } D \frac { \partial h ( T ) } { \partial M _ { A } ^ { i j } } .
|
| 562 |
+
$$
|
| 563 |
+
|
| 564 |
+
Now, for any collection of parameters $\theta _ { i }$ ,
|
| 565 |
+
|
| 566 |
+
$$
|
| 567 |
+
\frac { d } { d t } \sum _ { i } \frac { \partial h } { \partial \theta _ { i } } = A \sum _ { i } \frac { \partial h } { \partial \theta _ { i } } + \sum _ { i } \frac { \partial A } { \partial \theta _ { i } } h + \mathrm { s e c h } ^ { 2 } \left( W h + U x + b \right) \left( W \sum _ { i } \frac { \partial h } { \partial \theta _ { i } } + \sum _ { i } \frac { \partial W } { \partial \theta _ { i } } h \right) ,
|
| 568 |
+
$$
|
| 569 |
+
|
| 570 |
+
and from Gronwall’s inequality,
|
| 571 |
+
|
| 572 |
+
$$
|
| 573 |
+
\begin{array} { r l } { \displaystyle \left\| \sum _ { i } \frac { \partial h ( T ) } { \partial \theta _ { i } } \right\| \leq \left( \left\| \sum _ { i } \frac { \partial A _ { \beta , \gamma } } { \partial \theta _ { i } } \right\| + \left\| \sum _ { i } \frac { \partial W _ { \beta , \gamma } } { \partial \theta _ { i } } \right\| \right) \| h \| e ^ { \| ( A _ { \beta , \gamma } \| + \| W _ { \partial , \tau } \| ) T } . } & { } \\ { \displaystyle \lambda _ { \delta } \mathcal { M } _ { A } ^ { \operatorname* { s u p } } = \delta \frac { \partial L } { \partial \theta _ { i } } + \delta \left( \frac { \partial L } { \partial M _ { A } } \right) ^ { T } , } & { } \\ { \| \Delta _ { \delta } \mathcal { M } _ { A } ^ { \operatorname* { s u p } } \| \leq \| \Delta _ { \delta } \mathcal { M } _ { A } ^ { \operatorname* { s u p } } \| _ { F } } \\ { \leq \delta \sqrt { \displaystyle \sum _ { i , j } \left( \frac { \partial L } { \partial \mathcal { M } _ { A } ^ { \delta } } + \frac { \partial L } { \partial \mathcal { M } _ { A } ^ { \delta } } \right) ^ { 2 } } } & { } \\ { \leq \delta \left\| \frac { \partial L } { \partial y } \right\| \| D \| \| h \| \epsilon ^ { ( \| A _ { \delta , \gamma } \| + \| W _ { \delta , \tau } \| ) T } \sqrt { \displaystyle \sum _ { i , j } \left\| \frac { \partial A \partial _ { \beta , \gamma } } { \partial M _ { A } ^ { \frac { \delta } { \delta } } } + \frac { \partial A _ { \beta , \gamma } } { \partial M _ { \delta } ^ { \frac { \delta } { \delta } } } \right\| ^ { 2 } } . } & { } \end{array}
|
| 574 |
+
$$
|
| 575 |
+
|
| 576 |
+
Since $\begin{array} { r } { \frac { \partial ( M _ { A } h ) } { \partial M _ { A } ^ { i j } } = \frac { \partial ( M _ { A } ^ { T } h ) } { \partial M _ { A } ^ { j i } } } \end{array}$ ∂(M TA h)ji , it follows that
|
| 577 |
+
|
| 578 |
+
$$
|
| 579 |
+
\frac { \partial A _ { \beta , \gamma } } { \partial M _ { A } ^ { i j } } + \frac { \partial A _ { \beta , \gamma } } { \partial M _ { A } ^ { j i } } = 2 ( 1 - \beta ) \left( \frac { \partial ( M _ { A } h ) } { \partial M _ { A } ^ { i j } } + \frac { \partial ( M _ { A } ^ { T } h ) } { \partial M _ { A } ^ { j i } } \right) ,
|
| 580 |
+
$$
|
| 581 |
+
|
| 582 |
+
and so $\lVert \Delta _ { \delta } M _ { A } ^ { \mathrm { s y m } } \rVert = \mathcal { O } ( \delta ( 1 - \beta ) )$ , and therefore $\begin{array} { r } { \operatorname* { m a x } _ { k } | \Delta _ { \delta } \sigma _ { k } ( A _ { \beta , \gamma } ^ { \mathrm { s y m } } ) | = \mathcal { O } ( \delta ( 1 - \beta ) ^ { 2 } ) } \end{array}$ . Similarly, for the matrix $M _ { W }$ ,
|
| 583 |
+
|
| 584 |
+
$$
|
| 585 |
+
\begin{array} { l } { \displaystyle \operatorname* { m a x } _ { k } \Big | \Delta _ { \delta } \lambda _ { k } ( W _ { \beta , \gamma } ^ { \mathrm { s y m } } ) \Big | \leq ( 1 - \beta ) \| \Delta _ { \delta } M _ { W } ^ { \mathrm { s y m } } \| } \\ { \leq \delta ( 1 - \beta ) \left\| \frac { \partial L } { \partial y } \right\| \| D \| \| h \| e ^ { ( \| A _ { \beta , \gamma } \| + \| W _ { \beta , \gamma } \| ) T } \sqrt { \displaystyle \sum _ { i , j } \left\| \frac { \partial W _ { \beta , \gamma } } { \partial M _ { W } ^ { i j } } + \frac { \partial W _ { \beta , \gamma } } { \partial M _ { W } ^ { j i } } \right\| ^ { 2 } } } \\ { = 2 \delta ( 1 - \beta ) ^ { 2 } \left\| \frac { \partial L } { \partial y } \right\| \| D \| \| h \| e ^ { ( \| A _ { \beta , \gamma } \| + \| W _ { \beta , \gamma } \| ) T } \sqrt { \displaystyle \sum _ { i , j } \left( \frac { \partial ( M _ { W } h ) } { \partial M _ { W } ^ { i j } } + \frac { \partial ( M _ { W } ^ { T } h ) } { \partial M _ { W } ^ { j i } } \right) ^ { 2 } } , } \end{array}
|
| 586 |
+
$$
|
| 587 |
+
|
| 588 |
+
and hence $\begin{array} { r } { \operatorname* { m a x } _ { k } | \Delta _ { \delta } \lambda _ { k } ( W _ { \beta , \gamma } ^ { \mathrm { s y m } } ) | = \mathcal { O } ( \delta ( 1 - \beta ) ^ { 2 } ) } \end{array}$ .
|
| 589 |
+
|
| 590 |
+
In Figure 5, we plot the most positive real part of the eigenvalues of $A _ { \beta , \gamma }$ and $W _ { \beta , \gamma }$ during training for the ordered MNIST task. As $\beta$ increases, the eigenvalues change less during training, remaining in the stability region provided by case (b) of Theorem 1 for more of the training time.
|
| 591 |
+
|
| 592 |
+

|
| 593 |
+
Figure 5: The red lines track the largest real part of the eigenvalues of the hidden-to-hidden matrix $A _ { \beta , \gamma }$ and the blue lines track the largest real part of the eigenvalues of $W _ { \beta , \gamma }$ . We show results for two models trained on the ordered MNIST task with varying $\beta$ .
|
| 594 |
+
|
| 595 |
+
# B ADDITIONAL EXPERIMENTS
|
| 596 |
+
|
| 597 |
+
# B.1 SENSITIVITY TO RANDOM INITIALIZATION FOR MNIST AND TIMIT
|
| 598 |
+
|
| 599 |
+
The hidden matrices are initialized by sampling weights from the normal distribution $\mathcal { N } ( 0 , \sigma )$ , where $\sigma$ is the variance, which can be treated as a tuning parameter. In our experiments we typically chose a small $\sigma$ ; see the Table 8 for details. To show that the Lipschitz RNN is insensitive to random initialization, we have trained each model with 10 different seeds. Table 4 shows the maximum, average and minimum values obtained for each task. Note that higher values indicate better performance on the ordered and permuted MNIST tasks, while lower values indicate better performance on the TIMIT task.
|
| 600 |
+
|
| 601 |
+
# B.2 ORDERED PIXEL-BY-PIXEL AND NOISE-PADDED CIFAR-10
|
| 602 |
+
|
| 603 |
+
The pixel-by-pixel CIFAR-10 benchmark problem that has recently been proposed by (Chang et al., 2019). This task is similar to the pixel-by-pixel MNIST task, yet more challenging due to the increased sequence length and the more difficult classification problem. Similar to MNIST, we flatten the CIFAR-10 images to construct a sequence of length 1024 in scanline order, where each element of the sequence consists of three pixels (one from each channel).
|
| 604 |
+
|
| 605 |
+
A variation of this problem is the noise-padded CIFAR-10 problem (Chang et al., 2019), where we consider each row of an image as input at time step $t$ . The rows from each channel are stacked so that we obtain an input of dimension $x \in \mathbb { R } ^ { 9 6 }$ . Then, after the 32 time step which process the 32 row, we start to feed the recurrent unit with independent standard Gaussian noise for 968 time steps. At the final point in $T = 1 0 0 0$ , we use the learned hidden state for classification. This problem is challenging because only the first 32 time steps contain signals. Thus, the recurrent unit needs to recall information from the beginning of the process.
|
| 606 |
+
|
| 607 |
+
Table 4: Sensitivity to random initialization evaluated over 10 runs.
|
| 608 |
+
|
| 609 |
+
<table><tr><td>Solver</td><td>Task</td><td>Minimum</td><td>Average</td><td>Maximum</td><td>N</td><td># params</td></tr><tr><td>Euler</td><td>ordered MNIST</td><td>98.9%</td><td>99.0%</td><td>99.0%</td><td>64</td><td>~9K</td></tr><tr><td>RK2</td><td>ordered MNIST</td><td>98.9%</td><td>99.0%</td><td>99.1%</td><td>64</td><td>~9K</td></tr><tr><td>Euler</td><td>orderedMNIST</td><td>99.0%</td><td>99.2%</td><td>99.4%</td><td>128</td><td>~34K</td></tr><tr><td>RK2</td><td>ordered MNIST</td><td>98.9%</td><td>99.1%</td><td>99.3%</td><td>128</td><td>~34K</td></tr><tr><td>Euler</td><td>permuted MNIST</td><td>93.5%</td><td>93.8%</td><td>94.2%</td><td>64</td><td>~9K</td></tr><tr><td>RK2</td><td>permuted MNIST</td><td>93.5%</td><td>93.9%</td><td>94.2%</td><td>64</td><td>~9K</td></tr><tr><td>Euler</td><td>permuted MNIST</td><td>95.6%</td><td>95.9%</td><td>96.3%</td><td>128</td><td>~34K</td></tr><tr><td>RK2</td><td>permuted MNIST</td><td>95.4%</td><td>95.8%</td><td>96.2%</td><td>128</td><td>~34K</td></tr><tr><td>Euler</td><td>TIMIT (test MSE)</td><td>2.82</td><td>2.98</td><td>3.10</td><td>256</td><td>~198K</td></tr><tr><td>RK2</td><td>TIMIT (test MSE)</td><td>2.76</td><td>2.81</td><td>2.84</td><td>256</td><td>~198K</td></tr></table>
|
| 610 |
+
|
| 611 |
+
Table 5: Evaluation accuracy on pixel-by-pixel CIFAR-10 and noise padded CIFAR-10.
|
| 612 |
+
|
| 613 |
+
<table><tr><td>Name</td><td>ordered</td><td>noise padded</td><td>N</td><td># params</td></tr><tr><td>LSTM baseline by (Chang et al.,2019)</td><td>59.7%</td><td>11.6%</td><td>128</td><td>69K</td></tr><tr><td>Antisymmetric RNN (Chang et al., 2019)</td><td>58.7%</td><td>48.3%</td><td>256</td><td>36K</td></tr><tr><td>Incremental RNN (Kag et al.,2020)</td><td>-</td><td>54.5%</td><td>128</td><td>1</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>60.5%</td><td>57.4%</td><td>128</td><td>34K/46K</td></tr><tr><td>Lipschitz RNN using RK2 (ours)</td><td>60.3%</td><td>57.3%</td><td>128</td><td>34K/46K</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>64.2%</td><td>59.0%</td><td>256</td><td>134K/158K</td></tr><tr><td>Lipschitz RNN using RK2 (ours)</td><td>64.2%</td><td>58.9%</td><td>256</td><td>134K/158K</td></tr></table>
|
| 614 |
+
|
| 615 |
+
Table 5 provides a summary of our results. Our Lipschitz recurrent unit outperforms both the incremental RNN (Kag et al., 2020) and the antisymmetric RNN (Chang et al., 2019) by a significant margin. This impressively demonstrates that the Lipschitz unit enables the stable propagation of signals over long time horizons.
|
| 616 |
+
|
| 617 |
+
# B.3 PENN TREE BANK (PTB)
|
| 618 |
+
|
| 619 |
+
# B.3.1 CHARACTER LEVEL PREDICTION
|
| 620 |
+
|
| 621 |
+
Next, we consider a character level language modeling task using the Penn Treebank Corpus (PTB) (Marcus et al., 1993). Specifically, this task studies how well a model can predict the next character in a sequence of text. The dataset is composed of a train / validation / test set, where 5017K characters are used for training, 393K characters are used for validation and 442K characters are used for testing. For our experiments, we used the publicly available implementation of this task by Kerg et al. (2019), which computes the performance in terms of mean bits per character (BPC).
|
| 622 |
+
|
| 623 |
+
Table 6 shows the results for back-propagation through time (BPTT) over 150 and 300 time steps, respectively. The Lipschitz RNN performs slightly better then the exponential RNN and the nonnormal RNN on this task. (Kerg et al., 2019) notes that orthogonal hidden-to-hidden matrices are not particular well-suited for this task. Thus, it is not surprising that the Lipschitz unit has a small advantage here.
|
| 624 |
+
|
| 625 |
+
For comparison, we have also tested the Antisymmetric RNN (Chang et al., 2019) on this task. The performance of this unit is considerably weaker as compared to our Lipschitz unit. This suggests that the Lipschitz RNN is more expressive and improves the propagation of meaningful signals over longer time scales.
|
| 626 |
+
|
| 627 |
+
Table 6: Evaluation accuracy on PTB for character-level prediction for different sequence lengths $T$ . The \* indicate results that were adopted from Kerg et al. (2019).
|
| 628 |
+
|
| 629 |
+
<table><tr><td>Name</td><td>TPTB=150</td><td>TPTB = 300</td><td># params</td></tr><tr><td>RNN baseline by (Arjovsky et al., 2016)</td><td>2.89</td><td>2.90</td><td>~1.32M</td></tr><tr><td>RNN-orth (Henaff et al.,2016) (*)</td><td>1.62</td><td>1.66</td><td>~1.32M</td></tr><tr><td>EURNN (Jing et al.,2017) (*)</td><td>1.61</td><td>1.62</td><td>~1.32M</td></tr><tr><td>Exponential RNN (Lezcano-Casado & Martinez-Rubio,2019)(*)</td><td>1.49</td><td>1.52</td><td>~1.32M</td></tr><tr><td>Non-normal RNN (Kerg et al.,2019)</td><td>1.47</td><td>1.49</td><td>~1.32M</td></tr><tr><td>Antisymmteric RNN</td><td>1.60</td><td>1.64</td><td>~1.32M</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>1.43</td><td>1.46</td><td>~1.32M</td></tr></table>
|
| 630 |
+
|
| 631 |
+
# B.3.2 WORD-LEVEL PREDICTION
|
| 632 |
+
|
| 633 |
+
In addition to character-level prediction, we also consider word-level prediction using the PTB corpus. For comparison with other state-of-the-art units, we consider the setup by Kusupati et al. (2018), who use a sequence length of 300. Table 7 shows results for back-propagation through time (BPTT) over 300 time steps. The Lipschitz RNN performs slightly better than the other RNNs on this task and the baseline LSTM for the test perplexity metric reported by Kusupati et al. (2018).
|
| 634 |
+
|
| 635 |
+
Table 7: Evaluation accuracy on PTB for word-level prediction. The \* indicate results adopted from Kusupati et al. (2018). Note that here the parameters for the hidden-to-hidden units are reported.
|
| 636 |
+
|
| 637 |
+
<table><tr><td>Name</td><td>validation perplexity</td><td>test perplexity</td><td>N</td><td># params</td></tr><tr><td>LSTM(*)</td><td></td><td>117.41</td><td>=</td><td>210K</td></tr><tr><td>SpectraiRNN (*)</td><td></td><td>130.20</td><td></td><td>24.8K</td></tr><tr><td>FastRNN(*)</td><td></td><td>127.76</td><td>=</td><td>52.5K</td></tr><tr><td>FastGRNN-LSQ(*)</td><td></td><td>115.92</td><td>=</td><td>52.5K</td></tr><tr><td>FastGRNN (*)</td><td></td><td>116.11</td><td>=</td><td>52.5K</td></tr><tr><td>Incremental RNN (Kag et al.,2020)</td><td></td><td>115.71</td><td>=</td><td>29.5K</td></tr><tr><td>Lipschitz RNN using Euler (ours)</td><td>124.55</td><td>115.36</td><td>160</td><td>50K</td></tr></table>
|
| 638 |
+
|
| 639 |
+
# C TUNING PARAMETERS
|
| 640 |
+
|
| 641 |
+
For tuning we utilized a standard training procedure using a non-exhaustive random search within the following plausible ranges for the our weight parameterization $\beta = 0 . 6 5 , 0 . 7 , 0 . 7 5 , 0 . 8 ,$ $\gamma =$ [0.001, 1.0]. For Adam we explored learning rates between 0.001 and 0.005, and for SGD we considered 0.1. For the step size we explored values in the range 0.001 to 1.0. We did not perform an automated grid search and thus expect that the models can be further fine-tuned.
|
| 642 |
+
|
| 643 |
+
The tuning parameters for the different tasks that we have considered are summarized in Table 8.
|
| 644 |
+
|
| 645 |
+
For pixel-by-pixel MNIST and CIFAR-10, we use Adam for minimizing the objective. We train all our models for 100 epochs, with scheduled learning rate decays at epochs $\{ 9 0 \}$ . We do not use gradient clipping during training. Figure 6 shows the test accuracy curves for our Lipschitz RNN for the ordered and permuted MNIST classification tasks.
|
| 646 |
+
|
| 647 |
+
For TIMIT we use Adam with default parameters for minimizing the objective. We also tried Adam using betas (0.0, 0.9) as well as RMSprop with $\alpha = 0 . 9$ , however, Adam with default values worked best in our experiments. We train the model for 1200 epochs without learning-rate decay. Similar to Kerg et al. (2019) we train our model with gradient clipping, however, we observed that the performance of our model is relatively insensitive to the clipping value.
|
| 648 |
+
|
| 649 |
+
For the character level prediction task, we use Adam with default parameters for minimizing the objective, while we use RMSprop with $\alpha = 0 . 9$ for the word level prediction task. We train the model for 200 epochs for the character-level task, and for 500 epochs for the word-level task.
|
| 650 |
+
|
| 651 |
+
Table 8: Tuning parameters used for our experimental results and the performance evaluated with 12 different seed values for the parameter initialization of the model.
|
| 652 |
+
|
| 653 |
+
<table><tr><td>Name</td><td>N</td><td>lr</td><td>decay</td><td>β</td><td>7a</td><td>2w</td><td>E</td><td>0</td></tr><tr><td>Ordered MNIST</td><td>64</td><td>0.003</td><td>0.1</td><td>0.75</td><td>0.001</td><td>0.001</td><td>0.03</td><td>0.1/64</td></tr><tr><td>Ordered MNIST</td><td>128</td><td>0.003</td><td>0.1</td><td>0.75</td><td>0.001</td><td>0.001</td><td>0.03</td><td>0.1/128</td></tr><tr><td>Permuted MNIST</td><td>64</td><td>0.0035</td><td>0.1</td><td>0.75</td><td>0.001</td><td>0.001</td><td>0.03</td><td>0.1/128</td></tr><tr><td>Permuted MNIST</td><td>128</td><td>0.0035</td><td>0.1</td><td>0.75</td><td>0.001</td><td>0.001</td><td>0.03</td><td>0.1/128</td></tr><tr><td>Ordered CIFAR10</td><td>256</td><td>0.1</td><td>0.2</td><td>0.65</td><td>0.001</td><td>0.001</td><td>0.01</td><td>6/256</td></tr><tr><td>Noise-padded CIFAR10</td><td>256</td><td>0.1</td><td>0.2</td><td>0.75</td><td>0.001</td><td>0.001</td><td>0.01</td><td>6/256</td></tr><tr><td>TIMIT</td><td>256</td><td>0.001</td><td>-</td><td>0.8</td><td>0.8</td><td>0.001</td><td>0.9</td><td>12/256</td></tr><tr><td>PTB character-level 150</td><td>750</td><td>0.005</td><td>-</td><td>0.8</td><td>0.5</td><td>0.001</td><td>0.1</td><td>12/256</td></tr><tr><td>PTB character-level 300</td><td>750</td><td>0.005</td><td>=</td><td>0.8</td><td>0.5</td><td>0.001</td><td>0.1</td><td>12/256</td></tr><tr><td>PTB word-level</td><td>160</td><td>0.1</td><td>-</td><td>0.8</td><td>0.9</td><td>0.001</td><td>0.01</td><td>10/256</td></tr></table>
|
| 654 |
+
|
| 655 |
+

|
| 656 |
+
Figure 6: Test accuracy for the Lipschitz RNN for different classification tasks.
|
md/train/0z1HScLBEpb/0z1HScLBEpb.md
ADDED
|
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNEVEN: UNIVERSAL VALUE EXPLORATION FOR MULTI-AGENT REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
This paper focuses on cooperative value-based multi-agent reinforcement learning (MARL) in the paradigm of centralized training with decentralized execution (CTDE). Current state-of-the-art value-based MARL methods leverage CTDE to learn a centralized joint-action value function as a monotonic mixing of each agent’s utility function, which enables easy decentralization. However, this monotonic restriction leads to inefficient exploration in tasks with nonmonotonic returns due to suboptimal approximations of the values of joint actions. To address this, we present a novel MARL approach called Universal Value Exploration (UneVEn), which uses universal successor features (USFs) to learn policies of tasks related to the target task, but with simpler reward functions in a sample efficient manner. UneVEn uses novel action-selection schemes between randomly sampled related tasks during exploration, which enables the monotonic joint-action value function of the target task to place more importance on useful joint actions. Empirical results on a challenging cooperative predator-prey task requiring significant coordination amongst agents show that UneVEn significantly outperforms stateof-the-art baselines.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Learning control policies for cooperative multi-agent reinforcement learning (MARL) remains challenging as agents must search the joint-action space, which grows exponentially with the number of agents. Current state-of-the-art value-based methods such as VDN (Sunehag et al., 2017) and QMIX (Rashid et al., 2020b) learn a centralized joint-action value function as a monotonic factorization of decentralized agent utility functions and can therefore cope with large joint action spaces. Due to this monotonic factorization, the joint-action value function can be decentrally maximized as each agent can simply select the action that maximizes its corresponding utility function.
|
| 12 |
+
|
| 13 |
+
This monotonic restriction, however, prevents VDN and QMIX from representing nonmonotonic joint-action value functions (Mahajan et al., 2019) where an agent’s best action depends on what actions the other agents choose. For example, consider a predator-prey task where at least three agents need to coordinate to capture a prey and any capture attempts by fewer agents are penalized with a penalty of magnitude $p$ . As a result, both VDN and QMIX tend to get stuck in a suboptimal equilibrium (also called the relative overgeneralization pathology, Panait et al., 2006; Wei et al., 2018) in which agents simply avoid the prey (Mahajan et al., 2019; Bohmer et al., 2020). This happens ¨ for two reasons. First, depending on $p$ , successful coordination by at least three agents is a needle in the haystack and any step towards it is penalized. Second, the monotonically factorized jointaction value function lacks the representational capacity to distinguish the values of coordinated and uncoordinated joint actions during exploration.
|
| 14 |
+
|
| 15 |
+
Recent work addresses the problem of inefficient exploration by VDN and QMIX due to monotonic factorization. QTRAN (Son et al., 2019) and WQMIX (Rashid et al., 2020a) address this problem by weighing important joint actions differently, which can be found by simultaneously learning a centralized value function, but these approaches still rely on inefficient $\epsilon$ -greedy exploration which may fail on harder tasks (e.g., the predator-prey task above with higher value of $p$ ). MAVEN (Mahajan et al., 2019) learns an ensemble of monotonic joint-action value functions through committed exploration by maximizing the entropy of the trajectories conditioned on a latent variable. Their exploration focuses on diversity in the joint team behaviour using mutual information. By contrast, this paper proposes Universal Value Exploration (UneVEn), which follows the intuitive premise that tasks with a simpler reward function than the target task (e.g., a smaller miscoordination penalty in predator-prey) can be efficiently solved using a monotonic factorization of the joint-action value function. Therefore, UneVEn samples tasks related to the target task, that are often easier to solve, but often have similar important joint actions. Selecting actions based on these related tasks during exploration can bias the monotonic approximation of the value function towards important joint actions of the target task (Son et al., 2019; Rashid et al., 2020a), which can overcome relative overgeneralization. To leverage the policies of the sampled related tasks, which only differ in their reward functions, UneVEn uses Universal Successor Features (USFs, Borsa et al., 2018) which have demonstrated excellent zero-shot generalization in single-agent tasks with different reward functions (Barreto et al., 2017; 2020). USFs generalize policy dynamics over tasks using Universal Value Functions (UVFs, Schaul et al., 2015), along with Generalized Policy Improvement (GPI, Barreto et al., 2017), which combines solutions of previous tasks into new policies for unseen tasks.
|
| 16 |
+
|
| 17 |
+
Our contributions are as follows. First, we propose Multi-Agent Universal Successor Features (MAUSFs) factorized into novel decentralized agent-specific SFs with value decomposition networks (Sunehag et al., 2017) from MARL. This factorization enables agents to compute decentralized greedy policies and to perform decentralized local GPI, which is particularly well suited for MARL, as it allows to maximize over a combinatorial set of agent policies. Second, we propose Universal Value Exploration (UneVEn), which uses novel action-selection schemes based on related tasks to solve tasks with nonmonotonic values with monotonic approximations thereof. We evaluate our novel approach in predator-prey tasks that require significant coordination amongst agents and highlight the relative overgeneralization pathology. We empirically show that UneVEn with MAUSFs significantly outperforms current state-of-the-art value-based methods on the target tasks and in zero-shot generalization (Borsa et al., 2018) across MARL tasks with different reward functions, which enables us to leverage UneVEn effectively.
|
| 18 |
+
|
| 19 |
+
# 2 BACKGROUND
|
| 20 |
+
|
| 21 |
+
Dec-POMDP: A fully cooperative decentralized multi-agent task can be formalized as a decentralized partially observable Markov decision process (Dec-POMDP, Oliehoek et al., 2016) consisting of a tuple $\dot { G } = \langle S , \mathcal { U } , P , R , \Omega , O , n , \gamma \rangle$ . $s \in \mathcal { S }$ describes the true state of the environment. At each time step, each agent $a \in \mathcal { A } \equiv \{ 1 , . . . , n \}$ chooses an action $u ^ { a } \in \mathcal { U }$ , forming a joint action $\pmb { u } \in \mathcal { U } \equiv \mathcal { U } ^ { n }$ . This causes a transition in the environment according to the state transition kernel $P ( s ^ { \prime } | s , \pmb { u } ) : S \times \pmb { \mathcal { U } } \times S [ 0 , 1 ]$ . All agents are collaborative and share therefore the same reward function $R ( s , { \pmb u } ) : \mathcal { S } \times \mathcal { U } \mathbb { R }$ and $\gamma \in [ 0 , 1 )$ is a discount factor.
|
| 22 |
+
|
| 23 |
+
Due to partial observability, each agent $a$ cannot observe the true state $s$ , but receives an observation $o ^ { a } \in \Omega$ drawn from observation kernel $o ^ { a } \sim O ( s , a )$ . At time $t$ , each agent $a$ has access to its action-observation history $\tau _ { t } ^ { a } \in \mathcal { T } _ { t } \equiv ( \Omega \times \mathcal { U } ) ^ { t } \times \Omega$ , on which it conditions a stochastic policy $\pi ^ { a } ( u _ { t } ^ { a } | \tau _ { t } ^ { a } )$ . $\tau _ { t } \in \mathcal { T } _ { t } ^ { n }$ denotes the histories of all agents. The joint stochastic policy $\pi ( \boldsymbol { u } _ { t } | \boldsymbol { s } _ { t } , \mathbf { \bar { \tau } } _ { t } ) \equiv$ $\begin{array} { r } { \prod _ { a = 1 } ^ { n } \pi ^ { a } ( u _ { t } ^ { a } | \tau _ { t } ^ { a } ) } \end{array}$ induces a joint-action value function : $Q ^ { \pi } ( s _ { t } , \pmb { \tau } _ { t } , \pmb { u } _ { t } ) = \mathbb { E } \left[ G _ { t } | s _ { t } , \pmb { \tau } _ { t } , \pmb { u } _ { t } \right]$ , where $\begin{array} { r } { G _ { t } = \sum _ { i = 0 } ^ { \infty } \gamma ^ { i } r _ { t + i } } \end{array}$ is the discounted return.
|
| 24 |
+
|
| 25 |
+
CTDE: We adopt the framework of centralized training and decentralized execution (CTDE Kraemer & Banerjee, 2016), which assumes access to all action-observation histories $\tau _ { t }$ and global state $s _ { t }$ during training, but each agent’s decentralized policy $\pi ^ { a }$ can only condition on its own actionobservation history $\tau ^ { a }$ . This approach can exploit information that is not available during execution and also freely share parameters and gradients, which improves the sample efficiency considerably (see e.g., Foerster et al., 2018; Rashid et al., 2020b; Bohmer et al., 2020). ¨
|
| 26 |
+
|
| 27 |
+
Value Decomposition Networks: A naive way to learn in MARL is independent $Q$ -learning (IQL, Tan, 1993), which learns an independent action value function $Q ^ { a } \left( \tau _ { t } ^ { a } , u _ { t } ^ { a } ; \theta ^ { a } \right)$ for each agent $a$ that conditions only on its local action-observation history $\tau _ { t } ^ { a }$ . To make better use of other agents’ information in CTDE, value decomposition networks (VDN, Sunehag et al., 2017) represent the joint-action value function $Q _ { t o t }$ as a sum of per-agent utility functions $Q ^ { a } \colon Q _ { t o t } ( \tau , \boldsymbol { u } ; \theta ) \equiv$ $\textstyle \sum _ { a = 1 } ^ { n } { \dot { Q ^ { a } } } ( \tau ^ { a } , u ^ { a } ; \theta )$ . Each $Q ^ { a }$ still conditions only on individual action-observation histories and can be represented by an agent network that shares parameters across all agents. The joint-action value function $Q _ { t o t }$ can be trained using Deep Q-Networks (DQN, Mnih et al., 2015). Compared to VDN, QMIX (Rashid et al., 2020b) allows joint-action value function $Q _ { t o t }$ to be represented as a nonlinear monotonic combination of individual utility functions. The greedy joint action in both VDN and QMIX can be computed decentrally by individually maximizing each agent’s utility. See OroojlooyJadid & Hajinezhad (2019) for a more in-depth overview of cooperative deep MARL.
|
| 28 |
+
|
| 29 |
+
Task based Universal Value Functions: In this paper, we consider tasks that differ only in their reward functions $R _ { \pmb { w } } ( s , \pmb { u } ) \equiv \pmb { w } ^ { \top } \phi ( s , \pmb { u } )$ , which are linear combinations of a set of basis functions $\phi : \mathcal { S } \times \mathcal { U } \to \mathbb { R } ^ { d }$ . Intuitively, the basis functions $\phi$ encode potentially rewarded events, such as opening a door or picking up an object. We use the weight vector $\textbf { \em w }$ to denote the task with reward function $R _ { w }$ . Universal Value Functions (UVFs, Schaul et al., 2015) is an extension of DQN that learns a generalizable value function conditioned on tasks. UVFs are typically of the form $Q ^ { \pi } ( s _ { t } , \pmb { u } _ { t } , \pmb { w } )$ to indicate the action-value function of task $\textbf { \em w }$ under policy $\pi$ at time $t$ as:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
Q ^ { \pi } ( s _ { t } , u _ { t } , w ) = \mathbb { E } ^ { \pi } \big [ \sum _ { i = 0 } ^ { \infty } \gamma ^ { i } R _ { w } ( s _ { t + i } , u _ { t + i } ) \big | s _ { t } , u _ { t } \big ] = \mathbb { E } ^ { \pi } \big [ \sum _ { i = 0 } ^ { \infty } \gamma ^ { i } \phi ( s _ { t + i } , u _ { t + i } ) ^ { \top } w \big | s _ { t } , u _ { t } \big ] .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
Successor Features: The Successor Representation (Dayan, 1993) has been widely used in singleagent settings (Barreto et al., 2017; 2018; Borsa et al., 2018) to generalize across tasks with given reward specifications. By simply rewriting the definition of the action value function $Q ^ { \pi } ( s _ { t } , \pmb { u } _ { t } , \pmb { w } )$ of task $\textbf { \em w }$ from Equation 1 we have:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
Q ^ { \pi } ( s _ { t } , u _ { t } , w ) ~ = ~ \mathbb { E } ^ { \pi } \big [ \sum _ { i = 0 } ^ { \infty } \gamma ^ { i } \phi ( s _ { t + i } , u _ { t + i } ) \big | s _ { t } , u _ { t } \big ] ^ { \top } w ~ \equiv ~ \psi ^ { \pi } ( s _ { t } , u _ { t } ) ^ { \top } w ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $\psi ^ { \pi } ( s , \pmb u )$ are the Successor Features (SFs) under policy $\pi$ . For the optimal policy $\pi _ { z } ^ { \star }$ of task $_ z$ , the SFs $\psi ^ { \pi _ { z } ^ { \star } }$ summarize the dynamics under this policy, which can then be weighted with any reward vector $\pmb { w } \in \mathbb { R } ^ { d }$ to instantly evaluate policy $\pi _ { z } ^ { \star }$ on it: $Q ^ { \pi _ { z } ^ { \star } } ( s , \pmb { u } , \pmb { w } ) = \psi ^ { \pi _ { z } ^ { \star } } ( s , \mathbf { \bar { u } } ) ^ { \top } \pmb { w }$ .
|
| 42 |
+
|
| 43 |
+
Universal Successor Features and Generalized Policy Improvement: Borsa et al. (2018) introduce universal successor features (USFs) which learns SFs conditioned on tasks using the generalization power of UVFs. Specifically, they define UVFs of the form $Q ( s , \pmb { u } , z , \pmb { w } )$ which represents the value function of policy $\pi _ { z }$ evaluated on task $\pmb { w } \in \mathbb { R } ^ { d }$ . These UVFs can be factored using the SFs property (Equation 2) as: $Q ( s , \pmb { u } , z , \pmb { w } ) = \pmb { \psi } ( s , \pmb { u } , z ) ^ { \top } \pmb { w }$ , where $\psi ( s , u , z )$ are the USFs that generate the SFs induced by task-specific policy $\pi _ { z }$ . One major advantage of using SFs is the ability to efficiently do generalized policy improvement (GPI, Barreto et al., 2017), which allows a new policy to be computed for any unseen task based on instant policy evaluation of a set of policies on that unseen task with a simple dot-product. Formally, given a set $\mathcal { C } \subseteq \mathbb { R } ^ { d }$ of tasks and their corresponding SFs $\{ \psi ( s , \pmb { u } , z ) \} _ { z \in \mathcal { C } }$ induced by corresponding policies $\{ \pi _ { z } \} _ { z \in { \mathcal C } }$ , a new policy $\pi _ { w } ^ { \prime }$ for any unseen task $\pmb { w } \in \mathbb { R } ^ { d }$ can be derived using:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\begin{array} { r l r } { \pi _ { \pmb { w } } ^ { \prime } ( s ) } & { \in } & { \underset { \ b { u } \in \mathcal { U } } { \operatorname { a r g m a x } } \underset { \ b { z } \in \mathcal { C } } { \operatorname* { m a x } } Q ( s , \pmb { u } , z , \pmb { w } ) = \underset { \ b { u } \in \mathcal { U } } { \operatorname { a r g m a x } } \underset { \pmb { z } \in \mathcal { C } } { \operatorname* { m a x } } \psi ( s , \pmb { u } , z ) ^ { \top } \pmb { w } . } \end{array}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
Setting ${ \mathcal C } = \{ { w } \}$ allows us to revert back to UVFs, as we evaluate SFs induced by policy $\pi _ { w }$ on task $\textbf { \em w }$ itself. However, we can use any set of tasks that are similar to $\pmb { w }$ based on some similarity distribution $\mathcal { D } ( \cdot | \boldsymbol { w } )$ . The computed policy $\pi _ { w } ^ { \prime }$ is guaranteed to perform no worse on task $\pmb { w }$ than each of the policies $\{ \pi _ { z } \} _ { z \in { \mathcal C } }$ (Barreto et al., 2017), but often performs much better. SFs thus enable efficient use of GPI, which allows reuse of learned knowledge for zero-shot generalization.
|
| 50 |
+
|
| 51 |
+
# 3 MULTI-AGENT UNIVERSAL SUCCESSOR FEATURES
|
| 52 |
+
|
| 53 |
+
In this section, we introduce Multi-Agent Universal Successor Features (MAUSFs), extending single-agent USFs (Borsa et al., 2018) to multi-agent settings and show how we can learn generalized decentralized greedy policies for agents. The USFs based centralized joint-action value function $Q _ { t o t } ( \tau , u , z , w )$ allows evaluation of joint policy $\pi _ { z } = \left. \pi _ { z } ^ { 1 } , \ldots , \pi _ { z } ^ { n } \right.$ comprised of local agent policies $\boldsymbol { \pi } _ { z } ^ { a }$ of same task $_ z$ on task $\pmb { w }$ . However, each agent $a$ may execute a different policy $\pi _ { z ^ { a } } ^ { a }$ of different task $z ^ { a } \in \mathcal { C }$ , resulting in a combinatorial set of joint-policies. Maximizing over all combinations $\bar { z } \equiv \langle z ^ { 1 } , \dots , z ^ { n } \rangle \in \bar { \mathcal { C } } ^ { n }$ should therefore enormously improve GPI. To enable this flexibility, we define joint-action value function $( Q _ { t o t } )$ of joint policy $\pi _ { \bar { z } } = \{ \pi _ { z ^ { a } } ^ { a } \} _ { z ^ { a } \in \mathcal { C } }$ evaluated on any task ${ \mathbf { \boldsymbol { w } } \in \mathbb { R } ^ { d } }$ as: $Q _ { t o t } ( \tau , u , \bar { z } , w ) = \psi _ { t o t } ( \bar { \tau } , u , \bar { z } ) ^ { \dag } w$ , where $\psi _ { t o t } ( \tau , { \pmb u } , \bar { z } )$ are the MAUSFs of $( \pmb { \tau } , \pmb { u } )$ summarizing the joint dynamics of the environment under joint policy $\pi _ { \bar { z } }$ . However, training centralized MAUSFs and using centralized GPI to achieve maximization over a combinatorial space of $\bar { z }$ becomes impractical when there are more than a handful of agents, since the joint action space $( u )$ and joint task space $( \mathcal { C } ^ { n } )$ of the agents grows exponentially with the number of agents. To leverage CTDE and enable decentralized execution by agents, we therefore propose novel agentspecific $S F s$ for each agent $a$ following local policy $\pi _ { z ^ { a } } ^ { a }$ , which condition only on its own local action-observation history and task $z ^ { a }$ .
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 1: Schematic illustration of the MAUSFs training and UneVEn exploration with GPI policy.
|
| 57 |
+
|
| 58 |
+
Decentralized Execution: We define local utility functions for each agent $a$ as $Q ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } , \pmb { w } ) =$ $\psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } ; \theta ) ^ { \top } \pmb { w }$ , where $\psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } ; \theta )$ are the local agent-specific SFs induced by local policy $\pi _ { z ^ { a } } ^ { a } ( u ^ { a } | \tau ^ { a } )$ of agent $a$ sharing parameters $\theta$ . Intuitively, $Q ^ { \bar { a } } ( \tau ^ { a } , u ^ { a } , z ^ { a } , w )$ is the utility function for agent $a$ when local policy $\pi _ { z ^ { a } } ^ { a } ( u ^ { a } | \tau ^ { a } )$ of task $z ^ { a }$ is executed on task $\textbf { \em w }$ . We use VDN decomposition to represent MAUSFs $\psi _ { t o t }$ as a sum of local agent-specific SFs for each agent $a$ :
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
{ \cal Q } _ { t o t } ( \tau , u , \bar { z } , w ) = \sum _ { a = 1 } ^ { n } { \cal Q } ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } , w ) = \sum _ { a = 1 } ^ { n } \psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } ; \theta ) ^ { \top } w = \psi _ { t o t } ( \tau , u , \bar { z } ; \theta ) ^ { \top } w .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
We can now learn local agent-specific SFs $\psi ^ { a }$ for each agent $a$ that can be instantly weighted with any task vector $\pmb { w } \in \mathbb { R } ^ { d }$ to generate local utility functions $Q ^ { a }$ , thereby allowing agents to use the GPI policy in a decentralized manner.
|
| 65 |
+
|
| 66 |
+
Decentralized Local GPI: Our novel agent-specific SFs allows each agent $a$ to locally perform decentralized GPI by instant policy evaluation of a set $\mathcal { C }$ of local task policies $\{ \pi _ { z ^ { a } } ^ { a } \} _ { z ^ { a } \in \mathcal { C } }$ on any unseen task $\pmb { w }$ to compute a local GPI policy. Due to linearity of the VDN decomposition, this is equivalent to maximization over all combinations of $\bar { z } \equiv \langle z ^ { 1 } , \ldots , z ^ { n } \rangle \in \mathcal { C } \times \ldots \times \bar { \mathcal { C } } \equiv \mathcal { C } ^ { n }$ as:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { r c l l } { \pi _ { w } ^ { \prime } ( \tau ) } & { \in } & { \displaystyle \operatorname * { a r g m a x } _ { u \in \mathcal { U } } \operatorname* { m a x } _ { \bar { z } \in \mathcal { C } ^ { n } } Q _ { t o t } ( \tau , u , \bar { z } , w ) } & { = } & { \displaystyle \left\{ \underset { u ^ { a } \in \mathcal { U } } { \operatorname * { a r g m a x } } \operatorname* { m a x } _ { z ^ { a } \in \mathcal { C } } \psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ^ { a } ; \theta ) ^ { \top } w \right\} _ { a = 1 } ^ { n } . } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
As all of the above relies on the linearity of the VDN decomposition, it cannot be directly applied to nonlinear mixing techniques like QMIX (Rashid et al., 2020b).
|
| 73 |
+
|
| 74 |
+
Training: MAUSFs for task combination $\bar { z }$ are trained end-to-end by gradient descent on the loss:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r l r } { \mathcal { L } ( \boldsymbol { \theta } , \boldsymbol { \bar { z } } ) } & { = } & { \mathbb { E } _ { \sim \mathcal { B } } \left[ \left| \left| \phi ( s _ { t } , u _ { t } ) + \gamma \psi _ { t o t } ( \tau _ { t + 1 } , u _ { \bar { z } } ^ { \prime } , \bar { z } ; \boldsymbol { \theta } ^ { - } ) - \psi _ { t o t } ( \tau _ { t } , u _ { t } , \bar { z } ; \boldsymbol { \theta } ) \right| \right| _ { 2 } ^ { 2 } \right] , } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where the expectation is over a minibatch of samples $\{ ( s _ { t } , \pmb { u } _ { t } , \pmb { \tau } _ { t } ) \}$ from the replay buffer $\boldsymbol { B }$ (Lin, 1992), $\theta ^ { - }$ denotes the parameters of a target network (Mnih et al., 2015) and joint actions ${ \pmb u } _ { \bar { z } } ^ { \prime } = $ $\{ u _ { z ^ { a } } ^ { \prime a } \} _ { a = 1 } ^ { n }$ are selected individually by each agent network using the current parameters $\theta$ (called Double $Q$ -learning, van Hasselt et al., 2016): $\begin{array} { r } { u _ { z ^ { a } } ^ { \prime a } = \arg \operatorname* { m a x } _ { u \in \mathcal { U } } \psi ^ { a } ( \tau _ { t + 1 } ^ { a } , \stackrel { } { u } , z ^ { a } ; \theta ) ^ { \top } z ^ { a } } \end{array}$ . Each agent learns therefore local agent-specific SFs $\psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ; \theta )$ by gradient descent on $\mathcal { L } ( \boldsymbol { \theta } , \bar { \boldsymbol { z } } )$ for all $z \in \mathcal { C } \equiv \nu \cup \{ w \}$ , where $\dot { \nu } \sim \mathcal { \bar { D } } ( \cdot | \pmb { w } )$ is drawn from a distance measure around target task $\pmb { w }$ . The green region of Figure 1 shows a CTDE based architecture to train MAUSFs for a given target task $\textbf { \em w }$ . A detailed algorithm is present in Appendix A.
|
| 81 |
+
|
| 82 |
+
# 4 UNEVEN
|
| 83 |
+
|
| 84 |
+
In this section, we present UneVEn (red region of Figure 1), which leverages MAUSFs and decentralized GPI to enable efficient exploration on the target task $\pmb { w }$ . The joint-action value function of the target task $\pmb { w }$ suffers from suboptimal approximations due to monotonic factorization. At the beginning of every exploration episode, we sample a set of related tasks $\nu = \{ z \sim \mathcal { D } ( \cdot | \pmb { w } ) \}$ , containing potentially simpler reward functions, from a distribution $\mathcal { D }$ around the target task. The basic idea is that some of these related tasks can be efficiently learned using a monotonic joint-action value function. These tasks will therefore be solved early and exploration will concentrate on stateactions that are useful to them. As the sampled tasks are similar to $\pmb { w }$ , this has the potential to put more weight on the important joint actions of the target task (Rashid et al., 2020a). This implicit weighting allows the learning of the joint-action value function of the target task to focus on accurately representing the value of the more important joint actions, and thereby overcome the relative overgeneralization pathology.
|
| 85 |
+
|
| 86 |
+
Many choices for $\mathcal { D }$ are possible, but in the following we sample related tasks using a normal distribution centered around the target task $\pmb { w } \in \mathbb { R } ^ { d }$ with a fixed variance $\sigma$ as $\mathcal { D } = \bar { \mathcal { N } } ( \boldsymbol { w } , \sigma \mathbf { I } _ { d } )$ . The resulting task vectors weight the basis functions $\phi$ differently and represent different reward functions. In particular the varied reward functions can make these tasks much easier, but also harder, to solve with monotonic value functions. However, the approach has the advantage of not requiring any domain knowledge. The consequences of sampling harder tasks on learning are discussed with the corresponding action-selection schemes below.
|
| 87 |
+
|
| 88 |
+
Action-Selection Schemes: UneVEn uses two novel schemes to enable action selection based on related tasks. To emphasize the importance of the target task, we define a probability $\alpha$ of selecting actions based on the target task. Therefore, with probability $1 - \alpha$ , the action is selected based on the related task. Similar to other exploration schemes, $\alpha$ is annealed from 0.3 to 1.0 in our experiments over a fixed number of steps at the beginning of training. Once this exploration stage is finished (i.e., $\alpha = 1$ ), actions are always taken based on the target task’s joint-action value function. Each actionselection scheme employs a local decentralized GPI policy, that maximizes over a set of policies $\pi _ { z }$ based on $z \in { \mathcal { C } } _ { 1 }$ (also referred to as the evaluation set) to estimate the $Q$ -values of another set of tasks k ∈ C2 (also referred to as the target set) using: Qa(τat ,u,z,k)
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\begin{array} { r l } & { \mathrm { \mathrm { \mathrm { \mathrm { \mathrm { \mathrm { \arctan ~ } } a s ~ t h e \mathrm { \Lambda } t a r g e t \ s e t } ) \ u s i n g } : } } \qquad Q ^ { a } ( \tau _ { t } ^ { a } , u , z , k ) } \\ & { u _ { t } = \Bigl \{ u _ { t } ^ { a } = \underset { u \in \mathcal { U } } { \mathrm { \operatorname* { \arg m a x } } } \underset { k \in \mathcal { C } _ { 2 } } { \operatorname* { m a x } } \underset { z \in \mathcal { C } _ { 1 } } { \operatorname* { m a x } } \widehat { \psi ^ { a } \big ( \tau _ { t } ^ { a } , u , z ; \theta \big ) ^ { \top } k } \Bigr \} _ { a \in \mathcal { A } } . } \end{array}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
Here $\mathcal { C } _ { 1 } = \nu \cup \{ w \}$ is the set of target and related tasks which induce the policies that are evaluated (dot-product) on the set of tasks $\mathcal { C } _ { 2 }$ , which varies with different action-selection schemes. The red box in Figure 1 illustrates UneVEn exploration. For example, $Q$ -learning always picks actions based on the target task, i.e., the target set $\mathcal { C } _ { 2 } = \{ w \}$ . However, this scheme does not favour important joint actions. We call this default action-selection scheme target GPI and execute it with probability $\alpha$ . We now propose two novel action-selection schemes based on related tasks with probability $1 - \alpha$ , and thereby implicitly weighting joint actions during learning.
|
| 95 |
+
|
| 96 |
+
Uniform GPI: At the beginning of each episode, this action-selection scheme uniformly picks one related task, i.e., the target set $\mathcal { C } _ { 2 } = \{ k \sim \mathrm { U n i f o r m } ( \nu ) \}$ , and selects actions based on that task using the GPI policy throughout the episode. This uniform task selection explores the learned policies of all related tasks in $\mathcal { D }$ . This works well in practice as there are often enough simpler tasks to induce the required bias over important joint actions. However, if the sampled related task is harder than the target task, the action-selection based on these harder tasks might hurt learning on the target task and lead to higher variance during training.
|
| 97 |
+
|
| 98 |
+
Greedy GPI: At every time-step $t$ , this action-selection scheme picks the task $\pmb { k } \in \nu \cup \{ \pmb { w } \}$ that gives the highest $Q$ -value amongst the related and target tasks, i.e., the target set becomes $\mathcal { \bar { C } } _ { 2 } \overset { \cdot } { = } \nu \cup \{ w \}$ . Due to the greedy nature of this action-selection scheme, exploration is biased towards solved tasks, as those have larger values. We are thus exploring the solutions of tasks that are both solvable and similar to the target task $\pmb { w }$ , which makes them great candidates for important joint actions of $\textbf { \em w }$ .
|
| 99 |
+
|
| 100 |
+
NO-GPI: To demonstrate the influence of GPI on the above schemes, we also investigate ablations, where we define the evaluation set ${ \mathcal C } _ { 1 } = \{ k \}$ to only contain the currently estimated task $\boldsymbol { k }$ , i.e., using $\begin{array} { r } { \boldsymbol { \mathsf { \Pi } } \boldsymbol { u } _ { t } = \{ u _ { t } ^ { a } = \arg \operatorname* { m a x } _ { \boldsymbol { u } \in \mathcal { U } } \operatorname* { m a x } _ { \boldsymbol { k } \in \mathcal { C } _ { 2 } } \psi ^ { a } ( \tau _ { t } ^ { a } , \boldsymbol { u } , \boldsymbol { k } ; \theta ) ^ { \top } \boldsymbol { k } \} _ { a \in \mathcal { A } } } \end{array}$ for action selection.
|
| 101 |
+
|
| 102 |
+
# 5 EXPERIMENTS
|
| 103 |
+
|
| 104 |
+
In this section, we evaluate UneVEn on a variety of complex domains. For evaluation, all experiments are carried out with five random seeds and results are shown with $\pm$ standard error across
|
| 105 |
+
|
| 106 |
+
seeds. We compare our method against a number of SOTA value-based MARL approaches: IQL (Tan, 1993), VDN (Sunehag et al., 2017), QMIX (Rashid et al., 2020b), MAVEN (Mahajan et al., 2019), WQMIX (Rashid et al., 2020a), QTRAN (Son et al., 2019), and QPLEX (Wang et al., 2020a).
|
| 107 |
+
|
| 108 |
+
# Domain 1 : $m$ -step matrix game
|
| 109 |
+
|
| 110 |
+
We first evaluate UneVEn on $m$ -step matrix game proposed by Mahajan et al. (2019). This task is difficult to solve using simple $\epsilon$ -greedy exploration policies as committed exploration is required to achieve the optimal return. Appendix E shows the $m$ -step matrix game from Mahajan et al. (2019), in which the first joint decision of two agents determines the maximal outcome after another $m { - } 1$ decisions. One initial joint action can reach a return of up to $m + 3$ , whereas another only allows for $m$ . This challenges monotonic value functions, as the optimal joint reward function of the first decision is nonmonotonic. Figure 2 shows results of all methods on this task for $m = 1 0$ after training for $3 5 k$ steps. UneVEn with greedy (UneVEn-Greedy-GPI) action selection scheme converges to an optimal return and both greedy and uniform (UneVEn-Uniform-GPI) schemes outperforms all other methods, which suffer from poor $\epsilon$ -greedy exploration and often learn to take the suboptimal action in the beginning. Due to the nonmonotonicity of the initial state, it becomes difficult to switch the policy later, leading to suboptimal returns and only rarely converging to optimal solutions.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 2: Baseline results for $m = 1 0$ .
|
| 114 |
+
|
| 115 |
+
# Domain 2 : Cooperative Predator-Prey
|
| 116 |
+
|
| 117 |
+
We next evaluate UneVEn on challenging cooperative predator-prey tasks similar to one proposed by Son et al. (2019), but significantly more complex in terms of the coordination required amongst agents. We use a complex partially observable predator-prey (PP) task involving eight agents (predators) and three prey that is designed to test coordination between agents, as each prey needs to be captured by at least three surrounding agents with a simultaneous capture action. If only one or two surrounding agents attempt to capture the prey, a negative reward of magnitude $p$ is given. Successful capture yields a positive reward of $+ 1$ . This task is challenging for two reasons. First, depending on the magnitude of penalty $p$ , exploration is difficult as even if a single agent miscoordinates, the penalty is given, and therefore, any steps toward successful coordination are penalized. Second, the agents must be able to differentiate between the values of successful and unsuccessful collaborative actions, which monotonic value functions can only do if all agents already act optimally. More details about the task are available in Appendix B.
|
| 118 |
+
|
| 119 |
+
Proposition 1. For the predator-prey game defined above, the optimal joint action reward function for any group of $2 \leq k \leq n$ predator agents surrounding a prey is nonmonotonic (as defined by Mahajan et al., 2019) iff $p > 0$ . (Proof is provided in Appendix B).
|
| 120 |
+
|
| 121 |
+
Simpler PP Tasks: We first demonstrate that both VDN and QMIX with monotonic joint-action value functions can learn on target tasks with simpler reward functions. To generate a simpler task, we remove the penalty associated with miscoordination, i.e., $p = 0$ , thereby making the returns monotonic. Figure 3 shows that both QMIX and VDN can solve this task as there is no miscoordination penalty and the monotonic joint-action value function can learn to efficiently represent the optimal joint-action values. Other SOTA value-based approaches (MAVEN, WQMIX and QPLEX) and UneVEn with both uniform (UneVEn-Uniform-GPI) and greedy (UneVEn-Greedy-GPI) action-selection schemes can also solve this monotonic target task.
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: Baseline results for $p = 0$ .
|
| 125 |
+
|
| 126 |
+
Harder PP Tasks: We now make the target task nonmonotonic by increasing the magnitude of the penalty associated with each miscoordination, i.e., $p \in \{ 0 . 0 0 4 , 0 . \dot { 0 } 0 8 , 0 . 0 1 2 , 0 . 0 1 6 \}$ . For a smaller penalty of $p = 0 . 0 0 4$ , Figure 4 (top left) shows that VDN is still able to solve the task, further suggesting that simpler reward related tasks (with lower penalties) can be solved with monotonic approximations. However, both QMIX and VDN fail to learn on three other higher penalty target tasks due to their monotonic constraints, which hinder the accurate learning of the joint-action value functions. Intuitively, when uncoordinated joint actions are much more likely than coordinated ones, the penalty term can dominate the average value estimated by each agent’s utility. This makes it difficult to learn an accurate monotonic approximation that will select the optimal joint actions.
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 4: Comparison between UneVEn and SOTA MARL baselines with $p \in \{ 0 . 0 0 4 , 0 . 0 0 8 , 0 . 0 1 2 , 0 . 0 1 6 \}$
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 5: Ablation results: Comparison between different action selection of UneVEn for $p \in \{ 0 . 0 1 2 , 0 . 0 1 6 \}$
|
| 133 |
+
|
| 134 |
+
Interestingly, other SOTA value-based approaches that aim to address the monotonicity restriction of QMIX and VDN such as MAVEN, QTRAN, WQMIX and QPLEX also fail to learn on higher penalty tasks. WQMIX solves the task when $p = 0 . 0 0 4$ , but fails on other three higher penalty target tasks. Although WQMIX uses an explicit weighting mechanism to bias learning towards important joint actions, it must identify these actions by learning a nonmonotonic value function first. An $\epsilon$ -greedy exploration based on the target task will take a long time to learn such a value function, which is visible in the large standard error for $p \in \{ 0 . 0 0 8 , 0 . 0 1 2 , 0 . 0 1 6 \}$ in Figure 4. By contrast, both UneVEn-Uniform-GPI and UneVEn-Greedy-GPI can approximate nonmonotonic value functions more accurately and solve the task for all values of $p$ . As expected, the variance of UneVEn-Uniform-GPI is high on higher penalty target tasks (for e.g., $p = 0 . 0 1 6 $ ) as exploration suffers from action selection based on harder related tasks. UneVEn-Greedy-GPI does not suffer from this problem. Videos of learnt policies are available at $\mathtt { \tau \mathtt { l t t p s : / / r b . 9 Y / r d w p o 5 } }$ .
|
| 135 |
+
|
| 136 |
+
Ablations: Figure 5 shows ablation results for higher penalty tasks, i.e., $p = \{ 0 . 0 1 2 , 0 . 0 1 6 \}$ . To contrast the effect of UneVEn on exploration, we compare our two novel action-selection schemes to UneVEn-Target-GPI, which only selects the greedy actions of the target task. The results clearly show that UneVEn-Target-GPI fails to solve the higher penalty nonmonotonic tasks as the employed monotonic joint value function of the target task fails to accurately represent the values of different joint actions. This demonstrates the critical role of UneVEn and its action-selection schemes.
|
| 137 |
+
|
| 138 |
+
Next we evaluate the effect of GPI by comparing against UneVEn with MAUSFs without using the GPI policy, i.e., setting the evaluation set ${ \mathcal C } _ { 1 } = \{ k \}$ in Equation 7. First, UneVEn using a NOGPI policy with both uniform (Uniform-NOGPI) and greedy (Greedy-NOGPI) action selection outperform Target-NOGPI, further strengthening the claim that UneVEn with its novel action-selection scheme enables efficient exploration and bias towards optimal joint actions. Next, Figure 5 clearly shows that for each corresponding action-selection scheme (uniform, greedy, and target), using a GPI policy $( * \mathrm { - } \mathrm { { G P I } ) }$ is always favourable as it performs either similarly to the NOGPI policy (∗- NOGPI) or much better. GPI appears to improve zero-shot generalization of MAUSFs across tasks, which in turn enables good action selection for related tasks during UneVEn exploration.
|
| 139 |
+
|
| 140 |
+
Zero-Shot Generalization: Lastly, we evaluate this zero-shot generalization for all methods to check if the learnt policies are useful for unseen high penalty test tasks. We train all methods for 8 million environmental steps on a task with $p ~ = ~ 0 . 0 0 4$ , and test 60 rollouts of the resulting policies of all methods that are able to solve the training task, i.e., UneVEn-Greedy-GPI, UneVEn-Uniform-GPI, VDN, MAVEN, and WQMIX, on tasks with $p \in \{ 0 . 2 , 0 . 5 \}$ . For policies trained with UneVEn-Greedy-GPI and UneVEn-Uniform-GPI, we use the NOGPI policy for the zero-shot testing, i.e., $\mathcal { C } _ { 1 } = \mathcal { C } _ { 2 } = \{ \pmb { w } \}$ . Figure 6 shows that UneVEn with both uniform and greedy schemes exhibits great zero-shot generalization and solves both test tasks even with very high penalties. As MAUSFs learn the reward’s basis functions, rather than the reward itself, zero-shot generalization to larger penalties follow naturally. Furthermore, using UneVEn exploration allows the agents to collect enough diverse behaviour to come up with a near optimal policy for the test tasks. On the other hand, the learnt policies for all other methods that solve the target task with $p = 0 . 0 0 4$ are ineffective in these higher penalty nonmonotonic tasks, as they do not learn to avoid unsuccessful capture attempts. More details about the implementations are included in Appendix C. Additional ablation experiments are discussed in Appendix D.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 6: Zero-shot generalization comparison; training on $p = 0 . 0 0 4$ , testing on $p \in \{ 0 . { \overset { - } { 2 } } , 0 . 5 \}$ .
|
| 144 |
+
|
| 145 |
+
# Domain 3 : Starcraft Multi-Agent Challenge (SMAC)
|
| 146 |
+
|
| 147 |
+
We now evaluate UneVEn on challenging cooperative StarCraft II maps from the SMAC benchmark (Samvelyan et al., 2019). We consider SMAC maps where each ally agent unit is additionally penalized for being killed or suffering damage from the enemy, in addition to receiving positive reward for killing/inflicting damage on enemy units, which has recently shown to improve performance (Son et al., 2020). We present the results for one super hard map (MMM2, involving 10 units of 3 types), two hard asymmetric maps (5m vs 6m and 10m vs 11m) and three easy maps (2s3z, 1c3s5z and $8 \mathrm { m }$ ).
|
| 148 |
+
|
| 149 |
+
Figure 7 presents the mean test win rate for all maps. Both VDN and QMIX achieve almost $100 \%$ win rate on these maps, which leads us to conclude that they do not suffer from relative overgeneralization and that simple $\epsilon$ -greedy policies suffices for these maps. Thus, the additional complexity of learning MAUSFs in our approach results in slightly slower convergence. However, UneVEn with both GPI schemes matches the performance as VDN and QMIX in most maps, with only small deviations in $5 \mathrm { m } _ { - } \mathrm { v } s _ { - } 6 \mathrm { m }$ , demonstrating that our method can scale well to large complex tasks.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 7: Comparison between UneVEn, VDN and QMIX on SMAC maps.
|
| 153 |
+
|
| 154 |
+
# 6 RELATED WORK
|
| 155 |
+
|
| 156 |
+
Improving monotonic value function factorization in CTDE MAVEN (Mahajan et al., 2019) shows that the monotonic joint-action value function of QMIX and VDN suffers from suboptimal approximations on nonmonotonic tasks. It addresses this problem by learning a diverse ensemble of monotonic joint-action value functions conditioned on a latent variable by optimizing the mutual information between the joint trajectory and the latent variable. Deep Coordination Graphs (DCG) (Bohmer et al., 2020) uses a predefined coordination graph (Guestrin et al., 2002) to represent the ¨ joint-action value function. However, DCG is not a fully decentralized approach and specifying the coordination graph can require significant domain knowledge. Son et al. (2019) propose QTRAN that addresses the monotonic restriction of QMIX by learning a (decentralizable) VDN-factored joint-action value function along with an unrestricted centralized critic. The corresponding utility functions are distilled from the critic by solving a linear optimization problem involving all joint actions, but its exact implementation is computationally intractable and the corresponding approximate versions have instable performance. QPLEX (Wang et al., 2020a) uses a duplex dueling (Wang et al., 2016) network architecture to factorize the joint-action value function with linear decomposition structure. WQMIX (Rashid et al., 2020a) learns a QMIX-factored joint-action value function along with an unrestricted centralized critic and proposes explicit weighting mechanisms to bias the monotonic approximation of the optimal joint-action value function towards important joint actions, which is similar to our work. However, in our work, the weightings are implicitly done through action-selection based on simpler reward related tasks, which are easier to solve.
|
| 157 |
+
|
| 158 |
+
Exploration There exists a plethora of techniques for exploration in model-free single-agent RL, based on intrinsic novelty reward (Bellemare et al., 2016; Tang et al., 2017), predictability (Pathak et al., 2017), pure curiosity (Burda et al., 2019) or Bayesian posteriors (Osband et al., 2016; Gal et al., 2017; Fortunato et al., 2018; O’Donoghue et al., 2018). In the context of multi-agent RL, Bohmer ¨ et al. (2019) discuss the influence of unreliable intrinsic reward and Wang et al. (2020b) quantify the influence that agents have on each other’s return. Zheng & Yue (2018) propose to coordinate exploration between agents by shared latent variables, whereas Jaques et al. (2018) investigate social motivations of competitive agents. However, these techniques aim to visit as much of the state-action space as possible, which exacerbates the relative overgeneralization pathology. Approaches that use state abstraction (e.g., Roderick et al., 2018) can speed up exploration, but only by restricting the considered space with prior knowledge. In contrast, UneVEn explores similar tasks. This guides exploration to states and actions that prove useful, which restricts the explored space and overcomes relative overgeneralization. To the best of our knowledge, the only other work that explores the task space is Leibo et al. (2019): they use the evolution of competing agents as an auto-curriculum of harder and harder tasks. Collaborative agents cannot compete against each other, though, and their approach does therefore not affect relative overgeneralization.
|
| 159 |
+
|
| 160 |
+
Successor Features Most of the work on SFs have been focused on single-agent settings (Dayan, 1993; Kulkarni et al., 2016; Lehnert et al., 2017; Zhu et al., 2017; Barreto et al., 2017; 2018; Borsa et al., 2018; Lehnert & Littman, 2019; Lee et al., 2019; Hansen et al., 2019) for transfer learning and zero-shot generalization across tasks with different reward functions. Gupta et al. (2019) uses single-agent SFs in a transition-independent multi-agent setting to estimate the probability of events.
|
| 161 |
+
|
| 162 |
+
# 7 CONCLUSION
|
| 163 |
+
|
| 164 |
+
This paper presents novel multi-agent universal successor features (MAUSFs) decomposed as local agent-specific SFs, which enables decentralized version of the GPI to maximize over a combinatorial space of agent policies, making MAUSFs a perfect fit for MARL. We then propose UneVEn, which leverages the generalization power of MAUSFs to perform action-selection based on simpler related tasks to address the issue of sub-optimality of target task’s monotonic joint-action value function in current SOTA methods. Our experiments show that UneVEn significantly outperforms VDN, QMIX and other state-of-the-art value-based MARL methods on nonmonotonic tasks by a substantial margin.
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
Andre Barreto, Will Dabney, R ´ emi Munos, Jonathan J Hunt, Tom Schaul, Hado P van Hasselt, and ´ David Silver. Successor features for transfer in reinforcement learning. In Advances in neural information processing systems, pp. 4055–4065, 2017.
|
| 169 |
+
|
| 170 |
+
Andre Barreto, Diana Borsa, John Quan, Tom Schaul, David Silver, Matteo Hessel, Daniel Mankowitz, Augustin Zidek, and Remi Munos. Transfer in deep reinforcement learning using successor features and generalised policy improvement. In International Conference on Machine Learning, pp. 501–510. PMLR, 2018.
|
| 171 |
+
|
| 172 |
+
Andre Barreto, Shaobo Hou, Diana Borsa, David Silver, and Doina Precup. Fast reinforcement ´ learning with generalized policy updates. Proceedings of the National Academy of Sciences, 2020.
|
| 173 |
+
|
| 174 |
+
Marc G. 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 (NIPS) 29, pp. 1471–1479, 2016.
|
| 175 |
+
|
| 176 |
+
Wendelin Bohmer, Tabish Rashid, and Shimon Whiteson. Exploration with unreliable intrinsic ¨ reward in multi-agent reinforcement learning. CoRR, abs/1906.02138, 2019. URL http: //arxiv.org/abs/1906.02138. Presented at the ICML Exploration in Reinforcement Learning workshop.
|
| 177 |
+
|
| 178 |
+
Wendelin Bohmer, Vitaly Kurin, and Shimon Whiteson. Deep coordination graphs. In ¨ Proceedings of Machine Learning and Systems (ICML), pp. 2611–2622, 2020. URL https://arxiv. org/abs/1910.00091.
|
| 179 |
+
|
| 180 |
+
Diana Borsa, Andre Barreto, John Quan, Daniel Mankowitz, R ´ emi Munos, Hado van Hasselt, ´ David Silver, and Tom Schaul. Universal successor features approximators. arXiv preprint arXiv:1812.07626, 2018.
|
| 181 |
+
|
| 182 |
+
Yuri Burda, Harri Edwards, Deepak Pathak, Amos Storkey, Trevor Darrell, and Alexei A. Efros. Large-scale study of curiosity-driven learning. In International Conference on Learning Representations (ICLR), 2019.
|
| 183 |
+
|
| 184 |
+
Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555, 2014.
|
| 185 |
+
|
| 186 |
+
Peter Dayan. Improving generalization for temporal difference learning: The successor representation. Neural Computation, 5(4):613–624, 1993.
|
| 187 |
+
|
| 188 |
+
Jakob N Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In Thirty-second AAAI conference on artificial intelligence, 2018.
|
| 189 |
+
|
| 190 |
+
Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Matteo Hessel, Ian Osband, Alex Graves, Volodymyr Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, Charles Blundell, and Shane Legg. Noisy networks for exploration. In International Conference on Learning Representations (ICLR), 2018. URL https://openreview.net/forum?id= rywHCPkAW.
|
| 191 |
+
|
| 192 |
+
Yarin Gal, Jiri Hron, and Alex Kendall. Concrete dropout. In Advances in Neural Information Processing Systems (NIPS), pp. 3584–3593, 2017.
|
| 193 |
+
|
| 194 |
+
Carlos Guestrin, Michail Lagoudakis, and Ronald Parr. Coordinated reinforcement learning. In ICML, volume 2, pp. 227–234. Citeseer, 2002.
|
| 195 |
+
|
| 196 |
+
Tarun Gupta, Akshat Kumar, and Praveen Paruchuri. Successor features based multi-agent rl for event-based decentralized mdps. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 6054–6061, 2019.
|
| 197 |
+
|
| 198 |
+
Steven Hansen, Will Dabney, Andre Barreto, Tom Van de Wiele, David Warde-Farley, and Volodymyr Mnih. Fast task inference with variational intrinsic successor features. arXiv preprint arXiv:1906.05030, 2019.
|
| 199 |
+
|
| 200 |
+
Natasha Jaques, Angeliki Lazaridou, Edward Hughes, C¸ aglar Gulc¸ehre, Pedro A. Ortega, ¨ DJ Strouse, Joel Z. Leibo, and Nando de Freitas. Intrinsic social motivation via causal influence in multi-agent RL. CoRR, abs/1810.08647, 2018. URL https://arxiv.org/abs/ 1810.08647.
|
| 201 |
+
|
| 202 |
+
Landon Kraemer and Bikramjit Banerjee. Multi-agent reinforcement learning as a rehearsal for decentralized planning. Neurocomputing, 190:82–94, 2016.
|
| 203 |
+
|
| 204 |
+
Tejas D Kulkarni, Ardavan Saeedi, Simanta Gautam, and Samuel J Gershman. Deep successor reinforcement learning. arXiv preprint arXiv:1606.02396, 2016.
|
| 205 |
+
|
| 206 |
+
Donghun Lee, Srivatsan Srinivasan, and Finale Doshi-Velez. Truly batch apprenticeship learning with deep successor features. arXiv preprint arXiv:1903.10077, 2019.
|
| 207 |
+
|
| 208 |
+
Lucas Lehnert and Michael L Littman. Successor features support model-based and model-free reinforcement learning. CoRR abs/1901.11437, 2019.
|
| 209 |
+
|
| 210 |
+
Lucas Lehnert, Stefanie Tellex, and Michael L Littman. Advantages and limitations of using successor features for transfer in reinforcement learning. arXiv preprint arXiv:1708.00102, 2017.
|
| 211 |
+
|
| 212 |
+
Joel Z. Leibo, Edward Hughes, Marc Lanctot, and Thore Graepel. Autocurricula and the emergence of innovation from social interaction: A manifesto for multi-agent intelligence research. CoRR, abs/1903.00742, 2019. URL http://arxiv.org/abs/1903.00742.
|
| 213 |
+
|
| 214 |
+
Long-Ji Lin. Self-improving reactive agents based on reinforcement learning, planning and teaching. Machine Learning, 8(3):293–321, 1992.
|
| 215 |
+
|
| 216 |
+
Anuj Mahajan, Tabish Rashid, Mikayel Samvelyan, and Shimon Whiteson. Maven: Multi-agent variational exploration. In Advances in Neural Information Processing Systems, pp. 7613–7624, 2019.
|
| 217 |
+
|
| 218 |
+
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–533, 2015.
|
| 219 |
+
|
| 220 |
+
Brendan O’Donoghue, Ian Osband, Remi Munos, and Volodymyr Mnih. The uncertainty Bell- ´ man equation and exploration. In Proceedings of the 35th International Conference on Machine Learning (ICML), pp. 3836–3845, 2018. URL http://proceedings.mlr.press/v80/ o-donoghue18a.html.
|
| 221 |
+
|
| 222 |
+
Frans A Oliehoek, Christopher Amato, et al. A concise introduction to decentralized POMDPs, volume 1. Springer, 2016.
|
| 223 |
+
|
| 224 |
+
Afshin OroojlooyJadid and Davood Hajinezhad. A review of cooperative multi-agent deep reinforcement learning. arXiv preprint arXiv:1908.03963, 2019.
|
| 225 |
+
|
| 226 |
+
Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. In Proceedings of the 33rd International Conference on International Conference on Machine Learning (ICML), pp. 2377–2386, 2016.
|
| 227 |
+
|
| 228 |
+
Liviu Panait, Sean Luke, and R Paul Wiegand. Biasing coevolutionary search for optimal multiagent behaviors. IEEE Transactions on Evolutionary Computation, 10(6):629–645, 2006.
|
| 229 |
+
|
| 230 |
+
Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017.
|
| 231 |
+
|
| 232 |
+
Tabish Rashid, Gregory Farquhar, Bei Peng, and Shimon Whiteson. Weighted qmix: Expanding monotonic value function factorisation. arXiv preprint arXiv:2006.10800, 2020a.
|
| 233 |
+
|
| 234 |
+
Tabish Rashid, Mikayel Samvelyan, Christian Schroeder De Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. Monotonic value function factorisation for deep multi-agent reinforcement learning. arXiv preprint arXiv:2003.08839, 2020b.
|
| 235 |
+
|
| 236 |
+
Melrose Roderick, Christopher Grimm, and Stefanie Tellex. Deep abstract Q-networks. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems (AAMAS), pp. 131–138, 2018.
|
| 237 |
+
|
| 238 |
+
Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim GJ Rudner, Chia-Man Hung, Philip HS Torr, Jakob Foerster, and Shimon Whiteson. The starcraft multi-agent challenge. arXiv preprint arXiv:1902.04043, 2019.
|
| 239 |
+
|
| 240 |
+
Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In International conference on machine learning, pp. 1312–1320, 2015.
|
| 241 |
+
|
| 242 |
+
Kyunghwan Son, Daewoo Kim, Wan Ju Kang, David Earl Hostallero, and Yung Yi. Qtran: Learning to factorize with transformation for cooperative multi-agent reinforcement learning. arXiv preprint arXiv:1905.05408, 2019.
|
| 243 |
+
|
| 244 |
+
Kyunghwan Son, Sungsoo Ahn, Roben Delos Reyes, Jinwoo Shin, and Yung Yi. Qtran++: Improved value transformation for cooperative multi-agent reinforcement learning, 2020.
|
| 245 |
+
|
| 246 |
+
Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Value-decomposition networks for cooperative multi-agent learning. arXiv preprint arXiv:1706.05296, 2017.
|
| 247 |
+
|
| 248 |
+
Ming Tan. Multi-agent reinforcement learning: Independent vs. cooperative agents. In Proceedings of the tenth international conference on machine learning, pp. 330–337, 1993.
|
| 249 |
+
|
| 250 |
+
Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, OpenAI Xi Chen, Yan Duan, John Schulman, Filip DeTurck, and Pieter Abbeel. #Exploration: A study of count-based exploration for deep reinforcement learning. In Advances in Neural Information Processing Systems (NIPS) 30, pp. 2753–2762. 2017.
|
| 251 |
+
|
| 252 |
+
Hado van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In Proceedings of the 13th AAAI Conference on Artificial Intelligence, pp. 2094–2100, 2016. URL https://arxiv.org/pdf/1509.06461.pdf.
|
| 253 |
+
|
| 254 |
+
Jianhao Wang, Zhizhou Ren, Terry Liu, Yang Yu, and Chongjie Zhang. Qplex: Duplex dueling multi-agent q-learning. arXiv preprint arXiv:2008.01062, 2020a.
|
| 255 |
+
|
| 256 |
+
Tonghan Wang, Jianhao Wang, Yi Wu, and Chongjie Zhang. Influence-based multi-agent exploration. In International Conference on Learning Representations, 2020b. URL https: //openreview.net/forum?id ${ . } = { }$ BJgy96EYvr.
|
| 257 |
+
|
| 258 |
+
Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando Freitas. Dueling network architectures for deep reinforcement learning. In International conference on machine learning, pp. 1995–2003, 2016.
|
| 259 |
+
|
| 260 |
+
Ermo Wei, Drew Wicke, David Freelan, and Sean Luke. Multiagent soft q-learning. arXiv preprint arXiv:1804.09817, 2018.
|
| 261 |
+
|
| 262 |
+
Stephan Zheng and Yisong Yue. Structured exploration via hierarchical variational policy networks, 2018. URL https://openreview.net/forum?id $=$ HyunpgbR-.
|
| 263 |
+
|
| 264 |
+
Yuke Zhu, Daniel Gordon, Eric Kolve, Dieter Fox, Li Fei-Fei, Abhinav Gupta, Roozbeh Mottaghi, and Ali Farhadi. Visual semantic planning using deep successor representations. In Proceedings of the IEEE international conference on computer vision, pp. 483–492, 2017.
|
| 265 |
+
|
| 266 |
+
# A TRAINING ALGORITHM
|
| 267 |
+
|
| 268 |
+
Algorithm 1 presents the training of MAUSFs with UneVEn. Our method is able to learn on all tasks (target $\pmb { w }$ and sampled $_ z$ ) simultaneously in a sample efficient manner using the same feature $\phi _ { t } \equiv \phi ( s _ { t } , { \boldsymbol { u } } _ { t } )$ due to the linearly decomposed reward function (Equation 1).
|
| 269 |
+
|
| 270 |
+
# Algorithm 1 Training MAUSFs with UneVEn
|
| 271 |
+
|
| 272 |
+
Require: , $\alpha$ , $\beta$ target task $\textbf { \em w }$ , set of agents $\mathcal { A }$ , standard deviation $\sigma$
|
| 273 |
+
|
| 274 |
+
1: procedure TRAIN:
|
| 275 |
+
2: Initialize the local-agent SF network $\psi ^ { a } ( \tau ^ { a } , u ^ { a } , z ; \theta )$ and replay buffer $\mathcal { M }$
|
| 276 |
+
3: for fixed number of epochs do
|
| 277 |
+
4: $\boldsymbol \nu \sim \mathcal { N } ( \boldsymbol { \boldsymbol w } , \sigma \mathbf { I } _ { d } )$ ; ${ \pmb { o } } _ { 0 } \gets \mathrm { R E S E T E N V } ( )$ $\ u \ u \ash \pmb \sigma _ { t } \equiv \{ o _ { t } ^ { a } \} _ { a \in \mathcal { A } }$
|
| 278 |
+
5: $t = 0 \mathrm { ; } \quad \mathcal { M } \gets \mathrm { N E W E P I S O D E } ( \mathcal { M } , \nu , \pmb { \sigma } _ { 0 } )$
|
| 279 |
+
6: while not terminated do
|
| 280 |
+
7: if Bernoull $( \epsilon ) { = } 1$ then $\mathbf { \delta } u _ { t } \gets \mathrm { U n i f o r m } ( \mathcal { U } )$
|
| 281 |
+
8: else ${ \mathbf { \delta u } } _ { t } \gets \mathrm { U N E V E N } ( \tau _ { t } , \nu )$
|
| 282 |
+
9: $\langle o _ { t + 1 } , \phi _ { t } \rangle \gets \mathrm { E N V S T E P } ( u _ { t } )$
|
| 283 |
+
10: $\begin{array} { r l } & { \mathcal { M } \mathrm { A D D T R A N S I T I O N } ( \mathcal { M } , \boldsymbol { u } _ { t } , o _ { t + 1 } , \phi _ { t } ) } \\ & { t t + 1 } \end{array}$
|
| 284 |
+
11:
|
| 285 |
+
12: $\begin{array} { r } { \begin{array} { r l } { \mathcal { L } \gets 0 ; } & { { } \mathcal { B } \gets \mathrm { S A M P L E M I N I B A T C H } ( \mathcal { M } ) } \end{array} } \end{array}$
|
| 286 |
+
13: foreach $\left\{ \tau _ { t } , \boldsymbol { u } _ { t } , \phi _ { t } , \tau _ { t + 1 } , \nu \right\} \in \mathcal { B }$ do
|
| 287 |
+
14: foreach $z \in \nu \cup \{ w \}$ do
|
| 288 |
+
15: $\begin{array} { r l } & { u _ { z } ^ { \prime } \gets \{ \underset { u \in \mathcal { U } } { \mathrm { a r g } \operatorname* { m a x } } \psi ^ { a } ( \tau _ { t + 1 } ^ { a } , u , z ; \theta ) ^ { \top } z \} _ { a \in A } } \\ & { \mathcal { L } \gets \mathcal { L } + \left\| \phi _ { t } + \gamma \psi _ { t o t } ( \tau _ { t + 1 } , u _ { z } ^ { \prime } , z ; \theta ^ { - } ) - \psi _ { t o t } ( \tau _ { t } , u _ { t } , z ; \theta ) \right\| _ { 2 } ^ { 2 } } \\ & { \theta \gets \mathrm { O P T I M I Z E } ( \theta , \nabla _ { \theta } \mathcal { L } ) } \\ & { \theta ^ { - } \gets ( 1 - \beta ) \theta ^ { - } + \beta \theta } \end{array}$
|
| 289 |
+
16:
|
| 290 |
+
17:
|
| 291 |
+
18:
|
| 292 |
+
19: procedure $\operatorname { U N E V E N } ( \tau _ { t } , \nu )$ :
|
| 293 |
+
20: if Bernoulli $( \alpha ) = 1$ or Scheme is Target then
|
| 294 |
+
21: $\mathcal { C } _ { 2 } \gets \{ w \}$
|
| 295 |
+
22: else
|
| 296 |
+
23: if Scheme is Uniform then
|
| 297 |
+
24: $\mathcal { C } _ { 2 } \nu \sim \mathrm { U n i f o r m } ( \nu )$
|
| 298 |
+
25: else if Scheme is Greedy then
|
| 299 |
+
26: $\mathcal { C } _ { 2 } \nu \cup \{ w \}$
|
| 300 |
+
27: if Use GPI Policy is True then
|
| 301 |
+
28: $\begin{array} { r l } & { \mathcal { C } _ { 1 } \gets \nu \cup \{ \pmb { w } \} } \\ & { \mathbf { \ } u _ { t } \gets \{ u _ { t } ^ { a } = \arg \operatorname* { m a x } \underset { \mathbf { \substack { u \in \mathcal { U } } } } { \operatorname* { m a x } } \underset { \mathbf { \substack { k \in \mathcal { C } _ { 2 } \ : z \in \mathcal { C } _ { 1 } } } } { \operatorname* { m a x } } \psi ^ { a } ( \tau _ { t } ^ { a } , u , z ; \theta ) ^ { \top } \mathbf { k } \} _ { a \in \mathcal { A } } } \end{array}$
|
| 302 |
+
29:
|
| 303 |
+
30: else
|
| 304 |
+
31: $\begin{array} { r l } & { \mathbf { \delta } \mathbf { \psi } _ { \mathbf { { u } } _ { t } } \gets \{ u _ { t } ^ { a } = \arg \operatorname* { m a x } _ { \mathbf { \theta } _ { u \in \mathcal { U } } } \operatorname* { m a x } _ { \mathbf { \theta } _ { k \in \mathcal { C } _ { 2 } } } \psi ^ { a } ( \tau _ { t } ^ { a } , u , k ; \theta ) ^ { \top } k \} _ { a \in \mathcal { A } } } \\ & { \mathbf { u r n } \ : u _ { t } } \end{array}$
|
| 305 |
+
ret
|
| 306 |
+
|
| 307 |
+
# B EXPERIMENTAL DOMAIN DETAILS AND ANALYSIS
|
| 308 |
+
|
| 309 |
+
We consider a complicated partially observable predator-prey (PP) task in an $1 0 \times 1 0$ grid involving eight agents (predators) and three preys that is designed to test coordination between agents, as each prey needs a simultaneous capture action by at least three surrounding agents to be captured. Each agent can take 6 actions i.e. move in one of the 4 directions (Up, Left, Down, Right), remain still (no-op), or try to catch (capture) any adjacent prey. The prey moves around in the grid with a probability of 0.7 and remains still at its position with probability 0.3. Impossible actions for both agents and prey are marked unavailable, for eg. moving into an occupied cell or trying to take a capture action with no adjacent prey.
|
| 310 |
+
|
| 311 |
+
A1-Capture
|
| 312 |
+
|
| 313 |
+
<table><tr><td></td><td>A2-Capture</td><td>A2-Other</td></tr><tr><td>A3-Capture</td><td>+1</td><td>-p</td></tr><tr><td>A3-Other</td><td>-p</td><td>-p</td></tr></table>
|
| 314 |
+
|
| 315 |
+
A1-Other
|
| 316 |
+
Table 1: Joint-Reward function of three agents surrounding a prey. The first table indicates jointrewards when Agent 1 takes capture action and second table indicates joint-rewards when Agent 1 takes any other action. Notice that there are numerous joint actions leading to penalty $p$ .
|
| 317 |
+
|
| 318 |
+
<table><tr><td></td><td>A2-Capture</td><td>A2-Other</td></tr><tr><td>A3-Capture</td><td>-p</td><td>-p</td></tr><tr><td>A3-Other</td><td>-p</td><td>0</td></tr></table>
|
| 319 |
+
|
| 320 |
+
If either a single or a pair of agents take a capture action on an adjacent prey, a negative reward of magnitude $p$ is given. If three or more agents take the capture action on an adjacent prey, it leads to a successful capture of that prey and yield a positive reward of $+ 1$ . The maximum possible reward for capturing all preys is therefore $+ 3$ . Each agent observes a $5 \times 5$ grid centered around its position which contains information showing other agents and preys relative to its position. An episode ends if all preys have been captured or after 800 time steps. This task is similar to one proposed by Bohmer et al. (2020); Son et al. (2019), but significantly more complex in terms of the coordination ¨ required amongst agents as more agents need to coordinate simultaneously to capture the preys. We now prove Proposition 1 which states that:
|
| 321 |
+
|
| 322 |
+
Proposition. For, the predator-prey game defined above, the optimal joint action reward function for any group of $2 \leq k \leq n$ predator agents surrounding a prey is nonmonotonic (as defined by Mahajan et al., 2019) iff $p > 0$ .
|
| 323 |
+
|
| 324 |
+
Proof. Without loss of generality, we assume a single prey surrounded by three agents $( A _ { 1 } , A _ { 2 } , A _ { 3 } )$ in the environment. The joint reward function for this group of three agents is defined in Table 1.
|
| 325 |
+
|
| 326 |
+
For the case $ { p } \mathrm { ~ ~ { ~ > ~ } ~ } 0$ the proposition can be easily verified using the definition of nonmonotonicity (Mahajan et al., 2019). For any $3 \leq k \leq n$ agents attempting to catch a prey in state $s$ , we fix the actions of any $k - 3$ agents to be “other” indicating either of up, down, left, right, and noop actions and represent it with $\mathbf { \Delta } u ^ { k - 3 }$ . Next we consider the rewards $r$ for two cases:
|
| 327 |
+
|
| 328 |
+
• If we fix the action of any two of the remaining three agents as “other” represented as $\mathbf { \Delta } _ { \mathbf { \ b { u } } ^ { 2 } }$ , the action of the remaining agent becomes $\begin{array} { r } { \bar { u ^ { 1 } } = \mathrm { a r g } \operatorname* { m a x } _ { u \in \mathcal { U } } r ( s , \langle u , u ^ { \hat { 2 } } , u ^ { k - 3 } \rangle ) = } \end{array}$ “other”.
|
| 329 |
+
• If we fix the $\mathbf { \Delta } \mathbf { u } ^ { 2 }$ to be “capture”, we have : $u _ { 1 } \ = \ \arg \operatorname* { m a x } _ { u \in \mathcal { U } } r ( s , \langle u , u ^ { 2 } , u ^ { k - 3 } \rangle ) \ =$ “capture”.
|
| 330 |
+
|
| 331 |
+
Thus the best action for agent $A _ { 1 }$ in state $s$ depends on the actions taken by the other agents and the rewards $R ( s )$ are non-monotonic. Finally for the equivalence, we note that for the case $p = 0$ we have that a default action of “capture” is always optimal for any group of $k$ predators surrounding the prey. Thus the rewards are monotonic as the best action for any agent is independent of the rest. □
|
| 332 |
+
|
| 333 |
+
# C IMPLEMENTATION DETAILS
|
| 334 |
+
|
| 335 |
+
# C.1 HYPER PARAMETERS
|
| 336 |
+
|
| 337 |
+
All algorithms are implemented in the PyMARL framework (Samvelyan et al., 2019). All our experiments use $\epsilon$ -greedy scheme where $\epsilon$ is decayed from $\epsilon = 1$ to $\epsilon = 0 . 0 5$ over $2 5 0 k$ time steps. All our tasks use a discount factor of $\gamma = 0 . 9 9$ . We freeze the trained policy every $3 0 k$ timesteps and run 20 evaluation episodes with $\epsilon = 0$ . We use learning rate of 0.0005 with soft target updates for all experiments. We use a target network similar to Mnih et al. (2015) with “soft” target updates, rather than directly copying the weights: $\theta ^ { - } \beta * \theta + ( 1 - \beta ) * \theta ^ { - }$ , where $\theta$ are the current network parameters. We use $\beta = 0 . 0 0 5$ for all experiments. This means that the target values are constrained to change slowly, greatly improving the stability of learning. All algorithms were trained with RMSprop optimizer by one gradient step on loss computed on a batch of 32 episodes sampled from a replay buffer containing last 1000 episodes. We also used gradient clipping to restrict the norm of the gradient to be $\leq 1 0$ .
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 8: Additional Ablation results: Comparison between different action selection of UneVEn for $p \in$ $\{ 0 . 0 0 4 , 0 . 0 0 8 \}$ .
|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
Figure 9: Additional Zero-shot generalization results for $p \in \{ 0 . 2 , 0 . 3 , 0 . 5 , 1 . 0 \}$ .
|
| 344 |
+
|
| 345 |
+
The probability $\alpha$ of action selection based on target task in UneVEn with uniform and greedy action selection schemes increases from $\alpha = 0 . 3$ to $\alpha = 1 . 0$ over $2 5 0 k$ time steps. For sampling related tasks using normal distribution, we use $\mathcal { N } ( \pmb { w } , \sigma \mathbf { I } _ { d } )$ centered around target task $\pmb { w }$ with $\sigma \in$ $\{ 0 . 1 , 0 . 2 \}$ . At the beginning of each episode, we sample six related tasks, therefore $| \nu | = 6$ .
|
| 346 |
+
|
| 347 |
+
# C.2 NN ARCHITECTURE
|
| 348 |
+
|
| 349 |
+
Each agent’s local observation $o _ { t } ^ { a }$ are concatenated with agent’s last action $u _ { t - 1 } ^ { a }$ , and then passed through a fully-connected (FC) layers of 128 neurons, followed by ReLU activation, a GRU (Chung et al., 2014), and another FC of the same dimensionality to generate a action-observation history summary for the agent. Each agent’s task vector $z \in \mathcal { \dot { \nu } } \cup \{ w \}$ is passed through a FC layer of 128 neurons followed by ReLU activation to generate an internal task embedding. The history and task embedding are concatenated together and passed through two hidden FC-256 layers and ReLU activations to generate the outputs for each action. For methods with non-linear mixing such as QMIX (Rashid et al., 2020b), WQMIX (Rashid et al., 2020a), and MAVEN (Mahajan et al., 2019), we adopt the same hypernetworks from the original paper and test with either a single or double hypernet layers of $\mathrm { d i m 6 4 }$ utilizing an ELU non-linearity. For all baseline methods, we use the code shared publicly by the corresponding authors on Github.
|
| 350 |
+
|
| 351 |
+
# D ADDITIONAL RESULTS
|
| 352 |
+
|
| 353 |
+
Figure 8 presents additional ablation results for comparison between UneVEn with different action selection schemes for $p \in \{ 0 . 0 0 4 , 0 . 0 0 8 \}$ . Figure 9 presents additional zero-shot generalization results for policies trained on target task with penalty $p = 0 . 0 0 4$ tested on tasks with penalty $p \in \{ 0 . 2 , 0 . 3 , 0 . 5 , 1 . 0 \}$ . For UneVEn-Greedy-GPI, we can observe that the average number of miscoordinated capture attempts per episode actually drops with $p$ and converges around 1.5, i.e., for return $R _ { p }$ , average mistakes per episode is $\begin{array} { r } { \frac { 3 - R _ { p } } { p } = \{ 2 . 3 , 2 . 1 , 1 . 5 , 1 . 6 \} } \end{array}$ for $p \in \{ 0 . 2 , 0 . 3 , 0 . 5 , 1 . 0 \}$ .
|
| 354 |
+
|
| 355 |
+

|
| 356 |
+
Figure 10: $m$ -step matrix game from Mahajan et al. (2019) for $m = 1 0$ . The red cross means that selecting that joint action will lead to termination of the episode.
|
| 357 |
+
|
| 358 |
+
# E $m$ -STEP MATRIX GAMES
|
| 359 |
+
|
| 360 |
+
Figure 10 shows the $m$ -step matrix game for $m = 1 0$ from Mahajan et al. (2019), where there are $m - 2$ intermediate steps, and selecting a joint-action with zero reward leads to termination of the episode.
|
md/train/0zXJRJecC_/0zXJRJecC_.md
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model Adaptation: Historical Contrastive Learning for Unsupervised Domain Adaptation without Source Data
|
| 2 |
+
|
| 3 |
+
Jiaxing Huang, Dayan Guan, Aoran Xiao, Shijian Lu∗ School of Computer Science Engineering, Nanyang Technological University {Jiaxing.Huang, Dayan.Guan, Aoran.Xiao, Shijian.Lu}@ntu.edu.sg
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Unsupervised domain adaptation aims to align a labeled source domain and an unlabeled target domain, but it requires to access the source data which often raises concerns in data privacy, data portability and data transmission efficiency. We study unsupervised model adaptation (UMA), or called Unsupervised Domain Adaptation without Source Data, an alternative setting that aims to adapt source-trained models towards target distributions without accessing source data. To this end, we design an innovative historical contrastive learning (HCL) technique that exploits historical source hypothesis to make up for the absence of source data in UMA. HCL addresses the UMA challenge from two perspectives. First, it introduces historical contrastive instance discrimination (HCID) that learns from target samples by contrasting their embeddings which are generated by the currently adapted model and the historical models. With the historical models, HCID encourages UMA to learn instance-discriminative target representations while preserving the source hypothesis. Second, it introduces historical contrastive category discrimination (HCCD) that pseudo-labels target samples to learn category-discriminative target representations. Specifically, HCCD re-weights pseudo labels according to their prediction consistency across the current and historical models. Extensive experiments show that HCL outperforms and state-of-the-art methods consistently across a variety of visual tasks and setups.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Deep neural networks (DNNs) [28, 73, 23] have achieved great success in various computer vision tasks [8, 55, 60, 59, 28, 73, 23] but often generalize poorly to new domains due to the inter-domain discrepancy [1]. Unsupervised domain adaptation (UDA) [78, 51, 76, 64, 66, 79, 77, 103, 102, 25, 71, 44, 26, 86] addresses the inter-domain discrepancy by aligning the source and target data distributions, but it requires to access the source-domain data which often raises concerns in data privacy, data portability, and data transmission efficiency.
|
| 12 |
+
|
| 13 |
+
In this work, we study unsupervised model adaptation (UMA), an alternative setting that aims to adapt source-trained models to fit target data distribution without accessing the source-domain data. Under the UMA setting, the only information carried forward is a portable source-trained model which is usually much smaller than the source-domain data and can be transmitted more efficiently [45, 42, 43, 72, 48] as illustrated in Table 1. Beyond that, the UMA setting also alleviates the concern of data privacy and intellectual property effectively. On the other hand, the absence of the labeled source-domain data makes domain adaptation much more challenging and susceptible to collapse.
|
| 14 |
+
|
| 15 |
+
Table 1: Source data have much larger sizes than source-trained models.
|
| 16 |
+
|
| 17 |
+
<table><tr><td rowspan="2">Storage size (MB)</td><td colspan="2">Semantic segmentation</td><td>Object detection</td><td>Image classification</td></tr><tr><td>GTA5</td><td>SYNTHIA</td><td>Cityscapes</td><td>VisDA17</td></tr><tr><td>Source dataset</td><td>62,873.6</td><td>22,323.2</td><td>12,697.6</td><td>7,884.8</td></tr><tr><td>Source-trained model</td><td>179.1</td><td>179.1</td><td>553.4</td><td>172.6</td></tr></table>
|
| 18 |
+
|
| 19 |
+
To this end, we develop historical contrastive learning (HCL) that aims to make up for the absence of source data by adapting the source-trained model to fit target data distribution without forgetting source hypothesis, as illustrated in Fig. 1. HCL addresses the UMA challenge from two perspectives. First, it introduces historical contrastive instance discrimination (HCID) that learns target samples by comparing their embeddings generated by the current model (as queries) and those generated by historical models (as keys): a query is pulled close to its positive keys while pushed apart from its negative keys. HCID can thus be viewed as a new type of instance contrastive learning for the task of UMA with historical models, which learns instance-discriminative target representations without forgetting source-domain hypothesis. Second, it introduces historical contrastive category discrimination (HCCD) that pseudo-labels target samples for learning category-discriminative target representations. Specifically, HCCD re-weights the pseudo labels according to their consistency across the current and historical models.
|
| 20 |
+
|
| 21 |
+
The proposed HCL tackles UMA with three desirable features: 1) It introduces historical contrast and achieves UMA without forgetting source hypothesis; 2) The HCID works at instance level, which encourages to learn instance-discriminative target representations that generalize well to unseen data [98]; 3) The HCCD works at category level (i.e., output space) which encourages to learn category-discriminative target representation that is well aligned with the objective of down-stream tasks.
|
| 22 |
+
|
| 23 |
+
The contributions of this work can be summarized in three aspects. First, we investigate memorybased learning for unsupervised model adaptation that learns discriminative representations for unlabeled target data without forgetting source hypothesis. To the best of our knowledge, this is the first work that explores memory-based learning for the task of UMA. Second, we design historical contrastive learning which introduces historical contrastive instance discrimination and category discrimination, the latter is naturally aligned with the objective of UMA. Third, extensive experiments show that the proposed historical contrastive learning outperforms state-of-the-art methods consistently across a variety of visual tasks and setups.
|
| 24 |
+
|
| 25 |
+
# 2 Related Works
|
| 26 |
+
|
| 27 |
+
Our work is closely related to several branches of research in unsupervised model adaptation, domain adaptation, memory-based learning and contrastive learning.
|
| 28 |
+
|
| 29 |
+
Unsupervised model adaptation aims to adapt a source-trained model to fit target data distributions without accessing source-domain data. This problem has attracted increasing attention recently with a few pioneer studies each of which focuses on a specific visual task. For example, [45, 46] freezes the classifier of source-trained model and performs information maximization on target data for classification model adaptation. [42] tackles classification model adaptation with a conditional GANs that generates training images with target-alike styles and source-alike semantics. [43] presents a self-entropy descent algorithm to improve model adaptation for object detection. [72] reduces the uncertainty of target predictions (by source-trained model) for segmentation model adaptation. [48] introduces data-free knowledge distillation to transfer source-domain knowledge for segmentation model adaptation. Despite the different designs for different tasks, the common motivation of these studies is to make up for the absence of source data in domain adaptation. [40] and [88] tackle source-free domain adaptation from a generative manner by generating samples from the source classes and generating reference distributions, respectively.
|
| 30 |
+
|
| 31 |
+
We tackle the absence of source data by a memory mechanism that encourages to memorize source hypothesis during model adaptation. Specifically, we design historical contrastive learning that learns target representations by contrasting historical and currently evolved models. To the best of our knowledge, this is the first work that explores memory mechanism for UMA.
|
| 32 |
+
|
| 33 |
+
${ x _ { s r c } } / { x _ { t g t } }$ : Source/target data $G ^ { t } / G ^ { t - m }$ : Current/historical model ????????/???????? : Source/target feature $f ^ { t } / f ^ { t - m }$ Current/historical feature:
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: Illustration of unsupervised domain adaptation, unsupervised model adaptation and the proposed historical contrastive learning which exploits historical source hypothesis (or memorized knowledge) to make up for the absence of source supervision in the process of UMA. Here the historical source hypothesis could be the original source hypothesis $G ^ { 0 }$ (i.e. $\scriptstyle { \mathrm { t } } = { \mathrm { m } }$ , trained using the labeled source data only), the adapted source hypothesis $\bar { G } ^ { t - m }$ (i.e. $m < t$ , trained in the last $m$ epoch), or other types of previous models.
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
|
| 40 |
+
Domain adaptation is related to UMA but it requires to access labeled source data in training. Most existing work handles UDA from three typical approaches. The first exploits adversarial training to align source and target distributions in the feature, output or latent space [78, 51, 76, 14, 96, 64, 66, 79, 34, 77, 35, 21, 94, 29, 10, 9, 80, 20]. The second employs self-training to generate pseudo labels to learn from unlabeled target data iteratively [103, 69, 100, 102, 31, 19, 90, 91]. The third leverages image translation to modify image styles to reduce domain gaps [25, 71, 44, 95, 26, 86, 32, 33, 93, 92]. In addition, [30] proposes a categorical contrastive learning for domain adaptation.
|
| 41 |
+
|
| 42 |
+
Memory-based learning has been studied extensively. Memory networks [81] as one of early efforts explores to use external modules to store memory for supervised learning. Temporal ensemble [41], as well as a few following works [74, 12] extend the memory mechanism to semi-supervised learning. It employs historical hypothesis/models to regularize the current model and produces stable and competitive predictions. Mean Teacher [74] leverages moving-average models as the memory model to regularize the training, and similar idea was extended for UDA [16, 99, 4, 52]. Mutual learning [97] has also been proposed for learning among multiple peer student models.
|
| 43 |
+
|
| 44 |
+
Most aforementioned methods require labeled data in training. They do not work very well for UMA due to the absence of supervision from the labeled source data, by either collapsing in training or helping little in model adaptation performance. We design innovative historical contrastive learning to make up for the absence of the labeled source data, more details to be presented in the ensuing subsections.
|
| 45 |
+
|
| 46 |
+
Contrastive learning [82, 87, 22, 54, 101, 24, 56, 75, 36, 11] learns discriminative representations from multiple views of the same instance. It works with certain dictionary look-up mechanism [22], where a given image $x$ is augmented into two views, query and key, and the query token $q$ should match its designated key $k _ { + }$ over a set of negative keys $k _ { - }$ from other images. Existing work can be broadly classified into three categories based on dictionary creation strategies. The first creates a memory bank [82] to store all the keys in the previous epoch. The second builds an end-to-end dictionary [87, 75, 36, 11] that generates keys using samples from the current mini-batch. The third employs a momentum encoder [22] that generates keys on-the-fly by a momentum-updated encoder.
|
| 47 |
+
|
| 48 |
+
Other related source-free adaptation works. [7] considers supervised continual learning from previously learned tasks to a new task, which learns representations using the contrastive learning objective and preserves learned representations using a self-supervised distillation step, where the contrastively learned representations are more robust against the catastrophic forgetting for supervised continual learning. [38] addresses a source-free universal domain adaptation problem that does not guarantee that the classes in the target domain are the same as in the source domain. [39] propose a simple yet effective solution to realize inheritable models suitable for open-set source-free DA problem.
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2: The proposed historical contrastive learning consists of two key designs including historical contrastive instance discrimination (HCID) and historical contrastive category discrimination (HCCD). HCID learns from target samples by contrasting their embeddings generated by the current model (as queries) and historical models (as keys), which learns instance-discriminative target representations. HCCD pseudo-labels target samples to learn category-discriminative target representations, where the pseudo labels are re-weighted adaptively according to the prediction consistency across the current and historical models.
|
| 52 |
+
|
| 53 |
+
# 3 Historical Contrastive Learning
|
| 54 |
+
|
| 55 |
+
This section presents the proposed historical contrastive learning that memorizes source hypothesis to make up for the absence of source data as illustrated in Fig. 2. The proposed HCL consists of two key designs. The first is historical contrastive instance discrimination which encourages to learn instance-discriminative target representations that generalize well to unseen data [98]. The second is historical contrastive category discrimination that encourages to learn category-discriminative target representations which is well aligned with the objective of visual recognition tasks. More details to be described in the ensuring subsections.
|
| 56 |
+
|
| 57 |
+
# 3.1 Historical Contrastive Instance Discrimination
|
| 58 |
+
|
| 59 |
+
The proposed HCID learns from unlabeled target samples via contrastive learning over their embeddings generated from current and historical models: the positive pairs are pulled close while negative pairs are pushed apart. It is a new type of contrastive learning for UMA, which preserves sourcedomain hypothesis by generating positive keys from historical models. HCID works at instance level and encourages to learn instance-discriminative target representations that generalize well to unseen data [98].
|
| 60 |
+
|
| 61 |
+
HCID loss. Given a query sample $x _ { q }$ and a set of key samples $X _ { k } = \{ x _ { k _ { 0 } } , x _ { k _ { 1 } } , x _ { k _ { 2 } } , . . . , x _ { k _ { N } } \}$ , HCID employs current model $E ^ { t }$ to encode the query $q ^ { t } = E ^ { t } ( x _ { q } )$ , and historical encoders $E ^ { t - m }$ to encode the keys $k _ { n } ^ { t - m } = E ^ { t - m } ( x _ { k _ { n } } ) , n = 0 , \cdots , \bar { N }$ . With the encoded embeddings, HCID is achieved via a historical contrastive loss $\mathcal { L } _ { \mathrm { H i s N C E } }$ , minimization of which pulls $q$ close to its positive key $k _ { + } ^ { t - m }$ while pushing it apart from all other (negative) keys:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\mathcal { L } _ { \mathrm { H i s N C E } } = \sum _ { x _ { q } \in X _ { t g t } } - \log \frac { \exp ( q ^ { t } \cdot k _ { + } ^ { t - m } / \tau ) r _ { + } ^ { t - m } } { \sum _ { i = 0 } ^ { N } \exp ( q ^ { t } \cdot k _ { i } ^ { t - m } / \tau ) r _ { i } ^ { t - m } }
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $\tau$ is a temperature parameter [82], $r$ indicates the reliability of each key $k _ { n } ^ { t - m }$ , with which we reweight the similarity loss of each key to encourage to memorize well-learnt instead of poorly-learnt historical embeddings. In this work, we use the classification entropy to estimate the reliability of each key. The positive key sample is the augmentation of the query sample[22, 36], and all the rest are negative keys.
|
| 68 |
+
|
| 69 |
+
Remark 1 Note $\mathcal { L } _ { H i s N C E }$ in Eq.1 has a similar form as the InfoNCE loss[56, 22]. InfoNCE can actually be viewed as a special case of HisNCE, where all the query and keys are encoded by the current model ${ ' m = 0 }$ ) and the reliability is fixed ${ \bf \zeta } r _ { i } ^ { t - m } = 1 , \forall i )$ . For HisNCE, we assign each key a reliability score to encourage to memorize the well-learnt historical embeddings only. It is also worth noting that Eq. 1 only shows historical contrast with one historical model for simplicity. In practice, we could employ multiple historical models to comprehensively distill (memorize) the well-learnt embeddings from them. It could be achieved by computing Eq.1 multiple times.
|
| 70 |
+
|
| 71 |
+
# 3.2 Historical contrastive category discrimination
|
| 72 |
+
|
| 73 |
+
We design HCCD that generates pseudo labels and learns them conditioned on a historical consistency, i.e., the prediction consistency across the current and historical models. HCCD can be viewed as a new type of self-training, where pseudo labels are re-weighted by the historical consistency. It works at category level and encourages to learn category-discriminative target representations that are aligned with the objective of visual recognition tasks in UMA.
|
| 74 |
+
|
| 75 |
+
Historical contrastive pseudo label generation. Given an unlabeled sample $x$ , the current and historical models predict $p ^ { t } = G ^ { t } ( x )$ (as the query) and $p ^ { t - m } = G ^ { t - m } ( x )$ (as the keys). The pseudo label and the historical consistency of the sample are computed by:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\begin{array} { l } { { \hat { y } = \mathbf { { \Gamma } } ( p ^ { t } ) , } } \\ { { h _ { c o n } = 1 - \mathrm { S i g m o i d } ( | | p ^ { t } - p ^ { t - m } | | _ { 1 } ) , } } \end{array}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $p$ is a $K$ -class probability vector, $\mathbf { \delta T }$ is the pseudo label generation function [103, 102] and $\hat { y } = ( \hat { y } ^ { ( 1 ) } , \hat { y } ^ { ( 2 ) } , . . . , \hat { y } ^ { ( \bar { C } ) } )$ is the predicted category label.
|
| 82 |
+
|
| 83 |
+
HCCD loss. Given the unlabeled data $x$ and its historical contrastive pseudo label $\left( \hat { y } , h _ { c o n } \right)$ , HCCD performs self-training on target data $x$ via a weighted cross-entropy loss:
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\mathcal { L } _ { \mathrm { H i s S T } } = - \sum _ { x \in X _ { t g t } } h _ { c o n } \times \hat { y } \log p _ { x } ,
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $h _ { c o n }$ is the per-sample historical consistency and we use it to re-weight the self-training loss. If the predictions of a sample across the current and historical models are consistent, we consider it as a well-learnt sample and increase its influence in self-training. Otherwise, we consider it as pooly-learnt sample and decrease its influence in self-training.
|
| 90 |
+
|
| 91 |
+
# 3.3 Theoretical Insights
|
| 92 |
+
|
| 93 |
+
The two designs in Historical Contrastive Learning (HCL) are inherently connected with some probabilistic models and convergent under certain conditions:
|
| 94 |
+
|
| 95 |
+
Proposition 1 The historical contrastive instance discrimination (HCID) can be modelled as a maximum likelihood problem optimized via Expectation Maximization.
|
| 96 |
+
|
| 97 |
+
Proposition 2 The HCID is convergent under certain conditions.
|
| 98 |
+
|
| 99 |
+
Proposition 3 The historical contrastive category discrimination (HCCD) can be modelled as a classification maximum likelihood problem optimized via Classification Expectation Maximization.
|
| 100 |
+
|
| 101 |
+
Proposition 4 The HCCD is convergent under certain conditions.
|
| 102 |
+
|
| 103 |
+
The proofs of Proposition 1, Proposition 2, Proposition 3 and Proposition 4 are provided in the appendix, respectively.
|
| 104 |
+
|
| 105 |
+
# 4 Experiments
|
| 106 |
+
|
| 107 |
+
This section presents experiments including datasets, implementation details, evaluations of the proposed HCL in semantic segmentation, object detection and image classification tasks as well as the discussion of its desirable features.
|
| 108 |
+
|
| 109 |
+
Table 2: Experiments on semantic segmentation task GTA5 Cityscapes (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 110 |
+
|
| 111 |
+
<table><tr><td>Method</td><td>SF</td><td>Road</td><td>SW</td><td>Build</td><td>Wall</td><td>Fence</td><td>Pole</td><td>TL</td><td>TS</td><td>Veg.</td><td>Terrain</td><td>Sky</td><td>PR</td><td>Rider</td><td>Car</td><td>Truck</td><td>Bus</td><td>Train</td><td>Motor</td><td>Bike</td><td>mIoU</td></tr><tr><td>AdaptSeg [76]</td><td>X</td><td>86.5</td><td>36.0</td><td>79.9</td><td>23.4</td><td>23.3</td><td>23.9</td><td>35.2</td><td>14.8</td><td>83.4</td><td>33.3</td><td>75.6</td><td>58.5</td><td>27.6</td><td>73.7</td><td>32.5</td><td>35.4</td><td>3.9</td><td>30.1</td><td>28.1</td><td>42.4</td></tr><tr><td>AdvEnt [79]</td><td>X</td><td>89.4</td><td>33.1</td><td>81.0</td><td>26.6</td><td>26.8</td><td>27.2</td><td>33.5</td><td>24.7</td><td>83.9</td><td>36.7</td><td>78.8</td><td>58.7</td><td>30.5</td><td>84.8</td><td>38.5</td><td>44.5</td><td>1.7</td><td>31.6</td><td>32.4</td><td>45.5</td></tr><tr><td>IDA [57]</td><td>X</td><td>90.6</td><td>37.1</td><td>82.6</td><td>30.1</td><td>19.1</td><td>29.5</td><td>32.4</td><td>20.6</td><td>85.7</td><td>40.5</td><td>79.7</td><td>58.7</td><td>31.1</td><td>86.3</td><td>31.5</td><td>48.3</td><td>0.0</td><td>30.2</td><td>35.8</td><td>46.3</td></tr><tr><td>CRST[102]</td><td>X</td><td>91.0</td><td>55.4</td><td>80.0</td><td>33.7</td><td>21.4</td><td>37.3</td><td>32.9</td><td>24.5</td><td>85.0</td><td>34.1</td><td>80.8</td><td>57.7</td><td>24.6</td><td>84.1</td><td>27.8</td><td>30.1</td><td>26.9</td><td>26.0</td><td>42.3</td><td>47.1</td></tr><tr><td>CrCDA [35]</td><td>X</td><td>92.4</td><td>55.3</td><td>82.3</td><td>31.2</td><td>29.1</td><td>32.5</td><td>33.2</td><td>35.6</td><td>83.5</td><td>34.8</td><td>84.2</td><td>58.9</td><td>32.2</td><td>84.7</td><td>40.6</td><td>46.1</td><td>2.1</td><td>31.1</td><td>32.7</td><td>48.6</td></tr><tr><td>UR [72]</td><td>√</td><td>92.3</td><td>55.2</td><td>81.6</td><td>30.8</td><td>18.8</td><td>37.1</td><td>17.7</td><td>12.1</td><td>84.2</td><td>35.9</td><td>83.8</td><td>57.7</td><td>24.1</td><td>81.7</td><td>27.5</td><td>44.3</td><td>6.9</td><td>24.1</td><td>40.4</td><td>45.1</td></tr><tr><td>+HCL</td><td>√</td><td>92.2</td><td>54.1</td><td>81.7</td><td>34.2</td><td>25.4</td><td>37.9</td><td>35.8</td><td>29.8</td><td>84.1</td><td>38.0</td><td>83.9</td><td>59.1</td><td>27.1</td><td>84.6</td><td>33.9</td><td>41.9</td><td>16.2</td><td>27.7</td><td>44.7</td><td>49.1</td></tr><tr><td>SFDA [48]</td><td>√</td><td>91.7</td><td>52.7</td><td>82.2</td><td>28.7</td><td>20.3</td><td></td><td>36.530.6</td><td></td><td>23.681.7</td><td>35.6</td><td>84.859.5</td><td></td><td>22.6</td><td>83.4</td><td>29.6</td><td>32.4</td><td>11.8</td><td>23.8</td><td>39.6</td><td>45.8</td></tr><tr><td>+HCL</td><td>√</td><td>92.3</td><td>54.5</td><td>82.6</td><td>33.1</td><td>26.2</td><td>38.9</td><td>37.9</td><td>31.7</td><td>83.5</td><td>38.1</td><td>84.4</td><td>60.9</td><td>30.0</td><td>84.5</td><td>32.6</td><td>41.2</td><td>14.2</td><td>26.4</td><td>43.2</td><td>49.3</td></tr><tr><td>HCID</td><td>√</td><td>89.5</td><td>53</td><td>80.3</td><td>33.9</td><td>22.9</td><td>36.2</td><td>32.7</td><td></td><td>23.882.3</td><td>36.5</td><td>73.7</td><td>60.0</td><td>22.4</td><td>83.8</td><td>28.9</td><td>34.7</td><td>13.5</td><td>21.2</td><td>38.0</td><td>45.6</td></tr><tr><td>HCCD</td><td>√</td><td>91.0</td><td>53.6</td><td>81.5</td><td>32.4</td><td>23.1</td><td>36.9</td><td>32.3</td><td>26.3</td><td>82.8</td><td>37.2</td><td>80.4</td><td>58.5</td><td>25.0</td><td>82.5</td><td>29.9</td><td>34.2</td><td>15.5</td><td>23.2</td><td>40.5</td><td>46.7</td></tr><tr><td>HCL</td><td></td><td>92.0</td><td>55.0</td><td>80.4</td><td>33.5</td><td>24.6</td><td>37.1</td><td>35.1</td><td></td><td>28.883.0</td><td>37.6</td><td>82.359.4</td><td></td><td>27.6</td><td>83.6</td><td>32.3</td><td>36.6</td><td>14.1</td><td>28.7</td><td>43.0</td><td>48.1</td></tr></table>
|
| 112 |
+
|
| 113 |
+
Table 3: Experiments on semantic segmentation task SYNTHIA Cityscapes (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 114 |
+
|
| 115 |
+
<table><tr><td>Method</td><td>SF</td><td>Road</td><td>SW</td><td>Build</td><td>Wall</td><td>Fence</td><td>Pole</td><td>TL</td><td>TS</td><td>Veg.</td><td>Sky</td><td>PR</td><td>Rider</td><td>Car</td><td>Bus</td><td>Motor</td><td>Bike</td><td>mIoU</td><td>mIoU</td></tr><tr><td>AdaptSeg[76]</td><td>X</td><td>84.3</td><td>42.7</td><td>77.5</td><td>,</td><td>1</td><td>-</td><td>4.7</td><td>7.0</td><td>77.9</td><td>82.5</td><td>54.3</td><td>21.0</td><td>72.3</td><td>32.2</td><td>18.9</td><td>32.3</td><td>1</td><td>46.7</td></tr><tr><td>AdvEnt [79]</td><td>X</td><td>85.6</td><td>42.2</td><td>79.7</td><td>8.7</td><td>0.4</td><td>25.9</td><td>5.4</td><td>8.1</td><td>80.4</td><td>84.1</td><td>57.9</td><td>23.8</td><td>73.3</td><td>36.4</td><td>14.2</td><td>33.0</td><td>41.2</td><td>48.0</td></tr><tr><td>IDA [57]</td><td>X</td><td>84.3</td><td>37.7</td><td>79.5</td><td>5.3</td><td>0.4</td><td>24.9</td><td>9.2</td><td>8.4</td><td>80.0</td><td>84.1</td><td>57.2</td><td>23.0</td><td>78.0</td><td>38.1</td><td>20.3</td><td>36.5</td><td>41.7</td><td>48.9</td></tr><tr><td>CRST[102]</td><td>×</td><td>67.7</td><td>32.2</td><td>73.9</td><td>10.7</td><td>1.6</td><td>37.4</td><td>22.2</td><td>31.2</td><td>80.8</td><td>80.5</td><td>60.8</td><td>29.1</td><td>82.8</td><td>25.0</td><td>19.4</td><td>45.3</td><td>43.8</td><td>50.1</td></tr><tr><td>CrCDA[35]</td><td>X</td><td>86.2</td><td>44.9</td><td>79.5</td><td>8.3</td><td>0.7</td><td>27.8</td><td>9.4</td><td>11.8</td><td>78.6</td><td>86.5</td><td>57.2</td><td>26.1</td><td>76.8</td><td>39.9</td><td>21.5</td><td>32.1</td><td>42.9</td><td>50.0</td></tr><tr><td>UR[72]</td><td>√</td><td>59.3</td><td>24.6</td><td>77.0</td><td>14.0</td><td>1.8</td><td>31.5</td><td>18.3</td><td>32.0</td><td>83.1</td><td>80.4</td><td>46.3</td><td>17.8</td><td>76.7</td><td>17.0</td><td>18.5</td><td>34.6</td><td>39.6</td><td>45.0</td></tr><tr><td>+HCL</td><td>√</td><td>76.7</td><td>33.7</td><td>78.7</td><td>7.2</td><td>0.1</td><td>34.4</td><td>23.2</td><td>31.6</td><td>80.5</td><td>84.3</td><td>54.4</td><td>26.6</td><td>79.5</td><td>35.9</td><td>24.8</td><td>34.4</td><td>44.1</td><td>51.1</td></tr><tr><td>SFDA [48]</td><td>√</td><td>67.8</td><td>31.9</td><td>77.1</td><td>8.3</td><td>1.1</td><td>35.9</td><td>21.2</td><td>26.7</td><td>79.8</td><td>79.4</td><td>58.8</td><td>27.3</td><td>80.4</td><td>25.3</td><td>19.5</td><td>37.4</td><td>42.4</td><td>48.7</td></tr><tr><td>+HCL</td><td>√</td><td>78.2</td><td>35.3</td><td>79.6</td><td>7.3</td><td>0.2</td><td>37.7</td><td>21</td><td>30.9</td><td>80.4</td><td>83.3</td><td>59.8</td><td>29.4</td><td>79.2</td><td>34.2</td><td>24.5</td><td>38.9</td><td>45.0</td><td>51.9</td></tr><tr><td>HCL</td><td>√</td><td>80.9</td><td>34.9</td><td>76.7</td><td>6.6</td><td>0.2</td><td>36.1</td><td>20.1</td><td>28.2</td><td>79.1</td><td>83.1</td><td>55.6</td><td>25.6</td><td>78.8</td><td>32.7</td><td>24.1</td><td>32.7</td><td>43.5</td><td>50.2</td></tr></table>
|
| 116 |
+
|
| 117 |
+
# 4.1 Datasets
|
| 118 |
+
|
| 119 |
+
UMA for semantic segmentation is evaluated on two challenging tasks GTA5 $[ 6 1 ] $ Cityscapes [15] and SYNTHIA $[ 6 2 ] \cdot$ Cityscapes. GTA5 has 24, 966 synthetic images and shares 19 categories with Cityscapes. SYNTHIA contains 9, 400 synthetic images and shares 16 categories with Cityscapes. Cityscapes has 2975 and 500 real-world images for training and validation, respectively.
|
| 120 |
+
|
| 121 |
+
UMA for object detection is evaluated on tasks Cityscapes Foggy Cityscapes [68] and Cityscapes $ \mathrm { B D D 1 0 0 k }$ [89]. Foggy Cityscapes is derived by applying simulated fog to the 2, 975 Cityscapes images. BDD100k has $7 0 k$ training images and $1 0 k$ validation images, and shares 7 categories with Cityscapes. We evaluate a subset of BDD100k (i.e., daytime) as in [84, 65, 13] for fair comparisons.
|
| 122 |
+
|
| 123 |
+
UMA for image classification is evaluated on benchmarks VisDA17 [58] and Office-31 [63]. VisDA17 has 152, 409 synthetic images as the source domain and 55, 400 real images of 12 shared categories as the target domain. Office-31 has 4110 images of three sources including 2817 from Amazon, 795 from Webcam and 498 from DSLR (with 31 shared categories). Following [102, 63, 70], the evaluation is on six adaptation tasks $\mathbf { A } { } \mathbf { W } .$ , $\mathrm { D } \to \mathsf { W } .$ , $\mathrm { W } { } \mathrm { D }$ , $\mathbf { A } { } \mathbf { D }$ , $\mathrm { D } { \to } \mathsf { A }$ , and $\mathrm { W } { \to } \mathrm { A }$ .
|
| 124 |
+
|
| 125 |
+
# 4.2 Implementation Details
|
| 126 |
+
|
| 127 |
+
Semantic segmentation: Following [79, 103], we employ DeepLab-V2 [8] as the segmentation model. We adopt SGD [3] with momentum 0.9, weight decay $1 e - 4$ and learning rate $2 . 5 e \mathrm { ~ - ~ } 4$ where the learning rate is decayed by a polynomial annealing policy [8].
|
| 128 |
+
|
| 129 |
+
Object detection: Following [84, 65, 13], we adopt Faster R-CNN [60] as the detection model. We use SGD [3] with momentum 0.9 and weight decay $5 e - 4$ . The learning rate is $1 e - 3$ for first $5 0 k$ iterations and then decreased to $1 e - 4$ for another $2 0 k$ iterations.
|
| 130 |
+
|
| 131 |
+
Image classification: Following [102, 63, 70], we adopt ResNet-101 and ResNet-50 [23] as the classification models for VisDA17 and Office-31, respectively. We use SGD [3] with momentum 0.9, weight decay $5 e - 4$ , learning rate $1 e - 3$ and batch size 32.
|
| 132 |
+
|
| 133 |
+
# 4.3 Unsupervised Domain Adaption for Semantic Segmentation
|
| 134 |
+
|
| 135 |
+
We evaluated the proposed HCL in UMA-based semantic segmentation tasks $\mathrm { G T A } 5 $ Cityscapes and SYNTHIA Cityscapes. Tables 2 and 3 show experimental results in mean Intersectionover-Union (mIoU). We can see that HCL outperforms state-of-the-art UMA methods by large margins. In addition, HCL is complementary to existing UMA methods and incorporating it as denoted by $\mathrm { ^ { 6 6 } { + } H C L ^ { 9 3 } }$ improves the existing UMA methods clearly and consistently. Furthermore, HCL even achieves competitive performance as compared with state-of-the-art UDA methods (labeled by ✗in the column SF) which require to access the labeled source data in training. Further, We conduct ablation studies of the proposed HCL over the UMA-based semantic segmentation task $\mathrm { G T A } 5 $ Cityscapes. As the bottom of Table 2 shows, either HCID or HCCD achieves comparable performance. In addition, HCID and HCCD offer orthogonal self-supervision signals where HCID focuses on instance-level discrimination between queries and historical keys and HCCD focuses on category-level discrimination among samples with different pseudo category labels. The two designs are thus complementary and the combination of them in HCL produces the best segmentation.
|
| 136 |
+
|
| 137 |
+
Table 4: Experiments on object detection task Cityscapes Foggy Cityscapes (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 138 |
+
|
| 139 |
+
<table><tr><td>Method</td><td>SF</td><td>person</td><td>rider</td><td>car</td><td>truck</td><td>bus</td><td>train</td><td>mcycle</td><td>bicycle</td><td>mAP</td></tr><tr><td>DA [13]</td><td></td><td>25.0</td><td>31.0</td><td>40.5</td><td>22.1</td><td>35.3</td><td>20.2</td><td>20.0</td><td>27.1</td><td>27.6</td></tr><tr><td>MLDA [83]</td><td></td><td>33.2</td><td>44.2</td><td>44.8</td><td>28.2</td><td>41.8</td><td>28.7</td><td>30.5</td><td>36.5</td><td>36.0</td></tr><tr><td>DMA [37]</td><td></td><td>30.8</td><td>40.5</td><td>44.3</td><td>27.2</td><td>38.4</td><td>34.5</td><td>28.4</td><td>32.2</td><td>34.6</td></tr><tr><td>CAFA [27]</td><td></td><td>41.9</td><td>38.7</td><td>56.7</td><td>22.6</td><td>41.5</td><td>26.8</td><td>24.6</td><td>35.5</td><td>36.0</td></tr><tr><td>SWDA [65]</td><td></td><td>36.2</td><td>35.3</td><td>43.5</td><td>30.0</td><td>29.9</td><td>42.3</td><td>32.6</td><td>24.5</td><td>34.3</td></tr><tr><td>CRDA [84]</td><td>xxxxxx</td><td>32.9</td><td>43.8</td><td>49.2</td><td>27.2</td><td>45.1</td><td>36.4</td><td>30.3</td><td>34.6</td><td>37.4</td></tr><tr><td>SFOD [43]</td><td>1</td><td>25.5</td><td>44.5</td><td>40.7</td><td>33.2</td><td>22.2</td><td>28.4</td><td>34.1</td><td>39.0</td><td>33.5</td></tr><tr><td>+HCL</td><td></td><td>39.3</td><td>46.7</td><td>48.6</td><td>32.9</td><td>46.2</td><td>38.2</td><td>33.9</td><td>36.9</td><td>40.3</td></tr><tr><td>HCL</td><td>√</td><td>38.7</td><td>46.0</td><td>47.9</td><td>33.0</td><td>45.7</td><td>38.9</td><td>32.8</td><td>34.9</td><td>39.7</td></tr></table>
|
| 140 |
+
|
| 141 |
+
Table 5: Experiments on object detection task Cityscapes $ \mathrm { B D D 1 0 0 k }$ (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 142 |
+
|
| 143 |
+
<table><tr><td>Method</td><td>SF</td><td>person</td><td>rider</td><td>car</td><td>truck</td><td>bus</td><td>mcycle</td><td>bicycle</td><td>mAP</td></tr><tr><td>DA[13]</td><td>X</td><td>29.4</td><td>26.5</td><td>44.6</td><td>14.3</td><td>16.8</td><td>15.8</td><td>20.6</td><td>24.0</td></tr><tr><td rowspan="3">SWDA [65] CRDA [84]</td><td></td><td>30.2</td><td>29.5</td><td>45.7</td><td>15.2</td><td>18.4</td><td>17.1</td><td>21.2</td><td>25.3</td></tr><tr><td>X</td><td>31.4</td><td>31.3</td><td>46.3</td><td>19.5</td><td>18.9</td><td>17.3</td><td>23.8</td><td>26.9</td></tr><tr><td>·</td><td>32.4</td><td>32.6</td><td>50.4</td><td>20.6</td><td>23.4</td><td>18.9</td><td>25.0</td><td>29.0</td></tr><tr><td>SFOD [43] +HCL</td><td></td><td>33.9</td><td>34.4</td><td>52.8</td><td>22.1</td><td>25.3</td><td>22.6</td><td>26.7</td><td>31.1</td></tr><tr><td>HCL</td><td>√</td><td>32.7</td><td>33.2</td><td>52.0</td><td>21.3</td><td>25.6</td><td>21.5</td><td>26.0</td><td>30.3</td></tr></table>
|
| 144 |
+
|
| 145 |
+
# 4.4 Unsupervised Domain Adaptation for Object Detection
|
| 146 |
+
|
| 147 |
+
We evaluated the proposed HCL over the UMA-based object detection tasks Cityscapes $\mathrm { : F o g g y }$ Cityscapes and Cityscapes $ \mathrm { B D D 1 0 0 k }$ . Tables 4 and 5 show experimental results. We can observe that HCL outperforms state-of-the-art UMA method SFOD clearly. Similar to the semantic segmentation experiments, HCL achieves competitive performance as compared with state-of-the-art UDA methods (labeled by ✗in column SF) which require to access labeled source data in training.
|
| 148 |
+
|
| 149 |
+
# 4.5 Unsupervised Domain Adaptation for Image Classification
|
| 150 |
+
|
| 151 |
+
We evaluate the proposed HCL over the UMA-based image classificat tasks VisDA17 and Office-31. Tables 6 and 7 show experimental results. We can observe that HCL outperforms state-of-the-art UMA methods clearly. Similar to the semantic segmentation and object detection experiments, HCL achieves competitive performance as compared with state-of-the-art UDA methods (labeled by $\pmb { \chi }$ ) which require to access labeled source data in training.
|
| 152 |
+
|
| 153 |
+
# 4.6 Discussion
|
| 154 |
+
|
| 155 |
+
Generalization across computer vision tasks: We study how HCL generalizes across computer vision tasks by evaluating it over three representative tasks on semantic segmentation, object detection and image classification. Experiments in Tables 2- 7 show that HCL achieves competitive performance consistently across all three visual tasks, demonstrating the generalization ability of HCL across computer vision tasks.
|
| 156 |
+
|
| 157 |
+
Complementarity studies: We study the complementarity of our proposed HCL by combining it with existing UMA methods. Experiments in Table 2 (the row highlighted by $\ " + \mathrm { H C L } \ '$ ) shows that incorporating HCL boosts the existing UMA methods consistently.
|
| 158 |
+
|
| 159 |
+
Table 6: Experiments on image classification benchmark VisDA17 (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 160 |
+
|
| 161 |
+
<table><tr><td>Method</td><td>SF</td><td>Aero</td><td>Bike</td><td>Bus</td><td>Car</td><td>Horse</td><td>Knife</td><td>Motor</td><td>Person</td><td>Plant</td><td>Skateboard</td><td>Train</td><td>Truck</td><td>Mean</td></tr><tr><td>DANN [17]</td><td></td><td>81.9</td><td>77.7</td><td>82.8</td><td>44.3</td><td>81.2</td><td>29.5</td><td>65.1</td><td>28.6</td><td>51.9</td><td>54.6</td><td>82.8</td><td>7.8</td><td>57.4</td></tr><tr><td>ENT[18]</td><td></td><td>80.3</td><td>75.5</td><td>75.8</td><td>48.3</td><td>77.9</td><td>27.3</td><td>69.7</td><td>40.2</td><td>46.5</td><td>46.6</td><td>79.3</td><td>16.0</td><td>57.0</td></tr><tr><td>MCD [66]</td><td></td><td>87.0</td><td>60.9</td><td>83.7</td><td>64.0</td><td>88.9</td><td>79.6</td><td>84.7</td><td>76.9</td><td>88.6</td><td>40.3</td><td>83.0</td><td>25.8</td><td>71.9</td></tr><tr><td>CBST [103]</td><td></td><td>87.2</td><td>78.8</td><td>56.5</td><td>55.4</td><td>85.1</td><td>79.2</td><td>83.8</td><td>77.7</td><td>82.8</td><td>88.8</td><td>69.0</td><td>72.0</td><td>76.4</td></tr><tr><td>CRST[102]</td><td>xxxxx</td><td>88.0</td><td>79.2</td><td>61.0</td><td>60.0</td><td>87.5</td><td>81.4</td><td>86.3</td><td>78.8</td><td>85.6</td><td>86.6</td><td>73.9</td><td>68.8</td><td>78.1</td></tr><tr><td>3C-GAN [42]</td><td>√</td><td>94.8</td><td>73.4</td><td>68.8</td><td>74.8</td><td>93.1</td><td>95.4</td><td>88.6</td><td>84.7</td><td>89.1</td><td>84.7</td><td>83.5</td><td>48.1</td><td>81.6</td></tr><tr><td>+HCL</td><td>√</td><td>93.8</td><td>86.6</td><td>84.1</td><td>74.3</td><td>93.2</td><td>95.0</td><td>88.4</td><td>85.0</td><td>90.4</td><td>85.2</td><td>84.5</td><td>49.8</td><td>84.2</td></tr><tr><td>SHOT[45]</td><td>√</td><td>93.7</td><td>86.4</td><td>78.7</td><td>50.7</td><td>91.0</td><td>93.5</td><td>79.0</td><td>78.3</td><td>89.2</td><td>85.4</td><td>87.9</td><td>51.1</td><td>80.4</td></tr><tr><td>+HCL</td><td>√</td><td>94.3</td><td>87.0</td><td>82.6</td><td>70.6</td><td>92.0</td><td>93.2</td><td>87.0</td><td>80.6</td><td>89.6</td><td>86.8</td><td>84.6</td><td>58.7</td><td>83.9</td></tr><tr><td>HCL</td><td>√</td><td>93.3</td><td>85.4</td><td>80.7</td><td>68.5</td><td>91.0</td><td>88.1</td><td>86.0</td><td>78.6</td><td>86.6</td><td>88.8</td><td>80.0</td><td>74.7</td><td>83.5</td></tr></table>
|
| 162 |
+
|
| 163 |
+
Table 7: Experiments on image classification benchmark Office-31 (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Method</td><td>SF</td><td>A→W</td><td>D→W</td><td>W→D</td><td>A→D</td><td>D→A</td><td>W→A</td><td>Mean</td></tr><tr><td>DAN [49]</td><td></td><td>80.5</td><td>97.1</td><td>99.6</td><td>78.6</td><td>63.6</td><td>62.8</td><td>80.4</td></tr><tr><td>DANN [17]</td><td></td><td>82.0</td><td>96.9</td><td>99.1</td><td>79.7</td><td>68.2</td><td>67.4</td><td>82.2</td></tr><tr><td>ADDA [78]</td><td></td><td>86.2</td><td>96.2</td><td>98.4</td><td>77.8</td><td>69.5</td><td>68.9</td><td>82.9</td></tr><tr><td>JAN [50]</td><td></td><td>85.4</td><td>97.4</td><td>99.8</td><td>84.7</td><td>68.6</td><td>70.0</td><td>84.3</td></tr><tr><td>CBST[103]</td><td></td><td>87.8</td><td>98.5</td><td>100</td><td>86.5</td><td>71.2</td><td>70.9</td><td>85.8</td></tr><tr><td>CRST[102]</td><td>xxxxxx</td><td>89.4</td><td>98.9</td><td>100</td><td>88.7</td><td>72.6</td><td>70.9</td><td>86.8</td></tr><tr><td>3C-GAN [42]</td><td></td><td>93.7</td><td>98.5</td><td>99.8</td><td>92.7</td><td>75.3</td><td>77.8</td><td>89.6</td></tr><tr><td>+HCL</td><td>V</td><td>93.4</td><td>99.3</td><td>100.0</td><td>94.6</td><td>77.1</td><td>79.0</td><td>90.6</td></tr><tr><td>SHOT[45]</td><td></td><td>91.2</td><td>98.3</td><td>99.9</td><td>90.6</td><td>72.5</td><td>71.4</td><td>87.3</td></tr><tr><td>+HCL</td><td>1</td><td>92.8</td><td>99.0</td><td>100.0</td><td>94.4</td><td>76.1</td><td>78.3</td><td>90.1</td></tr><tr><td>HCL</td><td>√</td><td>92.5</td><td>98.2</td><td>100.0</td><td>94.7</td><td>75.9</td><td>77.7</td><td>89.8</td></tr></table>
|
| 166 |
+
|
| 167 |
+
Feature visualization: This paragraph presents the t-SNE [53] visualization of feature representation on GTA Cityscapes model adaptation task. We compare HCL with two state-of-the-art UMA methods, i.e., “UR" [72] and “SFDA" [48], and Fig.3 shows the visualization. We can observe that HCL can learn desirable instance-discriminative yet category-discriminative representations because it incorporates two key designs that work in a complementary manner: 1) HCID works at instance level, which encourages to learn instance-discriminative target representations that generalize well to unseen data [98]; 2) HCCD works at category level which encourages to learn category-discriminative target representations that are well aligned with the objective of down-stream visual tasks. In addition, qualitative illustrations are provided in Fig.4. It can be observed that our proposed HCL clearly outperforms UR and SFDA.
|
| 168 |
+
|
| 169 |
+
Generalization across learning setups: We study how HCL generalizes across learning setups by adapting it into two adaptation setups, i.e., partial-set adaptation and open-set adaptation. Experiments in Table 8 show that HCL achieves competitive performance consistently across both setups.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 3: The t-SNE [53] visualization of feature representation on $\mathrm { { G T A } }$ Cityscapes unsupervsied model adaptation task: Each color in the graphs stands for a category of samples (image pixels) with a digit representing the center of a category of samples. It can be observed that the proposed HCL outperforms “UR" and “SFDA" qualitatively, by generating instance-discriminative and categorydiscriminative representations for unlabeled target data.
|
| 173 |
+
|
| 174 |
+
Table 8: Experiments on image classification benchmark Office-Home under the setup of partial-set DA (domain adaptation) and open-set DA (“SF” denotes source-data free, i.e., adaptation without source data).
|
| 175 |
+
|
| 176 |
+
<table><tr><td>Partial-set DA</td><td>SF</td><td>A→C</td><td>A→P</td><td>A→R</td><td>C→A</td><td>C→P</td><td>C→R</td><td>P→A</td><td>P→C</td><td>P→R</td><td>R→A</td><td>R→C</td><td>R→P</td><td>Mean</td></tr><tr><td>SAN[5]</td><td>X</td><td>44.4</td><td>68.7</td><td>74.6</td><td>67.5</td><td>65.0</td><td>77.8</td><td>59.8</td><td>44.7</td><td>80.1</td><td>72.2</td><td>50.2</td><td>78.7</td><td>65.3</td></tr><tr><td>ETN [6]</td><td>×</td><td>59.2</td><td>77.0</td><td>79.5</td><td>62.9</td><td>65.7</td><td>75.0</td><td>68.3</td><td>55.4</td><td>84.4</td><td>75.7</td><td>57.7</td><td>84.5</td><td>70.5</td></tr><tr><td>SAFN [85]</td><td>X</td><td>58.9</td><td>76.3</td><td>81.4</td><td>70.4</td><td>73.0</td><td>77.8</td><td>72.4</td><td>55.3</td><td>80.4</td><td>75.8</td><td>60.4</td><td>79.9</td><td>71.8</td></tr><tr><td>SHOT [45]</td><td></td><td>57.9</td><td>83.6</td><td>88.8</td><td>72.4</td><td>74.0</td><td>79.0</td><td>76.1</td><td>60.6</td><td>90.1</td><td>81.9</td><td>68.3</td><td>88.5</td><td>76.8</td></tr><tr><td>+HCL</td><td>·</td><td>66.9</td><td>85.5</td><td>92.5</td><td>78.3</td><td>77.2</td><td>87.1</td><td>78.3</td><td>65.1</td><td>90.7</td><td>82.4</td><td>68.7</td><td>88.4</td><td>80.1</td></tr><tr><td>HCL</td><td>√</td><td>65.6</td><td>85.2</td><td>92.7</td><td>77.3</td><td>76.2</td><td>87.2</td><td>78.2</td><td>66.0</td><td>89.1</td><td>81.5</td><td>68.4</td><td>87.3</td><td>79.6</td></tr><tr><td>Open-set DA</td><td>SF</td><td>A→C</td><td>A→P</td><td>A→R</td><td>C→A</td><td>C→P</td><td>C→R</td><td>P→A</td><td>P→C</td><td>P→R</td><td>R→A</td><td>R→C</td><td>R→P</td><td>Mean</td></tr><tr><td>OSBP[67]</td><td>X</td><td>56.7</td><td>51.5</td><td>49.2</td><td>67.5</td><td>65.5</td><td>74.0</td><td>62.5</td><td>64.8</td><td>69.3</td><td>80.6</td><td>74.7</td><td>71.5</td><td>65.7</td></tr><tr><td>OpenMax [2]</td><td></td><td>56.5</td><td>52.9</td><td>53.7</td><td>69.1</td><td>64.8</td><td>74.5</td><td>64.1</td><td>64.0</td><td>71.2</td><td>80.3</td><td>73.0</td><td>76.9</td><td>66.7</td></tr><tr><td>STA [47]</td><td>X</td><td>58.1</td><td>53.1</td><td>54.4</td><td>71.6</td><td>69.3</td><td>81.9</td><td>63.4</td><td>65.2</td><td>74.9</td><td>85.0</td><td>75.8</td><td>80.8</td><td>69.5</td></tr><tr><td>SHOT[45]</td><td></td><td>62.5</td><td>77.8</td><td>83.9</td><td>60.9</td><td>73.4</td><td>79.4</td><td>64.7</td><td>58.7</td><td>83.1</td><td>69.1</td><td>62.0</td><td>82.1</td><td>71.5</td></tr><tr><td>+HCL</td><td>1</td><td>64.2</td><td>78.3</td><td>83.0</td><td>61.1</td><td>72.2</td><td>79.6</td><td>65.5</td><td>59.3</td><td>80.6</td><td>80.1</td><td>72.0</td><td>82.8</td><td>73.2</td></tr><tr><td>HCL</td><td>√</td><td>64.0</td><td>78.6</td><td>82.4</td><td>64.5</td><td>73.1</td><td>80.1</td><td>64.8</td><td>59.8</td><td>75.3</td><td>78.1</td><td>69.3</td><td>81.5</td><td>72.6</td></tr></table>
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
Figure 4: Qualitative illustrations and comparison over domain adaptive semantic segmentation task $\mathrm { G T A } 5 $ Cityscapes. Our historical contrastive learning (HCL) exploits historical source hypothesis to make up for the absence of source data in UMA, which produces better qualitative results (i.e., semantic segmentation) by preserving the source hypothesis. It can be observed that HCL generates better segmentation results, for example, the sidewalk in the first row, the road in the second row and the sky and sidewalk in the third row.
|
| 180 |
+
|
| 181 |
+
# 5 Conclusion
|
| 182 |
+
|
| 183 |
+
In this work, we studied historical contrastive learning, an innovative UMA technique that exploits historical source hypothesis to make up for the absence of source data in UMA. We achieve historical contrastive learning by novel designs of historical contrastive instance discrimination and historical contrastive category discrimination which learn discriminative representations for target data while preserving source hypothesis simultaneously. Extensive experiments over a variety of visual tasks and learning setups show that HCL outperforms state-of-the-art techniques consistently. Moving forward, we will explore memory-based learning in other transfer learning tasks.
|
| 184 |
+
|
| 185 |
+
# Acknowledgement
|
| 186 |
+
|
| 187 |
+
This research was conducted at Singtel Cognitive and Artificial Intelligence Lab for Enterprises (SCALE $@$ NTU), which is a collaboration between Singapore Telecommunications Limited (Singtel) and Nanyang Technological University (NTU) that is supported by $\mathbf { A } { ^ { * } \mathbf { S } } \mathbf { T } \mathbf { A } \mathbf { R }$ under its Industry Alignment Fund (LOA Award number: I1701E0013).
|
| 188 |
+
|
| 189 |
+
References
|
| 190 |
+
[1] Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In Advances in neural information processing systems, pages 137–144, 2007.
|
| 191 |
+
[2] Abhijit Bendale and Terrance E Boult. Towards open set deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1563–1572, 2016.
|
| 192 |
+
[3] Léon Bottou. Large-scale machine learning with stochastic gradient descent. In Proceedings of COMPSTAT’2010, pages 177–186. Springer, 2010. [4] Qi Cai, Yingwei Pan, Chong-Wah Ngo, Xinmei Tian, Lingyu Duan, and Ting Yao. Exploring object relation in mean teacher for cross-domain detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11457–11466, 2019. [5] Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Michael I Jordan. Partial transfer learning with selective adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2724–2732, 2018. [6] Zhangjie Cao, Kaichao You, Mingsheng Long, Jianmin Wang, and Qiang Yang. Learning to transfer examples for partial domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2985–2994, 2019.
|
| 193 |
+
[7] Hyuntak Cha, Jaeho Lee, and Jinwoo Shin. Co2l: Contrastive continual learning. arXiv preprint arXiv:2106.14413, 2021. [8] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4):834–848, 2017. [9] Shiming Chen, Wenjie Wang, Beihao Xia, Qinmu Peng, Xinge You, Feng Zheng, and Ling Shao. Free: Feature refinement for generalized zero-shot learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 122–131, 2021.
|
| 194 |
+
[10] Shiming Chen, GuoSen Xie, Yang Liu, Qinmu Peng, Baigui Sun, Hao Li, Xinge You, and Ling Shao. Hsva: Hierarchical semantic-visual adaptation for zero-shot learning. In 35th Conference on Neural Information Processing Systems (NeurIPS), 2021.
|
| 195 |
+
[11] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pages 1597–1607. PMLR, 2020.
|
| 196 |
+
[12] Yanbei Chen, Xiatian Zhu, and Shaogang Gong. Semi-supervised deep learning with memory. In Proceedings of the European Conference on Computer Vision (ECCV), pages 268–283, 2018.
|
| 197 |
+
[13] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3339–3348, 2018.
|
| 198 |
+
[14] Yuhua Chen, Wen Li, and Luc Van Gool. Road: Reality oriented adaptation for semantic segmentation of urban scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7892–7901, 2018.
|
| 199 |
+
[15] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3213–3223, 2016.
|
| 200 |
+
[16] Geoffrey French, Michal Mackiewicz, and Mark Fisher. Self-ensembling for visual domain adaptation. arXiv preprint arXiv:1706.05208, 2017.
|
| 201 |
+
[17] Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. The Journal of Machine Learning Research, 17(1):2096–2030, 2016.
|
| 202 |
+
[18] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In Advances in neural information processing systems, pages 529–536, 2005.
|
| 203 |
+
[19] Dayan Guan, Jiaxing Huang, Shijian Lu, and Aoran Xiao. Scale variance minimization for unsupervised domain adaptation in image segmentation. Pattern Recognition, 112:107764, 2021.
|
| 204 |
+
[20] Dayan Guan, Jiaxing Huang, Aoran Xiao, and Shijian Lu. Domain adaptive video segmentation via temporal consistency regularization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8053–8064, 2021.
|
| 205 |
+
[21] Dayan Guan, Jiaxing Huang, Aoran Xiao, Shijian Lu, and Yanpeng Cao. Uncertainty-aware unsupervised domain adaptation in object detection. IEEE Transactions on Multimedia, 2021.
|
| 206 |
+
[22] 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, pages 9729–9738, 2020.
|
| 207 |
+
[23] 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.
|
| 208 |
+
[24] 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.
|
| 209 |
+
[25] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In International Conference on Machine Learning, pages 1989–1998, 2018.
|
| 210 |
+
[26] Weixiang Hong, Zhenzhen Wang, Ming Yang, and Junsong Yuan. Conditional generative adversarial network for structured domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1335–1344, 2018.
|
| 211 |
+
[27] Cheng-Chun Hsu, Yi-Hsuan Tsai, Yen-Yu Lin, and Ming-Hsuan Yang. Every pixel matters: Center-aware feature alignment for domain adaptive object detector. In European Conference on Computer Vision, pages 733–748. Springer, 2020.
|
| 212 |
+
[28] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4700–4708, 2017.
|
| 213 |
+
[29] Jiaxing Huang, Dayan Guan, Shijian Lu, and Aoran Xiao. Mlan: Multi-level adversarial network for domain adaptive semantic segmentation. Pattern Recognition, 2021.
|
| 214 |
+
[30] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Category contrast for unsupervised domain adaptation in visual tasks. arXiv preprint arXiv:2106.02885, 2021.
|
| 215 |
+
[31] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Cross-view regularization for domain adaptive panoptic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10133–10144, 2021.
|
| 216 |
+
[32] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Fsdr: Frequency space domain randomization for domain generalization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6891–6902, 2021.
|
| 217 |
+
[33] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Rda: Robust domain adaptation via fourier adversarial attacking. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021.
|
| 218 |
+
[34] Jiaxing Huang, Dayan Guan, Aoran Xiao, and Shijian Lu. Semi-supervised domain adaptation via adaptive and progressive feature alignment. arXiv preprint arXiv:2106.02845, 2021.
|
| 219 |
+
[35] Jiaxing Huang, Shijian Lu, Dayan Guan, and Xiaobing Zhang. Contextual-relation consistent domain adaptation for semantic segmentation. In European Conference on Computer Vision, pages 705–722. Springer, 2020.
|
| 220 |
+
[36] 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.
|
| 221 |
+
[37] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12456–12465, 2019.
|
| 222 |
+
[38] Jogendra Nath Kundu, Naveen Venkat, R Venkatesh Babu, et al. Universal source-free domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4544– 4553, 2020.
|
| 223 |
+
[39] Jogendra Nath Kundu, Naveen Venkat, Ambareesh Revanur, R Venkatesh Babu, et al. Towards inheritable models for open-set domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12376–12385, 2020.
|
| 224 |
+
[40] Vinod K Kurmi, Venkatesh K Subramanian, and Vinay P Namboodiri. Domain impression: A source data free domain adaptation method. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 615–625, 2021.
|
| 225 |
+
[41] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016.
|
| 226 |
+
[42] Rui Li, Qianfen Jiao, Wenming Cao, Hau-San Wong, and Si Wu. Model adaptation: Unsupervised domain adaptation without source data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9641–9650, 2020.
|
| 227 |
+
[43] Xianfeng Li, Weijie Chen, Di Xie, Shicai Yang, Peng Yuan, Shiliang Pu, and Yueting Zhuang. A free lunch for unsupervised domain adaptive object detection without source data. arXiv preprint arXiv:2012.05400, 2020.
|
| 228 |
+
[44] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6936–6945, 2019.
|
| 229 |
+
[45] Jian Liang, Dapeng Hu, and Jiashi Feng. Do we really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. In International Conference on Machine Learning, pages 6028–6039. PMLR, 2020.
|
| 230 |
+
[46] Jian Liang, Dapeng Hu, Yunbo Wang, Ran He, and Jiashi Feng. Source data-absent unsupervised domain adaptation through hypothesis transfer and labeling transfer. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021.
|
| 231 |
+
[47] Hong Liu, Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Qiang Yang. Separate to adapt: Open set domain adaptation via progressive separation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2927–2936, 2019.
|
| 232 |
+
[48] Yuang Liu, Wei Zhang, and Jun Wang. Source-free domain adaptation for semantic segmentation. arXiv preprint arXiv:2103.16372, 2021.
|
| 233 |
+
[49] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In International Conference on Machine Learning, pages 97–105, 2015.
|
| 234 |
+
[50] Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Deep transfer learning with joint adaptation networks. In International conference on machine learning, pages 2208–2217. PMLR, 2017.
|
| 235 |
+
[51] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2507–2516, 2019.
|
| 236 |
+
[52] Zhipeng Luo, Zhongang Cai, Changqing Zhou, Gongjie Zhang, Haiyu Zhao, Shuai Yi, Shijian Lu, Hongsheng Li, Shanghang Zhang, and Ziwei Liu. Unsupervised domain adaptive 3d detection with multi-level consistency. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8866–8875, 2021.
|
| 237 |
+
[53] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579–2605, 2008.
|
| 238 |
+
[54] 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, pages 6707–6717, 2020.
|
| 239 |
+
[55] Hyeonwoo Noh, Seunghoon Hong, and Bohyung Han. Learning deconvolution network for semantic segmentation. In Proceedings of the IEEE international conference on computer vision, pages 1520–1528, 2015.
|
| 240 |
+
[56] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 241 |
+
[57] Fei Pan, Inkyu Shin, Francois Rameau, Seokju Lee, and In So Kweon. Unsupervised intra-domain adaptation for semantic segmentation through self-supervision. arXiv preprint arXiv:2004.07703, 2020.
|
| 242 |
+
[58] Xingchao Peng, Ben Usman, Neela Kaushik, Dequan Wang, Judy Hoffman, and Kate Saenko. Visda: A synthetic-to-real benchmark for visual domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 2021–2026, 2018.
|
| 243 |
+
[59] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 779–788, 2016.
|
| 244 |
+
[60] 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, pages 91–99, 2015.
|
| 245 |
+
[61] Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: Ground truth from computer games. In European conference on computer vision, pages 102–118. Springer, 2016.
|
| 246 |
+
[62] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M Lopez. The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3234–3243, 2016.
|
| 247 |
+
[63] Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European conference on computer vision, pages 213–226. Springer, 2010.
|
| 248 |
+
[64] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Adversarial dropout regularization. arXiv preprint arXiv:1711.01575, 2017.
|
| 249 |
+
[65] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6956–6965, 2019.
|
| 250 |
+
[66] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3723–3732, 2018.
|
| 251 |
+
[67] Kuniaki Saito, Shohei Yamamoto, Yoshitaka Ushiku, and Tatsuya Harada. Open set domain adaptation by backpropagation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 153–168, 2018.
|
| 252 |
+
[68] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Semantic foggy scene understanding with synthetic data. International Journal of Computer Vision, 126(9):973–992, 2018.
|
| 253 |
+
[69] Fatemeh Sadat Saleh, Mohammad Sadegh Aliakbarian, Mathieu Salzmann, Lars Petersson, and Jose M Alvarez. Effective use of synthetic data for urban scene semantic segmentation. In European Conference on Computer Vision, pages 86–103. Springer, 2018.
|
| 254 |
+
[70] Swami Sankaranarayanan, Yogesh Balaji, Carlos D Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8503–8512, 2018.
|
| 255 |
+
[71] Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Learning from synthetic data: Addressing domain shift for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3752–3761, 2018.
|
| 256 |
+
[72] Prabhu Teja Sivaprasad and Francois Fleuret. Uncertainty reduction for model adaptation in semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), number CONF. IEEE, 2021.
|
| 257 |
+
[73] 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, pages 1–9, 2015.
|
| 258 |
+
[74] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pages 1195–1204, 2017.
|
| 259 |
+
[75] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
|
| 260 |
+
[76] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kihyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7472–7481, 2018.
|
| 261 |
+
[77] Yi-Hsuan Tsai, Kihyuk Sohn, Samuel Schulter, and Manmohan Chandraker. Domain adaptation for structured output via discriminative patch representations. In Proceedings of the IEEE International Conference on Computer Vision, pages 1456–1465, 2019.
|
| 262 |
+
[78] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7167–7176, 2017.
|
| 263 |
+
[79] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2517–2526, 2019.
|
| 264 |
+
[80] Guoqiang Wei, Cuiling Lan, Wenjun Zeng, Zhizheng Zhang, and Zhibo Chen. Toalign: Task-oriented alignment for unsupervised domain adaptation. 35th Advances in Neural Information Processing Systems, 2021.
|
| 265 |
+
[81] Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. arXiv preprint arXiv:1410.3916, 2014.
|
| 266 |
+
[82] 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, pages 3733–3742, 2018.
|
| 267 |
+
[83] Rongchang Xie, Fei Yu, Jiachao Wang, Yizhou Wang, and Li Zhang. Multi-level domain adaptive learning for cross-domain detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops, Oct 2019.
|
| 268 |
+
[84] Chang-Dong Xu, Xing-Ran Zhao, Xin Jin, and Xiu-Shen Wei. Exploring categorical regularization for domain adaptive object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11724–11733, 2020.
|
| 269 |
+
[85] Ruijia Xu, Guanbin Li, Jihan Yang, and Liang Lin. Larger norm more transferable: An adaptive feature norm approach for unsupervised domain adaptation. In Proceedings of the IEEE International Conference on Computer Vision, pages 1426–1435, 2019.
|
| 270 |
+
[86] Yanchao Yang and Stefano Soatto. Fda: Fourier domain adaptation for semantic segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4085– 4095, 2020.
|
| 271 |
+
[87] Mang Ye, Xu Zhang, Pong C Yuen, and Shih-Fu Chang. Unsupervised embedding learning via invariant and spreading instance feature. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6210–6219, 2019.
|
| 272 |
+
[88] Hao-Wei Yeh, Baoyao Yang, Pong C Yuen, and Tatsuya Harada. Sofa: Source-data-free feature alignment for unsupervised domain adaptation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pages 474–483, 2021.
|
| 273 |
+
[89] Fisher Yu, Wenqi Xian, Yingying Chen, Fangchen Liu, Mike Liao, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving video database with scalable annotation tooling. arXiv preprint arXiv:1805.04687, 2(5):6, 2018.
|
| 274 |
+
[90] Yunpeng Zhai, Shijian Lu, Qixiang Ye, Xuebo Shan, Jie Chen, Rongrong Ji, and Yonghong Tian. Adcluster: Augmented discriminative clustering for domain adaptive person re-identification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9021–9030, 2020.
|
| 275 |
+
[91] Yunpeng Zhai, Qixiang Ye, Shijian Lu, Mengxi Jia, Rongrong Ji, and Yonghong Tian. Multiple expert brainstorming for domain adaptive person re-identification. In Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part VII 16, pages 594–611. Springer, 2020.
|
| 276 |
+
[92] Fangneng Zhan, Chuhui Xue, and Shijian Lu. Ga-dan: Geometry-aware domain adaptation network for scene text detection and recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9105–9115, 2019.
|
| 277 |
+
[93] Jingyi Zhang, Jiaxing Huang, and Shijian Lu. Spectral unsupervised domain adaptation for visual recognition. arXiv preprint arXiv:2106.06112, 2021.
|
| 278 |
+
[94] Jingyi Zhang, Jiaxing Huang, Zhipeng Luo, Gongjie Zhang, and Shijian Lu. Da-detr: Domain adaptive detection transformer by hybrid attention. arXiv preprint arXiv:2103.17084, 2021.
|
| 279 |
+
[95] Xiaobing Zhang, Haigang Gong, Xili Dai, Fan Yang, Nianbo Liu, and Ming Liu. Understanding pictograph with facial features: End-to-end sentence-level lip reading of chinese. In AAAI, pages 9211–9218, 2019.
|
| 280 |
+
[96] Yang Zhang, Philip David, and Boqing Gong. Curriculum domain adaptation for semantic segmentation of urban scenes. In Proceedings of the IEEE International Conference on Computer Vision, pages 2020–2030, 2017.
|
| 281 |
+
[97] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4320–4328, 2018.
|
| 282 |
+
[98] Nanxuan Zhao, Zhirong Wu, Rynson W. H. Lau, and Stephen Lin. What makes instance discrimination good for transfer learning? In International Conference on Learning Representations, 2021.
|
| 283 |
+
[99] Zhedong Zheng and Yi Yang. Unsupervised scene adaptation with memory regularization in vivo. arXiv preprint arXiv:1912.11164, 2019.
|
| 284 |
+
[100] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 598–607, 2019.
|
| 285 |
+
[101] Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local aggregation for unsupervised learning of visual embeddings. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 6002–6012, 2019.
|
| 286 |
+
[102] Yang Zou, Zhiding Yu, Xiaofeng Liu, BVK Kumar, and Jinsong Wang. Confidence regularized selftraining. In Proceedings of the IEEE International Conference on Computer Vision, pages 5982–5991, 2019.
|
| 287 |
+
[103] Yang Zou, Zhiding Yu, BVK Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In Proceedings of the European Conference on Computer Vision (ECCV), pages 289–305, 2018.
|
md/train/1Kof-nkmQB8/1Kof-nkmQB8.md
ADDED
|
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Collaborating with Humans without Human Data
|
| 2 |
+
|
| 3 |
+
DJ Strouse⇤, Kevin R. McKee, Matt Botvinick, Edward Hughes, Richard Everett⇤ DeepMind {strouse, kevinrmckee, botvinick, edwardhughes, reverett}@deepmind.com
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Collaborating with humans requires rapidly adapting to their individual strengths, weaknesses, and preferences. Unfortunately, most standard multi-agent reinforcement learning techniques, such as self-play (SP) or population play (PP), produce agents that overfit to their training partners and do not generalize well to humans. Alternatively, researchers can collect human data, train a human model using behavioral cloning, and then use that model to train “human-aware” agents (“behavioral cloning play”, or BCP). While such an approach can improve the generalization of agents to new human co-players, it involves the onerous and expensive step of collecting large amounts of human data first. Here, we study the problem of how to train agents that collaborate well with human partners without using human data. We argue that the crux of the problem is to produce a diverse set of training partners. Drawing inspiration from successful multi-agent approaches in competitive domains, we find that a surprisingly simple approach is highly effective. We train our agent partner as the best response to a population of self-play agents and their past checkpoints taken throughout training, a method we call Fictitious Co-Play (FCP). Our experiments focus on a two-player collaborative cooking simulator that has recently been proposed as a challenge problem for coordination with humans. We find that FCP agents score significantly higher than SP, PP, and BCP when paired with novel agent and human partners. Furthermore, humans also report a strong subjective preference to partnering with FCP agents over all baselines.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Generating agents which collaborate with novel partners is a longstanding challenge for Artificial Intelligence (AI) [4, 16, 37, 52]. Achieving ad-hoc, zero-shot coordination [31, $\boxed { 6 6 }$ is especially important in situations where an AI must generalize to novel human partners [6, 61]. Many successful approaches have employed human models, either constructed explicitly [14, 35, 53] or learnt implicitly [12, 60]. By contrast, recent work in competitive domains has shown that it is possible to reach humanlevel using model-free reinforcement learning (RL) without human data, via self-play [8, 9, 63, 64]. This begs the question: Can model-free RL without human data generate agents that can collaborate with novel humans?
|
| 12 |
+
|
| 13 |
+
We seek an answer to this question in the space of common-payoff games, where all agents work towards a shared goal and receive the same reward. Self-play (SP), in which an agent learns from repeated games played against copies of itself, does not produce agents that generalize well to novel co-players [10, 11, 21, 44]. Intuitively, this is because agents trained in self-play only ever need to coordinate with themselves, and so make for brittle and stubborn collaborators with new partners who act differently. Population play (PP) trains a population of agents, all of whom interact with each other $\pmb { \| 3 9 \| }$ . While PP can generate agents capable of cooperation with humans in competitive team games $\pmb { \Vert 3 4 \Vert }$ , it still fails to produce robust partners for novel humans in pure common-payoff settings [12]. PP in common-payoff settings naturally encourages agents to play the same way, reducing strategic diversity and producing agents not so different from self-play $\dot { \lVert 2 4 \rVert }$ .
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: In this work, we evaluate a variety of agent training methods (Section 2) in zero-shot coordination with agents (Section 4). We then run a human-agent collaborative study designed to elicit human preferences over agents (Section 5)
|
| 17 |
+
|
| 18 |
+
Our approach starts with the intuition that the key to producing robust agent collaborators is exposure to diverse training partners. We find that a surprisingly simple strategy is effective in generating sufficient diversity. We train $N$ self-play agents varying only their random seed for neural network initialization. Periodically during training, we save agent “checkpoints” representing their strategy at that point in time. Then, we train an agent partner as the best-response to both the fully-trained agents and their past checkpoints. The different checkpoints simulate different skill levels, and the different random seeds simulate breaking symmetries in different ways. We refer to this agent training procedure as Fictitious $\mathbf { C o }$ -Play (FCP) for its relationship to fictitious self-play [7, 27, 28, 69].
|
| 19 |
+
|
| 20 |
+
We evaluate FCP in a fully-observable two-player common-payoff collaborative cooking simulator. Based on the game Overcooked $\mathbb { \left. \boldsymbol { \ 2 5 } \right. }$ , it has recently been proposed as a coordination challenge for AI [12, 50, 70]. State-of-the-art performance in producing agents capable of generalization to novel humans was achieved in $[ \mathbb { 1 2 } ]$ via behavioral cloning (BC) of human data. More precisely, BC was used to produce models that can stand in as human proxies during training in simulation, a method we call behavioral cloning play (BCP). We demonstrate that FCP outperforms BCP in generalizing to both novel agent and human partners, and that humans express a significant preference for partnering with FCP over BCP. Our method avoids the cost and potential privacy concerns of collecting human data for training, while achieving better outcomes for humans at test time.
|
| 21 |
+
|
| 22 |
+
We summarize the novel contributions of this paper as follows:
|
| 23 |
+
|
| 24 |
+
1. We propose Fictitious Co-Play (FCP) to train agents capable of zero-shot coordination with humans (Section 2.1).
|
| 25 |
+
2. We demonstrate that FCP agents generalize better than SP, PP, and BCP in zero-shot coordination with a variety of held-out agents (Section 4.2).
|
| 26 |
+
3. We propose a rigorous human-agent interaction study with behavioral analysis and participant feedback (Section $5 . 1 )$ .
|
| 27 |
+
4. We demonstrate that FCP significantly outperforms the BCP state-of-the-art, both in task score and in human partner preference (Section $\underline { { \overline { { 5 . 2 } } } } )$ .
|
| 28 |
+
|
| 29 |
+
# 2 Methods
|
| 30 |
+
|
| 31 |
+
# 2.1 Fictitious Co-Play (FCP)
|
| 32 |
+
|
| 33 |
+
Diverse training conditions have been shown to make agents more robust, from environmental variations (i.e. domain randomization $\textcircled { 1 5 4 } , \textcircled { 5 6 } , \textcircled { 6 7 } \textcircled { 1 }$ to heterogeneity in training partners $\mathbb { \left. \boldsymbol { \mathfrak { G } } \boldsymbol { \mathfrak { g } } \right. }$ . We seek to train agents that are robust partners for humans in common-payoff games, and so extend this line of work to that setting.
|
| 34 |
+
|
| 35 |
+
One important challenge in collaborating with novel partners is dealing with symmetries $\pmb { \mathbb { B } } \mathbf { \mathbb { 1 } }$ . For example, two agents A and B facing each other may move past each other by A going left and B going right, or vice versa. Both are valid solutions, but a good agent partner will adaptively switch between these conventions if a human clearly prefers one over the other. A second important challenge is dealing with variations in skill level. Good agent partners should be able to assist both highly-skilled partners, as well as partners who are still learning.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 2: The four agent training methods we evaluate in this work. Self-play (SP) where an agent learns with itself, population-play (PP) where a population of agents are co-trained together, and behavioral cloning play (BCP) where data from human games is used to create a behaviorally cloned agent with which an RL agent is then trained. In our method, Fictitious Co-Play (FCP), $N$ self-play agents are trained independently and checkpointed throughout training. An agent is then trained to best respond to the entire population of SP agents and their checkpoints.
|
| 39 |
+
|
| 40 |
+
Fictitious co-play (FCP) is a simple two-stage approach for training agents that overcomes both of these challenges (Figure $2 ,$ right). In the first stage, we train a diverse pool of partners. To allow the pool to represent different symmetry breaking conventions, we train $N$ partner agents in self-play. Since these partners are trained independently, they can arrive at different arbitrary conventions for breaking symmetries. To allow the pool to represent different skill levels, we use multiple checkpoints of each self-play partner throughout training. The final checkpoint represents a fully-trained “skillful” partner, while earlier checkpoints represent less skilled partners. Notably, by using multiple checkpoints per partner, this additional diversity in skill incurs no extra training cost.
|
| 41 |
+
|
| 42 |
+
In the second stage, we train an FCP agent as the best response to the pool of diverse partners created in the first stage. Importantly, the partner parameters are frozen and thus FCP must learn to adapt to partners, rather than expect partners to adapt to it. In this way, FCP agents are prepared to follow the lead of human partners, and learn a general policy across a range of strategies and skills. We call our method “fictitious” co-play for its relationship to fictitious self-play in which competitive agents are trained with past checkpoints (in that case, to avoid strategy cycling) [7, 27, 28, 39, 69].
|
| 43 |
+
|
| 44 |
+
# 2.2 Baselines and ablations
|
| 45 |
+
|
| 46 |
+
We compare FCP agents to the three baseline training methods listed below, each varying only in their set of training partners, with the RL algorithm and architecture consistent across all agents:
|
| 47 |
+
|
| 48 |
+
1. Self-play (SP), where agents learn solely through interaction with themselves.
|
| 49 |
+
2. Population-play (PP), where a population of agents are co-trained through random pairings.
|
| 50 |
+
3. Behavioral cloning play (BCP), where an agent is trained with a BC model of a human [12].
|
| 51 |
+
|
| 52 |
+
We also evaluate three variations on FCP to better understand the conditions for its success:
|
| 53 |
+
|
| 54 |
+
1. To test the importance of including past checkpoints in training, we evaluate an ablation of FCP in which agents are trained only with the converged checkpoints of their partners $\mathrm { F C P } _ { - T }$ for “FCP minus time”). 2. To test whether FCP would benefit from additional diversity in its partner population, we evaluate an augmentation of FCP in which the population of SP partners varies not just in random seed, but also in architecture $\operatorname { F C P } _ { + A }$ for “FCP plus architectural variation”). 3. To test whether architectural variation can serve as a full replacement for playing with past checkpoints, we evaluate the combination of both modifications $( \mathrm { F C P } _ { - T , + A } )$ .
|
| 55 |
+
|
| 56 |
+
# 2.3 Environment
|
| 57 |
+
|
| 58 |
+
Following prior work on zero-shot coordination in human-agent interaction, we study the Overcooked environment (see Figure 3) [12, 13, 38, 50, 70]. We draw particular inspiration from the environment in Carroll et al. [12]. For full details, see Appendix A.
|
| 59 |
+
|
| 60 |
+
In this environment, players are placed into a gridworld kitchen as chefs and tasked with delivering as many cooked dishes of tomato soup as possible within an episode. This involves a series of sequential high-level actions to which both players can contribute: collecting tomatoes, depositing them into cooking pots, letting the tomatoes cook into soup, collecting a dish, getting the soup, and delivering it. Upon a successful delivery, both players are rewarded equally.
|
| 61 |
+
|
| 62 |
+
To effectively complete the task, players must learn to navigate the kitchen and interact with objects in the correct order, all while maintaining awareness of their partner’s behavior to coordinate with them. This environment therefore presents the challenges of both movement and strategic coordination.
|
| 63 |
+
|
| 64 |
+
Each player observes an egocentric RGB view of the world, and at every step can perform one of six actions: stand still, move {up, down, left, right}, interact. The behavior ofLÈ¡áyÒįŘįºµòµÒ¡y® interact varies based on the cell which the player is facing (e.g. place tomato on counter).
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
Figure 3: The Overcooked environment: a two-player common-payoff game in which players must coordinate to cook and deliver soup.
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 4: Layouts: the kitchens which agents and humans play in, each emphasizing different coordination strategies. Highlighted in bold are the terms used to refer to each in the rest of this paper.
|
| 71 |
+
|
| 72 |
+
# 2.4 Implementation details
|
| 73 |
+
|
| 74 |
+
Here we highlight several key implementation details for our training methods. For full details, including the architectures, hyperparameters, and compute used, please see Appendix B.
|
| 75 |
+
|
| 76 |
+
For our reinforcement learning agents, we use the V-MPO $\boldsymbol { \left[ \left[ 6 5 \right] \right] }$ algorithm along with a ResNet [26] plus LSTM $\mathbb { \left| \bigstar \bigstar \right\| }$ architecture which we found led to optimal behavior across all layouts. Agents are trained using a distributed set of environments running in parallel $\textcircled { 1 1 7 }$ , each sampling two agents from the training population to play together every episode.
|
| 77 |
+
|
| 78 |
+
Both PP and FCP are trained with a population size of $N = 3 2$ agents which are sampled uniformly. For FCP, we use 3 checkpoints for each agent, therefore incurring no additional training burden: (1) at initialization (i.e. a low-skilled agent), (2) at the end of training (i.e. a fully-trained expert agent), and (3) at the middle of training, defined as when the agent reaches $50 \%$ of its final reward (i.e. an average-skilled agent). When varying architecture for the training partners of the $\operatorname { F C P } _ { + A }$ and $\mathrm { F C P } _ { - T , + A }$ variants, we vary whether the partners use memory (i.e. LSTM vs not) and the width of their policy and value networks (i.e. 16 vs 256). In total, we train 8 agents for each of the 4 combinations, leaving the total population size of $N = 3 2$ unchanged, ensuring a fair comparison.
|
| 79 |
+
|
| 80 |
+
To train agents via behavioral cloning $\left[ \left[ 5 8 \right] \right]$ , we use the open-source Acme $\pmb { \mathbb { B } } 0 \|$ to learn a policy from human gameplay data. Specifically, we collected 5 human-human trajectories of length 1200 time steps for each of the 5 layouts, resulting in 60k total environment steps. We divide this data in half and train two BC agents: (1) a partner for training a BCP agent, and (2) a “human proxy” partner for agent-agent evaluation. Following Carroll et al. $\bar { \lVert 1 2 \rVert }$ , we use a set of feature-based observations for the agents (as opposed to RGB) and generate comparable results: performance is higher on 3 layouts (asymmetric, cramped, and ring) but poorer on the other 2 (circuit and forced).
|
| 81 |
+
|
| 82 |
+
# 3 Related work
|
| 83 |
+
|
| 84 |
+
Ad-hoc team play There is a large and diverse body of literature on ad-hoc team-play $ { \mathbb { B } } , { \mathbb { G } } 6 { \mathbb { I } }$ , also known as zero-shot coordination $\bar { \mathbb { B } } \mathbb { I }$ . Prior work based in game-theoretic settings has suggested the benefits of planning $\pmb { \mathbb { Z } 1 }$ , online learning $\mathbb { \left| \left. \sum \right. { ] } \right| }$ , and novel solution concepts $\bar { \mathbb { D } }$ , to name a few examples. More recently, multi-agent deep reinforcement learning has provided the tools to scale to more complex gridworld or continuous control settings, leading to work on hierarchical social planning $\widehat { \left\| 3 6 \right\| }$ , adapting to existing social conventions $\checkmark$ , trajectory diversity $\lVert \rVert \dot { \boldsymbol { \mathrm { E } } } \rVert$ , and theory of mind [14]. Ad-hoc team-play among novel agent partners is also an object of active study in the emergent communication literature [10, 11, 43]. This prior work has tended to focus on generalization to held-out agent partners as a proxy for human co-players.
|
| 85 |
+
|
| 86 |
+
Collaborative play with novel humans has been evaluated more actively in the context of training agent assistants; see for instance [57, 68]. To our knowledge, our FCP agents represent the stateof-the-art in coordinating with novel human partners on an equal footing of capabilities in a rich gridworld environment, as measured by the challenge tasks in Carroll et al. [12].
|
| 87 |
+
|
| 88 |
+
Diversity in multi-agent reinforcement learning In multi-agent reinforcement learning, agents that train with behaviorally diverse populations of game partners tend to demonstrate stronger performance than their self-play counterparts. For example, across a range of multi-agent games, generalization to held-out populations can be improved by training larger and more diverse populations [13, 42, 50]. In mixed-motive settings, cooperation among agents can be encouraged through social diversity, such as in player preferences and rewards [3, 47, 49]. Similarly, competitiveness can be optimized through selective matchmaking between increasingly diverse agents $[ \overbrace { 2 4 } , \overbrace { 3 9 } , \overbrace { 6 9 } ]$ .
|
| 89 |
+
|
| 90 |
+
Despite the increased focus on improving multi-agent performance, evaluation has typically been constrained to agent-agent settings. High-performing agents have infrequently been evaluated with humans, particularly in non-competitive domains $\bar { \lVert 1 6 rVert }$ . We add to this growing literature, showing that training with diversity is a powerful approach for effective human-agent collaboration.
|
| 91 |
+
|
| 92 |
+
Human-agent interaction In recent years, increased attention has been directed toward designing machine learning agents capable of collaborating with humans [41, 57, 68, 72] (see also $\boxed { \boxed { 1 6 } }$ for a broader review on Cooperative AI). Tylkin et al. $\lVert \rVert$ is particularly notable in also demonstrating that partially trained agents can be useful learning targets for human helpers, although in a different domain (cooperative Atari). Our method, FCP, can be seen as extending theirs by training with multiple “skill levels” and random seeds, rather than just one, which we demonstrate to be crucial to our agents’ performance (Tables 1 and 2 and Figure 7b).
|
| 93 |
+
|
| 94 |
+
A key preceding entry in this research area is Carroll et al. $\pmb { \mathbb { I } }$ , who similarly investigated humanagent coordination in Overcooked. We use their method (BCP) as a baseline throughout our experiments (Section $\boxed { 2 . 2 }$ . Relative to BCP, our approach removes the need for the expensive step of human data collection for agent training. Furthermore, through our novel human-agent experimental design, we go beyond objective performance metrics to compare the subjective preferences that agents generate. For a detailed comparison of methods and results, see Appendix E.
|
| 95 |
+
|
| 96 |
+
# 4 Zero-shot coordination with agents
|
| 97 |
+
|
| 98 |
+
In this section, we evaluate our FCP agent, its ablations, and the baselines with held-out agents.
|
| 99 |
+
|
| 100 |
+
# 4.1 Evaluation method: collaborative evaluation with agent partners
|
| 101 |
+
|
| 102 |
+
Our primary concern in this work is generalization to novel human partners (as investigated in Section $\textcircled{5}$ . However, just as collecting human-human data for behavioral cloning is expensive, so too is evaluating agents with humans. Consequently, we instead use generalization to held-out agent partners as a cheap proxy of performance with humans. This is then used to guide our model selection process, allowing us to be more targeted with the agents we select for our human-agent evaluations.
|
| 103 |
+
|
| 104 |
+
We evaluate with three held-out populations:
|
| 105 |
+
|
| 106 |
+
1. A BC model trained on human data, $H _ { \mathrm { p r o x y } }$ , intended as a proxy of generalization to humans, as done by Carroll et al. $[ \overbrace { | 1 2 | }$ . 2. A set of self-play agents varying in seed, architecture, and training time (specifically, heldout seeds of the $N = 3 2$ partners trained for the $\mathrm { F C P } _ { + A }$ agent; see Section 2.4). These are intended to test generalization to a diverse yet still skillful population. 3. Randomly initialized agents intended to test generalization to low-skill partners.
|
| 107 |
+
|
| 108 |
+
For all results, we report the average number of deliveries made by both players within an episode, aggregated across the 5 different layouts from Figure $^ 4$ (with the per-layout results reported in Appendix $\underline { { \overline { { ( \mathrm { C . 2 } ) } } } }$ . We estimate mean and standard deviation across 5 random seeds. For each seed, we evaluate the agent with all members of the held-out population for 10 episodes per agent-partner pair.
|
| 109 |
+
|
| 110 |
+
# 4.2 Results
|
| 111 |
+
|
| 112 |
+
# Finding 1: FCP significantly outperforms all baselines
|
| 113 |
+
|
| 114 |
+
To begin, we compare our FCP agent and the baselines when partnered with the three held-out populations introduced above. As can be seen in Figure $\boxed { 5 }$ FCP significantly outperforms all baselines when partnered with all three held-out populations. Notably, it performs better than BCP with $H _ { \mathrm { p r o x y } }$ even though BCP trains with such a model and FCP does not. Similar to Carroll et al. $\mathbb { \lVert 1 2 \rVert }$ , we find that BCP significantly outscores SP.
|
| 115 |
+
|
| 116 |
+
When paired with a randomly initialized partner which behaves suboptimally, we see an even greater difference between FCP and the baselines. Given that FCP is trained with non-held-out versions of such agents, it may not be surprising that it does so well with partners that behave poorly. However, what is surprising is how brittle the other training methods are. This suggests that they may not perform well with humans who are not highly skilled players, which we will see in Section 5.
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 5: Agent-agent collaborative evaluation: Performance of each agent when partnered with each of the held-out populations (Section $4 . 1 )$ in episodes of length $T = 5 4 0$ . Importantly, FCP scores higher than all baselines with a variety of test partners. Error bars represent standard deviation over five random training seeds. Plots aggregate data across kitchen layouts; results calculated by individual layout can be found in Appendix C.2.
|
| 120 |
+
|
| 121 |
+
Finding 2: Training with past checkpoints is the most beneficial variation for performance Next, we investigate how the different training partner variations influence FCP’s performance. In particular, we separately ablate the past checkpoints $( T )$ and architecture $( A )$ variations, evaluating them with the same partners as in Figure 5. The results of this evaluation are presented in Table 1. Comparing the FCP and $\mathrm { F C P } _ { - T }$ columns, we see that removing past checkpoints from training significantly reduces performance. Comparing the FCP and $\operatorname { F C P } _ { + A }$ columns, we see that adding architectural variation to the training population offers no improvement over training with past
|
| 122 |
+
|
| 123 |
+
<table><tr><td>Partner</td><td>FCP</td><td>FCP-T</td><td>FCP+A</td><td>FCP-T,+A</td></tr><tr><td>Hproxy</td><td>10.6± 0.5</td><td>4.7± 0.4</td><td>9.9±0.6</td><td>7.0±0.8</td></tr><tr><td>Diverse SP</td><td>11.2 ± 0.1</td><td>6.9 ± 0.1</td><td>11.1 ± 0.4</td><td>8.6 ± 0.4</td></tr><tr><td>Random</td><td>8.6± 0.2</td><td>1.0 ± 0.1</td><td>8.4±0.4</td><td>3.2 ± 0.5</td></tr></table>
|
| 124 |
+
|
| 125 |
+
Table 1: Ablation results: Performance of each variation of FCP – training with past partner checkpoints $T$ for time) and adding partner variation in architecture $( A )$ . Scores are mean deliveries with standard deviation over 5 random seeds. Notably, we find that the inclusion of past checkpoints is essential for strong performance $( \mathrm { F C P } > \mathrm { F C P } _ { - T }$ ), and additionally including architectural variation does not improve performance $( \mathrm { F C P } \approx \mathrm { F C P } _ { + A . }$ ). However, architectural variation is better than no variation, improving performance when past checkpoints are not available $( \mathrm { F C P } _ { - T , + A } > \mathrm { F C P } _ { - T , }$ ).
|
| 126 |
+
|
| 127 |
+
checkpoints. However, comparing the $\mathrm { F C P } _ { - T }$ and $\mathrm { F C P } _ { - T , + A }$ columns, we see that without training with past checkpoints, architectural variation in the population does improve performance.
|
| 128 |
+
|
| 129 |
+
# 5 Zero-shot coordination with humans
|
| 130 |
+
|
| 131 |
+
Ultimately, our goal is to develop agents capable of coordinating with novel human partners. In this section, we run an online study to evaluate our FCP agent and the baseline agents in collaborative play with human partners.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 6: Human-agent collaborative study: For our human-agent collaboration study, we recruited participants online to play games with FCP and baseline agents. Participants played a randomized sequence of episodes with different agent partners and kitchen layouts. After every two episodes, participants reported the direction and strength of their preference between their last two partners.
|
| 135 |
+
|
| 136 |
+
# 5.1 Evaluation method: collaborative evaluation with human participants
|
| 137 |
+
|
| 138 |
+
To test how effectively FCP’s performance generalizes to human partners, we recruited participants from Prolific $\mathbb { 1 1 8 } , \lvert 5 5 \rvert$ for an online collaboration study $N = 1 1 4$ ; $3 7 . 7 \%$ female, $5 9 . 6 \%$ male, $1 . 8 \%$ nonbinary; median age between 25–34 years). We used a within-participant design for the study: each participant played with a full cohort of agents (i.e. generated through every training method). This design allowed us to evaluate both objective performance as well as subjective preferences.
|
| 139 |
+
|
| 140 |
+
Participants first read game instructions and played a short tutorial episode guiding them through the dish preparation sequence (see Appendix $\dot { \mathrm { \bf D } } . 1 . 1$ for instruction text and study screenshots). Participants then played 20 episodes with a randomized sequence of agent partners and kitchen layouts. Episodes lasted $T = 3 0 0$ steps (1 minute) each. After every two episodes, participants reported their preference over the agent partners from those episodes on a five-point Likert-type scale. After playing all 20 episodes, participants completed a debrief questionnaire collecting standard demographic information and open-ended feedback on the study. Our statistical analysis below primarily relies upon the repeated-measures analysis of variance (ANOVA) method. See Appendix D for additional details of our study design and analysis, including independent ethical review.
|
| 141 |
+
|
| 142 |
+
# 5.2 Results
|
| 143 |
+
|
| 144 |
+
Finding 1: FCP coordinates best with humans, achieving the highest score across maps To begin, we compare the objective team performance supported by our FCP and baseline agents. The strong FCP performance observed in agent-agent play generalizes to human-agent collaboration:
|
| 145 |
+
|
| 146 |
+
the FCP-human teams significantly outperform all other agent-human teams, achieving the highest average scores across maps, every $p < 0 . 0 0 1$ (Figure $\mathrm { 7 a ) }$ , while performing as well as or better than the other teams on each individual map (see Appendix $\mathbf { D } . 3 )$ . Echoing the results from our agent-agent ablation experiments (Table $\perp )$ , the inclusion of past checkpoints in training proves critical to FCP’s strong performance, $p < 0 . 0 { \overline { { 0 1 } } }$ (Figure $\textcircled { 7 6 }$ . Similar to Carroll et al. $[ \left[ 1 2 \right] ]$ , we find that BCP outscores SP when collaborating with human players, $p < 0 . 0 0 1$ .
|
| 147 |
+
|
| 148 |
+
# Finding 2: Participants prefer FCP over all baselines
|
| 149 |
+
|
| 150 |
+
FCP’s strong collaborative performance carries over to our participants’ subjective partner preferences. Participants expressed a significant preference for FCP partners over all other agents, including BCP, with every $p < 0 . 0 5$ (Figure $\dot { \bigtriangledown } \dot { \mathbf { c } } { \big \rVert }$ . Notably, while human-BCP and human-PP teams did not significantly differ in their completed deliveries, participants reported significantly preferring BCP over PP, $p = 0 . 0 0 3$ , highlighting the informativeness of our subjective analysis.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 7: Human-agent collaborative evaluation: Evaluation and preference metrics from humanagent play in episodes of length $T = 3 0 0$ . Error bars represents $9 5 \%$ confidence intervals, calculated over episodes. Plots aggregate data across kitchen layouts; results calculated by individual layout can be found in Appendix D.3.
|
| 154 |
+
|
| 155 |
+
# 5.3 Exploratory behavioral analysis
|
| 156 |
+
|
| 157 |
+
To better understand how the human-agent scores and preferences may have arisen, here we analyze the resulting action trajectories of each human and agent player in our experiment.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
|
| 161 |
+
Figure 8: Behavioral analysis: (a) FCP is able to move most frequently $3 5 \%$ of the time), corresponding to the best movement coordination with human partners. (b) FCP exhibits the most equal preferences over cooking pots (0.11 difference), aligning with human preferences. Values are calculated as the absolute difference in preferences between the two pots; 1 indicates that the player only uses one of the two available pots, while 0 indicates that the player uses both pots equally.
|
| 162 |
+
|
| 163 |
+
# Finding 1: FCP exhibits the best movement coordination with humans
|
| 164 |
+
|
| 165 |
+
First, we investigate how much each player moves in an episode (Figure $\textcircled { 8 \mathrm { a } }$ , where moving in a higher fraction of timesteps may suggest fewer collisions and thus better coordination with a partner. Notably, we observe two results: (1) humans rarely move, a behavior which is out-of-distribution for typical training methods (e.g. SP, PP) but is seen in the training distribution for BCP and FCP.
|
| 166 |
+
|
| 167 |
+
(2) FCP moves the most on all layouts other than Forced, suggesting it is better at coordinating its movement strategy with its partner. This result was also reported by human participants, for example: “I noticed that some of my partners seemed to know they needed to move around me, while others seemed to get ‘stuck’ until I moved out of their way” (see Appendix D for more examples).
|
| 168 |
+
|
| 169 |
+
# Finding 2: FCP’s preferences over cooking pots aligns best with that of humans
|
| 170 |
+
|
| 171 |
+
Next, we investigate whether there was a preference for a specific cooking pot in the layouts which included two cooking pots (Figure $\textcircled { 8 6 }$ . To do this, we calculate the difference in the number of times each pot was used by each player, where a high value indicates a strong preference for one pot and a low value indicates more equal preference for the two pots.
|
| 172 |
+
|
| 173 |
+
As can be seen in the FCP column, our agent typically has the most aligned preferences with that of humans (0.11 for FCP to 0.14 for humans). Behaviorally speaking, this means that our agent prefers one cooking pot over the other $5 5 . 5 \%$ of the time (i.e. a 0.11 point difference). In contrast, all other agents have a strong preference for a single pot. This is a non-adaptive strategy which generalizes poorly to typical human behavior of using both pots, leading to worse performance.
|
| 174 |
+
|
| 175 |
+
# 6 Discussion
|
| 176 |
+
|
| 177 |
+
Summary In this work, we investigated the challenging problem of zero-shot collaboration with humans without using human data in the training pipeline. To accomplish this, we introduced Fictitious Co-Play (FCP) – a surprisingly simple yet effective method based on creating a diverse set of training partners. We found that FCP agents scored significantly higher than all baselines when partnered with both novel agent and human partners. Furthermore, through a rigorous human-agent experimental design, we also found that humans reported a strong subjective preference to partnering with FCP agents over all baselines.
|
| 178 |
+
|
| 179 |
+
Limitations and future work Our method currently relies on the manual process of initially training and selecting a diverse set of partners. This is not only time consuming, but also prone to researcher biases that may negatively influence the behavior of the created agents. Additionally, while we found FCP with a partner population size of $N = 3 2$ sufficient here, for more complex games, FCP may require an unrealistically large partner population size to represent sufficiently diverse strategies. To address these concerns, methods for automatically generating partner diversity for common-payoff games may be important. Possibilities include adaptive population matchmaking as been used in competitive zero-sum games $\mathbb { \lVert 6 9 \rVert }$ , as well as auxiliary objectives that explicitly encourage behavioral diversity [19, 45, 46].
|
| 180 |
+
|
| 181 |
+
Our method requires a known and fixed reward function. We also focus on one domain in order to compare with prior work which has argued that human-in-the-loop training is necessary. Consequently, the resulting agents are only designed to adaptively collaborate on a single task, and not to infer human preferences in general $\textcircled { 1 1 } \textcircled { 3 3 } \textcircled { 5 9 }$ . Moreover, if a task’s reward function is poorly aligned with how humans approach the task, our method may well produce subpar partners, as would any method without access to human data. Thus, additional domains and tasks should be studied to better understand how our method generalizes. Targeted experiments to test specific forms of generalization may be especially helpful in this regard $\overline { { [ 3 8 ] } }$ , as could approaches that procedurally generate environment layouts requiring diverse solutions $\pmb { \mathbb { Z } } 2 \mathbf { l }$
|
| 182 |
+
|
| 183 |
+
Finally, it may be possible to produce even stronger agent assistants by combining the strengths of FCP (i.e. diversity) and BCP (i.e. human-like play). Indeed, Knott et al. $\textcircled { \lvert 3 8 \rvert }$ recently demonstrated that modifying BCP to train with multiple BC partners produces more robust collaboration with held-out agents, a finding that would be interesting to test with human partners.
|
| 184 |
+
|
| 185 |
+
Societal impact A challenge for this line of work is ensuring agent behavior is aligned with human values (i.e. the AI value alignment problem [23, 59]). Our method has no guarantees that the resulting policy aligns with the preferences, intentions, or welfare of its potential partners. It likewise does not exclude the possibility that the target being optimized for is harmful (e.g. if the agent’s partner expresses preferences or intentions to harm others). This could therefore produce negative societal effects either if training leads to poor alignment or if agents are optimized for harmful metrics.
|
| 186 |
+
|
| 187 |
+
One potential strategy for mitigating these risks is the use of human preference data [15]. Such data could be used to fine-tune and filter trained agents before deployment, encouraging better alignment with human values. A key question in this line of research is how human preference data should be aggregated—or selected, in the case of expert preferences—when our aim is to create socially aligned agents (i.e. agents that are sufficiently aligned for everyone). Relatedly, targeted research on human beliefs and perceptions of AI $\lVert \overline { { 4 8 } } \rVert$ , and how they steer human-agent interaction, would help inform agent design for positive societal impact. For instance, developers could incorporate specific priors into agents to reinforce tendencies for fair outcomes $\pm \mathbb { Z } 0 . \pm \mathbb { B } 2 \mathbb { I }$ .
|
| 188 |
+
|
| 189 |
+
Conclusion We proposed a method which is both effective at collaborating with humans and simple to implement. We also presented a rigorous and general methodology for evaluating with humans and eliciting their preferences. Together, these establish a strong foundation for future research on the important challenge of human-agent collaboration for benefiting society.
|
| 190 |
+
|
| 191 |
+
# Acknowledgements
|
| 192 |
+
|
| 193 |
+
The authors would like to thank Mary Cassin for creating the game sprite art; Rohin Shah, Thore Graepel, and Iason Gabriel for feedback on the draft; Lucy Campbell-Gillingham, Tina Zhu, and Saffron Huang for support in evaluating agents with humans; and Max Kleiman-Weiner, Natasha Jaques, Marc Lanctot, Mike Bowling, and Dan Roberts for useful discussions.
|
| 194 |
+
|
| 195 |
+
# Funding disclosure
|
| 196 |
+
|
| 197 |
+
This work was funded solely by DeepMind. The authors declare no competing interests.
|
| 198 |
+
|
| 199 |
+
# References
|
| 200 |
+
|
| 201 |
+
[1] J. Abramson, A. Ahuja, I. Barr, A. Brussee, F. Carnevale, M. Cassin, R. Chhaparia, S. Clark, B. Damoc, A. Dudzik, et al. Imitating interactive intelligence. arXiv preprint arXiv:2012.05672, 2020.
|
| 202 |
+
[2] S. V. Albrecht and S. Ramamoorthy. A game-theoretic model and best-response learning method for ad hoc coordination in multiagent systems. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2013.
|
| 203 |
+
[3] B. Baker. Emergent reciprocity and team formation from randomized uncertain social preferences. In Neural Information Processing Systems (NeurIPS), 2020.
|
| 204 |
+
[4] N. Bard, J. N. Foerster, S. Chandar, N. Burch, M. Lanctot, H. F. Song, E. Parisotto, V. Dumoulin, S. Moitra, E. Hughes, et al. The Hanabi challenge: A new frontier for AI research. Artificial Intelligence, 280:103216, 2020.
|
| 205 |
+
[5] S. Barrett, A. Rosenfeld, S. Kraus, and P. Stone. Making friends on the fly: Cooperating with new teammates. Artificial Intelligence, 242:132–171, 2017.
|
| 206 |
+
[6] A. Bauer, D. Wollherr, and M. Buss. Human–robot collaboration: A survey. International Journal of Humanoid Robotics, 5(01):47–66, 2008.
|
| 207 |
+
[7] G. W. Brown. Iterative solution of games by fictitious play. Activity analysis of production and allocation, 13(1):374–376, 1951.
|
| 208 |
+
[8] N. Brown and T. Sandholm. Superhuman AI for heads-up no-limit poker: Libratus beats top professionals. Science, 359(6374):418–424, 2018.
|
| 209 |
+
[9] N. Brown and T. Sandholm. Superhuman AI for multiplayer poker. Science, 365(6456):885–890, 2019.
|
| 210 |
+
[10] K. Bullard, F. Meier, D. Kiela, J. Pineau, and J. Foerster. Exploring zero-shot emergent communication in embodied multi-agent populations. arXiv preprint arXiv:2010.15896, 2020.
|
| 211 |
+
[11] K. Bullard, D. Kiela, J. Pineau, and J. Foerster. Quasi-equivalence discovery for zero-shot emergent communication. arXiv preprint arXiv:2103.08067, 2021.
|
| 212 |
+
[12] M. Carroll, R. Shah, M. K. Ho, T. Griffiths, S. Seshia, P. Abbeel, and A. Dragan. On the utility of learning about humans for human-AI coordination. In Neural Information Processing Systems (NeurIPS), 2019.
|
| 213 |
+
[13] R. Charakorn, P. Manoonpong, and N. Dilokthanakul. Investigating partner diversification methods in cooperative multi-agent deep reinforcement learning. In International Conference on Neural Information Processing, 2020.
|
| 214 |
+
[14] R. Choudhury, G. Swamy, D. Hadfield-Menell, and A. D. Dragan. On the utility of model learning in HRI. In ACM/IEEE International Conference on Human-Robot Interaction (HRI), 2019.
|
| 215 |
+
[15] P. F. Christiano, J. Leike, T. B. Brown, M. Martic, S. Legg, and D. Amodei. Deep reinforcement learning from human preferences. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 4302–4310, 2017.
|
| 216 |
+
[16] A. Dafoe, E. Hughes, Y. Bachrach, T. Collins, K. R. McKee, J. Z. Leibo, K. Larson, and T. Graepel. Open problems in cooperative AI. arXiv preprint arXiv:2012.08630, 2020.
|
| 217 |
+
[17] L. Espeholt, H. Soyer, R. Munos, K. Simonyan, V. Mnih, T. Ward, Y. Doron, V. Firoiu, T. Harley, I. Dunning, S. Legg, and K. Kavukcuoglu. IMPALA: Scalable distributed deep-RL with importance weighted actor-learner architectures. In International Conference on Machine Learning (ICML), 2018.
|
| 218 |
+
[18] P. Eyal, R. David, G. Andrew, E. Zak, and D. Ekaterina. Data quality of platforms and panels for online behavioral research. Behavior Research Methods, pages 1–20, 2021.
|
| 219 |
+
[19] B. Eysenbach, A. Gupta, J. Ibarz, and S. Levine. Diversity is all you need: Learning skills without a reward function. In International Conference on Learning Representations (ICLR), 2019.
|
| 220 |
+
[20] E. Fehr and K. M. Schmidt. A theory of fairness, competition, and cooperation. The Quarterly Journal of Economics, 114(3):817–868, 1999.
|
| 221 |
+
[21] J. Foerster, F. Song, E. Hughes, N. Burch, I. Dunning, S. Whiteson, M. Botvinick, and M. Bowling. Bayesian action decoder for deep multi-agent reinforcement learning. In International Conference on Machine Learning (ICML), 2019.
|
| 222 |
+
[22] M. Fontaine, Y.-C. Hsu, Y. Zhang, B. Tjanaka, and S. Nikolaidis. On the importance of environments in human-robot coordination. In Robotics: Science and Systems (RSS), 2021.
|
| 223 |
+
[23] I. Gabriel. Artificial intelligence, values, and alignment. Minds and Machines, 30(3):411–437, 2020.
|
| 224 |
+
[24] M. Garnelo, W. M. Czarnecki, S. Liu, D. Tirumala, J. Oh, G. Gidel, H. van Hasselt, and D. Balduzzi. Pick your battles: Interaction graphs as population-level objectives for strategic diversity. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2021.
|
| 225 |
+
[25] Ghost Town Games. Overcooked, 2016.
|
| 226 |
+
[26] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016.
|
| 227 |
+
[27] J. Heinrich and D. Silver. Deep reinforcement learning from self-play in imperfect-information games. In NIPS Deep Reinforcement Learning (DRL) Workshop, 2016.
|
| 228 |
+
[28] J. Heinrich, M. Lanctot, and D. Silver. Fictitious self-play in extensive-form games. In International Conference on Machine Learning (ICML), 2015.
|
| 229 |
+
[29] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8): 1735–1780, 1997.
|
| 230 |
+
[30] M. Hoffman, B. Shahriari, J. Aslanides, G. Barth-Maron, F. Behbahani, T. Norman, A. Abdolmaleki, A. Cassirer, F. Yang, K. Baumli, S. Henderson, A. Novikov, S. G. Colmenarejo, S. Cabi, C. Gulcehre, T. L. Paine, A. Cowie, Z. Wang, B. Piot, and N. de Freitas. Acme: A research framework for distributed reinforcement learning. arXiv preprint arXiv:2006.00979, 2020.
|
| 231 |
+
[31] H. Hu, A. Lerer, A. Peysakhovich, and J. Foerster. “Other-Play” for zero-shot coordination. In International Conference on Machine Learning (ICML), 2020.
|
| 232 |
+
[32] E. Hughes, J. Z. Leibo, M. G. Phillips, K. Tuyls, E. A. Duéñez-Guzmán, A. G. Castañeda, I. Dunning, T. Zhu, K. R. McKee, R. Koster, H. Roff, and T. Graepel. Inequity aversion improves cooperation in intertemporal social dilemmas. In Neural Information Processing Systems (NeurIPS), 2018.
|
| 233 |
+
[33] B. Ibarz, J. Leike, T. Pohlen, G. Irving, S. Legg, and D. Amodei. Reward learning from human preferences and demonstrations in Atari. In Neural Information Processing Systems (NeurIPS), 2018.
|
| 234 |
+
[34] M. Jaderberg, W. M. Czarnecki, I. Dunning, L. Marris, G. Lever, A. G. Castaneda, C. Beattie, N. C. Rabinowitz, A. S. Morcos, A. Ruderman, et al. Human-level performance in 3D multiplayer games with population-based reinforcement learning. Science, 364(6443):859–865, 2019.
|
| 235 |
+
[35] S. Javdani, S. S. Srinivasa, and J. A. Bagnell. Shared autonomy via hindsight optimization. Robotics Science and Systems, 2015.
|
| 236 |
+
[36] M. Kleiman-Weiner, M. K. Ho, J. L. Austerweil, M. L. Littman, and J. B. Tenenbaum. Coordinate to cooperate or compete: abstract goals and joint intentions in social interaction. In Conference of the Cognitive Science Society (CogSci), 2016.
|
| 237 |
+
[37] G. Klien, D. D. Woods, J. M. Bradshaw, R. R. Hoffman, and P. J. Feltovich. Ten challenges for making automation a “team player” in joint human-agent activity. IEEE Intelligent Systems, 19 (6):91–95, 2004.
|
| 238 |
+
[38] P. Knott, M. Carroll, S. Devlin, K. Ciosek, K. Hofmann, A. Dragan, and R. Shah. Evaluating the robustness of collaborative agents. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2021.
|
| 239 |
+
[39] M. Lanctot, V. Zambaldi, A. Gruslys, A. Lazaridou, K. Tuyls, J. Pérolat, D. Silver, and T. Graepel. A unified game-theoretic approach to multiagent reinforcement learning. In Neural Information Processing Systems (NIPS), 2017.
|
| 240 |
+
[40] A. Lerer and A. Peysakhovich. Learning existing social conventions via observationally augmented self-play. In AAAI/ACM Conference on Artificial Intelligence, Ethics, and Society (AIES), 2019.
|
| 241 |
+
[41] E. Lockhart, N. Burch, N. Bard, S. Borgeaud, T. Eccles, L. Smaira, and R. Smith. Human-agent cooperation in bridge bidding. arXiv preprint arXiv:2011.14124, 2020.
|
| 242 |
+
[42] R. Lowe, Y. Wu, A. Tamar, J. Harb, P. Abbeel, and I. Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. In Neural Information Processing Systems (NIPS), 2017.
|
| 243 |
+
[43] R. Lowe, A. Gupta, J. Foerster, D. Kiela, and J. Pineau. Learning to learn to communicate. In ICML Adaptive & Multitask Learning Workshop, 2019.
|
| 244 |
+
[44] R. Lowe, A. Gupta, J. Foerster, D. Kiela, and J. Pineau. On the interaction between supervision and self-play in emergent communication. In International Conference on Learning Representations (ICLR), 2020.
|
| 245 |
+
[45] A. Lupu, H. Hu, and J. Foerster. Trajectory diversity for zero-shot coordination. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2021.
|
| 246 |
+
[46] A. Mahajan, T. Rashid, M. Samvelyan, and S. Whiteson. Maven: Multi-agent variational exploration. In Neural Information Processing Systems (NeurIPS), 2019.
|
| 247 |
+
[47] K. R. McKee, I. Gemp, B. McWilliams, E. A. Duèñez-Guzmán, E. Hughes, and J. Z. Leibo. Social diversity and social preferences in mixed-motive reinforcement learning. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2020.
|
| 248 |
+
[48] K. R. McKee, X. Bai, and S. Fiske. Understanding human impressions of artificial intelligence. PsyArXiv, 2021.
|
| 249 |
+
[49] K. R. McKee, E. Hughes, T. O. Zhu, M. J. Chadwick, R. Koster, A. G. Castaneda, C. Beattie, T. Graepel, M. Botvinick, and J. Z. Leibo. Deep reinforcement learning models the emergent dynamics of human cooperation. arXiv preprint arXiv:2103.04982, 2021.
|
| 250 |
+
[50] K. R. McKee, J. Z. Leibo, C. Beattie, and R. Everett. Quantifying environment and population diversity in multi-agent reinforcement learning. arXiv preprint arXiv:2102.08370, 2021.
|
| 251 |
+
[51] F. Melo and A. Sardinha. Ad hoc teamwork by learning teammates’ task. International Conference on Autonomous Agents and Multi-Agent Systems (AAMAS), 2015.
|
| 252 |
+
[52] B. Mutlu, A. Terrell, and C.-M. Huang. Coordination mechanisms in human-robot collaboration. In HRI Collaborative Manipulation Workshop, 2013.
|
| 253 |
+
[53] S. Nikolaidis and J. Shah. Human-robot cross-training: Computational formulation, modeling and evaluation of a human team training strategy. In ACM/IEEE International Conference on Human-Robot Interaction (HRI), 2013.
|
| 254 |
+
[54] OpenAI, I. Akkaya, M. Andrychowicz, M. Chociej, M. Litwin, B. McGrew, A. Petron, A. Paino, M. Plappert, G. Powell, R. Ribas, J. Schneider, N. Tezak, J. Tworek, P. Welinder, L. Weng, Q. Yuan, W. Zaremba, and L. Zhang. Solving Rubik’s Cube with a robot hand. arXiv preprint arXiv:1910.07113, 2019.
|
| 255 |
+
[55] E. Peer, L. Brandimarte, S. Samat, and A. Acquisti. Beyond the Turk: Alternative platforms for crowdsourcing behavioral research. Journal of Experimental Social Psychology, 70:153–163, 2017.
|
| 256 |
+
[56] X. B. Peng, M. Andrychowicz, W. Zaremba, and P. Abbeel. Sim-to-real transfer of robotic control with dynamics randomization. In IEEE International Conference on Robotics and Automation (ICRA), 2018.
|
| 257 |
+
[57] P. M. Pilarski, A. Butcher, M. Johanson, M. M. Botvinick, A. Bolt, and A. S. Parker. Learned human-agent decision-making, communication and joint action in a virtual reality environment. In Multidisciplinary Conference on Reinforcement Learning and Decision Making (RLDM), 2019.
|
| 258 |
+
[58] D. A. Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991.
|
| 259 |
+
[59] S. Russell. Human Compatible: Artificial Intelligence and the Problem of Control. Penguin, 2019.
|
| 260 |
+
[60] D. Sadigh, N. Landolfi, S. S. Sastry, S. A. Seshia, and A. D. Dragan. Planning for cars that coordinate with people: leveraging effects on human actions for planning and active information gathering over human internal state. Autonomous Robots, 42(7):1405–1426, 2018.
|
| 261 |
+
[61] N. Schurr, J. Marecki, M. Tambe, and P. Scerri. Towards flexible coordination of human-agent teams. Multiagent and Grid Systems, 1(1):3–16, 2005.
|
| 262 |
+
[62] A. Shih, A. Sawhney, J. Kondic, S. Ermon, and D. Sadigh. On the critical role of conventions in adaptive human-AI collaboration. In International Conference on Learning Representations (ICLR), 2021.
|
| 263 |
+
[63] D. Silver, J. Schrittwieser, K. Simonyan, I. Antonoglou, A. Huang, A. Guez, T. Hubert, L. Baker, M. Lai, A. Bolton, Y. Chen, T. Lillicrap, F. Hui, L. Sifre, G. van den Driessche, T. Graepel, and D. Hassabis. Mastering the game of go without human knowledge. Nature, 550(7676):354–359, 2017.
|
| 264 |
+
[64] D. Silver, T. Hubert, J. Schrittwieser, I. Antonoglou, M. Lai, A. Guez, M. Lanctot, L. Sifre, D. Kumaran, T. Graepel, T. Lillicrap, K. Simonyan, and D. Hassabis. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419): 1140–1144, 2018.
|
| 265 |
+
[65] H. F. Song, A. Abdolmaleki, J. T. Springenberg, A. Clark, H. Soyer, J. W. Rae, S. Noury, A. Ahuja, S. Liu, D. Tirumala, N. Heess, D. Belov, M. Riedmiller, and M. M. Botvinick. VMPO: On-policy maximum a posteriori policy optimization for discrete and continuous control. In International Conference on Learning Representations (ICLR), 2020.
|
| 266 |
+
[66] P. Stone, G. Kaminka, S. Kraus, and J. Rosenschein. Ad hoc autonomous agent teams: Collaboration without pre-coordination. In AAAI Conference on Artificial Intelligence, 2010.
|
| 267 |
+
[67] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2017.
|
| 268 |
+
[68] P. Tylkin, G. Radanovic, and D. C. Parkes. Learning robust helpful behaviors in two-player cooperative Atari environments. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2021.
|
| 269 |
+
[69] O. Vinyals, I. Babuschkin, W. M. Czarnecki, M. Mathieu, A. Dudzik, J. Chung, D. H. Choi, R. Powell, T. Ewalds, P. Georgiev, J. Oh, D. Horgan, M. Kroiss, I. Danihelka, A. Huang, L. Sifre, T. Cai, J. P. Agapiou, M. Jaderberg, A. S. Vezhnevets, R. Leblond, T. Pohlen, V. Dalibard, D. Budden, Y. Sulsky, J. Molloy, T. L. Paine, C. Gulcehre, Z. Wang, T. Pfaff, Y. Wu, R. Ring, D. Yogatama, D. Wünsch, K. McKinney, O. Smith, T. Schaul, T. Lillicrap, K. Kavukcuoglu, D. Hassabis, C. Apps, and D. Silver. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
|
| 270 |
+
[70] R. E. Wang, S. A. Wu, J. A. Evans, J. B. Tenenbaum, D. C. Parkes, and M. Kleiman-Weiner. Too many cooks: Coordinating multi-agent collaboration through inverse planning. In International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2020.
|
| 271 |
+
[71] F. Wu, S. Zilberstein, and X. Chen. Online planning for ad hoc autonomous agent teams. In International Joint Conference on Artificial Intelligence (IJCAI), 2011.
|
| 272 |
+
[72] S. Zheng, A. Trott, S. Srinivasa, N. Naik, M. Gruesbeck, D. C. Parkes, and R. Socher. The AI economist: Improving equality and productivity with AI-driven tax policies. arXiv preprint arXiv:2004.13332, 2020.
|
md/train/2j_cut38wv/2j_cut38wv.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Backdoor Attack with Imperceptible Input and Latent Modification
|
| 2 |
+
|
| 3 |
+
Khoa Doan, Yingjie Lao, Ping Li Cognitive Computing Lab Baidu Research 10900 NE 8th St. Bellevue, WA 98004, USA {khoadoan106, laoyingjie, pingli98}@gmail.com
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Recent studies have shown that deep neural networks (DNN) are vulnerable to various adversarial attacks. In particular, an adversary can inject a stealthy backdoor into a model such that the compromised model will behave normally without the presence of the trigger. Techniques for generating backdoor images that are visually imperceptible from clean images have also been developed recently, which further enhance the stealthiness of the backdoor attacks from the input space. Along with the development of attacks, defense against backdoor attacks is also evolving. Many existing countermeasures found that backdoor tends to leave tangible footprints in the latent or feature space, which can be utilized to mitigate backdoor attacks.
|
| 8 |
+
|
| 9 |
+
In this paper, we extend the concept of imperceptible backdoor from the input space to the latent representation, which significantly improves the effectiveness against the existing defense mechanisms, especially those relying on the distinguishability between clean inputs and backdoor inputs in latent space. In the proposed framework, the trigger function will learn to manipulate the input by injecting imperceptible input noise while matching the latent representations of the clean and manipulated inputs via a Wasserstein-based regularization of the corresponding empirical distributions. We formulate such an objective as a non-convex and constrained optimization problem and solve the problem with an efficient stochastic alternating optimization procedure. We name the proposed backdoor attack as Wasserstein Backdoor (WB), which achieves a high attack success rate while being stealthy from both the input and latent spaces, as tested in several benchmark datasets, including MNIST, CIFAR10, GTSRB, and TinyImagenet.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
In the past years, deep neural network (DNN) has successfully transformed many technological fields, such as object classification [26, 20], face recognition [31, 1], autonomous driving [53], security applications [19, 3], etc. Meanwhile, due to the underlying black-box nature, its security and privacy implications have also raised serious concerns recently. Efforts in the research community have exposed the vulnerability of DNN classifiers to various attacks [50, 41, 33]. For instance, adversarial examples leverage the difference between the classifier and human to misclassify specific inputs by adding imperceptible perturbations without altering the model [17]. Such attacks during the inference phase are categorized as evasion attacks [27, 5]. On the other hand, poisoning attacks attempt to inject malicious data points or manipulate the training process to either degrade the model accuracy [37, 45, 60] or cause misclassification for specific inputs (a.k.a. backdoor attacks) [8, 36, 34, 18].
|
| 14 |
+
|
| 15 |
+
In general, backdoor attacks aim at injecting a malicious behavior into a DNN model so that the model would perform normally on clean inputs but yield misclassification in the presence of the backdoor trigger (e.g., a specific pattern such as a small square [18]). Later on, many works adopt the concepts and techniques in adversarial examples to improve the stealthiness of the trigger against human observers [34, 2, 35]. Recent works have demonstrated more powerful backdoor attacks that are capable of mounting attacks with visual indistinguishable backdoor images [29, 55, 59, 39, 13]. For instance, WaNet [39] generates backdoor images with warping transformation to minimize input difference while LIRA [13] generates backdoor images with imperceptible conditional noise addition, resulting in much stealthier triggers.
|
| 16 |
+
|
| 17 |
+
To alleviate the threats originated from the ever-growing powerful backdoor attacks, several categories of countermeasures have been developed. One promising direction for backdoor detection entails identifying backdoor images by characterizing the distinguishable dissimilarity in the feature or latent representation between backdoor images and clean images [6, 54, 42, 47, 52]. These methods rely on the assumption that the injected backdoor would leave a noticeable fingerprint in the latent space. For example, activation clustering [6] and spectral signature [54] detect malicious samples by inspecting the clusters of the latent space and the spectrum of the covariance of latent representations, respectively. Thus, a stronger adaptive backdoor attack should also ensure its stealthiness from the latent space.
|
| 18 |
+
|
| 19 |
+
In this paper, we present a novel methodology for a backdoor attack that is imperceptible from both the input and latent spaces. We extend the concept of generating imperceptible backdoor triggers to the latent space by minimizing the Wasserstein distance between the latent representations of the clean and backdoor data, which significantly improves the effectiveness against the existing defense mechanisms, especially those aforementioned that rely on the distinguishability in latent space. We name the proposed method Wasserstein Backdoor, or WB. Our technical contributions are summarized below:
|
| 20 |
+
|
| 21 |
+
• We propose a non-convex, constrained optimization problem, which learns to poison the classifier with a backdoor whose trigger is visually imperceptible in the input space and whose poisoned samples have indistinguishable latent distribution to the latent distribution of the clean samples. The latent constraint is formulated via a variant of Wasserstein distance, called sliced-Wasserstein distance [24], between the two sets of clean and backdoor data. • We then develop an efficient estimation of the sliced-Wasserstein distance by exploiting the discriminant directions of the trained classifier, instead of randomly sampling from the unit sphere. The proposed distance is a valid distance metric and requires significantly less computation, while yielding a better estimate than the existing calculations of the sliced-Wasserstein distance. • Finally, we demonstrate the superior attack performance of the proposed method and its robustness against several representative defense mechanisms. Specifically, we show that the proposed method outperforms the state-of-the-art attacks in terms of latent indistinguishability, while maintaining similar attack success rates and input indistinguishability.
|
| 22 |
+
|
| 23 |
+
The rest of the paper is organized as follows. We review the background and related work in Section 2. In Section 3, we define the threat model. Section 4 presents the details of the proposed methodology. We evaluate the performance and compare to prior works in Section 5. Finally, Section 6 presents remarks and concludes this paper. We present more details about experimental settings and results as well as supporting proofs in the supplementary material.
|
| 24 |
+
|
| 25 |
+
# 2 Background and Related Work
|
| 26 |
+
|
| 27 |
+
# 2.1 Backdoor Attack
|
| 28 |
+
|
| 29 |
+
The increasing popularity of training outsourcing and machine learning as a service (MLaaS) has created potential security risks in the supply chain [10, 58]. One important security threat is backdoor attacks against DNNs, which have recently attracted a lot of attention. Backdoor attacks inject a malicious behavior by leveraging the redundancies inside the model such that the model responds to inputs with triggers maliciously (e.g., classify as a target class that would normally be considered as a wrong class by manual annotation), while preserving the benign behavior for clean inputs without the triggers. Hence, a typical backdoor embedding process is to train the model by minimizing the loss of the clean inputs and the corresponding labels as well as backdoor inputs (with triggers) and the target class(es). A trigger is typically applied on a clean image by superimposing at a certain location (i.e., patch-based) [18, 34] or adding perturbations [44]. Various forms of the triggers have been investigated in the literature, including blended [8], sinusoidal strips (SIG) [2], reflection (ReFool) [35], and warping-based (WaNet) [39]. As we mentioned above, several techniques have been developed recently that can significantly reduce the visibility of the trigger in the input space to enhance the stealthiness of the backdoor attack [34, 2, 35]. In particular, WaNet uses a smooth warping field to generate backdoor images with unnoticeable modifications [39], while LIRA [13] alternates between the processes of trigger generation and backdoor injection to learn visually stealthy triggers. One prior work, Adversarial Embedding [51], also attempted to improve the latent indistinguishability of the backdoor attack by using adversarial regularization to minimize the distance between the latent distributions of the backdoor inputs and clean inputs.
|
| 30 |
+
|
| 31 |
+
# 2.2 Backdoor Defense
|
| 32 |
+
|
| 33 |
+
By exploring specific characteristics of the injected backdoor, various countermeasures have been proposed [6, 54, 16, 47, 9, 7, 42], although they are often circumvented by subsequent adaptive attacks. For instance, based on the property that a backdoor attack usually targets redundant weights or neurons based on the clean images, model pruning can be used to eliminate the injected backdoor [32]. In contrast, Neural Cleanse assumes a known subset of clean inputs to reverse-engineer possible trigger patches [56]. It is also possible to filter the images to nullify the presence of triggers at the test phase to defend against backdoor attacks [36, 30].
|
| 34 |
+
|
| 35 |
+
In this paper, we focus on optimizing the characteristics of backdoor attacks in the latent space. As we discussed above, the rationale behind this is that prior works have demonstrated backdoor images cause distinctive activations in the latent space from those of clean inputs. Hence, this distinguishable dissimilarity between clean images and backdoor images can be utilized for defense in both training [6, 54] and test phases [49, 23, 22]. Most of these approaches compute an outlier score to detect abnormal inputs that will be filtered afterward. For example, spectral signature [54] computes the outlier score based on the singular value decomposition of the covariance matrix of the latent representations, while CleaNN [22] leverages a concentration inequality to detect anomalous reconstruction errors that are then suppressed before the input entering the victim DNN.
|
| 36 |
+
|
| 37 |
+
This work proposes a method to minimize the difference between clean images and backdoor images in the latent space to improve the attack stealthiness. While doing this, we also optimize the visual imperceptibility in the input space, so that our proposed method can bypass visual inspection.
|
| 38 |
+
|
| 39 |
+
# 3 Threat Model
|
| 40 |
+
|
| 41 |
+
We consider the same threat model as in prior studies [44, 51, 39], which assumes the backdoor injection is performed at training and the adversary can access to the victim model including both structures and parameters. A successful backdoor attack over an image classification task should produce malicious behavior on images with the trigger, while otherwise working normally on clean images. However, in typical backdoor attacks, the poisoned images are visually inconsistent with natural images, which can be identified easily by human observers. Besides, these attacks usually leave a tangible trace in the latent space of the poisoned classifier; thus, some defense methods can easily detect and discard the poisoned models. To this end, we propose a stronger backdoor attack where the poisoned images are crafted with imperceptible perturbation in the input space to clean images as well as unnoticeable trace in the latent space. We advance the state-of-the-art by significantly enhancing the imperceptibility and robustness of the backdoor attack.
|
| 42 |
+
|
| 43 |
+
# 4 Proposed Methodology: Wasserstein Backdoor (WB)
|
| 44 |
+
|
| 45 |
+
# 4.1 Preliminaries
|
| 46 |
+
|
| 47 |
+
Consider the standard supervised classification task where one seeks to learn a mapping function $f _ { \theta } : \mathcal { X } \longrightarrow \mathcal { C }$ where $\mathcal { X }$ is the input domain and $\mathcal { C }$ is the set of target classes. The task is to learn the parameters $\theta$ by using the training dataset $\mathcal { S } = \{ ( x _ { i } , y _ { i } ) : x _ { i } \in \bar { \mathcal { X } } , y _ { i } \in \mathcal { C } , i = 1 , . . , N \}$ .
|
| 48 |
+
|
| 49 |
+
Following the standard training scheme of backdoor attacks, the classifier is trained with the combination of the clean and poisoned subsets of $S$ . To create a poisoned sample, a clean training sample $( x , y )$ is transformed into a backdoor sample $( T ( x ) , \eta ( y ) )$ , where $T$ is a backdoor injection function (also called the trigger function) and $\eta$ is the target label function. When training $f$ with the clean and poison samples, we alter the behavior of $f$ so that:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
f ( x ) = y , \quad f ( T ( x ) ) = \eta ( y ) ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
for any pair of clean data $x \in \mathcal { X }$ and its corresponding label $y \in { \mathcal { C } }$ . There are two commonly studied backdoor attack settings [18, 39, 51]: all-to-one and all-to-all. In the all-to-one attack, the label is changed to a constant target, i.e. $\eta ( y ) = c$ ; while for the all-to-all attack, the true label is one-shifted, i.e. $\bar { \eta ( y ) } = ( y + 1 )$ mod $| { \mathcal { C } } |$ . In the existing works, the trigger function $T$ is usually selected before training $f$ and fixed during the training process of $f$ .
|
| 56 |
+
|
| 57 |
+
# 4.2 Learning to Backdoor
|
| 58 |
+
|
| 59 |
+
Given the training dataset $s$ and a loss function $\mathcal { L }$ , e.g., cross entropy loss, empirical risk minimization can be used to learn the parameters $\theta$ , as follows:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\theta ^ { * } = \arg \operatorname* { m i n } _ { \theta } \sum _ { i = 1 } ^ { N } \mathcal { L } ( f _ { \theta } ( x _ { i } ) , y _ { i } ) .
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
The goal of this work is to learn a trigger function $T _ { \xi } : \mathcal { X } \longrightarrow \mathcal { X }$ and a classification model $f _ { \theta }$ in such a way that the clean image $x$ and its corresponding backdoor image $T ( x )$ are visually consistent in the input space while the backdoor attack does not leave a detectable trace in the latent space of the poisoned classifier. When $f$ is a neural network, $\phi ( x )$ can be the output of an intermediate, hidden layer of $f$ , which captures some high-level abstractions of the input. Note that we require the classifier to perform normally on the clean sample, $x$ , compared to the classifier’s vanilla version, but change its prediction on the poisoned image, $T ( x )$ , to the target class $\eta ( y )$ .
|
| 66 |
+
|
| 67 |
+
To generate a trigger and poison the image, we follow the prior work [13] and formulate the trigger function as a conditional noise generator $g$ , as follows:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
T _ { \xi } ( x ) = x + g _ { \xi } ( x ) , \quad | | g _ { \xi } ( x ) | | _ { \infty } \leq \epsilon \forall x
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
The generator function $g _ { \xi }$ takes an input $x$ and generates an artificially imperceptible noise on the same input space, which guarantees the stealthiness of the backdoor attack. We can design such generator function as an autoencoder or the more complex U-Net architecture [43].
|
| 74 |
+
|
| 75 |
+
With the above objectives and notations, similar to [13, 4], we can formulate the task into the following constrained optimization problem:
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
\begin{array} { r l } { \displaystyle } & { { } \displaystyle \operatorname* { m i n } _ { \theta } \sum _ { i = 1 } ^ { N } \alpha \mathcal { L } \big ( f _ { \theta } ( x _ { i } ) , y _ { i } \big ) + \beta \mathcal { L } \big ( f _ { \theta } ( T _ { \xi ^ { * } ( \theta ) } ( x _ { i } ) \big ) , \eta ( y _ { i } ) \big ) } \\ { \displaystyle s . t . \quad } & { { } \xi ^ { * } = \arg \operatorname* { m i n } _ { \xi } \sum _ { i = 1 } ^ { N } \mathcal { L } \big ( f _ { \theta } ( T _ { \xi } ( x _ { i } ) ) , \eta ( y _ { i } ) \big ) + \mathcal { R } _ { \phi } ( \mathcal { F } _ { c } , \mathcal { F } _ { b } ) } \end{array}
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
where $\mathcal { R } _ { \phi }$ is the regularization constraint of the clean and poisoned representations, denoted as $\mathcal { F } _ { c } = \{ \phi ( x _ { i } ) : i = 1 , . . , N \}$ and $\mathcal { F } _ { b } \{ \phi ( T ( x _ { i } ) ) : i = 1 , . . , N \}$ , respectively.
|
| 82 |
+
|
| 83 |
+
In this problem, a learned classification model with a specific parameter configuration $\theta$ is associated with an optimal yet stealthy backdoor trigger function, which is trained to poison the model. The classifier is trained to minimize a linear combination of clean and targeted backdoor objectives. The parameters $\alpha$ and $\beta$ control the mixing strengths of the clean and backdoor loss signals. The trigger function is trained to perturb an image within its $\ell _ { \infty }$ ball in the input space, so that the loss towards the attack target class is minimized while regularizing the latent representations of the backdoor images.
|
| 84 |
+
|
| 85 |
+
# 4.3 Stealthy Latent Representation via Wasserstein Regularization
|
| 86 |
+
|
| 87 |
+
In practical applications, latent-space defense methods investigate the abnormal trace of incoming data points with respect to the previous stream of data. These traces exist primarily because of the fact that the clean and backdoor latent representations are separated or distributed differently (e.g., the separated clusters of the clean and poison representations that can be seen in Figures 2 and 3). Thus, we aim to minimize such distributional difference through the regularization constraint $\mathcal { R } _ { \phi }$ . Since we cannot assume that the two latent distributions have common support or their density functions are known, commonly-used divergences, such as $f$ -divergences [40, 15] (which include KL and JSD), are difficult to minimize. Instead, we consider the Wasserstein-2 distance and formulate the regularization constraint as follows:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\mathcal { R } \phi ( \mu , \nu ) = \left( \operatorname* { i n f } _ { \gamma \in \Pi ( \mu , \nu ) } \int _ { ( x , z ) \sim \gamma } p ( x , z ) | | x - z | | _ { 2 } d x d z \right) ^ { 1 / 2 }
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\mu$ and $\nu$ are marginal probability measures defined by empirical samples $\mathcal { F } _ { c }$ and $\mathcal { F } _ { b }$ of the latent representations of the clean and poisoned data, respectively.
|
| 94 |
+
|
| 95 |
+
Estimating the Wasserstein distance also has some challenges. From the primal domain, computing the infimum in Equation (4) is particularly difficult since the data distributions are not fixed or known. On the other hand, employing the Kantorovich-Rubinstein duality requires a separate, parameterized Lipschitz function and a minimax solver, which increases the complexity of the proposed problem. Fortunately, for one-dimensional continuous measures, the Wasserstein distance has an elegant yet closed-form solution. Let $q _ { \mu }$ and $q _ { \nu }$ be the corresponding density functions of $\mu$ and $\nu$ , respectively. The Wasserstein-2 distance between one-dimensional measures $\mu$ and $\nu$ can be given by:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathcal { W } ( \mu , \nu ) = \left( \int _ { 0 } ^ { 1 } | | ( F _ { \mu } ^ { - 1 } ( z ) - F _ { \nu } ^ { - 1 } ( z ) | | _ { 2 } d z \right) ^ { 1 / 2 }
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $\begin{array} { r } { F _ { \mu } ( z ) = \int _ { \infty } ^ { z } q _ { \mu } ( \rho ) d \rho } \end{array}$ and $\begin{array} { r } { F _ { \nu } ( z ) = \int _ { \infty } ^ { z } q _ { \nu } ( \rho ) d \rho } \end{array}$ are the cumulative distribution functions. 1 1Inspired by the efficiency of this solution and its successful applications in a variety of tasks [12, 24, 14], we propose to first find a family of one-dimensional representations, e.g., through the linear projections, and approximate the Wasserstein distance as a function of these one-dimensional marginals, as follows:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\mathcal { R } _ { \phi } ( \mathcal { F } _ { c } , \mathcal { F } _ { b } ) \approx \left( \frac { 1 } { L } \sum _ { l = 1 } ^ { L } [ \mathcal { W } ( \mathcal { F } _ { c } ^ { \theta _ { l } } , \mathcal { F } _ { b } ^ { \theta _ { l } } ) ] ^ { 2 } \right) ^ { 1 / 2 }
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $\mathcal { F } _ { c } ^ { \theta _ { l } } = \{ \theta _ { l } ^ { T } \phi ( x _ { i } ) : i = 1 , . . , N \}$ and $\mathcal { F } _ { b } ^ { \theta _ { l } } = \{ \theta _ { l } ^ { T } \phi ( T ( x _ { i } ) ) : i = 1 , . . , N \}$ contains the projections of the clean and poisoned datasets into a one-dimensional direction defined by $\theta _ { l }$ (a slice). Typically, $\theta _ { l }$ is drawn from a uniform distribution on the unit sphere. This formulation is also known as the sliced-Wasserstein distance (SWD) [12, 24]. One particular problem with this approach is that the random nature of the slices could lead to several non-informative directions; i.e., the sliced distances are close to 0 in directions that do not lie on the manifolds of the data. Consequently, a large number $L$ of random directions are needed to approximate the sliced-Wasserstein distance, which increases the computational complexity of the estimation.
|
| 108 |
+
|
| 109 |
+
To remedy this issue, we avoid the uniform sampling of the unit sphere and select directions that contain discriminant information of the two data sources, by exploiting the following fact in the classification task. For backdoor samples of a target class $c _ { 1 } \in { \mathcal { C } }$ , created from clean samples of some other class $c _ { 2 } \in { \mathcal { C } }$ , the projections into an output dimension represent meaningful discriminant information that distinguishes the backdoor samples (from class $c _ { 2 }$ ) and the clean samples (from class $c _ { 1 }$ ). Thus, we propose to replace the uniform linear projections of SWD with the projections into the output layer. When the latent space is the penultimate layer of the classifier, such projections are equivalent to the following approximation:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\mathcal { R } _ { \phi } ( \mathcal { F } _ { c } , \mathcal { F } _ { b } ) \approx \left( \frac { 1 } { | \mathcal { C } | } \sum _ { c = 1 } ^ { | \mathcal { C } | } \left[ \mathcal { W } ( \mathcal { F } _ { c } ^ { W _ { c , : } } , \mathcal { F } _ { c } ^ { W _ { c , : } } ) \right] ^ { 2 } \right) ^ { 1 / 2 } .
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $W _ { c , : }$ is a row of the matrix $W \in \mathbb { R } ^ { | \mathcal { C } | \times d }$ ( $d$ is the dimension of the latent space), which is the normalized parameter matrix between the penultimate and the output layers.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 1: Distance estimates (normalized) in the latent space for SWD with different number of sampled directions (between 10 to 10,000) and DSWD.
|
| 119 |
+
|
| 120 |
+
Empirically, Figure 1 shows the estimated SWD with different numbers of random directions and the proposed calculation, so called DSWD, when the latent space is defined at the penultimate layer of the classifier. The dimension of the latent space is 512 for both MNIST and CIFAR10 datasets. Each distance is computed on a random sample of 1000 clean and 1000 backdoor images, and each calculation is repeated 100 times. It can be seen that with only a fraction of slices, DSWD achieves a significantly smaller variance than that of the SWD estimates. Furthermore, in MNIST, the selected directions of DSWD leads to higher distance estimates than SWD, which means that DSWD selects more discriminant directions than SWD while SWD underestimates the distance between the two empirical samples. In addition, we show that DSWD is a valid distance metric of the latent distributions. The detailed proof is presented in the supplementary material.
|
| 121 |
+
|
| 122 |
+
Theorem 1. When the latent space is the penultimate layer of a neural network, the proposed DSWD distance is a valid distance function of probability measures in this space.
|
| 123 |
+
|
| 124 |
+
Remark 1. Since existing defense methods choose the penultimate layer of a neural network. as the space to perform the defense analysis, in most cases, we can employ the proposed DSWD calculation.
|
| 125 |
+
|
| 126 |
+
Remark 2. To preserve the clean classification performance, the classifier seeks optimal parameters that lead to similar predictions of clean samples from the same class. The goal of the trigger function is to make the poisoned samples classified toward a different class. This leads to an adversarial game between the classifier and the trigger functions.
|
| 127 |
+
|
| 128 |
+
DSWD also has a significantly better computational efficiency than SWD. In most problems, SWD requires a large number of random directions, typically between 1000 to 10,000, in order to provide a reliable estimate of the distance [38, 14]. In DSWD, the number of random directions is fixed to the number of possible output labels, which is typically small for many classification problems.
|
| 129 |
+
|
| 130 |
+
# 4.4 Optimization
|
| 131 |
+
|
| 132 |
+
The non-convex, constrained optimization in Equation (3) is challenging because of its non-linear constraint. In general, we can alternately update one of $f$ and $T$ while keeping the other fixed, similar to training GANs. However, it is difficult and slow for the classifier to reach an acceptable performance on the clean data, i.e., similar accuracy to that of the vanilla classifier.
|
| 133 |
+
|
| 134 |
+
Under the alternating update scheme, we observe that on MNIST, the poisoned classifier can reach the acceptable clean-data performance after several epochs; while on other more complex datasets (i.e. CIFAR10, GTSRB, and TinyImagenet), this procedure results in sub-optimal clean-data performance. One possible explanation is that training the vanilla classifier with complex architecture and dataset to reach a decent accuracy is already a difficult and time-consuming task (e.g., 2 to 3 epochs to reach the optimal performance on MNIST but several hundreds of epochs on the other datasets).
|
| 135 |
+
|
| 136 |
+
Fortunately, we observe that after training the classifier and the trigger functions in an alternating update scheme for a certain number of epochs (denoted as Stage I), we can fix the trigger function and only train the classifier for the remaining epochs (denoted as Stage II). This two-stage training scheme is adopted in our experiments.
|
| 137 |
+
|
| 138 |
+
# 5 Experimental Results
|
| 139 |
+
|
| 140 |
+
# 5.1 Experimental Setup
|
| 141 |
+
|
| 142 |
+
We demonstrate the effectiveness of the proposed method through a range of experiments on four widely-used datasets for backdoor attack study: MNIST, CIFAR10, GTSRB and TinyImagenet. For these experiments, we follow the previous works [51, 54, 6, 39] and select the penultimate layers of the classifiers as the latent space for the defense experiments. The implementation of WB was based on the PaddlePaddle deep learning platform.
|
| 143 |
+
|
| 144 |
+
Architectures: For the classifier $f$ , we consider several popular models: Pre-activation Resnet18 [20], VGG [46], DenseNet [21] for CIFAR10 and GTSRB datasets, and Resnet-18 for TinyImagenet. For the MNIST dataset, we employ a CNN model.
|
| 145 |
+
|
| 146 |
+
Hyperparameters: For the baselines, we train the classifiers using the SGD optimizer with an initial learning rate of 0.01 and a learning rate decay of 0.1 after every 100 epochs. For other hyperparameters, we follow the proposed setup in [39] for all datasets. We use the same configurations for WB. We train the classifier and trigger functions alternately (Stage I) for 10 and 50 epochs for MNIST and the other datasets, respectively, and fine-tune the classifier (Stage II) for another 40 epochs and 450 epochs for MNIST and the other datasets, respectively. To achieve a high-degree stealthiness of WB, we pick $\epsilon$ as small as 0.01 for all datasets. In general, the larger the value of $\epsilon$ the easier the trigger functions can be learned and the more successful the attacks are.
|
| 147 |
+
|
| 148 |
+
# 5.2 Attack Performance
|
| 149 |
+
|
| 150 |
+
We present the attack success rates of the proposed WB method, along with a comparison to two state-of-the-art methods, i.e., WaNet [39] and LIRA [13]. Both LIRA and Wanet’s attack performances are significantly better than other approaches, including BadNets [18], and are two of the strongest existing methods that generate very stealthy triggers on the images. We first poison the classifier using the backdoor attack methods in both all-to-one and all-to-all settings and record the performance of the classifier on both clean and backdoor test samples. For all-to-one, we randomly pick the target label $\hat { c }$ (i.e., $\eta ( y ) = \hat { c } \forall y )$ , while for all-to-all, the target label function is defined as $\eta ( y ) = { \bar { ( y + 1 ) } }$ mod $| { \mathcal { C } } | \ \forall y$ , which is widely used to evaluate the backdoor-related works [39, 18, 6, 13]. Note that this all-to-all attack setting is more challenging than the all-to-one setting, especially on datasets with a large number of classes such as TinyImagenet.
|
| 151 |
+
|
| 152 |
+
The classification accuracy on the clean test samples and the attack success rate for each method is represented in Table 1 and Table 2 for the all-to-one and all-to-all settings, respectively. As we can observe from these tables, all the methods can achieve high clean-data accuracies and attack success rates. While WB’s attack performance slightly drops compared to LIRA’s performance, WB is significantly more stealthy in the latent space, as being discussed next.
|
| 153 |
+
|
| 154 |
+
Table 1: Attack Performance: All-to-one Attack
|
| 155 |
+
|
| 156 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">WaNet</td><td colspan="2">LIRA</td><td colspan="2">WB</td></tr><tr><td>Clean</td><td>Attack</td><td>Clean</td><td>Attack</td><td>Clean</td><td>Attack</td></tr><tr><td>MNIST</td><td>0.99</td><td>0.99</td><td>0.99</td><td>1.00</td><td>0.99</td><td>0.99</td></tr><tr><td>CIFAR10</td><td>0.94</td><td>0.99</td><td>0.94</td><td>1.00</td><td>0.94</td><td>0.99</td></tr><tr><td>GTSRB</td><td>0.99</td><td>0.98</td><td>0.99</td><td>1.00</td><td>0.99</td><td>0.99</td></tr><tr><td>TinyImagenet</td><td>0.57</td><td>0.99</td><td>0.58</td><td>1.00</td><td>0.57</td><td>0.99</td></tr></table>
|
| 157 |
+
|
| 158 |
+
Table 2: Attack Performance: All-to-all Attack
|
| 159 |
+
|
| 160 |
+
<table><tr><td rowspan="2">Dataset</td><td colspan="2">WaNet</td><td colspan="2">LIRA</td><td colspan="2">WB</td></tr><tr><td>Clean</td><td>Attack</td><td>Clean</td><td>Attack</td><td>Clean</td><td>Attack</td></tr><tr><td>MNIST</td><td>0.99</td><td>0.95</td><td>0.99</td><td>0.99</td><td>0.99</td><td>0.96</td></tr><tr><td>CIFAR10</td><td>0.94</td><td>0.93</td><td>0.94</td><td>0.94</td><td>0.94</td><td>0.94</td></tr><tr><td>GTSRB</td><td>0.99</td><td>0.98</td><td>0.99</td><td>1.00</td><td>0.99</td><td>0.98</td></tr><tr><td>TinyImagenet</td><td>0.58</td><td>0.58</td><td>0.58</td><td>0.59</td><td>0.58</td><td>0.58</td></tr></table>
|
| 161 |
+
|
| 162 |
+
# 5.3 Latent-Space Defense
|
| 163 |
+
|
| 164 |
+
Recent works on backdoor defense have found that backdoor attacks tend to leave a tangible trace in the latent space of the poisoned classifier. Activation Clustering [6] and Spectral Signature [54] are two representative defenses used for analyzing the latent space in prior work [51]. In this section, we also examine the latent space of the backdoor-injected classifiers through the lens of these defense methods.
|
| 165 |
+
|
| 166 |
+
# 5.3.1 Learned Latent Representation and Activation Clustering
|
| 167 |
+
|
| 168 |
+
It has been shown in [6] that in a poisoned classifier, the latent representations of the clean and backdoor samples form separate clusters, which can be easily detected using clustering methods such as K-means. The authors also recommend a process called exclusionary reclassification to determine which cluster is poisoned and re-train the poisoned classifier.
|
| 169 |
+
|
| 170 |
+
In Figure 2 and Figure 3, we can observe highly separated clusters (for samples with the sample predictions of $y = 0$ ) in the latent space when we omit the latent regularization term $\mathcal { R } _ { \phi }$ in WB (Baseline), which is similar to LIRA [13]. However, when $\mathcal { R } _ { \phi }$ is included, the latent representations of the clean and backdoor samples are distributed similarly. Without well-separated clusters of the clean and poisoned samples, the exclusionary reclassification process in the activation clustering is not effective against the attacks.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 2: MNIST: t-SNE embedding in the latent space. Baseline is WB without $\mathcal { R } _ { \phi }$ .
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 3: CIFAR10: t-SNE embedding in the latent space. Baseline is WB without $\mathcal { R } _ { \phi }$ .
|
| 177 |
+
|
| 178 |
+
Quantitatively, we present the quality scores (i.e., the adjusted Rand Index) of the clustering step in Table 3. The adjusted Rand Index is 1 when the samples form two distinct clusters and is close to 0 for a random separation. We compare WB with BadNets [18] and Adversarial Embedding [51], which is the state-of-the-art backdoor attack method with stealthy latent space. As we can observe in this table, the defense is most successful on BadNets since there exists a perfect clustering of the clean and poisoned samples (Rand Index $\geq 0 . 9 5$ ). While Adversarial Embedding is more resistant against the defense, WB is significantly more stealthy against the defense since the values of Rand Index are all very close to 0. Note that, similar to BadNets, WaNet also does not pass this defense (please see the supplementary material).
|
| 179 |
+
|
| 180 |
+
Table 3: Adjusted Rand Index in All-to-one Attack
|
| 181 |
+
|
| 182 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Dataset</td><td rowspan="2">Rand Index (BadNets)</td><td colspan="2">Adversarial Embedding</td><td colspan="2">WB</td></tr><tr><td>Rand Index</td><td>Attack</td><td>Rand Index</td><td>Attack</td></tr><tr><td>DenseNet</td><td>CIFAR10</td><td>0.979</td><td>0.1820</td><td>0.764</td><td>0.0382</td><td>0.998</td></tr><tr><td>DenseNet</td><td>GTSRB</td><td>0.997</td><td>0.2710</td><td>0.914</td><td>0.0135</td><td>0.997</td></tr><tr><td>VGG</td><td>CIFAR10</td><td>0.998</td><td>0.0006</td><td>0.962</td><td>0.0002</td><td>0.999</td></tr><tr><td>VGG</td><td>GTSRB</td><td>0.997</td><td>0.6420</td><td>0.743</td><td>0.1010</td><td>0.999</td></tr></table>
|
| 183 |
+
|
| 184 |
+
# 5.3.2 Spectral Signature Defense
|
| 185 |
+
|
| 186 |
+
The work in [54] proposes a defense method that identifies and removes backdoor samples using the Spectral Signature. For data from each predicted class, Spectral Signature first finds the top singular value of the covariance matrix of the latent vectors of the data. Then it computes the correlation score to this singular value for each sample and those samples with the outlier scores are flagged as backdoor samples. While Spectral Signature is a sample filtering-based defense method, the inspection of the correlation scores can also be useful to verify whether there is a tangible trace in the latent space of the classifier.
|
| 187 |
+
|
| 188 |
+
Following the same experiments in [54], we first pick 5,000 clean samples and 500 backdoor samples for each dataset. Then, we plot the histograms of the correlation scores for both sets of samples. As we can observe in Figure 4, there is no clear separation between the scores of the backdoor samples and those of the clean samples.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 4: Defense experiments of the all-to-one attack against Spectral Signature. The correlations of the clean and backdoor samples with the top singular vector of the covariance matrix in the latent space are not separable.
|
| 192 |
+
|
| 193 |
+
# 5.4 Model Mitigation Defense
|
| 194 |
+
|
| 195 |
+
In this section, we evaluate the robustness of WB against another popular defense, Neural Cleanse [56], which is model mitigation defense based on a pattern optimization approach. Specifically, Neural Cleanse searches for the optimal patch pattern for each possible target label that induces a misclassification to that label. It then quantifies whether any of the optimal backdoor trigger pattern is an outlier via a metric called Anomaly Index. The model has a backdoor if the Anomaly Index is greater than 2 for any class. The anomaly indices are presented in Figure 5.
|
| 196 |
+
|
| 197 |
+
It can be seen that both WaNet and WB can pass the detection of Neural Cleanse, similar to that of the vanilla classifier (Clean). In MNIST and CIFAR10, WB even achieves smaller Anomaly Indices than those of the vanilla models. Note that popular backdoor attacks, such as BadNets, can be defended by Neural Cleanse in most of these datasets [56].
|
| 198 |
+
|
| 199 |
+

|
| 200 |
+
Figure 5: Backdoor attacks against Neural Cleanse defense.
|
| 201 |
+
|
| 202 |
+
# 5.5 Input Perturbation Defense
|
| 203 |
+
|
| 204 |
+
In this section, we study the stealthiness of WB against STRIP [16], a representative detection based backdoor defense mechanism. Given the classifier and an input image, STRIP first perturbs the image and determines the presence of a backdoor in the model according to the entropy of the predictions of these perturbed images (i.e., if the predictions are consistent or not).
|
| 205 |
+
|
| 206 |
+
In Figure 6, we plot the entropy of clean and backdoor images, which are computed by STRIP. We can observe that the distribution of entropy of the backdoor samples is similar to that of the clean samples. In other words, STRIP fails to detect backdoor samples generated by WB, which further validates the advantage of the proposed method.
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
Figure 6: Performance against STRIP defense.
|
| 210 |
+
|
| 211 |
+
Additional experiments for demonstrating the stealthiness of WB against several other defense approaches can be found in the supplementary material.
|
| 212 |
+
|
| 213 |
+
# 6 Conclusion
|
| 214 |
+
|
| 215 |
+
This paper presented a novel methodology for a backdoor attack that is imperceptible from both the input and latent spaces, i.e., Wasserstein Backdoor (WB). WB learns a trigger function that adds visually imperceptible noise to an input image and minimizes the distributional difference via a novel sliced Wasserstein distance formulation between representations of the clean and backdoor images in the latent space of the trained classifier. We comprehensively evaluated the performance of the proposed method on various image classification benchmark models over a wide range of datasets. Our experimental results demonstrated that the proposed method could significantly improve the effectiveness against the existing defense mechanisms, especially those relying on the distinguishability in latent space.
|
| 216 |
+
|
| 217 |
+
References
|
| 218 |
+
[1] Tadas Baltrusaitis, Amir Zadeh, Yao Chong Lim, and Louis-Philippe Morency. Openface 2.0: Facial behavior analysis toolkit. In Proceedings of the 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG), pages 59–66, Xi’an, China, 2018.
|
| 219 |
+
[2] Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in CNNS by training set corruption without label poisoning. In Proceedings of the 2019 IEEE International Conference on Image Processing (ICIP), pages 101–105, Taipei, 2019.
|
| 220 |
+
[3] Daniel S Berman, Anna L Buczak, Jeffrey S Chavis, and Cherita L Corbett. A survey of deep learning methods for cyber security. Information, 10(4):122, 2019.
|
| 221 |
+
[4] Avishek Joey Bose, Gauthier Gidel, Hugo Berard, Andre Cianflone, Pascal Vincent, Simon Lacoste-Julien, and William L. Hamilton. Adversarial example games. In Advances in Neural Information Processing Systems (NeurIPS), virtual, 2020.
|
| 222 |
+
[5] Nicholas Carlini and David A. Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Bhavani M. Thuraisingham, Battista Biggio, David Mandell Freeman, Brad Miller, and Arunesh Sinha, editors, Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security (AISec@CCS), pages 3–14, Dallas, TX, 2017.
|
| 223 |
+
[6] Bryant Chen, Wilka Carvalho, Nathalie Baracaldo, Heiko Ludwig, Benjamin Edwards, Taesung Lee, Ian M. Molloy, and Biplav Srivastava. Detecting backdoor attacks on deep neural networks by activation clustering. In Proceedings of the Workshop on Artificial Intelligence Safety, Honolulu, HI, 2019.
|
| 224 |
+
[7] Huili Chen, Cheng Fu, Jishen Zhao, and Farinaz Koushanfar. Deepinspect: A black-box trojan detection and mitigation framework for deep neural networks. In Proceedings of the TwentyEighth International Joint Conference on Artificial Intelligence (IJCAI), pages 4658–4664, Macao, China, 2019.
|
| 225 |
+
[8] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017.
|
| 226 |
+
[9] Hao Cheng, Kaidi Xu, Sijia Liu, Pin-Yu Chen, Pu Zhao, and Xue Lin. Defending against backdoor attack on deep neural networks. arXiv preprint arXiv:2002.12162, 2020.
|
| 227 |
+
[10] Joseph Clements and Yingjie Lao. Hardware trojan design on neural networks. In 2019 IEEE International Symposium on Circuits and Systems (ISCAS), pages 1–5. IEEE, 2019.
|
| 228 |
+
[11] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), pages 248–255, Miami, FL, 2009.
|
| 229 |
+
[12] Ishan Deshpande, Ziyu Zhang, and Alexander G. Schwing. Generative modeling using the sliced wasserstein distance. In Proceedings of the 2018 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3483–3491, Salt Lake City, UT, 2018.
|
| 230 |
+
[13] Khoa Doan, Yingjie Lao, Weijie Zhao, and Ping Li. LIRA: Learnable, imperceptible and robust backdoor attacks. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 11966–11976, 2021.
|
| 231 |
+
[14] Khoa D Doan, Amir Kimiyaie, Saurav Manchanda, and Chandan K Reddy. Image hashing by minimizing independent relaxed wasserstein distance. arXiv preprint arXiv:2003.00134, 2020.
|
| 232 |
+
[15] Khoa D Doan, Saurav Manchanda, Fengjiao Wang, Sathiya Keerthi, Avradeep Bhowmik, and Chandan K Reddy. Image generation via minimizing fr\’echet distance in discriminator feature space. arXiv preprint arXiv:2003.11774, 2020.
|
| 233 |
+
[16] Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith Chinthana Ranasinghe, and Surya Nepal. STRIP: a defence against trojan attacks on deep neural networks. In Proceedings of the 35th Annual Computer Security Applications Conference (ACSAC), pages 113–125, San Juan, PR, 2019.
|
| 234 |
+
[17] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, 2015.
|
| 235 |
+
[18] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. BadNets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230–47244, 2019.
|
| 236 |
+
[19] Wenbo Guo, Dongliang Mu, Jun Xu, Purui Su, Gang Wang, and Xinyu Xing. LEMNA: explaining deep learning based security applications. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security (CCS), pages 364–379, Toronto, Canada, 2018.
|
| 237 |
+
[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778, Las Vegas, NV, 2016.
|
| 238 |
+
[21] Hossein Hosseini and Radha Poovendran. Semantic adversarial examples. In Proceedings of the 2018 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPR Workshops), pages 1614–1619, Salt Lake City, UT, 2018.
|
| 239 |
+
[22] Mojan Javaheripi, Mohammad Samragh, Gregory Fields, Tara Javidi, and Farinaz Koushanfar. Cleann: Accelerated trojan shield for embedded neural networks. In Proceedings of the IEEE/ACM International Conference On Computer Aided Design (ICCAD), pages 11:1–11:9, San Diego, CA, 2020.
|
| 240 |
+
[23] Kaidi Jin, Tianwei Zhang, Chao Shen, Yufei Chen, Ming Fan, Chenhao Lin, and Ting Liu. A unified framework for analyzing and detecting malicious examples of dnn models. arXiv preprint arXiv:2006.14871, 2020.
|
| 241 |
+
[24] Soheil Kolouri, Kimia Nadjahi, Umut Simsekli, Roland Badeau, and Gustavo K. Rohde. Generalized sliced wasserstein distances. In Advances in Neural Information Processing Systems (NeurIPS), pages 261–272, Vancouver, Canada, 2019.
|
| 242 |
+
[25] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 243 |
+
[26] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NIPS), pages 1106–1114, Lake Tahoe, NV, 2012.
|
| 244 |
+
[27] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. arXiv preprint arXiv:1611.01236, 2016.
|
| 245 |
+
[28] 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.
|
| 246 |
+
[29] Shaofeng Li, Minhui Xue, Benjamin Zi Hao Zhao, Haojin Zhu, and Xinpeng Zhang. Invisible backdoor attacks on deep neural networks via steganography and regularization. IEEE Trans. Dependable Secur. Comput., 18(5):2088–2105, 2021.
|
| 247 |
+
[30] Yiming Li, Tongqing Zhai, Baoyuan Wu, Yong Jiang, Zhifeng Li, and Shutao Xia. Rethinking the trigger of backdoor attack. arXiv preprint arXiv:2004.04692, 2020.
|
| 248 |
+
[31] Jingtuo Liu, Yafeng Deng, Tao Bai, Zhengping Wei, and Chang Huang. Targeting ultimate accuracy: Face recognition via deep embedding. arXiv preprint arXiv:1506.07310, 2015.
|
| 249 |
+
[32] Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Fine-pruning: Defending against backdooring attacks on deep neural networks. In Proceedings of the 21st International Symposium on Research in Attacks, Intrusions, and Defenses (RAID), pages 273–294, Heraklion, Crete, Greece, 2018.
|
| 250 |
+
[33] Qiang Liu, Pan Li, Wentao Zhao, Wei Cai, Shui Yu, and Victor C. M. Leung. A survey on security threats and defensive techniques of machine learning: A data driven view. IEEE Access, 6:12103–12117, 2018.
|
| 251 |
+
[34] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. In Proceedings of the 25th Annual Network and Distributed System Security Symposium (NDSS), San Diego, CA, 2018.
|
| 252 |
+
[35] Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Reflection backdoor: A natural backdoor attack on deep neural networks. In Proceedings of the 16th European Conference on Computer Vision (ECCV), Part X, pages 182–199, Glasgow, UK, 2020.
|
| 253 |
+
[36] Yuntao Liu, Yang Xie, and Ankur Srivastava. Neural trojans. In Proceedings of the 2017 IEEE International Conference on Computer Design (ICCD), pages 45–48, Boston, MA, 2017.
|
| 254 |
+
[37] Luis Muñoz-González, Battista Biggio, Ambra Demontis, Andrea Paudice, Vasin Wongrassamee, Emil C. Lupu, and Fabio Roli. Towards poisoning of deep learning algorithms with back-gradient optimization. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security (AISec@CCS), pages 27–38, Dallas, TX, 2017.
|
| 255 |
+
[38] Khai Nguyen, Nhat Ho, Tung Pham, and Hung Bui. Distributional sliced-wasserstein and applications to generative modeling. In Proceedings of the 9th International Conference on Learning Representations (ICLR), Virtual Event, Austria, 2021.
|
| 256 |
+
[39] Tuan Anh Nguyen and Anh Tuan Tran. Wanet - imperceptible warping-based backdoor attack. In Proceedings of the 9th International Conference on Learning Representations (ICLR), Virtual Event, Austria, 2021.
|
| 257 |
+
[40] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Proceedings of the 30th International Conference on Neural Information Processing Systems, pages 271–279, 2016.
|
| 258 |
+
[41] Nicolas Papernot, Patrick D. McDaniel, Somesh Jha, Matt Fredrikson, Z. Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In Proceedings of the IEEE European Symposium on Security and Privacy (EuroS&P), pages 372–387, Saarbrücken, Germany, 2016.
|
| 259 |
+
[42] Ximing Qiao, Yukun Yang, and Hai Li. Defending neural backdoors via generative distribution modeling. In Advances in Neural Information Processing Systems (NeurIPS), pages 14004– 14013, Vancouver, Canada, 2019.
|
| 260 |
+
[43] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the 8th International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), Part III, pages 234–241, Munich, Germany, 2015.
|
| 261 |
+
[44] Aniruddha Saha, Akshayvarun Subramanya, and Hamed Pirsiavash. Hidden trigger backdoor attacks. In Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI), pages 11957–11965, New York, NY, 2020.
|
| 262 |
+
[45] Ali Shafahi, W. Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 6106–6116, Montréal, Canada, 2018.
|
| 263 |
+
[46] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 264 |
+
[47] Ezekiel Soremekun, Sakshi Udeshi, Sudipta Chattopadhyay, and Andreas Zeller. Exposing backdoors in robust machine learning models. arXiv preprint arXiv:2003.00865, 2020.
|
| 265 |
+
[48] Johannes Stallkamp, Marc Schlipsing, Jan Salmen, and Christian Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural networks, 32:323–332, 2012.
|
| 266 |
+
[49] Mahesh Subedar, Nilesh Ahuja, Ranganath Krishnan, Ibrahima J Ndiour, and Omesh Tickoo. Deep probabilistic models to detect data poisoning attacks. arXiv preprint arXiv:1912.01206, 2019.
|
| 267 |
+
|
| 268 |
+
[50] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In Proceedings of the 2nd International Conference on Learning Representations (ICLR), Banff, Canada, 2014.
|
| 269 |
+
|
| 270 |
+
[51] Te Juin Lester Tan and Reza Shokri. Bypassing backdoor detection algorithms in deep learning. In Proceedings of the IEEE European Symposium on Security and Privacy (EuroS&P), pages 175–183, Genoa, Italy, 2020.
|
| 271 |
+
|
| 272 |
+
[52] Di Tang, XiaoFeng Wang, Haixu Tang, and Kehuan Zhang. Demon in the variant: Statistical analysis of dnns for robust backdoor contamination detection. In Proceedings of the 30th USENIX Security Symposium (USENIX Security), pages 1541–1558, 2021.
|
| 273 |
+
|
| 274 |
+
[53] Yuchi Tian, Kexin Pei, Suman Jana, and Baishakhi Ray. Deeptest: automated testing of deepneural-network-driven autonomous cars. In Proceedings of the 40th International Conference on Software Engineering (ICSE), pages 303–314, Gothenburg, Sweden, 2018.
|
| 275 |
+
|
| 276 |
+
[54] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. In Advances in Neural Information Processing Systems (NeurIPS), pages 8011–8021, Montréal, Canada, 2018.
|
| 277 |
+
|
| 278 |
+
[55] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Label-consistent backdoor attacks. arXiv preprint arXiv:1912.02771, 2019.
|
| 279 |
+
|
| 280 |
+
[56] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y. Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In Proceedings of the 2019 IEEE Symposium on Security and Privacy $( S P )$ , pages 707–723, San Francisco, CA, 2019.
|
| 281 |
+
|
| 282 |
+
[57] Jiayu Wu, Qixiang Zhang, and Guoxi Xu. Tiny Imagenet challenge, 2017.
|
| 283 |
+
|
| 284 |
+
[58] Peng Yang, Yingjie Lao, and Ping Li. Robust watermarking for deep neural networks via bi-level optimization. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), 2021.
|
| 285 |
+
|
| 286 |
+
[59] Haoti Zhong, Cong Liao, Anna Cinzia Squicciarini, Sencun Zhu, and David J. Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. In Proceedings of the tenth ACM Conference on Data and Application Security and Privacy (CODASPY), pages 97–108, New Orleans, LA, 2020.
|
| 287 |
+
|
| 288 |
+
[60] Chen Zhu, W. Ronny Huang, Hengduo Li, Gavin Taylor, Christoph Studer, and Tom Goldstein. Transferable clean-label poisoning attacks on deep neural nets. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 7614–7623, Long Beach, CA, 2019.
|
md/train/3X8qZL4_WO/3X8qZL4_WO.md
ADDED
|
@@ -0,0 +1,464 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Mimicking Evolution with Reinforcement Learning
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 In nature, there are two processes driving the development of the brain: evolution
|
| 11 |
+
2 and learning. Evolution acts slowly, across generations, and amongst other things,
|
| 12 |
+
3 it defines what agents learn by changing their internal reward function. Learning
|
| 13 |
+
4 acts fast, within one’s lifetime, and it quickly updates agents’ policies to maximise
|
| 14 |
+
5 the evolved reward function. Although previous work has emulated both of these
|
| 15 |
+
6 processes working in tandem, the optimisation of the reward function in order to
|
| 16 |
+
7 serve the aims of the evolutionary process is very computationally expensive. This
|
| 17 |
+
8 work proposes a fixed reward function, the evolutionary reward, that aims to max
|
| 18 |
+
9 imise the number of current (and future) genetically similar agents. Furthermore,
|
| 19 |
+
10 we propose a way to approximate the joint action value by averaging the action
|
| 20 |
+
11 values of other agents weighted by their genetic similarity. In a finite environment
|
| 21 |
+
12 with limited resources this techniques drives improved survival mechanisms and
|
| 22 |
+
13 reproductive success. Given that this reward function is fixed, we avoid the com
|
| 23 |
+
14 putationally intense process of optimising it. We demonstrate the viability of our
|
| 24 |
+
15 evolutionary reward by testing it in two bio-inspired, open-ended environments and
|
| 25 |
+
16 monitoring a number of metrics such as population size and life expectancy. We
|
| 26 |
+
17 compare our technique with the state-of-the-art evolutionary algorithm: CMA-ES,
|
| 27 |
+
18 and show the superiority of work at producing agents that maximise the number of
|
| 28 |
+
19 its genes across time.
|
| 29 |
+
|
| 30 |
+
# 20 1 Introduction
|
| 31 |
+
|
| 32 |
+
21 Evolution is the only process we know of today that has given rise to general intelligence (as demon
|
| 33 |
+
22 strated in animals, and specifically in humans). This fact has been inspiring artificial intelligence (AI)
|
| 34 |
+
23 researchers to run evolution in artificial worlds that mimic key properties of life on Earth. One of
|
| 35 |
+
24 these key properties is open-endedness. This means that, as in nature, the fitness function (or any
|
| 36 |
+
25 goal function) of the environment is not defined anywhere but it simply emerges from the survival
|
| 37 |
+
26 and reproduction of genes. For this reason, we call these environments open-ended evolutionary
|
| 38 |
+
27 environments (OEEE). They are never-ending environments where adaptable agents are competing
|
| 39 |
+
28 for a common limited-resource to survive and replicate their genes. Using them for research is the
|
| 40 |
+
29 focus of the field of artificial life (ALife).
|
| 41 |
+
30 Our ability to run evolution efficiently in OEEE will dictate the success of ALife. In this work
|
| 42 |
+
31 we speed up the way evolution is ran in OEEE by introducing Evolution via Evolutionary Reward
|
| 43 |
+
32 (EvER). In EvER, each agent is born with an evolutionary reward that, when maximised by a learning,
|
| 44 |
+
33 it also maximises the survival and reproduction of the agent’s genes. Due to this property we say that
|
| 45 |
+
34 this reward is aligned with evolution. This allows learning to search for policies with increasingly
|
| 46 |
+
35 evolutionary fitness. Also, by guarantying this alignment we don’t need to go through the expensive
|
| 47 |
+
36 process of aligning the agents’ reward functions through evolution. This reward function was designed
|
| 48 |
+
37 to work on any OEEE.
|
| 49 |
+
38 In the remaining part of this introduction we 1) describe how evolution changes what we learn;
|
| 50 |
+
39 2) introduce our contribution and describe how maximising a reward function can lead to the
|
| 51 |
+
40 maximisation of evolutionary fitness.
|
| 52 |
+
|
| 53 |
+
# 41 1.1 Evolving what to learn
|
| 54 |
+
|
| 55 |
+
42 In nature, there are two different mechanisms driving the development of the brain. Evolution acts
|
| 56 |
+
43 slowly, across generations, and amongst other things, it defines what agents learn by changing their
|
| 57 |
+
44 internal reward function. Learning acts fast, within one’s lifetime, and it quickly updates agents’
|
| 58 |
+
45 policies to maximise pleasure and minimise pain. Combining these two methods has a long history
|
| 59 |
+
46 in AI research [1, 42, 8]. This combination (illustrated in Appendix B, Figure 3) results in a very
|
| 60 |
+
47 computationally expensive algorithm as it requires two loops 1) learning (the inner loop) where
|
| 61 |
+
48 agents maximise their innate reward functions across their lifetimes and 2) evolution (the outer loop)
|
| 62 |
+
49 where natural selection and mutation defines the reward functions for the next generation (amongst
|
| 63 |
+
50 other things, such as NN topologies and initial weights).
|
| 64 |
+
51 We say that a reward function is aligned with evolution when the maximisation of the reward leads
|
| 65 |
+
52 to the maximisation of the agent’s fitness. Through evolution the most aligned reward functions
|
| 66 |
+
53 get selected and increase their numbers. Intuitively, one can define the optimally aligned reward
|
| 67 |
+
54 function as the reward function that allows a learner to learn most quickly how to maximise its fitness,
|
| 68 |
+
55 assuming the conditions of the world (including other agents) remain the same. However, as agents
|
| 69 |
+
56 evolve and learn, they change their environment and its corresponding fitness function. This change,
|
| 70 |
+
57 increases the misalignment between the reward and fitness functions. Therefore, the optimally aligned
|
| 71 |
+
58 reward function is always chasing the ever changing fitness function (see Appendix C for a formal
|
| 72 |
+
59 description of this). However, in this paper, we show that in simulation it is possible to define a fixed
|
| 73 |
+
60 reward function which is always aligned, although not guaranteed to be optimally aligned, with the
|
| 74 |
+
61 essence of fitness: the ability of the individual to survive and reproduce its genes.
|
| 75 |
+
62 Our work allows learning to single-handedly drive the search for policies with increasingly evolution
|
| 76 |
+
63 ary fitness by ensuring the alignment of the reward function with the fitness function. This greatly
|
| 77 |
+
64 simplifies the two-loop algorithm used to combine evolution and learning that was described earlier in
|
| 78 |
+
65 this section. We can do this because our reward is extrinsic to the agent and therefore, only possible
|
| 79 |
+
66 within a simulation.
|
| 80 |
+
|
| 81 |
+
# 67 1.2 Learning to maximise evolutionary fitness
|
| 82 |
+
|
| 83 |
+
68 The distinction between an agent and a gene is key to understanding this paper. Formally, evolution is
|
| 84 |
+
69 a change in gene frequencies in a population (of agents) over time. The gene is the unit of evolution,
|
| 85 |
+
70 and an agent carries one or more genes. Richard Dawkins has famously described our bodies as
|
| 86 |
+
71 throwaway survival machines built for replicating immortal genes [6]. His line illustrates well the
|
| 87 |
+
72 gene-centered view of evolution [43, 6], a view that has been able to explain multiple phenomena
|
| 88 |
+
73 such as intragenomic conflict and altruism that are difficult to explain with organism-centered or
|
| 89 |
+
74 group-centered viewpoints [2, 10, 7]. From the gene’s perspective, the evolutionary process is a
|
| 90 |
+
75 constant competition for resources. However, from the agent’s perspective, the evolutionary process
|
| 91 |
+
76 is a mix between a cooperative exercise with agents that carry some of its genes (its family) and
|
| 92 |
+
77 a competition with unrelated agents. Evolution pressures agents to engage in various degrees of
|
| 93 |
+
78 collaboration depending on the degree of kinship between them and the agents they interact with (i.e.
|
| 94 |
+
79 depending on the amount of overlap between the genes they carry). This pressure for cooperation
|
| 95 |
+
80 amongst relatives was named kin selection [34].
|
| 96 |
+
81 Evolution acts on the gene level, but RL acts on the agent level. RL can be aligned with the
|
| 97 |
+
82 evolutionary process by noting what evolution does to the agents through its selection of genes:
|
| 98 |
+
83 evolution generates agents with increasing capabilities to maximise the survival and reproduction
|
| 99 |
+
84 success of the genes they carry.
|
| 100 |
+
|
| 101 |
+
# 2 Related work
|
| 102 |
+
|
| 103 |
+
86 Combining evolution and learning Combining evolution and learning has long history in AI
|
| 104 |
+
87 research. The evolutionary reinforcement learning algorithm, introduced in 1991 [1], makes the
|
| 105 |
+
88 evolutionary process determine the initial weights of two neural networks: an action and an evaluation
|
| 106 |
+
89 network. During an agent’s lifetime, learning adapts the action network guided by the output of
|
| 107 |
+
90 its innate and fixed (during its lifetime) evaluation network. $\mathrm { N E A T + Q }$ [42] uses an evolutionary
|
| 108 |
+
91 algorithm, NEAT [36], to evolve topologies of NN and their initial weights so that they can better
|
| 109 |
+
92 learn using RL. In NEAT-Q the reward function remains fixed. However, evolutionary algorithms
|
| 110 |
+
93 have also been used to evolve potential-based shaping rewards and meta-parameters for RL [8].
|
| 111 |
+
94 Competing in Arms-race Every time adaptable entities compete against each other an arms-race
|
| 112 |
+
95 is created. Each entity’s task gets harder every time their competitors learn something useful. This
|
| 113 |
+
96 arms race drives the continued emergence of ever new innovative and sophisticated capabilities
|
| 114 |
+
97 necessary to out-compete adversaries. Evolutionary Algorithms (EA) have been successfully used
|
| 115 |
+
98 to co-evolve multiple competing entities [32, 29]. However, in sequential decision problems EA
|
| 116 |
+
99 algorithms discard most of the information by not looking at the whole state-action trajectories
|
| 117 |
+
100 the agents encounter throughout their lifetime. This theoretical disadvantage limits their potential
|
| 118 |
+
101 efficiency to tackle sequential problems when compared with RL. Empirically, EA algorithms
|
| 119 |
+
102 usually have a higher variance when compared with gradient methods [30, 23, 24]. With regards
|
| 120 |
+
103 to gradient methods (deep learning methods in particular), impressive results have been recently
|
| 121 |
+
104 achieved by training NN, through back-propagation, to compete against each other in simulated games
|
| 122 |
+
105 (OpenFive [4], AlphaZero [31], GAN [11]). More closely aligned with our proposed methodology,
|
| 123 |
+
106 OpenAI has recently developed Neural MMO [37], a simulated environment that captures some
|
| 124 |
+
107 important properties of life on Earth. In Neural MMO artificial agents, represented by NN, need to
|
| 125 |
+
108 forage for food and water to survive in a never-ending simulation. Currently, Neural MMO agents
|
| 126 |
+
109 can not reproduce and their goal is to maximise their own survival, instead of maximising the survival
|
| 127 |
+
110 and reproduction success of their genes as it happens in nature. We extend this work by introducing
|
| 128 |
+
111 genes, the ability for agents to reproduce and we align the agents’ reward with evolution. These
|
| 129 |
+
112 are key properties of life on Earth that we must have in simulation environments if we hope to have
|
| 130 |
+
113 them evolve similar solutions to the ones evolved by nature (in other words, these are key properties
|
| 131 |
+
114 to achieve convergent evolution - see Appendix ?? for more details on why this important for AI
|
| 132 |
+
115 research).
|
| 133 |
+
116 Cooperative MARL Cooperative MARL is an active research area within RL that has been
|
| 134 |
+
117 experiencing fast progress [26, 3, 9]. The setting is usually approached in a binary way [4, 41, 20].
|
| 135 |
+
118 Agents are grouped into teams and agents within the same team fully cooperate amongst each other
|
| 136 |
+
119 whilst agents from different teams don’t cooperate at all (cooperation is either one or zero); we define
|
| 137 |
+
120 this scenario as the binary cooperative setting. The teams may have a fixed number of members or
|
| 138 |
+
121 change dynamically [19, 27, 40, 5]. The most straightforward solution for this setting would be to
|
| 139 |
+
122 train independent learners to maximise their team’s reward. However, independent learners would
|
| 140 |
+
123 face a non-stationary learning problem. The MADDPG [22] algorithm tackles this problem by using
|
| 141 |
+
124 a multi-agent policy gradient method with a centralised critic and decentralised actors so that training
|
| 142 |
+
125 takes into account all the states and actions of the entire team but during execution each agent can
|
| 143 |
+
126 act independently. More relevant to our work, factored value functions[12, 27] such as Transfer
|
| 144 |
+
127 Planning [40] Value Decomposition Networks (VDN) [38] and Q-Mix [28] use different methods to
|
| 145 |
+
128 decompose the team’s central action-value function into the decentralised action-value functions. We
|
| 146 |
+
129 build on top of VDN (which is further explained in the Appendix D) to extend the concept of team to
|
| 147 |
+
130 the concept of family and introduce continuous degrees of cooperation.
|
| 148 |
+
|
| 149 |
+
# 131 3 Background
|
| 150 |
+
|
| 151 |
+
132 Reinforcement Learning We recall the single agent fully-observable RL setting [39], where the
|
| 152 |
+
133 environment is typically formulated as a Markov decision process (MDP). At every time step,
|
| 153 |
+
134 $t = 1 , 2 , \dots$ , the agent observes the environment’s state $s _ { t } \in S$ , and uses it to select an action $a _ { t } \in { \mathcal { A } }$
|
| 154 |
+
135 As a consequence, the agent receives a reward $r _ { t } \in \mathcal { R } \subset \mathbb { R }$ and the environment transitions to the state
|
| 155 |
+
136 $s _ { t + 1 }$ . The tuple $\left( { { s _ { t + 1 } } , { r _ { t } } } \right)$ is sampled from the static probability distribution $p : { \mathcal { S } } \times { \mathcal { A } } { \mathcal { P } } ( S \times { \mathcal { R } } )$
|
| 156 |
+
137 whilst the actions $a _ { t }$ are sampled from the parametric policy function $\pi _ { \theta } : { \mathcal { S } } { \mathcal { P } } ( { \mathcal { A } } )$ :
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
s _ { t + 1 } , r _ { t } \sim p ( s _ { t + 1 } , r _ { t } | s _ { t } , a _ { t } ) , \quad a _ { t } \sim \pi _ { \theta } ( a _ { t } | s _ { t } )
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
138 The goal of the agent is to find the optimal policy parameters $\theta ^ { * }$ that maximise the expected return
|
| 163 |
+
139 $\bar { R } = \mathbb { E } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } ]$ , where $\gamma$ is the discount factor. In the more general framework, the state is
|
| 164 |
+
140 only partially observable, meaning that the agent can not directly observe the state but instead it
|
| 165 |
+
141 observes $o _ { t } \in \mathcal { O }$ which is typically given by a function of the state. In this situation, the environment
|
| 166 |
+
142 is modelled by a partial observable Markov decision process (POMDP) and the policy usually
|
| 167 |
+
143 incorporates past history $h _ { t } = a _ { 0 } o _ { 0 } r _ { 0 } , \ldots , a _ { t - 1 } o _ { t - 1 } r _ { t - 1 }$ .
|
| 168 |
+
144 Q-Learning and Deep Q-Networks The action-value function $Q ^ { \pi }$ gives the estimated return when
|
| 169 |
+
145 the agent has the state history $h _ { t }$ , executes action $a _ { t }$ and follows the policy $\pi$ on the future time
|
| 170 |
+
146 steps. It can be recursively defined by $Q ^ { \pi } ( h _ { t } , a _ { t } ) = \mathbb { E } _ { s _ { t + 1 } , r _ { t } \sim p } \big [ r _ { t } + \gamma \mathbb { E } _ { a _ { t + 1 } \sim \pi } \big [ Q ^ { \pi } ( h _ { t + 1 } , a _ { t + 1 } ) \big ] \big ]$ . Q
|
| 171 |
+
147 learning and Deep Q-Networks (DQN) [25] are popular methods for obtaining the optimal action value
|
| 172 |
+
148 function $Q ^ { * }$ . Once we have $Q ^ { * }$ , the optimal policy is also available as $\pi ^ { * } = \arg \operatorname* { m a x } _ { a _ { t } } Q ^ { * } ( h _ { t } , a _ { t } )$ .
|
| 173 |
+
149 In DQN, the action-value function is approximated by a deep NN with parameters $\theta$ . $Q _ { \theta } ^ { * }$ is found by
|
| 174 |
+
150 minimising the loss function:
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\mathcal { L } _ { t } ( \theta ) = \mathbb { E } _ { h _ { t } , a _ { t } , r _ { t } , h _ { t + 1 } } [ ( y _ { t } - Q _ { \theta } ^ { \pi } ( h _ { t } , a _ { t } ) ) ^ { 2 } ] , \quad \mathrm { w h e r e ~ } y _ { t } = r _ { t } + \gamma \operatorname* { m a x } _ { a ^ { \prime } } Q _ { \theta ^ { \prime } } ^ { \pi } ( a _ { t + 1 } , h _ { t + 1 } ) ,
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
where 151 $\pi$ is the $\epsilon$ -greedy policy which takes action arg $\operatorname* { m a x } _ { a _ { t } } Q ^ { \pi } ( a _ { t } , h _ { t } )$ with probability $1 - \epsilon$ , and 152 takes a random action with probability $\epsilon$ . $\theta ^ { \prime }$ are the parameters of a target network that are periodically 153 copied from $\theta$ and kept constant for a number of iterations.
|
| 181 |
+
|
| 182 |
+
154 Multi-Agent Reinforcement Learning In this work, we consider the MARL setting where the
|
| 183 |
+
155 underlying environment is modelled by a partially observable stochastic game [13]. In this setting,
|
| 184 |
+
156 the environment is populated by multiple agents which have individual observations and rewards and
|
| 185 |
+
157 act according to individual policies. Their goal is to maximise their own expected return.
|
| 186 |
+
|
| 187 |
+
# 158 4 Evolution via Evolutionary Reward
|
| 188 |
+
|
| 189 |
+
159 In this section, we propose a reward function that enables RL algorithms to search for policies with
|
| 190 |
+
160 increasingly evolutionary success. We call this reward the evolutionary reward because it is always
|
| 191 |
+
161 aligned with the fitness function. We also propose a specific RL algorithm that is particularly suited
|
| 192 |
+
162 to maximise the evolutionary reward in open-ended evolutionary environments however other RL
|
| 193 |
+
163 algorithms could also be used.
|
| 194 |
+
164 Evolutionary reward The evolutionary reward of an agent is proportional to the number of copies
|
| 195 |
+
165 its genes have in the world’s population. Maximising this reward leads to the maximisation of the
|
| 196 |
+
166 survival and reproduction success of the genes an agent carries. We start by defining the kinship
|
| 197 |
+
167 function between a pair of agents $i$ and $j$ , who carry $N$ genes represented by the integer vectors $g ^ { i }$
|
| 198 |
+
168 and $g ^ { j }$ (we chose to use $\textbf { { g } }$ for genome, which in biology is the set of genes an agent carries):
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
k \colon \mathbb { Z } ^ { N } \times \mathbb { Z } ^ { N } \to [ 0 , 1 ] , \qquad k ( g ^ { i } , g ^ { j } ) = \frac { 1 } { N } \sum _ { p = 1 } ^ { N } \delta _ { g _ { p } ^ { i } , g _ { p } ^ { j } } \quad ,
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
169 where $\delta _ { g _ { p } ^ { i } , g _ { p } ^ { j } }$ is the Kronecker delta which is one if $g _ { p } ^ { i } = g _ { p } ^ { j }$ and zero otherwise. When agent $i$ is alive
|
| 205 |
+
170 at time $t + 1$ , it receives the reward:
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
r _ { t } ^ { i } = \sum _ { j \in \mathcal { A } _ { t + 1 } } k ( \pmb { g } ^ { i } , \pmb { g } ^ { j } ) ,
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
171 where $\boldsymbol { \mathcal { A } } _ { t + 1 }$ is the set of agents alive at the instant $t + 1$ . Note that since agent $i$ is alive at $t + 1$ ,
|
| 212 |
+
172 $\boldsymbol { \mathcal { A } } _ { t + 1 }$ includes agent $i$ . $T ^ { i } - 1$ is the last time step that agent $i$ is alive and so, at this instant, the agent
|
| 213 |
+
173 receives its final reward which is proportional to the discounted sum of the number of times its genes
|
| 214 |
+
174 will be present on other agents after its death:
|
| 215 |
+
|
| 216 |
+
$$
|
| 217 |
+
r _ { T ^ { i } - 1 } ^ { i } = \sum _ { t = T ^ { i } } ^ { \infty } \gamma ^ { t - T ^ { i } } \sum _ { j \in { \mathcal A } _ { t } } k ( { \boldsymbol g } ^ { i } , { \boldsymbol g } ^ { j } ) ,
|
| 218 |
+
$$
|
| 219 |
+
|
| 220 |
+
175 with this reward function, the agents are incentivised to maximise the survival and replication success
|
| 221 |
+
176 of the genes they carry. In the agent-centered view, the agents are incentivised to survive and replicate,
|
| 222 |
+
177 but also to help their family (kin) survive and replicate; and to make sure that when they die their
|
| 223 |
+
178 family is in a good position to carry on surviving and replicating. The degree of collaboration with
|
| 224 |
+
179 other family members depends on the overlap between their genotype as it happens in nature.
|
| 225 |
+
180 The discount factor, $\gamma$ , needs to be in the interval $[ 0 , 1 [$ to ensure the final reward remains bounded.
|
| 226 |
+
181 Due to the exponential discounting we can compute the final reward up to an error of $\epsilon$ by summing
|
| 227 |
+
182 over a finite period of time denoted by the effective horizon $( h _ { e } )$ . To see how to compute the $h _ { e }$ for
|
| 228 |
+
183 a given environment and $\epsilon$ see the Appendix G.1. By computing the final reward this way, we can
|
| 229 |
+
184 now use RL algorithms like Q-learning to train agents with this evolutionary reward. However, in the
|
| 230 |
+
185 next section we introduce a more practical algorithm that allows us to estimate the final reward more
|
| 231 |
+
186 efficiently.
|
| 232 |
+
187 Evolutionary Value-Decomposition Networks We propose Evolutionary Value-Decomposition
|
| 233 |
+
188 Networks (E-VDN) as an extension of VDN [38] (explained in the Appendix D) from the binary
|
| 234 |
+
189 cooperative setting with static teams to the continuous cooperative setting with dynamic families.
|
| 235 |
+
190 E-VDN helps us reduce the variance of the value estimation and allows us to estimate the final
|
| 236 |
+
191 evolutionary reward without having to simulate the environment forward for $h _ { e }$ iterations.
|
| 237 |
+
192 Within a team, each agent fully cooperates with all the other members of the team, and it does not
|
| 238 |
+
193 cooperate at all with any agent outside of the team. Moreover, if $a$ and $b$ are members of the same
|
| 239 |
+
194 team and $c$ is a member of $a$ ’s team then $c$ and $b$ are also in the same team. Within a family, the
|
| 240 |
+
195 degrees of cooperation amongst its members depends on their kinship degree (which can be any real
|
| 241 |
+
196 number from 0 to 1). Also, if $a$ and $b$ are members of the same family and $c$ is part of $a$ ’s family, $c$ is
|
| 242 |
+
197 not necessarily part of $b$ ’s family.
|
| 243 |
+
198 Each agent $i$ sees the members of its family from an unique perspective, based on the kinship degree it
|
| 244 |
+
199 shares with them. In E-VDN, each agent $i$ has a joint action-value function, $Q ^ { i }$ . E-VDN assumes $Q ^ { i }$
|
| 245 |
+
200 can be composed by averaging the action-value functions across the members of $i$ ’s family weighted
|
| 246 |
+
201 by their kinship with agent $i$ (this is similar to the VDN’s assumption):
|
| 247 |
+
|
| 248 |
+
$$
|
| 249 |
+
Q ^ { i } ( ( h _ { t } ^ { 1 } , h _ { t } ^ { 2 } , \dots , h _ { t } ^ { | { \cal A } _ { t } | } ) , ( a _ { t } ^ { 1 } , a _ { t } ^ { 2 } , \dots , a _ { t } ^ { | { \cal A } _ { t } | } ) ) \approx \frac { 1 } { n _ { t } ^ { i } } \sum _ { j \in { \cal A } _ { t } } k ( g ^ { i } , g ^ { j } ) \tilde { Q } ^ { j } ( h _ { t } ^ { j } , a _ { t } ^ { j } | \tilde { \theta } _ { j } ) ,
|
| 250 |
+
$$
|
| 251 |
+
|
| 252 |
+
202 where $n _ { t } ^ { i }$ is a normalisation coefficient defined as $\begin{array} { r } { n _ { t } ^ { i } = \sum _ { j \in \mathcal { A } _ { t } } k ( \pmb { g } ^ { i } , \pmb { g } ^ { j } ) , \tilde { Q } _ { t } ^ { j } } \end{array}$ is the output of a NN
|
| 253 |
+
203 with parameters $\widetilde { \theta } _ { j }$ and with the input $( h _ { t } ^ { j } , a _ { t } ^ { j } )$ . Composing $Q ^ { i }$ with an average, instead of a sum
|
| 254 |
+
204 as it happens in VDN, is necessary as E-VDN allows the number of value functions contributing to
|
| 255 |
+
205 the composition to vary as the family gets bigger or smaller (agents born and die). This averaging
|
| 256 |
+
206 allows us to incorporate the local observations of each family member and reduce variance in the
|
| 257 |
+
207 value estimation.
|
| 258 |
+
208 More importantly, E-VDN allows us to deal with the difficulty of estimating the final reward (5) in a
|
| 259 |
+
209 particularly convenient way. As is clear from its definition (5), the final reward is the expected sum
|
| 260 |
+
210 (over time) of kinship that agent $i$ has with other agents $j$ after its death. The key idea is to note that
|
| 261 |
+
211 this value $( r _ { T ^ { i } - 1 } ^ { i } )$ can be approximated by the Q-value of other agents $j$ that are close to (have high
|
| 262 |
+
212 kinship with) agent $i$ :
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
\hat { r } _ { T ^ { i } - 1 } ^ { i } = \left\{ \begin{array} { l l } { \frac { 1 } { n _ { T ^ { i } } ^ { i } } \sum _ { j \in \mathcal { A } _ { T ^ { i } } } k ( g ^ { i } , g ^ { j } ) \tilde { Q } _ { T ^ { i } } ^ { j } ( \dots ) \approx Q _ { T ^ { i } } ^ { i } ( \dots ) } & { \mathrm { i f ~ } n _ { T ^ { i } } ^ { i } > 0 } \\ { 0 } & { \mathrm { i f ~ } n _ { T ^ { i } } ^ { i } = 0 } \end{array} \right.
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
213 The final reward is zero if, and only if, at the time of its death the agent has no surviving family.
|
| 269 |
+
|
| 270 |
+
Each 214 $\tilde { Q } _ { t } ^ { i }$ is trained by back-propagating gradients, $g _ { t } ^ { i }$ , from the Q-learning rule:
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
g _ { t } ^ { i } = \nabla \pmb { \theta } _ { i } ( y _ { t } ^ { i } - \frac { 1 } { n _ { t } ^ { i } } \sum _ { j \in \cal A _ { t } } k ( \pmb { g } ^ { i } , \pmb { g } ^ { j } ) \tilde { Q } ^ { j } ( h _ { t } ^ { j } , a _ { t } ^ { j } | \tilde { \pmb { \theta } } _ { j } ) ) ^ { 2 } \approx \nabla \pmb { \theta } _ { i } ( y _ { t } ^ { i } - Q _ { t } ^ { i } ( \dots | \pmb { \theta } _ { i } ) ) ^ { 2 } ,
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
where 215 $\theta _ { i }$ is the concatenation of all the parameters $\widetilde { \theta } _ { j }$ , used in each $\tilde { Q } ^ { j }$ , contributing to the estimation 216 of $Q ^ { i }$ ; i.e. $\pmb { \theta } _ { i } : = \{ \widetilde { \theta } _ { j } \} _ { j }$ s.t. $k ( { \pmb g } ^ { i } , { \pmb g } ^ { j } ) > 0$ . Note that $\tilde { Q } ^ { i }$ are neural networks with parameters $\widetilde { \theta } _ { i }$ and $Q ^ { i }$ is 217 simply the average stated in (6).
|
| 277 |
+
|
| 278 |
+
The learning targets 218 $y _ { t } ^ { i }$ are given by:
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\begin{array} { r } { y _ { t } ^ { i } = \left\{ \begin{array} { l l } { r _ { t } ^ { i } + \gamma \operatorname* { m a x } _ { { \pmb a } _ { t + 1 } } Q _ { t + 1 } ^ { i } ( . . . ) | \pmb \theta _ { i } ^ { \prime } ) } & { \mathrm { i f ~ } t < T ^ { i } - 1 } \\ { \hat { r } _ { T ^ { i } - 1 } ^ { i } } & { \mathrm { i f ~ } t = T ^ { i } - 1 } \end{array} \right. , } \end{array}
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
219 $r _ { t } ^ { i }$ is the evolutionary reward (4), $\hat { r } _ { T ^ { i } - 1 } ^ { i }$ is the estimate of the final evolutionary reward (7) and $\theta _ { i } ^ { \prime }$
|
| 285 |
+
220 are the parameters of the target network that get periodically copied from $\theta _ { i }$ . We don’t use a replay
|
| 286 |
+
221 buffer in our training (which is commonly used in DQN) due to the non-stationary of multi-agent
|
| 287 |
+
222 environments (more about this in the Appendix G.2).
|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
Figure 1: The binary environment.
|
| 291 |
+
|
| 292 |
+
Since the joint action-value $Q ^ { i }$ increases monotonically with increasing $\tilde { Q } ^ { i }$ , an agent acting greedily with respect to its action-value function will also act greedily in respect to its family action-value function: arg m $\begin{array} { r } { \operatorname { 1 a x } _ { a _ { t } ^ { i } } Q _ { t } ^ { i } ( . . . ) \approx \arg \operatorname* { m a x } _ { a _ { t } ^ { i } } \tilde { Q } ^ { i } ( h _ { t } ^ { i } , a _ { t } ^ { i } ) . } \end{array}$ .
|
| 293 |
+
|
| 294 |
+
# 5 Experimental Setup
|
| 295 |
+
|
| 296 |
+
We want to test two hypotheses: 1) E-VDN is particularly well suited to make agents climb the fitness landscape in open-ended evolutionary environments; 2) E-VDN is able to increase the evolutionary fitness of agents in non-binary cooperative environments. To test the first hypothesis we need to compare E-VDN with another popular evolutionary algorithm. To make it easier to implement the competing algorithm we are going to use a binary cooperative environment to test the first hypothesis. To test the second hypothesis we will use a non-binary cooperative environment. Note, if an agent carries more than one gene (like it happens in nature) we have a non-binary environment.
|
| 297 |
+
|
| 298 |
+
234 In this section, we give a quick overview of these two multi-agent environments, as well as details
|
| 299 |
+
235 of the network architectures and the training regime. For a more complete description of the
|
| 300 |
+
236 environments, you can refer to the Appendix E. In the binary environment, we compared our
|
| 301 |
+
237 algorithm with a popular Evolution Strategies algorithm (CMA-ES [14]), and describe the training
|
| 302 |
+
238 regime used for CMA-ES in the Appendix F.
|
| 303 |
+
|
| 304 |
+
The Binary Environment The binary environment is a 2-dimensional grid world, which is initialised with five agents carrying five unique genomes (Figure 1). At each time step, each agent may move one step and produce an attack to another agent in an adjacent tile. When an agent moves to a tile with food it collects all the food available in it. If an agent chooses to produce an attack, it decreases its victim’s health by one point, if the victim’s health reaches zero it dies and $50 \%$ of its collected food is captured by the attacker. The food is used to survive (one unit of food must be consumed every time step to remain alive), and to reproduce. When agents are within their fertile age and they have stored enough food, they reproduce themselves asexually and give birth to an agent carrying an exact copy of their genome. Each genome has only a single gene and there are no mutations. These rules make the cooperation between agents binary, agents either fully-cooperate (they have the exact same genome) or they don’t cooperate at all (their genome has no overlap).
|
| 305 |
+
|
| 306 |
+
The Non-binary Environment The non-binary environment has the same rules as the binary environment with the difference that the agents now have 32 genes in their genome and they reproduce sexually instead of asexually. When two fertile agents are adjacent, they give birth to an agent who’s genome is composed by two halves of the genes of each parent, selected randomly. There are no genders, any agent can reproduce with any other agent. These rules give rise to different levels of collaboration: from 0 to 1 in steps of $\frac { 1 } { 3 2 }$ .
|
| 307 |
+
|
| 308 |
+
256 Policy Each agent observes a 5x5 square crop of the surrounding state (Figure 1). The agent
|
| 309 |
+
257 sees six features for every visible tile; i.e. the input is a 5x5x6 tensor. This includes two features
|
| 310 |
+
258 corresponding to tile properties (food available and whether it is occupied or not) and four features
|
| 311 |
+
259 corresponding to the occupying agents’ properties (age, food stored, kinship and health). Besides
|
| 312 |
+
260 these local inputs, each agent also observes its absolute position, family size and the total number
|
| 313 |
+
261 of agents in the world. We intend to remove these extra inputs in future work as we provide agents
|
| 314 |
+
262 with memory (we’re currently providing our policy with $\hat { o _ { t } ^ { i } }$ instead of $h _ { t } ^ { i \cdot }$ ). The NN has ten outputs
|
| 315 |
+
263 (five movement actions with no attack and five movement actions with an attack). In this work, we
|
| 316 |
+
264 used two different feed forward architectures: one is simply a fully connected NN with three hidden
|
| 317 |
+
265 layers and 244, 288 parameters in total, the other architecture is composed by convolutional and
|
| 318 |
+
266 dense layers and it is much smaller containing only 23, 616 parameters. The smaller NN was used to
|
| 319 |
+
267 compare our algorithm with an evolutionary algorithm which doesn’t scale well to larger networks.
|
| 320 |
+
|
| 321 |
+
Training details In this work, the genome does not directly encode the policy, however, we think it would be interesting to do that in future work. In the binary environment, we train five different policies (with the same architecture but different weights) simultaneously. At each training episode, we sample five policies with replacement and assign each one to one of the five unique genomes. We do this, to force each policy to interact with all other policies (including itself), increasing their robustness in survival and reproduction. During the test episodes, no sampling occurs, each policy is simply assigned to each unique genome. The training episodes had a length between 450 and 550 (note that the reward is computed as if there was no episode end), and the test episodes had a length of 500 steps.
|
| 322 |
+
|
| 323 |
+
277 In the non-binary environment, due to the large number of unique genomes, it is unfeasible to assign
|
| 324 |
+
278 a unique policy to each unique genome. To keep things simple, we chose to use only one policy in
|
| 325 |
+
279 this environment. This was not possible to do with CMA-ES, so we did not implement it in this
|
| 326 |
+
280 environment (more about CMA-ES on Appendix F).
|
| 327 |
+
|
| 328 |
+
Traits encoded by the genes In the non-binary environment, we can think of each of the 32 genes to change some visual feature (e.g. facial feature) of their agent so that it can be better recognised by its family. In the binary environment, besides the gene encoding this visual feature it also encodes which policy, chosen from a set of 5 policies, the agent is going to have. Note that the genes encode fixed traits (they don’t change during an agent’s lifetime) and their frequency in the population evolve through normal evolution (death and birth). With EvER we don’t need evolution to create the reward function and continuously align it with the fitness function. The agent’s brain is always trying to learn the right things for the survival of its genes, however, the actual genes are evolving at the normal pace of evolution.
|
| 329 |
+
|
| 330 |
+
290 To analyse the impact of our reward function, we deliberately chose to minimise entanglement
|
| 331 |
+
291 between genes and other aspects of the agents. However, EvER can be easily used in environments
|
| 332 |
+
292 where genes encode more traits like the agent’s abilities, visual features, initial weights and the
|
| 333 |
+
293 topology of its policy.
|
| 334 |
+
|
| 335 |
+
Evaluation Metrics In our simple environments, fitter policies can use the environment resources more efficiently and increase their population size to larger numbers. Therefore, to evaluate the performance of the algorithms in generating increasingly fitter species we track the average population size along training time.
|
| 336 |
+
|
| 337 |
+
# 6 Results
|
| 338 |
+
|
| 339 |
+
Training agents with E-VDN generates quite an interesting evolutionary history. Throughout the binary environment history, we found four distinct eras where agents engage in significantly distinct behaviour patterns $1 ^ { \mathrm { s t } }$ row of fig. 2). In the first era (the blue line - which lasts only a few hundred iterations), the agents learned how to survive, and through their encounters with the other founding agents, they have learnt that it was always (evolutionary) advantageous to attack other agents. In the second era (orange line), the agents’ food-gathering skills increased to a point where they started to reproduce. In this era, the birth-rate and population numbers increased fast. However, with the extra births, intra-family encounters became more frequent, and intra-family violence rose to its all-time maximum driving the average life span down. This intra-family violence quickly decreased in the third era (green line), as agents started to recognize their kin. Kin detection allowed for selective kindness and selective violence, which took the average life span to its all-time maximum. Finally,
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
Figure 2: ( $1 ^ { \mathrm { s t } }$ row) Results obtained using E-VDN with the larger NN, each point was obtained by averaging 20 test episodes. The different colours correspond to different eras. This plot was generated with a denser version of the evolutionary reward (more details on the Appendix G.3). $2 ^ { \mathrm { n d } }$ row) Results obtained using CMA-ES and E-VDN algorithms with the smaller NN and the standard evolutionary reward (4). Both algorithms were trained with 20 CPUs each.
|
| 343 |
+
|
| 344 |
+
310 in the fourth era (red line), agents learned how to sacrifice their lives for the future of their family.
|
| 345 |
+
311 Old infertile agents started allowing the younger generation to eat them without retaliation. Through
|
| 346 |
+
312 this cannibalism, the families had found a system for wealth inheritance. A smart allocation of the
|
| 347 |
+
313 family’s food resources in the fitter generation led to an increase in the population size with the cost
|
| 348 |
+
314 of a shorter life span. This behaviour emerges because the final reward (5) incentivises agents to
|
| 349 |
+
315 plan for the success of their genes even after their death. This behaviour is further investigated in
|
| 350 |
+
316 the Appendix H.1. These results show that optimising open-ended evolutionary environments with
|
| 351 |
+
317 E-VDN does indeed generate increasingly complex behaviours.
|
| 352 |
+
318 The $2 ^ { \mathrm { n d } }$ row of Figure 2, shows the macro-statistics obtained by training the smaller NN with CMA
|
| 353 |
+
319 ES and E-VDN. From the figure, we observe that E-VDN is able to produce a larger population of
|
| 354 |
+
320 agents with a longer life-span and a higher birth rate. A small population means that many resources
|
| 355 |
+
321 are left unused by the current population, this creates an opportunity for a new and more efficient
|
| 356 |
+
322 species to collect the unused resources and multiply its numbers. These opportunities are present in
|
| 357 |
+
323 the CMA-ES environment, however the algorithm could not find them, which suggests that E-VDN
|
| 358 |
+
324 is better at finding the way up the fitness landscape than CMA-ES. Video 1, shows that each family
|
| 359 |
+
325 trained with CMA-ES creates a swarm formation in a line that moves around the world diagonally.
|
| 360 |
+
326 When there is only one surviving family, this simple strategy allows agents to only step into tiles
|
| 361 |
+
327 that have reached their maximum food capacity. However, this is far from an evolutionarily stable
|
| 362 |
+
328 strategy [35] (ESS; i.e. a strategy that is not easily driven to extinction by a competing strategy), as
|
| 363 |
+
329 we verify when we place the best two families trained with CMA-ES on the same environment as the
|
| 364 |
+
330 best two E-VDN families and observe the CMA-ES families being consistently driven quickly to
|
| 365 |
+
331 extinction by their competition (fig. 4.a of Appendix B).
|
| 366 |
+
332 Our results, in the non-binary environment, show that in a non-binary cooperative setting E-VDN
|
| 367 |
+
333 also improves the ability of the trained policy to survive and replicate its genes (Figure 4.b,c and d
|
| 368 |
+
334 of Appendix B). This is a key feature that evolutionary algorithms should have in order to take the
|
| 369 |
+
335 research in open-ended evolutionary environments further. Note, that the non-binary environment
|
| 370 |
+
336 is much harder than the binary one. To replicate, agents need to be adjacent to other agents. In the
|
| 371 |
+
337 beginning, all agents are unrelated making it dangerous to get adjacent to another agent as it often
|
| 372 |
+
338 leads into attacks, but it is also dangerous to get too far away from them since with a limited vision it
|
| 373 |
+
339 is hard to find a fertile mate once they lose sight of each other. Video 2 shows a simulation of the
|
| 374 |
+
340 evolved policy being run on the non-binary environment, it seems that agents found a way to find
|
| 375 |
+
341 mates by moving to a certain region of the map (the breeding ground) once they are fertile.
|
| 376 |
+
|
| 377 |
+
# 42 7 Conclusion & Future Work
|
| 378 |
+
|
| 379 |
+
43 This paper has introduced an evolutionary reward function that when maximised also maximises the
|
| 380 |
+
44 evolutionary fitness of the agent. This allows RL to be used as a tool for research of open-ended
|
| 381 |
+
345 evolutionary systems. To implement this reward function, we extended the concept of team to the
|
| 382 |
+
346 concept of family and introduce continuous degrees of cooperation. Future work could explore three
|
| 383 |
+
347 directions: 1) Explore a different reward function that makes agents maximise the expected geometric
|
| 384 |
+
348 growth rate of their genes; 2) Research the minimum set of requirements to emerge natural cognitive
|
| 385 |
+
349 abilities in artificial agents such as identity awareness and recognition, friendship and hierarchical
|
| 386 |
+
350 status (by following our proposed methodology for progress in AI (Appendix ??)) 3) Extend the use
|
| 387 |
+
351 of genes to encode more fixed traits in the agent like its initial weights and the topology of its policy.
|
| 388 |
+
|
| 389 |
+
# 352 Broader Impact
|
| 390 |
+
|
| 391 |
+
Simulating the key processes that generated life and intelligence in nature is a promising path to further our understanding in this field and unlock ever more intelligent algorithms able to solve useful problems for the world. However, embodying AI with the goal to survive and self-reproduce can be dangerous, and should never be done outside of a sand-boxed environment.
|
| 392 |
+
|
| 393 |
+
# References
|
| 394 |
+
|
| 395 |
+
[1] David Ackley and Michael Littman. Interactions between learning and evolution. Artificial life II, 10:487–509, 1991.
|
| 396 |
+
[2] BURT Austin, Robert Trivers, and Austin Burt. Genes in conflict: the biology of selfish genetic elements. Harvard University Press, 2009.
|
| 397 |
+
[3] Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. arXiv preprint arXiv:1710.03748, 2017.
|
| 398 |
+
[4] Christopher Berner, Greg Brockman, Brooke Chan, Vicki Cheung, Przemysław D˛ebiak, Christy Dennison, David Farhi, Quirin Fischer, Shariq Hashme, Chris Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019.
|
| 399 |
+
[5] Wendelin Böhmer, Vitaly Kurin, and Shimon Whiteson. Deep coordination graphs. arXiv preprint arXiv:1910.00091, 2019. [6] Richard Dawkins. The selfish gene. 1976.
|
| 400 |
+
[7] Richard Dawkins. Twelve misunderstandings of kin selection. Zeitschrift für Tierpsychologie, 51(2):184–200, 1979.
|
| 401 |
+
[8] Stefan Elfwing, Eiji Uchibe, Kenji Doya, and Henrik I Christensen. Co-evolution of shaping rewards and meta-parameters in reinforcement learning. Adaptive Behavior, 16(6):400–412, 2008.
|
| 402 |
+
[9] Jakob N Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 403 |
+
[10] Andy Gardner and Francisco Úbeda. The meaning of intragenomic conflict. Nature ecology & evolution, 1(12):1807–1815, 2017.
|
| 404 |
+
[11] 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, pages 2672–2680, 2014.
|
| 405 |
+
[12] Carlos Guestrin, Daphne Koller, and Ronald Parr. Multiagent planning with factored mdps. In Advances in neural information processing systems, pages 1523–1530, 2002.
|
| 406 |
+
[13] Eric A Hansen, Daniel S Bernstein, and Shlomo Zilberstein. Dynamic programming for partially observable stochastic games. In AAAI, volume 4, pages 709–715, 2004.
|
| 407 |
+
[14] Nikolaus Hansen, Sibylle D Müller, and Petros Koumoutsakos. Reducing the time complexity of the derandomized evolution strategy with covariance matrix adaptation (cma-es). Evolutionary computation, 11(1):1–18, 2003.
|
| 408 |
+
[15] Nikolaus Hansen, Youhei Akimoto, and Petr Baudis. CMA-ES/pycma on Github. Zenodo, DOI:10.5281/zenodo.2559634, February 2019. URL https://doi.org/10.5281/zenodo. 2559634.
|
| 409 |
+
[16] Verena Heidrich-Meisner and Christian Igel. Evolution strategies for direct policy search. In International Conference on Parallel Problem Solving from Nature, pages 428–437. Springer, 2008.
|
| 410 |
+
|
| 411 |
+
96 [17] Verena Heidrich-Meisner and Christian Igel. Variable metric reinforcement learning methods applied to the noisy mountain car problem. In European Workshop on Reinforcement Learning, pages 136–150. Springer, 2008. [18] Verena Heidrich-Meisner and Christian Igel. Hoeffding and bernstein races for selecting policies in evolutionary direct policy search. In Proceedings of the 26th Annual International Conference on Machine Learning, pages 401–408. ACM, 2009. [19] Jelle R Kok, Eter Jan Hoen, Bram Bakker, and Nikos Vlassis. Utile coordination: Learning interdependencies among cooperative agents. In EEE Symp. on Computational Intelligence and Games, Colchester, Essex, pages 29–36, 2005. [20] Karol Kurach, Anton Raichuk, Piotr Stanczyk, Michał Zaj ˛ac, Olivier Bachem, Lasse Espeholt, ´ Carlos Riquelme, Damien Vincent, Marcin Michalski, Olivier Bousquet, et al. Google research football: A novel reinforcement learning environment. arXiv preprint arXiv:1907.11180, 2019. [21] Richard L Lewis, Satinder Singh, and Andrew G Barto. Where do rewards come from? In Proceedings of the International Symposium on AI-Inspired Biology, pages 2601–2606, 2010. [22] Ryan Lowe, Yi Wu, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multiagent actor-critic for mixed cooperative-competitive environments. In Advances in Neural Information Processing Systems, pages 6379–6390, 2017. [23] Simon M Lucas and Thomas P Runarsson. Temporal difference learning versus co-evolution for acquiring othello position evaluation. In 2006 IEEE Symposium on Computational Intelligence and Games, pages 52–59. IEEE, 2006. [24] Simon M Lucas and Julian Togelius. Point-to-point car racing: an initial study of evolution versus temporal difference learning. In 2007 iEEE symposium on computational intelligence and games, pages 260–267. IEEE, 2007. [25] 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. [26] Frans A. Oliehoek and Christopher Amato. A Concise Introduction to Decentralized POMDPs. SpringerBriefs in Intelligent Systems. Springer, May 2016. doi: 10.1007/978-3-319-28929-8. URL http://www.fransoliehoek.net/docs/OliehoekAmato16book.pdf. [27] Frans A Oliehoek, Shimon Whiteson, Matthijs TJ Spaan, et al. Approximate solutions for factored dec-pomdps with many agents. In AAMAS, pages 563–570, 2013. [28] Tabish Rashid, Mikayel Samvelyan, Christian Schroeder De Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. Qmix: monotonic value function factorisation for deep multi-agent reinforcement learning. arXiv preprint arXiv:1803.11485, 2018. [29] Craig W Reynolds. Competition, coevolution and the game of tag. In Proceedings of the Fourth International Workshop on the Synthesis and Simulation of Living Systems, pages 59–69, 1994. [30] Thomas Philip Runarsson and Simon M Lucas. Coevolution versus self-play temporal difference learning for acquiring position evaluation in small-board go. IEEE Transactions on Evolutionary Computation, 9(6):628–640, 2005. [31] David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419):1140–1144, 2018. [32] Karl Sims. Evolving 3d morphology and behavior by competition. Artificial life, 1(4):353–372, 1994. [33] Satinder Singh, Richard L Lewis, Andrew G Barto, and Jonathan Sorg. Intrinsically motivated reinforcement learning: An evolutionary perspective. IEEE Transactions on Autonomous Mental Development, 2(2):70–82, 2010.
|
| 412 |
+
|
| 413 |
+
[34] J Maynard Smith. Group selection and kin selection. Nature, 201(4924):1145, 1964.
|
| 414 |
+
|
| 415 |
+
[35] J Maynard Smith and George R Price. The logic of animal conflict. Nature, 246(5427):15, 1973.
|
| 416 |
+
|
| 417 |
+
[36] Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
|
| 418 |
+
|
| 419 |
+
[37] Joseph Suarez, Yilun Du, Phillip Isola, and Igor Mordatch. Neural mmo: A massively multiagent game environment for training and evaluating intelligent agents. arXiv preprint arXiv:1903.00784, 2019.
|
| 420 |
+
|
| 421 |
+
[38] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Valuedecomposition networks for cooperative multi-agent learning. arXiv preprint arXiv:1706.05296, 2017.
|
| 422 |
+
|
| 423 |
+
[39] Richard S Sutton, Andrew G Barto, et al. Introduction to reinforcement learning, volume 2. MIT press Cambridge, 1998.
|
| 424 |
+
|
| 425 |
+
[40] Elise Van der Pol and Frans A Oliehoek. Coordinated deep reinforcement learners for traffic light control. Proceedings of Learning, Inference and Control of Multi-Agent Systems (at NIPS 2016), 2016.
|
| 426 |
+
|
| 427 |
+
[41] Oriol Vinyals, Igor Babuschkin, Wojciech M Czarnecki, Michaël Mathieu, Andrew Dudzik, Junyoung Chung, David H Choi, Richard Powell, Timo Ewalds, Petko Georgiev, et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
|
| 428 |
+
|
| 429 |
+
[42] Shimon Whiteson and Peter Stone. Evolutionary function approximation for reinforcement learning. Journal of Machine Learning Research, 7(May):877–917, 2006.
|
| 430 |
+
|
| 431 |
+
[43] George C Williams. Adaptation and natural selection: a critique of some current evolutionary thought, volume 833082108. Princeton science library OCLC, 1966.
|
| 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]
|
| 437 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes]
|
| 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] (b) Did you include complete proofs of all theoretical results? [Yes]
|
| 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)? [No]
|
| 447 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 448 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No]
|
| 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]
|
| 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? [N/A] (b) Did you mention the license of the assets? [N/A] (c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 454 |
+
|
| 455 |
+
492 (d) Did you discuss whether and how consent was obtained from people whose data you’re
|
| 456 |
+
493 using/curating? [N/A]
|
| 457 |
+
494 (e) Did you discuss whether the data you are using/curating contains personally identifiable
|
| 458 |
+
495 information or offensive content? [N/A]
|
| 459 |
+
497 (a) Did you include the full text of instructions given to participants and screenshots, if
|
| 460 |
+
498 applicable? [N/A]
|
| 461 |
+
499 (b) Did you describe any potential participant risks, with links to Institutional Review
|
| 462 |
+
500 Board (IRB) approvals, if applicable? [N/A]
|
| 463 |
+
501 (c) Did you include the estimated hourly wage paid to participants and the total amount
|
| 464 |
+
502 spent on participant compensation? [N/A]
|
md/train/5jRVa89sZk/5jRVa89sZk.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EMPIRICAL ANALYSIS OF UNLABELED ENTITY PROBLEM IN NAMED ENTITY RECOGNITION
|
| 2 |
+
|
| 3 |
+
Yangming Li, Lemao Liu, & Shuming Shi Tencent AI Lab {newmanli,redmondliu,shumingshi}@tencent.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In many scenarios, named entity recognition (NER) models severely suffer from unlabeled entity problem, where the entities of a sentence may not be fully annotated. Through empirical studies performed on synthetic datasets, we find two causes of performance degradation. One is the reduction of annotated entities and the other is treating unlabeled entities as negative instances. The first cause has less impact than the second one and can be mitigated by adopting pretraining language models. The second cause seriously misguides a model in training and greatly affects its performances. Based on the above observations, we propose a general approach, which can almost eliminate the misguidance brought by unlabeled entities. The key idea is to use negative sampling that, to a large extent, avoids training NER models with unlabeled entities. Experiments on synthetic datasets and real-world datasets show that our model is robust to unlabeled entity problem and surpasses prior baselines. On well-annotated datasets, our model is competitive with the state-of-the-art method1.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Named entity recognition (NER) is an important task in information extraction. Previous methods typically cast it into a sequence labeling problem by adopting IOB tagging scheme (Mesnil et al., 2015; Huang et al., 2015; Ma & Hovy, 2016; Akbik et al., 2018; Qin et al., 2019). A representative model is Bi-LSTM CRF (Lample et al., 2016). The great success achieved by these methods benefits from massive correctly labeled data. However, in some real scenarios, not all the entities in the training corpus are annotated. For example, in some NER tasks (Ling & Weld, 2012), the datasets contain too many entity types or a mention may be associated with multiple labels. Since manual annotation on this condition is too hard, some entities are inevitably neglected by human annotators. Situations in distantly supervised NER (Ren et al., 2015; Fries et al., 2017) are even more serious. To reduce handcraft annotation, distant supervision (Mintz et al., 2009) is applied to automatically produce labeled data. As a result, large amounts of entities in the corpus are missed due to the limited coverage of knowledge resources. We refer this to unlabeled entity problem, which largely degrades performances of NER models.
|
| 12 |
+
|
| 13 |
+
There are several approaches used in prior works to alleviate this problem. Fuzzy CRF and AutoNER (Shang et al., 2018b) allow models to learn from the phrases that may be potential entities. However, since these phrases are obtained through a distantly supervised phrase mining method (Shang et al., 2018a), many unlabeled entities in the training data may still not be recalled. In the context of only resorting to unlabeled corpora and an entity ontology, Mayhew et al. (2019); Peng et al. (2019) employ positive-unlabeled (PU) learning (Li & Liu, 2005) to unbiasedly and consistently estimate the task loss. In implementations, they build distinct binary classifiers for different labels. Nevertheless, the unlabeled entities still impact the classifiers of the corresponding entity types and, importantly, the model can’t disambiguate neighboring entities. Partial CRF (Tsuboi et al., 2008) is an extension of commonly used CRF (Lafferty et al., 2001) that supports learning from incomplete annotations. Yang et al. (2018); Nooralahzadeh et al. (2019); Jie et al. (2019) use it to circumvent training with false negatives. However, as fully annotated corpora are still required to get ground truth training negatives, this approach is not applicable to the situations where little or even no high-quality data is available.
|
| 14 |
+
|
| 15 |
+
In this work, our goal is to study what are the impacts of unlabeled entity problem on the models and how to effectively eliminate them. Initially, we construct some synthetic datasets and introduce degradation rates. The datasets are constructed by randomly removing the annotated named entities in well-annotated datasets, e.g., CoNLL-2003 (Sang & De Meulder, 2003), with different probabilities. The degradation rates measure how severe an impact of unlabeled entity problem degrades the performances of models. Extensive studies are investigated on synthetic datasets. We find two causes: the reduction of annotated entities and treating unlabeled entities as negative instances. The first cause is obvious but has far fewer influences than the second one. Besides, it can be mitigated well by using a pretraining language model, like BERT (Devlin et al., 2019)), as the sentence encoder. The second cause seriously misleads the models in training and exerts a great negative impact on their performances. Even in less severe cases, it can sharply reduce the F1 score by about $2 0 \%$ . Based on the above observations, we propose a novel method that is capable of eliminating the misguidance of unlabeled entities in training. The core idea is to apply negative sampling that avoids training NER models with unlabeled entities.
|
| 16 |
+
|
| 17 |
+
Extensive experiments have been conducted to verify the effectiveness of our approach. Studies on synthetic datasets and real-world datasets (e.g., EC) show that our model well handles unlabeled entities and notably surpasses prior baselines. On well-annotated datasets (e.g., CoNLL-2003), our model is competitive with the state-of-the-art method.
|
| 18 |
+
|
| 19 |
+
# 2 PRELIMINARIES
|
| 20 |
+
|
| 21 |
+
In this section, we formally define the unlabeled entity problem and briefly describe a strong baseline, BERT Tagging (Devlin et al., 2019), used in empirical studies.
|
| 22 |
+
|
| 23 |
+
# 2.1 UNLABELED ENTITY PROBLEM
|
| 24 |
+
|
| 25 |
+
We denote an input sentence as $\mathbf { x } = [ x _ { 1 } , x _ { 2 } , \cdots , x _ { n } ]$ and the annotated named entity set as ${ \bf y } =$ $\{ y _ { 1 } , y _ { 2 } , \cdots , y _ { m } \}$ . $n$ is the sentence length and $m$ is the amount of entities. Each member $y _ { k }$ of set $\mathbf { y }$ is a tuple $( i _ { k } , j _ { k } , l _ { k } )$ . $( i _ { k } , j _ { k } )$ is the span of an entity which corresponds to the phrase $\mathbf { x } _ { i _ { k } , j _ { k } } = [ x _ { i _ { k } } , x _ { i _ { k } + 1 } , \cdot \cdot \cdot , x _ { j _ { k } } ]$ and $l _ { k }$ is its label. The unlabeled entity problem is defined as, due to the limited coverage of machine annotator or the negligence of human annotator, some ground truth entities $\widetilde { \mathbf { y } }$ of the sentence $\mathbf { x }$ are not covered by annotated entity set y.
|
| 26 |
+
|
| 27 |
+
For instance, given a sentence $\mathbf { x } = [ \mathrm { J a c k }$ , and, Mary, are, from, New, York] and a labeled entity set $\mathbf { y } = \{ ( 1 , 1 , \bar { \mathrm { P E R } } ) \}$ , unlabeled entity problem is that some entities, like $( \mathrm { 6 , \dot { 7 } , L O C ) }$ , are neglected by annotators. These unlabeled entities are denoted as $\widetilde { \mathbf { y } } = \{ ( 3 , 3 , \mathrm { P E R } ) , ( 6 , 7 , \mathrm { L O C } ) \}$ .
|
| 28 |
+
|
| 29 |
+
# 2.2 BERT TAGGING
|
| 30 |
+
|
| 31 |
+
BERT Tagging is present in Devlin et al. (2019), which adopts IOB tagging scheme, where each token $x _ { i }$ in a sentence $\mathbf { x }$ is labeled with a fine-grained tag, such as B-ORG, I-LOC, or O. Formally, its output is a $n$ -length label sequence $\mathbf { z } = [ z _ { 1 } , \bar { z } _ { 2 } , \cdot \cdot \cdot , z _ { n } ]$ .
|
| 32 |
+
|
| 33 |
+
Formally, BERT tagging firstly uses BERT to get the representation $\mathbf { h } _ { i }$ for every token $x _ { i }$
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
[ \mathbf { h } _ { 1 } , \mathbf { h } _ { 2 } , \cdot \cdot \cdot \mathbf { \nabla } , \mathbf { h } _ { n } ] = \mathrm { B E R T } ( \mathbf { x } ) .
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
Then, the label distribution $\mathbf { q } _ { i }$ is computed as $\mathrm { S o f t m a x } ( \mathbf { W } \mathbf { h } _ { i } )$ . In training, the loss is induced as $\begin{array} { r } { \sum _ { 1 \leq i \leq n } - \log { \mathbf q } _ { i } [ z _ { i } ] } \end{array}$ . At test time, it obtains the label for each token $x _ { i }$ by arg max $\mathbf { q } _ { i }$ .
|
| 40 |
+
|
| 41 |
+
# 3 EMPIRICAL STUDIES
|
| 42 |
+
|
| 43 |
+
To understand the impacts of unlabeled entity problem, we conduct empirical studies over multiple synthetic datasets, different methods, and various metrics.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 1: The empirical studies conducted on CoNLL-2003 dataset.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 2: The empirical studies investigated on OntoNotes 5.0 dataset.
|
| 50 |
+
|
| 51 |
+
# 3.1 PREPARATIONS
|
| 52 |
+
|
| 53 |
+
Synthetic Datasets. We use synthetic datasets to simulate poorly-annotated datasets that contain unlabeled entities. They are obtained by randomly removing the labeled entities of well-annotated datasets with different masking probabilities $p$ . The material datasets are CoNLL-2003 (Sang & De Meulder, 2003) and OntoNotes 5.0 (Pradhan et al., 2013). The probabilities $p$ are respectively set as $0 . 0 , 0 . 1 , 0 . 2 , \cdots , 0 . 9$ . In this way, $2 \times 1 0$ synthetic datasets are constructed.
|
| 54 |
+
|
| 55 |
+
Methods. We adopt two models. One of them is BERT Tagging, which has long been regarded as a strong baseline. The other is LSTM Tagging that replaces the original encoder (i.e., BERT) of BERT Tagging with LSTM (Hochreiter & Schmidhuber, 1997). We use it to study the effect of using pretraining language model. To explore the negative impact brought by unlabeled entities in training, we present an adjusted training loss for above two models:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\Big ( \sum _ { 1 \leq i \leq n } - \log \mathbf { q } _ { i } [ z _ { i } ] \Big ) - \Big ( \sum _ { ( i ^ { \prime } , j ^ { \prime } , l ^ { \prime } ) \in \widetilde { \mathbf { y } } } \sum _ { i ^ { \prime } \leq k \leq j ^ { \prime } } - \log \mathbf { q } _ { k } [ z _ { k } ] \Big ) .
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
The idea here is to remove the incorrect loss incurred by unlabeled entities. Note that missed entity set $\widetilde { \mathbf { y } }$ is reachable in synthetic datasets but unknown in real-world datasets.
|
| 62 |
+
|
| 63 |
+
Metrics. Following prior works, the F1 scores of models are tested by using conlleval script2. We also design two degradation rates to measure the different impacts of unlabeled entity problem. One is erosion rate $\alpha _ { p }$ and the other is misguidance rate $\beta _ { p }$ :
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\alpha _ { p } = \frac { f _ { 0 } ^ { a } - f _ { p } ^ { a } } { f _ { 0 } ^ { a } } , \beta _ { p } = \frac { f _ { p } ^ { a } - f _ { p } } { f _ { p } ^ { a } } .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
For a synthetic dataset with the masking probability being $p$ , $f _ { p }$ and $f _ { p } ^ { a }$ are the F1 scores of a model and its adjusted version, respectively. Note that $f _ { 0 } ^ { \alpha }$ corresponds to $p \bar { = } 0$ . Erosion rate $\alpha _ { p }$ measures how severely the reduction of annotated entities degrades the F1 scores of a model. Misguidance rate $\beta _ { p }$ measures how seriously unlabeled entities misguide the model in training.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 3: This demonstrates how our model scores possible entities.
|
| 73 |
+
|
| 74 |
+
# 3.2 OVERALL ANALYSIS
|
| 75 |
+
|
| 76 |
+
The left parts of Fig. 1 and Fig. 2 show the results of empirical studies, where we evaluate the F1 scores of BERT Tagging and LSTM Tagging on 20 synthetic datasets. From them, we can draw the following observations. Firstly, the significant downward trends of solid lines confirm the fact that NER models severely suffer from unlabeled entity problem. For example, by setting the masking probability as 0.4, the performance of LSTM Tagging decreases by $3 3 . 0 1 \%$ on CoNLL2003 and $1 9 . 5 8 \%$ on OntoNotes 5.0. Secondly, in contrast, the dashed lines change very slowly, indicating that the models with adjusted training loss (see Eq. (2)) are much less influenced by the issue. For instance, when masking probability is 0.7, adopting adjusted loss preserves the F1 scores of BERT Tagging by $4 1 . 0 4 \%$ on CoNLL-2003 and $5 7 . 3 8 \%$ on OntoNotes 5.0. Lastly, for high masking probabilities, even though the negative impact of unlabeled entities is eliminated by adjusting the training loss, the performance still declines to a certain extent. For example, when masking probability is set as 0.8, the F1 scores of adjusted LSTM Tagging decrease by $3 1 . 6 4 \%$ on CoNLL-2003 and $1 7 . 2 2 \%$ on OntoNotes 5.0.
|
| 77 |
+
|
| 78 |
+
Reduction of Annotated Entities. From the last observation, we can infer that a cause of performance degradation is the reduction of annotated entities. In the middle parts of Fig. 1 and Fig. 2, we plot the change of erosion rates $\alpha _ { p }$ (see Eq. (2)) with respect to masking probabilities. We can see that its impact is not very serious when in low masking probabilities but can’t be neglected when in high ones. Besides, using pre-training language models greatly mitigates the issue. As an example, when the probability is 0.8, on both CoNLL-2003 and OntoNotes 5.0, the erosion rates of adjusted BERT Tagging are only about half of those of adjusted LSTM Tagging.
|
| 79 |
+
|
| 80 |
+
Misguidance of Unlabeled Entities. From the last two observations, we can conclude that the primary cause is treating unlabeled entities as negative instances, which severely misleads the models during training. To better understand it, in the right parts of Fig. 1 and Fig. 2, we plot the change of misguidance rates $\beta _ { p }$ (see Eq. (3)) with masking probabilities. These rates are essentially the percentage decreases of F1 scores. From them, we can see that the impact of misguidance is very much serious even when in low masking probabilities.
|
| 81 |
+
|
| 82 |
+
# 4 METHODOLOGY
|
| 83 |
+
|
| 84 |
+
Motivated by Sec. 3.2, we present a model that is robust to unlabeled entities.
|
| 85 |
+
|
| 86 |
+
# 4.1 SCORING MODEL WITH BERT
|
| 87 |
+
|
| 88 |
+
Based on the findings in Sec. 3.2, we use BERT as the default encoder to mitigate the reduction of annotated entities. Specifically, given a sentence $\mathbf { x }$ , we firstly obtain the token representations $\mathbf { h } _ { i }$ with Eq. (1). Then, we get the representation for every phrase $\mathbf { x } _ { i , j }$ as
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathbf { s } _ { i , j } = \mathbf { h } _ { i } \oplus \mathbf { h } _ { j } \oplus \left( \mathbf { h } _ { i } - \mathbf { h } _ { j } \right) \oplus \big ( \mathbf { h } _ { i } \odot \mathbf { h } _ { j } \big ) ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $\oplus$ is column-wise vector concatenation and $\odot$ is element-wise vector product. The design here is mainly inspired by Chen et al. (2017).
|
| 95 |
+
|
| 96 |
+
Finally, multi-layer perceptron (MLP) computes the label distribution $\mathbf { o } _ { i , j }$ for a span $( i , j )$
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array} { r } { \mathbf { o } _ { i , j } = \mathrm { S o f t m a x } ( \mathbf { U } \operatorname { t a n h } ( \mathbf { V } \mathbf { s } _ { i , j } ) ) . } \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
The term $\mathbf { o } _ { i , j } [ l ]$ is the predicted score for an entity $( i , j , l )$ .
|
| 103 |
+
|
| 104 |
+
# 4.2 TRAINING VIA NEGATIVE SAMPLING
|
| 105 |
+
|
| 106 |
+
From Sec. 3.2, we know that regarding all the unlabeled spans as negative instances certainly degrades the performances of models, since some of them may be missed entities. Our solution to this issue is negative sampling. Specifically, we randomly sample a small subset of unlabeled spans as the negative instances to induce the training loss.
|
| 107 |
+
|
| 108 |
+
Given the annotated entity set $\mathbf { y }$ , we firstly get all the negative instance candidates as
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\{ ( i , j , 0 ) \mid ( i , j , l ) \not \in { \bf y } , 1 \leq i \leq j \leq n , l \in \mathcal { L } \} ,
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\mathcal { L }$ is the label space and O is the label for non-entity spans.
|
| 115 |
+
|
| 116 |
+
Then, we uniformly sample a subset $\widehat { \mathbf { y } }$ from the whole candidate set. The size of sample set $\widehat { \mathbf { y } }$ is $\lceil \lambda * n \rceil , 0 < \lambda < 1$ , where $\left\lceil \right\rceil$ b is the ceiling function.
|
| 117 |
+
|
| 118 |
+
Ultimately, a span-level cross entropy loss used for training is incurred as
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\Big ( \sum _ { ( i , j , l ) \in \mathbf { y } } - \log ( \mathbf { o } _ { i , j } [ l ] ) \Big ) + \Big ( \sum _ { ( i ^ { \prime } , j ^ { \prime } , l ^ { \prime } ) \in \widehat { \mathbf { y } } } - \log \bigl ( \mathbf { o } _ { i ^ { \prime } , j ^ { \prime } } [ l ^ { \prime } ] \bigr ) \Big ) .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
Negative sampling incorporates some randomness into the training loss, which reduces the risk of training a NER model with unlabeled entities.
|
| 125 |
+
|
| 126 |
+
# 4.3 INFERENCE
|
| 127 |
+
|
| 128 |
+
At test time, firstly, the label for every span $( i , j )$ is obtained by $\mathrm { \ a r g m a x } _ { l } \mathbf { o } _ { i , j } [ l ]$ . Then, we select the ones whose label $l$ is not $\mathrm { O }$ as predicted entities. When the spans of inferred entities intersects, we preserve the one with the highest predicted score and discard the others.
|
| 129 |
+
|
| 130 |
+
The time complexity of inference is $\mathcal { O } ( n ^ { 2 } )$ , which is majorly contributed by the span selection procedure. While this seems a bit higher compared with our counterparts, we find that, in practical use, its running time is far less than that of the forward computation of neural networks. The algorithm for inference is greedy yet effective. In experiments, we find that the probability of our heuristic selecting a wrong labeled span when resolving the span conflict is very low.
|
| 131 |
+
|
| 132 |
+
# 5 DISCUSSION
|
| 133 |
+
|
| 134 |
+
We show that, through negative sampling, the probability of not treating a specific missed entity in a $n$ -length sentence as the negative instance is larger than $\textstyle 1 - { \frac { 2 } { n - 3 } }$ :
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\begin{array} { l } { { \displaystyle \prod _ { 0 \le i < \lceil \lambda n \rceil } \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - m - i } \right) > \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - m - \lceil \lambda n \rceil } \right) ^ { \lceil \lambda n \rceil } } } \\ { { \displaystyle \qquad > \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - n - n } \right) ^ { n } \ge \left( 1 - n * \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - n - n } \right) = 1 - \frac { 2 } { n - 3 } } } \end{array} .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
Herand e n(n+1)2 − m is the amount of negative candidates. Besides, we use the facts, λ < 1, m ≤ n, $( 1 - \bar { z } ) ^ { n } \geq 1 - n z , 0 \leq z \leq 1$ , during the derivation.
|
| 141 |
+
|
| 142 |
+
Note that the above bound is only applicable to the special case where there is just one unlabeled entity in a sentence. We remain the strict proof for general cases to future work.
|
| 143 |
+
|
| 144 |
+
# 6 EXPERIMENTS
|
| 145 |
+
|
| 146 |
+
We have conducted extensive experiments on multiple datasets to verify the effectiveness of our method. Studies on synthetic datasets show that our model can almost eliminate the misguidance
|
| 147 |
+
|
| 148 |
+
Table 1: The experiment results on two synthetic datasets.
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan="2">Masking Prob.</td><td colspan="2">CoNLL-2003</td><td colspan="2">OntoNotes 5.0</td></tr><tr><td>BERT Tagging</td><td>Our Model</td><td>BERT Tagging</td><td>Our Model</td></tr><tr><td>0.1</td><td>90.71</td><td>91.37</td><td>87.69</td><td>89.20</td></tr><tr><td>0.2</td><td>89.57</td><td>91.25</td><td>86.86</td><td>89.15</td></tr><tr><td>0.3</td><td>88.95</td><td>90.53</td><td>84.75</td><td>88.73</td></tr><tr><td>0.4</td><td>82.94</td><td>89.73</td><td>82.55</td><td>88.20</td></tr><tr><td>0.5</td><td>78.99</td><td>89.22</td><td>71.07</td><td>88.17</td></tr><tr><td>0.6</td><td>63.84</td><td>87.65</td><td>58.17</td><td>87.53</td></tr></table>
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: The misguidance rates of BERT Tagging and our model.
|
| 154 |
+
|
| 155 |
+
brought by unlabeled entities in training. On real-world datasets, our model has notably outperformed prior baselines and achieved the state-of-the-art performances. On well-annotated datasets, our model is competitive to current state-of-the-art method.
|
| 156 |
+
|
| 157 |
+
# 6.1 SETTINGS
|
| 158 |
+
|
| 159 |
+
The setup of synthetic datasets and well-annotated datasets are the same as what we describe in Sec. 3.1. For real-world datasets, we use EC and NEWS, both of which are collected by Yang et al. (2018). EC is in e-commerce domain, which has 5 entity types: Brand, Product, Model, Material, and Specification. The data contains 2400 sentences tagged by human annotators and are divided into three parts: 1200 for training, 400 for dev, and 800 for testing. Yang et al. (2018) also construct an entity dictionary of size 927 and apply distant supervision on a raw corpus to obtain additional 2500 sentences for training. NEWS is from MSRA dataset (Levow, 2006). Yang et al. (2018) only adopt the PERSON entity type. Training data of size 3000, dev data of size 3328, and testing data of size 3186 are all sampled from MSRA. They collect an entity dictionary of size 71664 and perform distant supervision on the rest data to obtain extra 3722 training cases by using the dictionary. Both EC and NEWS contain a large amount of incompletely annotated sentences, and hence naturally suffer from the unlabeled entity problem.
|
| 160 |
+
|
| 161 |
+
We adopt the same hyper-parameter configurations of neural networks for all the datasets. L2 regularization and dropout ratio are respectively set as $1 \times 1 0 ^ { - 5 }$ and 0.4 for reducing overfit. The dimension of scoring layers is 256. Ratio $\lambda$ is set as 0.35. When the sentence encoder is LSTM, we set the hidden dimension as 512 and use pretrained word embeddings (Pennington et al., 2014; Song et al., 2018) to initialize word representations. We utilize Adam (Kingma & Ba, 2014) as the optimization algorithm and adopt the suggested hyper-parameters. At evaluation time, we convert the predictions of our models into IOB format and use conlleval script to compute the F1 score. In all the experiments, the improvements of our models over the baselines are statistically significant with rejection probabilities smaller than 0.05.
|
| 162 |
+
|
| 163 |
+
Table 2: The experiment results on two well-annotated datasets.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Method</td><td>CoNLL-2003</td><td>OntoNotes 5.0</td></tr><tr><td>FlairEmbedding (Akbik etal., 2018)</td><td>93.09</td><td>89.3</td></tr><tr><td>BERT-MRC(Li etal.,2020a)</td><td>93.04</td><td>91.11</td></tr><tr><td>HCR w/BERT (Luo et al., 2020)</td><td>93.37</td><td>90.30</td></tr><tr><td>BERT-Biaffine Model (Yu etal., 2020)</td><td>93.5</td><td>91.3</td></tr><tr><td>Our Model</td><td>93.42</td><td>90.59</td></tr></table>
|
| 166 |
+
|
| 167 |
+
Table 3: The experiment results on two real-world datasets.
|
| 168 |
+
|
| 169 |
+
<table><tr><td colspan="2">Method</td><td>EC</td><td>NEWS</td></tr><tr><td rowspan="6">Yang et al. (2018)</td><td>String Matching via Ontology</td><td>44.02</td><td>47.75</td></tr><tr><td>BiLSTM+CRF</td><td>54.59</td><td>69.09</td></tr><tr><td>BiLSTM+CRFw/RL</td><td>56.23</td><td>73.19</td></tr><tr><td>BiLSTM+PartialCRF</td><td>60.08</td><td>78.38</td></tr><tr><td>BiLSTM+Partial CRF w/RL</td><td>61.45</td><td>79.22</td></tr><tr><td>WeightedPartial CRF</td><td>61.75</td><td>78.64</td></tr><tr><td>Jie et al. (2019) Nooralahzadeh et al. (2019)</td><td>BiLSTM+Partial CRFw/RL</td><td>63.56</td><td>80.04</td></tr><tr><td rowspan="2">This Work</td><td>OurModel</td><td>66.17</td><td>85.39</td></tr><tr><td>OurModel w/o BERT,w/BiLSTM</td><td>64.68</td><td>82.11</td></tr></table>
|
| 170 |
+
|
| 171 |
+
# 6.2 RESULTS ON SYNTHETIC DATASETS
|
| 172 |
+
|
| 173 |
+
In this section, our model is compared with BERT Tagging on the synthetic datasets of the masking probabilities being $0 . 1 , 0 . 2 , \cdots , 0 . 6$ . From Table 1, we can get two conclusions. Firstly, our model significantly outperforms BERT Tagging, especially in high masking probabilities. For example, on CoNLL-2003, our F1 scores outnumber those of BERT Tagging by $1 . 8 8 \%$ when the probability is 0.2 and $2 7 . 1 6 \%$ when the probability is 0.6. Secondly, our model is very robust to the unlabeled entity problem. When increasing the masking probability from 0.1 to 0.5, the results of our model only decrease by $2 . 3 5 \%$ on CoNLL-2003 and $1 . 9 1 \%$ on OntoNotes 5.0.
|
| 174 |
+
|
| 175 |
+
Fig. 4 demonstrates the misguidance rate comparisons between BERT Tagging and our models. The way to adjust our model is reformulating Eq. (7) by defining the negative term via $\{ ( i , j , \mathrm { O } ) \mid \forall l :$ $( i , j , l ) \not \in { \bf y } \cup \widetilde { { \bf y } } \}$ rather than the negatively sampled $\hat { \mathbf { y } }$ . The idea here is to avoid the unlabeled entities being sampled. From Fig. 4, we can discover that, in all masking probabilities, the misguidance rates of our model are far smaller than those of BERT Tagging and are consistently lower than $2 . 5 0 \%$ . These indicate that, in training, our model indeed eliminates the misguidance brought by unlabeled entities to some extent.
|
| 176 |
+
|
| 177 |
+
# 6.3 RESULTS ON FULLY ANNOTATED DATASETS
|
| 178 |
+
|
| 179 |
+
We additionally apply our model with negative sampling on the well-annotated datasets where the issue of incomplete entity annotation is not serious. As shown in Table 2, the F1 scores of our model are very close to current best results. Our model slightly underperforms BERT-Biaffine Model by only $0 . { \dot { 0 } } 9 \%$ on CoNLL-2003 and $0 . 7 8 \%$ on OntoNotes 5.0. Besides, our model surpasses many other strong baselines. On OntoNotes 5.0, our model outperforms HCR w/ BERT by $0 . 3 2 \%$ and Flair Embedding by $1 . 4 4 \%$ . On CoNLL-2003, the improvements of F1 scores are $0 . 4 1 \%$ over BERT-MRC and $0 . 3 5 \%$ over Flair Embedding. All these results indicate that our model is still very effective when applied to high-quality data.
|
| 180 |
+
|
| 181 |
+
# 6.4 RESULTS ON REAL-WORLD DATASETS
|
| 182 |
+
|
| 183 |
+
For two real-world datasets, a large portion of training data is obtained via distant supervision. As stated in Yang et al. (2018), the F1 scores of string matching through an entity dictionary are notably declined in terms of the low recall scores, although its precision scores are higher than those of other methods. Therefore, unlabeled entity problem is serious in the datasets. As shown in Table 3, the baselines come from three works (Yang et al., 2018; Nooralahzadeh et al., 2019; Jie et al.,
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
Figure 5: The results of our models with different ratio $\lambda$ on synthetic datasets.
|
| 187 |
+
|
| 188 |
+
Table 4: The PCCs between F1 score and degradation rates.
|
| 189 |
+
|
| 190 |
+
<table><tr><td rowspan="2">Metric</td><td colspan="2">CoNLL-2003</td><td colspan="2">OntoNotes 5.0</td></tr><tr><td>BERTTagging</td><td>LSTMTagging</td><td>BERTTagging</td><td>LSTM Tagging</td></tr><tr><td>Erosion Rate αp</td><td>-0.94</td><td>-0.90</td><td>-0.85</td><td>-0.82</td></tr><tr><td>Misguidance Rate βp</td><td>-1.00</td><td>-0.96</td><td>-1.00</td><td>-0.98</td></tr></table>
|
| 191 |
+
|
| 192 |
+
2019). Yang et al. (2018) use Partial CRF to circumvent all possible unlabeled entities and utilize reinforcement learning (RL) to adaptively skip noisy annotation. Jie et al. (2019) and Nooralahzadeh et al. (2019) respectively improve Partial CRF and the policy of RL. All the F1 scores of baselines are copied from Yang et al. (2018); Nooralahzadeh et al. (2019), except for that of Weighted Partial CRF, which is obtained by rerunning its open-source code3.
|
| 193 |
+
|
| 194 |
+
Our model has significantly outperformed prior baselines and obtained new state-of-the-art results. Compared with prior best model (Nooralahzadeh et al., 2019), we achieve the improvements of $3 . 9 4 \%$ on EC and $6 . 2 7 \%$ on NEWS. Compared with strong baseline, BiLSTM $^ +$ Partial CRF, the increases of F1 scores are $9 . 2 0 \%$ and $8 . 2 \bar { 1 } \%$ . To make fair comparisons, we replace BERT with LSTM. Even so, we still outperform (Nooralahzadeh et al., 2019) by $1 . 7 6 \%$ on EC and $2 . 5 2 \%$ on NEWS. All these strongly confirm the effectiveness of our model.
|
| 195 |
+
|
| 196 |
+
# 6.5 RATIO $\lambda$ IN NEGATIVE SAMPLING
|
| 197 |
+
|
| 198 |
+
Intuitively, setting ratio $\lambda$ (see Sec. 4.2) as too large values or too small values both are inappropriate. Large ratios increase the risks of training negatives containing unlabeled entities. Small ratios reduce the number of negative instances used for training, leading to underfitting. Fig. 5 shows the experiments on some synthetic datasets with the ratio $\lambda$ of our method being $0 . 1 , 0 . 2 , \cdots , 0 . 9$ . From it, we can see that all the score curves are roughly arched, which verifies our intuition. Besides, we find that $0 . 3 < \lambda < 0 . 4$ performs well in all the cases.
|
| 199 |
+
|
| 200 |
+
# 6.6 VALIDITY OF DEGRADATION RATES
|
| 201 |
+
|
| 202 |
+
As Table 4 shows, we use Pearson’s correlation coefficient (PCC) to measure the statistical correlations between degradation rates (e.g., misguidance rate $\beta _ { p }$ ) and the F1 score. We can see that the correlation scores are generally close to $- 1$ . For example, for LSTM Tagging, on the synthetic datasets built from CoNLL-2003, the correlation score of erosion rate $\alpha _ { p }$ is $- 0 . 9 0$ and that of misguidance rate $\beta _ { p }$ is $- 0 . 9 6$ . The results indicate that not only degradation rates quantify specific impacts of unlabeled entities but also their negative values change synchronously with the F1 score. We conclude that degradation rates are appropriate metrics for evaluation.
|
| 203 |
+
|
| 204 |
+
# 7 RELATED WORK
|
| 205 |
+
|
| 206 |
+
NER is a classical task in information extraction. Previous works commonly treat it as a sequence labeling problem by using IOB tagging scheme (Huang et al., 2015; Akbik et al., 2018; Luo et al., 2020; Li et al., 2020b;c). Each word in the sentence is labeled as B-tag if it is the beginning of an entity, I-tag if it’s inside but not the first one within the entity, or O otherwise. This approach is extensively studied in prior works. For example, Akbik et al. (2018) propose Flair Embedding that pretrains character embedding in large corpora and uses it rather than token representations to represent a sentence. Recently, there is a growing interest in span-based models (Li et al., 2020a; Yu et al., 2020). They treat the spans, instead of single words, as the basic units for labeling. For example, Li et al. (2020a) present BERT-MRC that regards NER as a MRC task, where named entities are extracted as retrieving answer spans. Span-based models are also prevalent in language modeling (Li et al., 2020d), syntactic analysis (Stern et al., 2017), etc.
|
| 207 |
+
|
| 208 |
+
In some practical applications (e.g., fine-grained NER (Zhang et al., 2020)), NER models are faced with unlabeled entity problem, where the unlabeled entities seriously degrade the performances of models. Several approaches to this issue have been proposed. Fuzzy CRF and AutoNER (Shang et al., 2018b) allow learning from high-quality phrases. However, since these phrases are obtained through distant supervision, the unlabeled entities in the corpora may still be missed. PU learning (Peng et al., 2019; Mayhew et al., 2019) unbiasedly and consistently estimates the training loss. Nevertheless, the unlabeled entities still impact the classifiers of the corresponding entity types and, importantly, the model can’t disambiguate neighboring entities. Partial CRF (Yang et al., 2018; Jie et al., 2019) supports learning from incomplete annotations. However, because fully annotated corpora are still needed to training models with true negative instances, this type of approach is not applicable to the situations where no high-quality data is available.
|
| 209 |
+
|
| 210 |
+
# 8 CONCLUSION
|
| 211 |
+
|
| 212 |
+
In this work, we study what are the impacts of unlabeled entities on NER models and how to effectively eliminate them. Through empirical studies performed on synthetic datasets, we find two causes: the reduction of annotated entities and treating unlabeled entities as training negatives. The first cause has fewer influences than the second one and can be mitigated by adopting pretraining language models. The second cause seriously misleads the models in training and greatly affects their performances. Based on the above observations, we propose a novel method that is capable of eliminating the misguidance of unlabeled entities during training. The core idea is to apply negative sampling that avoids training NER models with unlabeled entities. Experiments on synthetic datasets and real-world datasets demonstrate that our model handles unlabeled entities well and significantly outperforms previous baselines. On well-annotated datasets, our model is competitive with the existing state-of-the-art approach.
|
| 213 |
+
|
| 214 |
+
# REFERENCES
|
| 215 |
+
|
| 216 |
+
Alan Akbik, Duncan Blythe, and Roland Vollgraf. Contextual string embeddings for sequence labeling. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 1638–1649, 2018.
|
| 217 |
+
|
| 218 |
+
Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced LSTM for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1657–1668, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1152. URL https: //www.aclweb.org/anthology/P17-1152.
|
| 219 |
+
|
| 220 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https: //www.aclweb.org/anthology/N19-1423.
|
| 221 |
+
|
| 222 |
+
Jason Fries, Sen Wu, Alex Ratner, and Christopher Re. Swellshark: A generative model for biomed-´ ical named entity recognition without labeled data. arXiv preprint arXiv:1704.06360, 2017.
|
| 223 |
+
|
| 224 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 225 |
+
|
| 226 |
+
Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015.
|
| 227 |
+
|
| 228 |
+
Zhanming Jie, Pengjun Xie, Wei Lu, Ruixue Ding, and Linlin Li. Better modeling of incomplete annotations for named entity recognition. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 729–734, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1079. URL https://www.aclweb.org/anthology/N19-1079.
|
| 229 |
+
|
| 230 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 231 |
+
|
| 232 |
+
John Lafferty, Andrew McCallum, and Fernando CN Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 2001.
|
| 233 |
+
|
| 234 |
+
Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. Neural architectures for named entity recognition. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 260–270, San Diego, California, June 2016. Association for Computational Linguistics. doi: 10.18653/v1/N16-1030. URL https://www.aclweb.org/anthology/ N16-1030.
|
| 235 |
+
|
| 236 |
+
Gina-Anne Levow. The third international chinese language processing bakeoff: Word segmentation and named entity recognition. In Proceedings of the Fifth SIGHAN Workshop on Chinese Language Processing, pp. 108–117, 2006.
|
| 237 |
+
|
| 238 |
+
Xiao-Li Li and Bing Liu. Learning from positive and unlabeled examples with different data distributions. In European conference on machine learning, pp. 218–229. Springer, 2005.
|
| 239 |
+
|
| 240 |
+
Xiaoya Li, Jingrong Feng, Yuxian Meng, Qinghong Han, Fei Wu, and Jiwei Li. A unified MRC framework for named entity recognition. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 5849–5859, Online, July 2020a. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.519. URL https: //www.aclweb.org/anthology/2020.acl-main.519.
|
| 241 |
+
|
| 242 |
+
Yangming Li, Han Li, Kaisheng Yao, and Xiaolong Li. Handling rare entities for neural sequence labeling. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6441–6451, Online, July 2020b. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.574. URL https://www.aclweb.org/anthology/2020. acl-main.574.
|
| 243 |
+
|
| 244 |
+
Yangming Li, Lemao Liu, and Shuming Shi. Segmenting natural language sentences via lexical unit analysis. arXiv preprint arXiv:2012.05418, 2020c.
|
| 245 |
+
|
| 246 |
+
Yangming Li, Kaisheng Yao, Libo Qin, Shuang Peng, Yijia Liu, and Xiaolong Li. Span-based neural buffer: Towards efficient and effective utilization of long-distance context for neural sequence models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 8277– 8284, 2020d.
|
| 247 |
+
|
| 248 |
+
Xiao Ling and Daniel S Weld. Fine-grained entity recognition. In AAAI, volume 12, pp. 94–100, 2012.
|
| 249 |
+
|
| 250 |
+
Ying Luo, Fengshun Xiao, and Hai Zhao. Hierarchical contextualized representation for named entity recognition. In AAAI, pp. 8441–8448, 2020.
|
| 251 |
+
|
| 252 |
+
Xuezhe Ma and Eduard Hovy. End-to-end sequence labeling via bi-directional LSTM-CNNs-CRF. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1064–1074, Berlin, Germany, August 2016. Association for Computational Linguistics. doi: 10.18653/v1/P16-1101. URL https://www.aclweb.org/ anthology/P16-1101.
|
| 253 |
+
|
| 254 |
+
Stephen Mayhew, Snigdha Chaturvedi, Chen-Tse Tsai, and Dan Roth. Named entity recognition with partially annotated training data. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pp. 645–655, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/K19-1060. URL https://www.aclweb.org/anthology/K19-1060.
|
| 255 |
+
|
| 256 |
+
G. Mesnil, Y. Dauphin, K. Yao, Y. Bengio, L. Deng, D. Hakkani-Tur, X. He, L. Heck, G. Tur, D. Yu, and G. Zweig. Using recurrent neural networks for slot filling in spoken language understanding. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 23(3):530–539, 2015. doi: 10.1109/TASLP.2014.2383614.
|
| 257 |
+
|
| 258 |
+
Mike Mintz, Steven Bills, Rion Snow, and Dan Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, pp. 1003–1011, 2009.
|
| 259 |
+
|
| 260 |
+
Farhad Nooralahzadeh, Jan Tore Lønning, and Lilja Øvrelid. Reinforcement-based denoising of distantly supervised ner with partial annotation. In Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP (DeepLo 2019), pp. 225–233, 2019.
|
| 261 |
+
|
| 262 |
+
Minlong Peng, Xiaoyu Xing, Qi Zhang, Jinlan Fu, and Xuanjing Huang. Distantly supervised named entity recognition using positive-unlabeled learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2409–2419, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1231. URL https: //www.aclweb.org/anthology/P19-1231.
|
| 263 |
+
|
| 264 |
+
Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014.
|
| 265 |
+
|
| 266 |
+
Sameer Pradhan, Alessandro Moschitti, Nianwen Xue, Hwee Tou Ng, Anders Bjorkelund, Olga ¨ Uryupina, Yuchen Zhang, and Zhi Zhong. Towards robust linguistic analysis using ontonotes. In Proceedings of the Seventeenth Conference on Computational Natural Language Learning, pp. 143–152, 2013.
|
| 267 |
+
|
| 268 |
+
Libo Qin, Wanxiang Che, Yangming Li, Haoyang Wen, and Ting Liu. A stack-propagation framework with token-level intent detection for spoken language understanding. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 2078– 2087, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1214. URL https://www.aclweb.org/anthology/D19-1214.
|
| 269 |
+
|
| 270 |
+
Xiang Ren, Ahmed El-Kishky, Chi Wang, Fangbo Tao, Clare R Voss, and Jiawei Han. Clustype: Effective entity recognition and typing by relation phrase-based clustering. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 995–1004, 2015.
|
| 271 |
+
|
| 272 |
+
Erik F Sang and Fien De Meulder. Introduction to the conll-2003 shared task: Languageindependent named entity recognition. arXiv preprint cs/0306050, 2003.
|
| 273 |
+
|
| 274 |
+
Jingbo Shang, Jialu Liu, Meng Jiang, Xiang Ren, Clare R Voss, and Jiawei Han. Automated phrase mining from massive text corpora. IEEE Transactions on Knowledge and Data Engineering, 30 (10):1825–1837, 2018a.
|
| 275 |
+
|
| 276 |
+
Jingbo Shang, Liyuan Liu, Xiaotao Gu, Xiang Ren, Teng Ren, and Jiawei Han. Learning named entity tagger using domain-specific dictionary. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2054–2064, Brussels, Belgium, OctoberNovember 2018b. Association for Computational Linguistics. doi: 10.18653/v1/D18-1230. URL https://www.aclweb.org/anthology/D18-1230.
|
| 277 |
+
|
| 278 |
+
Yan Song, Shuming Shi, Jing Li, and Haisong Zhang. Directional skip-gram: Explicitly distinguishing left and right context for word embeddings. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 175–180, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2028. URL https://www.aclweb.org/anthology/N18-2028.
|
| 279 |
+
|
| 280 |
+
Mitchell Stern, Jacob Andreas, and Dan Klein. A minimal span-based neural constituency parser. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 818–827, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1076. URL https://www.aclweb.org/anthology/ P17-1076.
|
| 281 |
+
|
| 282 |
+
Yuta Tsuboi, Hisashi Kashima, Shinsuke Mori, Hiroki Oda, and Yuji Matsumoto. Training conditional random fields using incomplete annotations. In Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008), pp. 897–904, 2008.
|
| 283 |
+
|
| 284 |
+
Yaosheng Yang, Wenliang Chen, Zhenghua Li, Zhengqiu He, and Min Zhang. Distantly supervised ner with partial annotation learning and reinforcement learning. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 2159–2169, 2018.
|
| 285 |
+
|
| 286 |
+
Juntao Yu, Bernd Bohnet, and Massimo Poesio. Named entity recognition as dependency parsing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6470–6476, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/ 2020.acl-main.577. URL https://www.aclweb.org/anthology/2020.acl-main. 577.
|
| 287 |
+
|
| 288 |
+
Haisong Zhang, Lemao Liu, Haiyun Jiang, Yangming Li, Enbo Zhao, Kun Xu, Linfeng Song, Suncong Zheng, Botong Zhou, Jianchen Zhu, et al. Texsmart: A text understanding system for fine-grained ner and enhanced semantic analysis. arXiv preprint arXiv:2012.15639, 2020.
|
md/train/5la5tka8a4-/5la5tka8a4-.md
ADDED
|
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Proximal and Federated Random Reshuffling
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Random Reshuffling (RR), also known as Stochastic Gradient Descent (SGD) without replacement, is a popular and theoretically grounded method for finite-sum minimization. We propose two new algorithms: Proximal and Federated Random Reshuffling (ProxRR and FedRR). The first algorithm, ProxRR, solves composite finite-sum minimization problems in which the objective is the sum of a (potentially non-smooth) convex regularizer and an average of $n$ smooth objectives. ProxRR evaluates the proximal operator once per epoch only. When the proximal operator is expensive to compute, this small difference makes ProxRR up to $n$ times faster than algorithms that evaluate the proximal operator in every iteration, such as proximal (stochastic) gradient descent. We give examples of practical optimization tasks where the proximal operator is difficult to compute and ProxRR has a clear advantage. One such task is federated or distributed optimization, where the evaluation of the proximal operator corresponds to communication across the network. We obtain our second algorithm, FedRR, as a special case of ProxRR applied to federated optimization, and prove it has a smaller communication footprint than either distributed gradient descent or Local SGD. Our theory covers both constant and decreasing stepsizes, and allows for importance resampling schemes that can improve conditioning, which may be of independent interest. Our theory covers both convex and nonconvex regimes. Finally, we corroborate our results with experiments on real data sets.
|
| 11 |
+
|
| 12 |
+
# 21 1 Introduction
|
| 13 |
+
|
| 14 |
+
22 Modern theory and practice of training supervised machine learning models is based on the paradigm
|
| 15 |
+
23 of regularized empirical risk minimization (ERM) [Shalev-Shwartz and Ben-David, 2014]. While the
|
| 16 |
+
24 ultimate goal of supervised learning is to train models that generalize well to unseen data, in practice
|
| 17 |
+
25 only a finite data set is available during training. Settling for a model merely minimizing the average
|
| 18 |
+
26 loss on this training set—the empirical risk—is insufficient, as this often leads to over-fitting and poor
|
| 19 |
+
27 generalization performance in practice. Due to this reason, empirical risk is virtually always amended
|
| 20 |
+
28 with a suitably chosen regularizer whose role is to encode prior knowledge about the learning task at
|
| 21 |
+
29 hand, thus biasing the training algorithm towards better performing models.
|
| 22 |
+
30 The regularization framework is quite general and perhaps surprisingly it also allows us to consider
|
| 23 |
+
31 methods for federated learning (FL)—a paradigm in which we aim at training model for a number of
|
| 24 |
+
32 clients that do not want to reveal their data [Konecný et al. ˇ , 2016, McMahan et al., 2017, Kairouz
|
| 25 |
+
33 et al., 2019]. The training in FL usually happens on devices with only a small number of model
|
| 26 |
+
34 updates being shared with a global host. To this end, Federated Averaging algorithm has emerged
|
| 27 |
+
35 that performs Local SGD updates on the clients’ devices and periodically aggregates their average.
|
| 28 |
+
36 Its analysis usually requires special techniques and deliberately constructed sequences hindering the
|
| 29 |
+
37 research in this direction. We shall see, however, that the convergence of our FedRR follows from
|
| 30 |
+
38 merely applying our algorithm for regularized problems to a carefully chosen reformulation.
|
| 31 |
+
|
| 32 |
+
39 Formally, regularized ERM problems are optimization problems of the form
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\begin{array} { r } { \underset { x \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } \big [ P ( x ) : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } f _ { i } ( x ) + \psi ( x ) \big ] , } \end{array}
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where 40 $f _ { i } \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ is the loss of model parameterized by vector $x \in \mathbb { R } ^ { d }$ on the $i$ -th training data 41 point, and $\psi : \mathbb { R } ^ { d } \mathbb { R } \cup \{ + \infty \}$ is a regularizer. Let $[ \acute { n } ] : = \{ 1 , 2 , \ldots , n \}$ . We shall make the 42 following assumption throughout the paper without explicitly mentioning it:
|
| 39 |
+
|
| 40 |
+
43 Assumption 1. The functions $f _ { i }$ are $L _ { i }$ -smooth, and the regularizer $\psi$ is proper, closed and convex.
|
| 41 |
+
Let 44 $L _ { \operatorname* { m a x } } : = \operatorname* { m a x } _ { i \in [ n ] } L _ { i }$ .
|
| 42 |
+
|
| 43 |
+
45 In some results we will additionally assume that either the individual functions $f _ { i }$ , or their average
|
| 44 |
+
46 $\begin{array} { r } { f : = \frac { 1 } { n } \sum _ { i } f _ { i } } \end{array}$ , or the regularizer $\psi$ are $\mu$ -strongly convex. Whenever we need such additional
|
| 45 |
+
47 assumptions, we will make this explicitly clear. While all these concepts are standard, we review
|
| 46 |
+
48 them briefly in Section A.
|
| 47 |
+
49 Proximal SGD. When the number $n$ of training data points is huge, as is increasingly common
|
| 48 |
+
50 in practice, the most efficient algorithms for solving (1) are stochastic first-order methods, such
|
| 49 |
+
51 as stochastic gradient descent (SGD) [Bordes et al., 2009], in one or another of its many variants
|
| 50 |
+
52 proposed in the last decade [Shang et al., 2018, Pham et al., 2020]. These method almost invariably
|
| 51 |
+
53 rely on alternating stochastic gradient steps with the evaluation of the proximal operator
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\begin{array} { r } { \operatorname { p r o x } _ { \gamma \psi } ( x ) : = \operatorname * { a r g m i n } _ { z \in \mathbb { R } ^ { d } } \left\{ \gamma \psi ( z ) + \frac { 1 } { 2 } \| z - x \| ^ { 2 } \right\} . } \end{array}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
54 The simplest of these has the form
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r } { x _ { k + 1 } ^ { \mathrm { S G D } } = \mathrm { p r o x } _ { \gamma _ { k } \psi } ( x _ { k } ^ { \mathrm { S G D } } - \gamma _ { k } \nabla f _ { i _ { k } } ( x _ { k } ^ { \mathrm { S G D } } ) ) , } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
55 where $i _ { k }$ is an index from $\{ 1 , 2 , \ldots , n \}$ chosen uniformly at random, and $\gamma _ { k } > 0$ is a properly
|
| 64 |
+
56 chosen learning rate. Our understanding of (2) is quite mature; see [Gorbunov et al., 2020] for a
|
| 65 |
+
57 general treatment which considers methods of this form in conjunction with more advanced stochastic
|
| 66 |
+
58 gradient estimators in place of $\nabla f _ { i _ { k } }$ .
|
| 67 |
+
59 Applications such as training sparse linear models [Tibshirani, 1996], nonnegative matrix factoriza
|
| 68 |
+
60 tion [Lee and Seung, 1999], image deblurring [Rudin et al., 1992, Bredies et al., 2010], and training
|
| 69 |
+
61 with group selection [Yuan and Lin, 2006] all rely on the use of hand-crafted regularizes. For most of
|
| 70 |
+
62 them, the proximal operator can be evaluated efficiently, and SGD is near or at the top of the list of
|
| 71 |
+
63 efficient training algorithms.
|
| 72 |
+
64 Random reshuffling. A particularly successful variant of SGD is based on the idea of random
|
| 73 |
+
65 shuffling (permutation) of the training data followed by $n$ iterations of the form (2), with the index
|
| 74 |
+
66 $i _ { k }$ following the pre-selected permutation [Bottou, 2012]. This process is repeated several times,
|
| 75 |
+
67 each time using a new freshly sampled random permutation of the data, and the resulting method is
|
| 76 |
+
68 known under the name Random Reshuffling $( R R )$ . When the same permutation is used throughout,
|
| 77 |
+
69 the technique is known under the name Shuffle-Once $( S O )$ .
|
| 78 |
+
70 One of the main advantages of this approach is rooted in its intrinsic ability to avoid cache misses when
|
| 79 |
+
71 reading the data from memory, which enables a significantly faster implementation. Furthermore,
|
| 80 |
+
72 RR is often observed to converge in fewer iterations than SGD in practice. This can intuitively be
|
| 81 |
+
73 ascribed to the fact that while due to its sampling-with-replacement approach SGD can miss to learn
|
| 82 |
+
74 from some data points in any given epoch, RR will learn from each data point in each epoch.
|
| 83 |
+
75 Understanding the random reshuffling trick, and why it works, has been a non-trivial open problem
|
| 84 |
+
76 for a long time [Bottou, 2009, Recht and Ré, 2012, Gürbüzbalaban et al., 2019, Haochen and Sra,
|
| 85 |
+
77 2019]. Until recent development which lead to a significant simplification of the convergence
|
| 86 |
+
78 analysis technique and proofs [Mishchenko et al., 2020], prior state of the art relied on long and
|
| 87 |
+
79 elaborate proofs requiring sophisticated arguments and tools, such as analysis via the Wasserstein
|
| 88 |
+
80 distance [Nagaraj et al., 2019], and relied on a significant number of strong assumptions about
|
| 89 |
+
81 the objective [Shamir, 2016, Haochen and Sra, 2019]. In alternative recent development, Ahn et al.
|
| 90 |
+
82 [2020] also develop new tools for analyzing the convergence of random reshuffling, in particular using
|
| 91 |
+
83 decreasing stepsizes and for objectives satisfying the Polyak-Łojasiewicz condition, a generalization
|
| 92 |
+
84 of strong convexity [Polyak, 1963, Lojasiewicz, 1963].
|
| 93 |
+
85 The difficulty of analyzing RR has been the main obstacle in the development of even some of the
|
| 94 |
+
86 most seemingly benign extensions of the method. Indeed, while all these are well understood in
|
| 95 |
+
Require: Stepsizes $\gamma _ { t } > 0$ , initial vector $\boldsymbol { x } _ { 0 } \in \mathbb { R } ^ { d }$ , number of epochs $T$
|
| 96 |
+
1: Sample a permutation $\pi = \left( \pi _ { 0 u } , \pi _ { 1 } , . . . , \pi _ { n - 1 } \right)$ of $[ n ]$ (Do step 1 only for ProxSO)
|
| 97 |
+
2: for epochs $t = 0 , 1 , \ldots , T - 1$ do
|
| 98 |
+
3: Sample a permutation $\pi = \left( \pi _ { 0 } , \pi _ { 1 } , \ldots , \pi _ { n - 1 } \right)$ of $[ n ]$ (Do step 3 only for ProxRR)
|
| 99 |
+
4: $x _ { t } ^ { 0 } = x _ { t }$
|
| 100 |
+
5: 6: for i = 0, 1, . . . , n − 1 doxi+1t = xit − γt∇fπi (xit)
|
| 101 |
+
7:
|
| 102 |
+
87 combination with its much simpler-to-analyze cousin SGD, to the best of our knowledge, there exists
|
| 103 |
+
88 no theoretical analysis of proximal, parallel, and importance sampling variants of RR with both
|
| 104 |
+
89 constant and decreasing stepsizes, and in most cases it is not even clear how should such methods be
|
| 105 |
+
90 constructed. Empowered by and building on the recent advances of Mishchenko et al. [2020], in this
|
| 106 |
+
91 paper we address all these challenges.
|
| 107 |
+
|
| 108 |
+
# 92 2 Contributions
|
| 109 |
+
|
| 110 |
+
In this section we outline the key contributions of our work, and also offer a few intuitive explanations motivating some of the development.
|
| 111 |
+
|
| 112 |
+
• New algorithm: ProxRR. Despite rich literature on Proximal SGD [Gorbunov et al., 2020], it is not obvious how one should extend RR to solve problem (1) when a regularizer $\psi$ is present. Indeed, the standard practice for SGD is to apply the proximal operator after each stochastic step [Duchi and Singer, 2009], i.e., in analogy with (2). On the other hand, RR is motivated by the fact that a data pass better approximates the full gradient step. If we applied the proximal operator after each step of RR, we would no longer approximate the full gradient after an epoch, as we illustrate next.
|
| 113 |
+
|
| 114 |
+
Example 1. Let 101 $n = 2$ , $\textstyle \psi ( x ) = { \frac { 1 } { 2 } } \| x \| ^ { 2 }$ , $f _ { 1 } ( x ) = \langle c _ { 1 } , x \rangle$ , $f _ { 2 } ( x ) = \langle c _ { 2 } , x \rangle$ with some $c _ { 1 } , c _ { 2 } \in \mathbb { R } ^ { d }$ , 102 $c _ { 1 } \neq c _ { 2 }$ . Let $\boldsymbol { x } _ { 0 } \in \mathbb { R } ^ { d }$ , $\gamma > 0$ and define $x _ { 1 } = x _ { 0 } - \gamma \nabla f _ { 1 } ( x _ { 0 } )$ , $x _ { 2 } = x _ { 1 } - \gamma \nabla f _ { 2 } ( x _ { 1 } )$ . Then, we 103 have $\mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 2 } ) = \mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 0 } - 2 \gamma \nabla f ( x _ { 0 } ) )$ . However, if $\begin{array} { r } { \tilde { x } _ { 1 } = \mathrm { p r o x } _ { \gamma \psi } ( x _ { 0 } - \gamma \nabla f _ { 1 } ( x _ { 0 } ) ) } \end{array}$ and 104 $\begin{array} { r } { \tilde { x } _ { 2 } = \mathrm { p r o x } _ { \gamma \psi } ( x _ { 1 } - \gamma \nabla f _ { 2 } ( \tilde { x } _ { 1 } ) ) } \end{array}$ , then $\tilde { x } _ { 2 } \neq \mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 0 } - 2 \gamma \nabla f ( x _ { 0 } ) )$ .
|
| 115 |
+
|
| 116 |
+
105 Motivated by this observation, we propose ProxRR (Algorithm 1), in which the proximal operator is
|
| 117 |
+
106 applied at the end of each epoch of RR, i.e., after each pass through all randomly reshuffled data. A
|
| 118 |
+
107 notable property of Algorithm 1 is that only a single proximal operator evaluation is needed during
|
| 119 |
+
108 each data pass. This is in sharp contrast with the way Proximal SGD works, and offers significant
|
| 120 |
+
109 advantages in regimes where the evaluation of the proximal mapping is expensive (e.g., comparable
|
| 121 |
+
110 to the evaluation of $n$ gradients $\nabla f _ { 1 } , \ldots , \nabla f _ { n } )$ .
|
| 122 |
+
111 • Convergence of ProxRR (for strongly convex functions or regularizer). We establish several
|
| 123 |
+
112 convergence results for ProxRR, of which we highlight two here. Both offer a linear convergence rate
|
| 124 |
+
113 with a fixed stepsize to a neighborhood of the solution. In both we reply on Assumption 1. Firstly, in
|
| 125 |
+
114 the case when in addition, each $f _ { i }$ is $\mu$ -strongly convex, we prove the rate (see Theorem 2)
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 - \gamma \mu \right) ^ { n T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { 2 \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } , } \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
115 where $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ is the stepsize, and $\sigma _ { \mathrm { r a d } } ^ { 2 }$ is a shuffling radius constant (for precise definition, 116 see (4)). In Theorem 1 we bound the shuffling radius in terms of $\| \nabla f ( x _ { * } ) \| ^ { 2 }$ , n, $L _ { \mathrm { m a x } }$ and the more common quantity 117 $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \| \nabla f _ { i } ( x _ { * } ) - \nabla f ( x _ { * } ) \| ^ { 2 } } \end{array}$ . Secondly, if $\psi$ is $\mu$ -strongly convex, and 118 we choose the stepsize $\gamma _ { t } \overset { \cdot \cdot } { = } \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , we prove the rate (see Theorem 3)
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 + 2 \gamma \mu n \right) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
119 Both mentioned rates show exponential (linear in logarithmic scale) convergence to a neighborhood whose size is proportional to 120 $\gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 }$ . Since we can choose $\gamma$ to be arbitrarily small or periodically
|
| 138 |
+
|
| 139 |
+
121 decrease it, this implies that the iterates converge to $x _ { * }$ in the limit. Moreover, we show in Section 4 that when122 $\begin{array} { r } { \gamma = \mathcal { O } ( \frac { 1 } { T } ) } \end{array}$ the error is $\scriptstyle { \mathcal { O } } ( { \frac { 1 } { T ^ { 2 } } } )$ , which is superior to the $\mathcal { O } ( \textstyle { \frac { 1 } { T } } )$ error of SGD.
|
| 140 |
+
|
| 141 |
+
• Results for SO. All of our results apply to the Shuffle-Once algorithm as well. For simplicity, we center the discussion around RR, whose current theoretical guarantees in the nonconvex case are better than that of SO. Nevertheless, the other results are the same for both methods, and ProxRR is identical to ProxSO in terms of our theory too. A study of the empirical differences between RR and SO can be found in [Mishchenko et al., 2020].
|
| 142 |
+
|
| 143 |
+
128 • Application to Federated Learning. In Section 6 we describe an application of our results to
|
| 144 |
+
129 federated learning [Konecný et al. ˇ , 2016, McMahan et al., 2017, Kairouz et al., 2019]. In this way we
|
| 145 |
+
130 obtain the FedRR method, which is similar to Local SGD, except the local solver is a single pass
|
| 146 |
+
131 of RR over the local data. Empirically, FedRR can be vastly superior to Local SGD (see Figure 2).
|
| 147 |
+
132 Remarkably, we also show that the rate of FedRR beats the best known lower bound for Local SGD
|
| 148 |
+
133 due to [Woodworth et al., 2020] (we needed to adapt it from the original online to the finite-sum
|
| 149 |
+
134 setting we consider in this paper) for large enough $n$ . See Section F for more details.
|
| 150 |
+
|
| 151 |
+
• Nonconvex analysis. In the nonconvex regime, and under suitable assumptions, we establish (see Theorems 5 and 8) an $\begin{array} { r } { \mathcal { O } ( \frac { 1 } { \gamma T } ) } \end{array}$ rate up to a neighborhood of size $\mathcal { O } ( \gamma ^ { 2 } )$ . For a certain stepsize it yields an $\begin{array} { r } { \mathcal { O } ( { \frac { 1 } { \varepsilon ^ { 3 } } } ) } \end{array}$ convergence rate.
|
| 152 |
+
|
| 153 |
+
Besides the above results, we describe several extensions in the appendix, which we now outline.
|
| 154 |
+
|
| 155 |
+
• Extension 1: Decreasing stepsizes. The convergence of RR is not always exact and depends on the parameters of the objective. Similarly, if the shuffling radius $\sigma _ { \mathrm { r a d } } ^ { 2 }$ is positive, and we wish to find an $\varepsilon$ -approximate solution, the optimal choice of a fixed stepsize for ProxRR will depend on $\varepsilon$ . This deficiency can be fixed by using decreasing stepsizes in both vanilla RR [Ahn et al., 2020] and in SGD [Stich, 2019]. We adopt the same technique to our setting. However, we depart from [Ahn et al., 2020] by only adjusting the stepsize once per epoch rather than at every iteration, similarly to the concurrent work of Tran et al. [2020] on RR with momentum. For details, see Section I.
|
| 156 |
+
|
| 157 |
+
146 • Extension 2: Importance resampling for Proximal RR. While importance sampling is a well
|
| 158 |
+
147 established technique for speeding up the convergence of SGD [Zhao and Zhang, 2015, Khaled and
|
| 159 |
+
148 Richtárik, 2020], no importance sampling variant of RR has been proposed nor analyzed. This is not
|
| 160 |
+
149 surprising since the key property of importance sampling in SGD—unbiasedness—does not hold for
|
| 161 |
+
150 RR. Our approach to equip ProxRR with importance sampling is via a reformulation of problem (1)
|
| 162 |
+
151 into a similar problem with a larger number of summands. In particular, for each $i \in [ n ]$ we include
|
| 163 |
+
152 $n _ { i }$ copies of the function $\textstyle { \frac { 1 } { n _ { i } } } f _ { i }$ , and then take average of all $\begin{array} { r } { \bar { N } = \sum _ { i } n _ { i } } \end{array}$ functions constructed this
|
| 164 |
+
153 way. The value of $n _ { i }$ depends on the “importance” of $f _ { i }$ , described below. We then apply ProxRR
|
| 165 |
+
154 to this reformulation. If $f _ { i }$ is $L _ { i }$ -smooth for all $i \in [ n ]$ and we let $\begin{array} { r } { \bar { L } : = \frac { 1 } { n } \sum _ { i } L _ { i } } \end{array}$ , then we choose
|
| 166 |
+
155 . It is easy to show that , and hence our reformulation leads to at most a doubling
|
| 167 |
+
156 of the number of functions forming the finite sum. However, the overall complexity of ProxRR
|
| 168 |
+
157 applied to this reformulation will depend on $\bar { L }$ instead of $\operatorname* { m a x } _ { i } L _ { i }$ (see Theorem 10), which can lead
|
| 169 |
+
158 to a significant improvement. For details of the construction and our complexity results, see Section J.
|
| 170 |
+
|
| 171 |
+
# 159 3 Preliminaries
|
| 172 |
+
|
| 173 |
+
160 In our analysis, we build upon the notions of limit points and shuffling variance introduced by 161 Mishchenko et al. [2020] for vanilla (i.e., non-proximal) RR. Given a stepsize $\gamma > 0$ (held constant 162 during each epoch) and a permutation to a neighborhood of intermediate lim $\pi$ of poi $\{ 1 , 2 , \ldots , n \}$ inner loop iterates of RR/SO convergedefined by $x _ { * } ^ { 1 } , x _ { * } ^ { 2 } , \ldots , x _ { * } ^ { n }$
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\begin{array} { r } { x _ { * } ^ { i } : = x _ { * } - \gamma \sum _ { j = 0 } ^ { i - 1 } \nabla f _ { \pi _ { j } } ( x _ { * } ) , \quad i = 1 , \ldots , n . } \end{array}
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
164 The intuition behind this definition is fairly simple: if we performed $i$ steps starting at $x _ { * }$ , we would end up close to 165 $x _ { * } ^ { i }$ . To quantify the closeness, we define the shuffling radius.
|
| 180 |
+
|
| 181 |
+
166 Definition 1 (Shuffling radius). Given a stepsize $\gamma > 0$ and a random permutation $\pi$ of $\{ 1 , 2 , \ldots , n \}$ used in Algorithm 1, define 167 $x _ { * } ^ { i } = x _ { * } ^ { i } ( \gamma , \pi )$ as in (3). Then, the shuffling radius is defined by
|
| 182 |
+
|
| 183 |
+
$$
|
| 184 |
+
\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } ( \gamma ) : = \underset { i = 0 , \ldots , n - 1 } { \operatorname* { m a x } } \left[ \frac { 1 } { \gamma ^ { 2 } } \mathbb { E } _ { \boldsymbol \pi } \left[ D _ { f _ { \pi _ { i } } } ( x _ { * } ^ { i } , x _ { * } ) \right] \right] , } \end{array}
|
| 185 |
+
$$
|
| 186 |
+
|
| 187 |
+
168 where the expectation is taken with respect to the randomness in the permutation $\pi$ . If there are
|
| 188 |
+
169 multiple steradius, i.e., $\sigma _ { \mathrm { r a d } } ^ { 2 } : = \operatorname* { m a x } _ { t \geq 1 } \sigma _ { \mathrm { r a d } } ^ { 2 } ( \gamma _ { t } )$ $\gamma _ { 1 } , \gamma _ { 2 } , \ldots$ lgorithm 1, we take the maximum of all of them as the shuffling.
|
| 189 |
+
171 The shuffling radius is related by a multiplicative factor in the stepsize to the shuffling variance
|
| 190 |
+
172 introduced by Mishchenko et al. [2020]. When the stepsize is held fixed, the difference between the
|
| 191 |
+
173 two notions is minimal. When the stepsize is decreasing, however, the shuffling radius is easier to
|
| 192 |
+
174 work with, since it can be upper bounded by problem constants independent of the stepsizes.
|
| 193 |
+
175 Armed with a special lemma for sampling without replacement, we can upper bound the shuffling
|
| 194 |
+
176 radius using the smoothness constant $L _ { \mathrm { m a x } }$ , size of the vector $\nabla f ( x _ { * } )$ , and the variance $\sigma _ { * } ^ { 2 }$ of the
|
| 195 |
+
177 gradient vectors $\nabla f _ { 1 } ( x _ { * } ) , \ldots , \nabla f _ { n } ( x _ { * } )$ .
|
| 196 |
+
|
| 197 |
+
178 Tof unding twe have $\gamma > 0$ ae any random permutation is a solution of Problem ( $\pi$ $\{ 1 , 2 , \ldots , n \}$ $\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } \leq \frac { L _ { \operatorname* { m a x } } } { 2 } n \big ( n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \frac { 1 } { 2 } \sigma _ { * } ^ { 2 } \big ) } \end{array}$ $x _ { * }$
|
| 198 |
+
180 and $\sigma _ { * } ^ { 2 }$ is the population variance at the optimum
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { n } { \sum _ { i = 1 } ^ { n } } \Vert \nabla f _ { i } ( x _ { * } ) - \nabla f ( x _ { * } ) \Vert ^ { 2 } . } \end{array}
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
181 All proofs are relegated to the supplementary material. In order to better understand the bound
|
| 205 |
+
182 given by Theorem 1, note that if there is no proximal operator (i.e., $\psi = 0$ ) then $\nabla f ( x _ { * } ) = 0$ and
|
| 206 |
+
183 we get that $\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } \le \frac { L _ { \mathrm { m a x } } n \sigma _ { * } ^ { 2 } } { 4 } } \end{array}$ Lmaxnσ2∗4 . This recovers the existing upper bound on the shuffling variance of
|
| 207 |
+
184 Mishchenko et al. [2020] for vanilla RR. On the other hand, if $\nabla f ( x _ { * } ) \neq 0$ then we get an additive
|
| 208 |
+
185 term of size proportional to the squared norm of $\nabla f ( x _ { * } )$ .
|
| 209 |
+
|
| 210 |
+
# 186 4 Theory for strongly convex losses $f _ { 1 } , \ldots , f _ { n }$
|
| 211 |
+
|
| 212 |
+
187 Our first theorem establishes a convergence rate for Algorithm 1 applied with a constant stepsize to
|
| 213 |
+
188 Problem (1) when each objective $f _ { i }$ is strongly convex. This assumption is commonly satisfied in
|
| 214 |
+
189 machine learning applications where each $f _ { i }$ represents a regularized loss on some data points, as in
|
| 215 |
+
190 $\ell _ { 2 }$ regularized linear regression and $\ell _ { 2 }$ regularized logistic regression.
|
| 216 |
+
191 Theorem 2. Let Assumption 1 be satisfied. Further, assume that each $f _ { i }$ is $\mu$ -strongly convex. If
|
| 217 |
+
192 Algorithm 1 is run with constant stepsize $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , then its iterates satisfy
|
| 218 |
+
|
| 219 |
+
$$
|
| 220 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 - \gamma \mu \right) ^ { n T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { 2 \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 221 |
+
$$
|
| 222 |
+
|
| 223 |
+
193 We can convert the guarantee of Theorem 2 to a convergence rate by properly tuning the stepsize
|
| 224 |
+
194 and using the upper bound of Theorem 1 on the shuffling radius. In particular, if we choose the
|
| 225 |
+
195 stepsize as $\begin{array} { r } { \gamma = \operatorname* { m i n } \left\{ \frac { 1 } { L _ { \mathrm { m a x } } } , \frac { \sqrt { \varepsilon \mu } } { \sqrt { 2 } \sigma _ { \mathrm { r a d } } } \right\} } \end{array}$ , and let $\kappa : = L _ { \mathrm { m a x } } / \mu$ and $r _ { 0 } : = \| x _ { 0 } - x _ { * } \| ^ { 2 }$ , then we obtain
|
| 226 |
+
196 $\mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] = \dot { \mathcal { O } } \left( \varepsilon \right)$ provided that the total number of iterations $K _ { \mathrm { R R } } = n T$ is at least
|
| 227 |
+
|
| 228 |
+
$$
|
| 229 |
+
\begin{array} { r } { K _ { \mathrm { R R } } \geq [ ( \kappa + \frac { \sqrt { \kappa n } } { \sqrt { \varepsilon } \mu } ( \sqrt { n } \| \nabla f ( x _ { * } ) \| + \sigma _ { * } ) ] \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 230 |
+
$$
|
| 231 |
+
|
| 232 |
+
197 Comparison with vanilla RR. If there is no proximal operator, then $\| \nabla f ( x _ { * } ) \| = 0$ and we recover
|
| 233 |
+
198 the earlier result of Mishchenko et al. [2020] on the convergence of RR without proximal, which is
|
| 234 |
+
199 optimal in $\varepsilon$ up to logarithmic factors. On the other hand, when the proximal operator is nonzero,
|
| 235 |
+
200 we get an extra term in the complexity proportional to $\| \nabla f ( x _ { * } ) \|$ : thus, even when all the functions
|
| 236 |
+
201 are the same (i.e., $\sigma _ { * } = 0$ ), we do not recover the linear convergence of Proximal Gradient Descent
|
| 237 |
+
202 [Karimi et al., 2016, Beck, 2017]. This can be easily explained by the fact that Algorithm 1 performs
|
| 238 |
+
203 $n$ gradient steps per one proximal step. Hence, even if $f _ { 1 } = \cdots = f _ { n }$ , Algorithm 1 does not reduce
|
| 239 |
+
204 to Proximal Gradient Descent. We note that other algorithms for composite optimization which may
|
| 240 |
+
205 not take a proximal step at every iteration (for example, using stochastic projection steps) also suffer
|
| 241 |
+
206 from the same dependence [Patrascu and Irofti, 2021].
|
| 242 |
+
207 Comparison with proximal SGD. In order to compare (6) against the complexity of Proximal SGD
|
| 243 |
+
208 (Algorithm 2), we recall that Proximal SGD achieves $\mathbb { E } \left[ \left. x _ { K } - x _ { * } \right. ^ { 2 } \right] = \mathcal { O } \left( \varepsilon \right)$ if either $f$ or $\psi$ is
|
| 244 |
+
209 $\mu$ -strongly convex and
|
| 245 |
+
|
| 246 |
+
$$
|
| 247 |
+
\begin{array} { r } { K _ { \mathrm { S G D } } \geq \left( \kappa + \frac { \sigma _ { \ast } ^ { 2 } } { \varepsilon \mu ^ { 2 } } \right) \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 248 |
+
$$
|
| 249 |
+
|
| 250 |
+
<table><tr><td colspan="2"></td><td>Require: Stepsizes γk > O,initial vector xo ∈ Rd, number of steps K</td><td></td></tr><tr><td colspan="2">1:for steps k=O,1,...,K-1do</td><td></td><td></td></tr><tr><td>2:</td><td>Sample ik uniformly at random from [n]</td><td></td><td></td></tr><tr><td>3:</td><td>Xk+1=prOXγky(xk-γk√fi(xk))</td><td></td><td></td></tr></table>
|
| 251 |
+
|
| 252 |
+
210 This result is standard [Needell et al., 2016, Gower et al., 2019], with the exception that we do not
|
| 253 |
+
211 know any proof in the literature for the case when $\psi$ is strongly convex. For completeness, we prove
|
| 254 |
+
212 it in Appendix C, but since our proof is a minor modification of that in [Gower et al., 2019], we do
|
| 255 |
+
213 not provide it here.
|
| 256 |
+
214 By comparing $K _ { \mathrm { S G D } }$ (given by (7)) and $K _ { \mathrm { R R } }$ (given by (6)), we see that ProxRR has milder
|
| 257 |
+
215 dependence on $\varepsilon$ than Proximal SGD. In particular, ProxRR converges faster whenever the target
|
| 258 |
+
216 accuracy ε is small enough to satisfy ε ≤ 1Lmaxnµ $\begin{array} { r } { \varepsilon \leq \frac { 1 } { L _ { \operatorname* { m a x } } n \mu } \left( \frac { \sigma _ { * } ^ { 4 } } { n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } } \right) . } \end{array}$ . Furthermore, ProxRR is much
|
| 259 |
+
217 better when we consider proximal iteration complexity $\#$ of proximal operator access), in which case
|
| 260 |
+
218 the complexity of ProxRR (6) is reduced by a factor of $n$ (because we take one proximal step every $n$
|
| 261 |
+
219 iterations), while the proximal iteration complexity of Proximal SGD remains the same as (7). In this
|
| 262 |
+
220 case, ProxRR is better whenever the accuracy $\varepsilon$ satisfies
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
\begin{array} { r } { \varepsilon \geq \frac { n } { L _ { \operatorname* { m a x } } \mu } \left[ n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } \right] \qquad \mathrm { o r } \qquad \varepsilon \leq \frac { n } { L _ { \operatorname* { m a x } } \mu } \left[ \frac { \sigma _ { * } ^ { 4 } } { n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } } \right] . } \end{array}
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
21 We can see that if the target accuracy is large enough or small enough, and if the cost of proximal operators dominates the computation, ProxRR is much quicker to converge than Proximal SGD.
|
| 269 |
+
|
| 270 |
+
# 5 Theory for strongly convex regularizer $\psi$
|
| 271 |
+
|
| 272 |
+
In Theorem 2, we assume that each $f _ { i }$ is $\mu$ -strongly convex. This is motivated by the common practice of using $\ell _ { 2 }$ regularization in machine learning. However, applying $\ell _ { 2 }$ regularization in every step of Algorithm 1 can be expensive when the data are sparse and the iterates $\ v { x } _ { t } ^ { i }$ are dense, because it requires accessing each coordinate of $\boldsymbol { x } _ { t } ^ { i }$ which can be much more expensive than computing sparse gradients $\nabla f _ { i } ( x _ { t } ^ { i } )$ . Alternatively, we may instead choose to put the $\ell _ { 2 }$ regularization inside $\psi$ and only ask that $\psi$ be strongly convex—this way, we can save a lot of time as we need to access each coordinate of the dense iterates $\boldsymbol { x } _ { t } ^ { i }$ only once per epoch rather than every iteration. Theorem 3 gives a convergence guarantee in this setting.
|
| 273 |
+
|
| 274 |
+
Theorem 3. Let Assumption 1 hold and $f _ { 1 } , \ldots , f _ { n }$ be convex. Further, assume that $\psi$ is $\mu$ -strongly convex. If Algorithm 1 is run with constant stepsize $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , where $L _ { \operatorname* { m a x } } = \operatorname* { m a x } _ { i } L _ { i }$ , then its iterates satisfy
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq ( 1 + 2 \gamma \mu n ) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
235 Using Theorem 3 and choosing the stepsize as
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
\begin{array} { r } { \gamma = \operatorname* { m i n } \left\{ \frac { 1 } { L _ { \mathrm { m a x } } } , \frac { \sqrt { \varepsilon \mu } } { \sigma _ { \mathrm { r a d } } } \right\} , } \end{array}
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
we get 236 $\mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] = \mathcal { O } \left( \varepsilon \right)$ provided that the total number of iterations satisfies
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { r } { K \geq \left( \kappa + \frac { \sigma _ { \mathrm { r a d } } / \mu } { \sqrt { \varepsilon \mu } } + n \right) \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
237 This can be converted to a bound similar to (6) by using Theorem 1, in which case the only difference
|
| 293 |
+
238 between the two cases is an extra $n \log \left( { \frac { 1 } { \varepsilon } } \right)$ term when only the regularizer $\psi$ is $\mu$ -strongly convex.
|
| 294 |
+
239 Since for small enough accuracies the $^ 1 / \sqrt { \varepsilon }$ term dominates, this difference is minimal.
|
| 295 |
+
|
| 296 |
+
# 240 6 FedRR: application of ProxRR to federated learning
|
| 297 |
+
|
| 298 |
+
Let us consider now the problem of minimizing the average of 241 $\begin{array} { r } { N = \sum _ { m = 1 } ^ { M } N _ { m } } \end{array}$ PM m=1 Nm functions that are 242 stored on devices, which have $N _ { 1 } , \dots , N _ { M }$ samples correspondingly,
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\begin{array} { r } { \underset { x \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } F ( x ) + R ( x ) , \qquad F ( x ) = \frac { 1 } { N } { \sum _ { m = 1 } ^ { M } } F _ { m } ( x ) , \qquad F _ { m } ( x ) = { \sum _ { j = 1 } ^ { N _ { m } } } f _ { m j } ( x ) . } \end{array}
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
# Algorithm 3 Federated Random Reshuffling (FedRR)
|
| 305 |
+
|
| 306 |
+
<table><tr><td></td><td>Require:Stepsize γ >O,initial vector xo = x ∈ Rd,number of epochs T 1:for epochs t=O,1,...,T-1do</td><td></td><td></td><td></td></tr><tr><td>2:</td><td>for m =1,...,M locally in parallel do</td><td></td><td></td><td></td></tr><tr><td>3:</td><td>xt,m=Xt .0</td><td></td><td></td><td></td></tr><tr><td>4:</td><td>Sample permutation πo,m,π1,m,...,πNm-1,m of {1,2,..., Nm}</td><td></td><td></td><td></td></tr><tr><td>5:</td><td>fori=0,1,...,Nm-1do</td><td></td><td></td><td></td></tr><tr><td>6:</td><td>Ct,m i+1</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>7: 8:</td><td></td><td></td><td></td><td></td></tr></table>
|
| 307 |
+
|
| 308 |
+
243 For example, $f _ { m j } ( x )$ can be the loss associated with a single sample $( X _ { m j } , y _ { m j } )$ , where pairs
|
| 309 |
+
244 $( X _ { m j } , y _ { m j } )$ follow a distribution $D _ { m }$ that is specific to device $m$ . An important instance of such for
|
| 310 |
+
245 mulation is federated learning, where $M$ devices train a shared model by communicating periodically
|
| 311 |
+
246 with a server. We normalize the objective in (10) by $N$ as this is the total number of functions after
|
| 312 |
+
247 we expand each $F _ { m }$ into a sum. We denote the solution of (10) by $x _ { * }$ .
|
| 313 |
+
248 Extending the space. To rewrite the problem as an instance of (1), we are going to consider a bigger
|
| 314 |
+
249 product space, which is sometimes used in distributed optimization [Bianchi et al., 2015]. Let us
|
| 315 |
+
250 define $n : = \operatorname* { m a x } \{ N _ { 1 } , \dots , N _ { m } \}$ and introduce $\psi _ { C }$ , the consensus constraint, defined via
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\begin{array} { r } { \psi _ { C } ( x _ { 1 } , \dots , x _ { M } ) : = \left\{ \begin{array} { l l } { 0 , } & { x _ { 1 } = \dots = x _ { M } } \\ { + \infty , } & { \mathrm { o t h e r w i s e } } \end{array} \right. . } \end{array}
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
251 By introducing dummy variables $x _ { 1 } , \ldots , x _ { M }$ and adding the constraint $x _ { 1 } = \cdot \cdot \cdot = x _ { M }$ , we arrive at
|
| 322 |
+
252 the intermediate problem
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\operatorname* { m i n } _ { x _ { 1 } , \ldots , x _ { M } \in \mathbb { R } ^ { p } } \frac { 1 } { N } \sum _ { m = 1 } ^ { M } F _ { m } ( x _ { m } ) + ( R + \psi _ { C } ) ( x _ { 1 } , \ldots , x _ { M } ) ,
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
53 where $R + \psi _ { C }$ is defined, with a slight abuse of notation, as $( R + \psi _ { C } ) ( x _ { 1 } , \dots , x _ { M } ) = R ( x _ { 1 } )$ if
|
| 329 |
+
54 $x _ { 1 } = \cdot \cdot \cdot = x _ { M }$ , and $( R + \psi _ { C } ) ( x _ { 1 } , \dots , x _ { M } ) = + \infty$ otherwise.
|
| 330 |
+
255 Since we have replaced $R$ with a more complicated regularizer $R + \psi _ { C }$ , we need to understand how
|
| 331 |
+
256 to compute the proximal operator of the latter. We show (Lemma 7 in the supplementary) that the
|
| 332 |
+
257 proximal operator of $( R + \psi _ { C } )$ is merely the projection onto $\{ ( x _ { 1 } , . . . , x _ { M } ) ^ { \top } | x _ { 1 } = \cdot \cdot \cdot = x _ { M } \}$
|
| 333 |
+
258 followed by the proximal operator of $R$ with a smaller stepsize.
|
| 334 |
+
|
| 335 |
+
functions, Reformulation. To have $\textstyle \sum _ { j = N _ { m } + 1 } ^ { n } 0$ $f _ { m j } ( x ) \equiv 0$ . We can now stick the vectors together into for any $n$ functions in every $j > N _ { m }$ , so that $F _ { m }$ $\begin{array} { r } { F _ { m } ( x _ { m } ) = \sum _ { j = 1 } ^ { n } f _ { m j } ( x _ { m } ) = \sum _ { j = 1 } ^ { N _ { m } } f _ { m j } ( x _ { m } ) + } \end{array}$ , we write $\pmb { x } = ( x _ { 1 } , \dots , x _ { M } ) \in \mathbb { R } ^ { M \cdot d }$ $F _ { m }$ as a sum with extra $n - N _ { m }$ 1 and multiply zero the objective by $\textstyle { \frac { N } { n } }$ , which gives the following reformulation:
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\begin{array} { r } { \underset { { \pmb x } \in \mathbb { R } ^ { M \cdot d } } { \operatorname* { m i n } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } f _ { i } ( { \pmb x } ) + \psi ( { \pmb x } ) , } \end{array}
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
where 263 $\begin{array} { r } { \psi ( { \pmb x } ) : = \frac { N } { n } ( R + \psi _ { C } ) } \end{array}$ and
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\begin{array} { l } \displaystyle { \begin{array} { l } { { \mathrm { ) ~ a n d } } } \\ { { f _ { i } ( x ) = f _ { i } ( x _ { 1 } , \ldots , x _ { M } ) : = \sum ^ { M } f _ { m i } ( x _ { m } ) . } } \end{array} } \end{array}
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
264 In other words, function $f _ { i } ( { \pmb x } )$ includes $i$ m=1-th data sample from each device and contains at most
|
| 348 |
+
265 one loss from every device, while $F _ { m } ( x )$ combines all data losses on device $m$ . Note that the
|
| 349 |
+
266 solution of (11) is $\pmb { x } _ { * } : = ( x _ { * } ^ { \top } , \ldots , x _ { * } ^ { \top } ) ^ { \top }$ and the gradient of the extended function $f _ { i } ( { \pmb x } )$ is given
|
| 350 |
+
267 by $\nabla f _ { i } ( { \pmb x } ) = ( \nabla f _ { 1 i } ( x _ { 1 } ) ^ { \top } , \cdots , \nabla f _ { M i } ( x _ { M } ) ^ { \top } ) ^ { \top }$ . Therefore, a stochastic gradient step that uses
|
| 351 |
+
268 $\nabla f _ { i } ( { \pmb x } )$ corresponds to updating all local models with the gradient of $i$ -th data sample, without any
|
| 352 |
+
269 communication.
|
| 353 |
+
270 Algorithm 1 for this specific problem can be written in terms of $x _ { 1 } , \ldots , x _ { M }$ , which results in
|
| 354 |
+
271 Algorithm 3. Note that since $f _ { m i } ( x _ { i } )$ depends only on $x _ { i }$ , computing its gradient does not require
|
| 355 |
+
272 communication. Only once the local epochs are finished, the vectors are averaged as the result of
|
| 356 |
+
273 projecting onto the set $\{ ( x _ { 1 } , \ldots , x _ { M } ) \ | ^ \stackrel { \textstyle - } { x } _ { 1 } = \cdot \cdot \cdot = x _ { M } \}$ .
|
| 357 |
+
274 Reformulation properties. To analyze FedRR, the only thing that we need to do is understand the
|
| 358 |
+
275 properties of the reformulation (11) and then apply Theorem 2 or Theorem 3. The following lemma
|
| 359 |
+
276 gives us the smoothness and strong convexity properties of (11).
|
| 360 |
+
277 Lemma 1. Let function $f _ { m i }$ be $L _ { i }$ -smooth and $\mu$ -strongly convex for every $m$ . Then, $f _ { i }$ from
|
| 361 |
+
278 reformulation (11) is $L _ { i }$ -smooth and $\mu$ -strongly convex.
|
| 362 |
+
279 The previous lemma shows that the conditioning of the reformulation is $\begin{array} { r } { \kappa \ : = \ : \frac { L _ { \mathrm { m a x } } } { \mu } } \end{array}$ just as we
|
| 363 |
+
280 would expect. Moreover, it implies that the requirement on the stepsize remains exactly the same:
|
| 364 |
+
281 $\gamma \leq 1 / L _ { \operatorname* { m a x } }$ . What remains unknown is the value of ProxRR and ProxSO. To find an upper b $\sigma _ { \mathrm { r a d } } ^ { 2 }$ , wh on $\sigma _ { \mathrm { r a d } } ^ { 2 }$ plays a key role in the convergence, let us define
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\begin{array} { r } { \sigma _ { m , * } ^ { 2 } : = \frac { 1 } { N _ { m } } \sum _ { j = 1 } ^ { n } \bigl \| \nabla f _ { m j } ( x _ { * } ) - \frac { 1 } { N _ { m } } \nabla F _ { m } ( x _ { * } ) \bigr \| ^ { 2 } , } \end{array}
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
283 which is the variance of local gradients on device $m$ . This quantity characterizes the convergence rate
|
| 371 |
+
284 of local SGD [Yuan et al., 2020], so we should expect it to appear in our bounds too. The next lemma
|
| 372 |
+
285 explains how to use it to upper bound $\sigma _ { \mathrm { r a d } } ^ { 2 }$ .
|
| 373 |
+
|
| 374 |
+
$\sigma _ { \mathrm { r a d } } ^ { 2 }$
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\sigma _ { \mathrm { r a d } } ^ { 2 } \leq L _ { \operatorname* { m a x } } \cdot \sum _ { m = 1 } ^ { M } \Bigl ( \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } + \frac { n } { 4 } \sigma _ { m , * } ^ { 2 } \Bigr ) .
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
287 The lemma shows that the upper bound on $\sigma _ { \mathrm { r a d } } ^ { 2 }$ depends on the sum of local variances $\textstyle \sum _ { m = 1 } ^ { M } \sigma _ { m , * } ^ { 2 }$ as
|
| 381 |
+
288 well as on the local gradient norms PMm= $\begin{array} { r } { \sum _ { m = 1 } ^ { M } \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } } \end{array}$ . Both of these sums appear in the existing
|
| 382 |
+
289 literature on convergence of Local GD/SGD [Khaled et al., 2019, Woodworth et al., 2020, Yuan et al.,
|
| 383 |
+
290 2020]. We are now ready to present formal convergence results. For simplicity, we will consider
|
| 384 |
+
291 heterogeneous and homogeneous cases separately and assume that $N _ { 1 } = \cdot \cdot \cdot = N _ { M } = n$ . To further
|
| 385 |
+
292 illustrate generality of our results, we will present the heterogeneous assuming strong convexity $R$
|
| 386 |
+
293 and the homogeneous under strong convexity of functions $f _ { m i }$ .
|
| 387 |
+
294 Heterogeneous data. In the case when the data are heterogeneous, we provide the first local RR
|
| 388 |
+
295 method. We can apply either Theorem 2 or Theorem 3, but for brevity, we give only the corollary
|
| 389 |
+
296 obtained from Theorem 3.
|
| 390 |
+
297 Theorem 4. Assume that functions $f _ { m i }$ are convex and $L _ { i }$ -smooth for each $m$ and $i$ . If $R$ is
|
| 391 |
+
298 $\mu$ -strongly convex and $\gamma \leq 1 / L _ { \operatorname* { m a x } }$ , then we have for the iterates produced by Algorithm 3
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 + 2 \gamma \mu n \right) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } L _ { \operatorname* { m a x } } } { M \mu } \sum _ { m = 1 } ^ { M } \Bigl ( \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } + \frac { N } { 4 M } \sigma _ { m , * } ^ { 2 } \Bigr ) . } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
299 For nonconvex analysis, we consider $R \equiv 0$ and require the following standard assumption.
|
| 398 |
+
|
| 399 |
+
300 Assumption 2 (Bounded variance and dissimilarity). There exist constants $\sigma , \zeta > 0$ such that for any 301 $x \in \mathbb { R } ^ { d }$ and
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\begin{array} { r l r l } & { \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left\| \nabla f _ { m i } - \frac { 1 } { n } \nabla F _ { m } ( \boldsymbol { x } ) \right\| ^ { 2 } \leq \sigma ^ { 2 } } & & { \mathrm { a n d } \quad } & { \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \left\| \frac { 1 } { n } \nabla F _ { m } ( \boldsymbol { x } ) - \nabla F ( \boldsymbol { x } ) \right\| ^ { 2 } \leq \zeta ^ { 2 } . } \end{array}
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
Note that above 02 $\begin{array} { r } { \frac { 1 } { n } \nabla F _ { m } ( x ) \ = \ \frac { 1 } { N _ { m } } \nabla F _ { m } ( x ) } \end{array}$ is the gradient of a local dataset and $\nabla F ( x ) \ =$ 303 $\begin{array} { r } { \frac { 1 } { N } \sum _ { l = 1 } ^ { M } \nabla F _ { l } ( x ) } \end{array}$ is the full gradient on all data.
|
| 406 |
+
|
| 407 |
+
304 Theorem 5 (Nonconvex convergence). Let Assumptions 1 and 2 be satisfied, and $R \equiv 0$ (no prox).
|
| 408 |
+
|
| 409 |
+
Then, the communication complexity to achieve 305 $\mathbb { E } \left[ \left. \nabla F ( x _ { T } ) \right. ^ { 2 } \right] \leq \varepsilon ^ { 2 }$ is
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\begin{array} { r } { T = { \cal O } \left( \left( \frac { 1 } { \varepsilon ^ { 2 } } + \frac { \sigma } { \sqrt { n } \varepsilon ^ { 3 } } + \frac { \zeta } { \varepsilon ^ { 3 } } \right) \left( F ( x _ { 0 } ) - F _ { * } \right) \right) . } \end{array}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
306 Notice that by replicating the data locally on each device and thereby increasing the value of $n$
|
| 416 |
+
307 without changing the objective, we can improve the second term in the communication complexity.
|
| 417 |
+
308 In particular, if the data are not too dissimilar $( \sigma \gg \zeta )$ and $\varepsilon$ is small $\begin{array} { r } { \big ( \frac { 1 } { \varepsilon ^ { 3 } } \gg \frac { 1 } { \varepsilon ^ { 2 } } \big ) } \end{array}$ , the second term in
|
| 418 |
+
309 the complexity dominates, and it helps to have more local steps. However, if the data are less similar,
|
| 419 |
+
310 the nodes have to communicate more frequently to get more information about other objectives.
|
| 420 |
+
311 Homogeneous data. For simplicity, in the homogeneous (i.e., i.i.d.) data case we provide guarantees
|
| 421 |
+
312 313 $\nabla F _ { m } ( x _ { * } ) = \mathbf { \bar { 0 } }$ oximal op, and thus $\begin{array} { r } { \sigma _ { m , * } ^ { 2 } = \frac { 1 } { n } \sum _ { j = 1 } ^ { n } \| \nabla f _ { m j } ( x _ { * } ) \| ^ { 2 } } \end{array}$ $F _ { 1 } ( x ) = \cdots = F _ { M } ( x )$ , for any hen given $m$ it holds
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\begin{array} { r } { \sum _ { m = 1 } ^ { M } \sigma _ { m , * } ^ { 2 } = \frac { 1 } { n } \sum _ { m = 1 } ^ { M } \sum _ { i = 1 } ^ { n } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } = \frac { N } { n } \sigma _ { * } ^ { 2 } = M \sigma _ { * } ^ { 2 } , } \end{array}
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
where 314 $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { N } \sum _ { i = 1 } ^ { n } \sum _ { m = 1 } ^ { M } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } } \end{array}$ is the variance of the gradients over all data.
|
| 428 |
+
|
| 429 |
+

|
| 430 |
+
Figure 1: Experimental results for problem (12). The first two plots show with average and confidence intervals estimated on 20 random seeds and clearly demonstrate that one can save a lot of proximal operator computations with our method. The right plot shows the best/worst convergence of ProxSO over 20,000 sampled permutations.
|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
Figure 2: FedRR vs Local-SGD and Scaffold: i.i.d. data (left) and heterogeneous data (middle and right). We set $\lambda _ { 1 } = 0$ and estimate the averages and standard deviations by running 10 random seeds for each method.
|
| 434 |
+
|
| 435 |
+
315 Theorem 6. Let $R ( x ) \equiv 0$ (no prox) and the data be i.i.d., that is $\nabla F _ { m } ( x _ { * } ) = 0$ for any $m$ , where
|
| 436 |
+
316 $x _ { * }$ is the solution of (10). Let $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { N } \sum _ { i = 1 } ^ { n } \sum _ { m = 1 } ^ { M } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } } \end{array}$ . If each $f _ { m j }$ is $L _ { \mathrm { m a x } }$ -smooth
|
| 437 |
+
317 and $\mu$ -strongly convex, then the iterates of Algorithm 3 satisfy
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
\begin{array} { r } { \mathbb { E } \left[ \| x _ { T } - x _ { * } \| ^ { 2 } \right] \leq ( 1 - \gamma \mu ) ^ { n T } \| x _ { 0 } - x _ { * } \| ^ { 2 } + \frac { \gamma ^ { 2 } L _ { \operatorname* { m a x } } N \sigma _ { * } ^ { 2 } } { M \mu } . } \end{array}
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
The most important part of this result is that the last term in Theorem 6 has a factor of $M$ in the denominator, meaning that the convergence bound improves with the number of devices involved.
|
| 444 |
+
|
| 445 |
+
# 7 Experiments1
|
| 446 |
+
|
| 447 |
+
ProxRR vs SGD. In Figure 1, we look at the logistic regression loss with the elastic net regularization,
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } f _ { i } ( x ) + \lambda _ { 1 } \| x \| _ { 1 } + \frac { \lambda _ { 2 } } { 2 } \| x \| ^ { 2 } , } \end{array}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
where each $f _ { i } : \mathbb { R } ^ { d } \mathbb { R }$ is defined as f ${ \mathfrak { r } } _ { i } ( x ) : = - { \bigl ( } b _ { i } \log { \bigl ( } h ( a _ { i } ^ { \top } x ) { \bigr ) } + ( 1 - b _ { i } ) \log { \bigl ( } 1 - h ( a _ { i } ^ { \top } x ) { \bigr ) } { \bigr ) }$ , and where $( a _ { i } , b _ { i } ) \in \mathbb { R } ^ { d } \times \{ 0 , 1 \}$ , $i = 1 , \ldots , N$ are the data samples, $h \colon t \to 1 / ( 1 + e ^ { - t } )$ is the sigmoid function, and $\lambda _ { 1 } , \lambda _ { 2 } \geq 0$ are parameters. We set minibatch sizes to 32 for all methods and use theoretical stepsizes, without any tuning. We denote the heuristic version of RR that performs proximal operator step after each iteration as ‘RR (iteration prox)’. From the experiments, we can see that all methods behave more or less the same way. However, the algorithm that we propose needs only a small fraction of proximal operator evaluations, which gives it a huge advantage whenever the operator takes more time to compute than stochastic gradients.
|
| 454 |
+
|
| 455 |
+
FedRR vs Local SGD and Scaffold. We also compare the performance of FedRR, Local SGD and Scaffold Karimireddy et al. [2020] on homogeneous (i.e., i.i.d.) and heterogeneous data. Since Local SGD and Scaffold require smaller stepsizes to converge, they are significantly slower in the i.i.d. regime, as can be seen in Figure 2. FedRR, however, does not need small initial stepsize and very quickly converges to a noisy neighborhood of the solution. We obtain heterogeneous regime by sorting data with respect to the labels and mixing the sorted dataset with the unsorted one. In this scenario, we also use the same small stepsize for every method to address the data heterogeneity. Clearly, Scaffold is the best in terms of functional values because it does variance reduction with respect to the data. Extending FedRR in the same way might be useful too, but this goes beyond the scope of our paper and we leave it for future work. We also note that in terms of distances from the optimum, FedRR still performs much better than Local SGD and Scaffold.
|
| 456 |
+
|
| 457 |
+
342 References
|
| 458 |
+
343 Kwangjun Ahn, Chulhee Yun, and Suvrit Sra. SGD with shuffling: optimal rates without component convexity and large epoch requirements. arXiv preprint arXiv:2006.06946. Neural Information Processing Systems (NeurIPS) 2020, 2020. (Cited on pages 2, 4, and 31)
|
| 459 |
+
46 Amir Beck. First-Order Methods in Optimization. Society for Industrial and Applied Mathematics, Philadelphia, PA, 2017. doi: 10.1137/1.9781611974997. (Cited on page 5)
|
| 460 |
+
348 Pascal Bianchi, Walid Hachem, and Franck Iutzeler. A coordinate descent primal-dual algorithm and application to distributed asynchronous optimization. IEEE Transactions on Automatic Control, 61 (10):2947–2957, 2015. (Cited on page 7) Antoine Bordes, Léon Bottou, and Patrick Gallinari. SGD-QN: Careful quasi-Newton stochastic gradient descent. 2009. (Cited on page 2)
|
| 461 |
+
353 Léon Bottou. Curiously fast convergence of some stochastic gradient descent algorithms. Unpublished open problem offered to the attendance of the SLDS 2009 conference, 2009. URL http://leon. bottou.org/papers/bottou-slds-open-problem-2009. (Cited on page 2)
|
| 462 |
+
56 Léon Bottou. Stochastic gradient descent tricks. In Neural Networks: Tricks of the Trade, pages 421–436. Springer, 2012. (Cited on page 2)
|
| 463 |
+
358 Kristian Bredies, Karl Kunisch, and Thomas Pock. Total generalized variation. SIAM Journal on Imaging Sciences, 3(3):492–526, 2010. (Cited on page 2) Gong Chen and Marc Teboulle. Convergence Analysis of a Proximal-Like Minimization Algorithm Using Bregman Functions. SIAM Journal on Optimization, 3(3):538–543, 1993. doi: 10.1137/ 0803026. (Cited on page 19)
|
| 464 |
+
363 John Duchi and Yoram Singer. Efficient online and batch learning using forward backward splitting. Journal of Machine Learning Research, 10(Dec):2899–2934, 2009. (Cited on page 3) Eduard Gorbunov, Filip Hanzely, and Peter Richtárik. A Unified Theory of SGD: Variance Reduction, Sampling, Quantization and Coordinate Descent. volume 108 of Proceedings of Machine Learning Research, pages 680–690, Online, 26–28 Aug 2020. PMLR. (Cited on pages 2, 3, 18, and 34) Robert M. Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richtárik. SGD: General Analysis and Improved Rates. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 5200–5209, Long Beach, California, USA, 09–15 Jun 2019. PMLR. (Cited on page 6) Robert M. Gower, Peter Richtárik, and Francis Bach. Stochastic quasi-gradient methods: variance reduction via Jacobian sketching. Mathematical Programming, pages 1–58, 2020. ISSN 0025-5610. doi: 10.1007/s10107-020-01506-0. (Cited on page 34)
|
| 465 |
+
76 Mert Gürbüzbalaban, Asuman Özdaglar, and Pablo A. Parrilo. Why random reshuffling beats ˘ stochastic gradient descent. Mathematical Programming, Oct 2019. ISSN 1436-4646. doi: 10.1007/s10107-019-01440-w. (Cited on page 2)
|
| 466 |
+
79 Jeff Haochen and Suvrit Sra. Random Shuffling Beats SGD after Finite Epochs. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2624–2633, Long Beach, California, USA, 09–15 Jun 2019. PMLR. (Cited on page 2)
|
| 467 |
+
383 Peter Kairouz et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. (Cited on pages 1 and 4)
|
| 468 |
+
85 Hamed Karimi, Julie Nutini, and Mark Schmidt. Linear Convergence of Gradient and ProximalGradient Methods Under the Polyak-Łojasiewicz Condition. In European Conference on Machine Learning and Knowledge Discovery in Databases - Volume 9851, ECML PKDD 2016, page 795–811, Berlin, Heidelberg, 2016. Springer-Verlag. (Cited on page 5)
|
| 469 |
+
|
| 470 |
+
389 Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian U. Stich, and
|
| 471 |
+
390 Ananda Theertha Suresh. SCAFFOLD: Stochastic controlled averaging for federated learning. In
|
| 472 |
+
391 International Conference on Machine Learning, pages 5132–5143. PMLR, 2020. (Cited on pages 9
|
| 473 |
+
392 and 30)
|
| 474 |
+
393 Ahmed Khaled and Peter Richtárik. Better theory for SGD in the nonconvex world. arXiv Preprint
|
| 475 |
+
394 arXiv:2002.03329, 2020. (Cited on pages 4 and 31)
|
| 476 |
+
395 Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. First Analysis of Local GD on
|
| 477 |
+
396 Heterogeneous Data. arXiv preprint arXiv:1909.04715, 2019. (Cited on page 8)
|
| 478 |
+
397 Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for Local SGD on
|
| 479 |
+
398 identical and heterogeneous data. In International Conference on Artificial Intelligence and
|
| 480 |
+
399 Statistics, pages 4519–4529. PMLR, 2020. (Cited on page 29)
|
| 481 |
+
400 Jakub Konecný, H. Brendan McMahan, Felix Yu, Peter Richtárik, Ananda Theertha Suresh, and Dave ˇ
|
| 482 |
+
401 Bacon. Federated learning: strategies for improving communication efficiency. In NIPS Private
|
| 483 |
+
402 Multi-Party Machine Learning Workshop, 2016. (Cited on pages 1 and 4)
|
| 484 |
+
403 Daniel D. Lee and H. Sebastian Seung. Learning the parts of objects by non-negative matrix
|
| 485 |
+
404 factorization. Nature, 401(6755):788–791, 1999. (Cited on page 2)
|
| 486 |
+
405 Stanislaw Lojasiewicz. A topological property of real analytic subsets. Coll. du CNRS, Les équations
|
| 487 |
+
406 aux dérivées partielles, 117:87–89, 1963. (Cited on page 2)
|
| 488 |
+
407 H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas.
|
| 489 |
+
408 Communication-efficient learning of deep networks from decentralized data. In Proceedings of the
|
| 490 |
+
409 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. (Cited on
|
| 491 |
+
410 pages 1 and 4)
|
| 492 |
+
411 Konstantin Mishchenko, Ahmed Khaled, and Peter Richtárik. Random Reshuffling: Simple Analysis
|
| 493 |
+
412 with Vast Improvements. arXiv preprint arXiv:2006.05988. Neural Information Processing Systems
|
| 494 |
+
413 (NeurIPS) 2020, 2020. (Cited on pages 2, 3, 4, 5, 16, 19, 20, 25, and 26)
|
| 495 |
+
414 Dheeraj Nagaraj, Prateek Jain, and Praneeth Netrapalli. SGD without Replacement: Sharper Rates
|
| 496 |
+
415 for General Smooth Convex Functions. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors,
|
| 497 |
+
416 Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings
|
| 498 |
+
417 of Machine Learning Research, pages 4703–4711, Long Beach, California, USA, 09–15 Jun 2019.
|
| 499 |
+
418 PMLR. (Cited on page 2)
|
| 500 |
+
419 Deanna Needell, Nathan Srebro, and Rachel Ward. Stochastic gradient descent, weighted sampling,
|
| 501 |
+
420 and the randomized Kaczmarz algorithm. Mathematical Programming, 155(1):549–573, Jan 2016.
|
| 502 |
+
421 ISSN 1436-4646. doi: 10.1007/s10107-015-0864-7. (Cited on pages 6 and 34)
|
| 503 |
+
422 Neal Parikh and Stephen Boyd. Proximal Algorithms. Foundations and Trends in Optimization, 1(3):
|
| 504 |
+
423 127–239, January 2014. ISSN 2167-3888. doi: 10.1561/2400000003. (Cited on pages 16 and 30)
|
| 505 |
+
424 Andrei Patrascu and Paul Irofti. Stochastic proximal splitting algorithm for composite minimization.
|
| 506 |
+
425 Optimization Letters, pages 1–19, 2021. (Cited on page 5)
|
| 507 |
+
426 Nhan H. Pham, Lam M. Nguyen, Dzung T. Phan, and Quoc Tran-Dinh. ProxSARAH: An efficient
|
| 508 |
+
427 algorithmic framework for stochastic composite nonconvex optimization. Journal of Machine
|
| 509 |
+
428 Learning Research, 21(110):1–48, 2020. (Cited on page 2)
|
| 510 |
+
429 Boris T. Polyak. Gradient methods for minimizing functionals. Zhurnal Vychislitel’noi Matematiki i
|
| 511 |
+
430 Matematicheskoi Fiziki, 3(4):643–653, 1963. (Cited on page 2)
|
| 512 |
+
431 Benjamin Recht and Christopher Ré. Toward a noncommutative arithmetic-geometric mean in
|
| 513 |
+
432 equality: Conjectures, case-studies, and consequences. In S. Mannor, N. Srebro, and R. C.
|
| 514 |
+
433 Williamson, editors, Proceedings of the 25th Annual Conference on Learning Theory, volume 23,
|
| 515 |
+
434 page 11.1–11.24, 2012. Edinburgh, Scotland. (Cited on page 2)
|
| 516 |
+
435 Leonid I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal
|
| 517 |
+
436 algorithms. Physica D: nonlinear phenomena, 60(1-4):259–268, 1992. (Cited on page 2)
|
| 518 |
+
|
| 519 |
+
37 Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: from theory to algorithms. Cambridge University Press, 2014. (Cited on page 1) Ohad Shamir. Without-replacement sampling for stochastic gradient methods. In Advances in neural information processing systems, pages 46–54, 2016. (Cited on page 2) Fanhua Shang, Licheng Jiao, Kaiwen Zhou, James Cheng, Yan Ren, and Yufei Jin. ASVRG: Accelerated Proximal SVRG. In Jun Zhu and Ichiro Takeuchi, editors, Proceedings of Machine Learning Research, volume 95, pages 815–830. PMLR, 14–16 Nov 2018. (Cited on page 2) Sebastian U. Stich. Unified Optimal Analysis of the (Stochastic) Gradient Method. arXiv preprint arXiv:1907.04232, 2019. (Cited on pages 4 and 31) Ruo-Yu Sun. Optimization for Deep Learning: An Overview. Journal of the Operations Research Society of China, 8(2):249–294, Jun 2020. ISSN 2194-6698. doi: 10.1007/s40305-020-00309-6. (Cited on page 31) Junqi Tang, Karen Egiazarian, Mohammad Golbabaee, and Mike Davies. The practicality of stochastic optimization in imaging inverse problems. IEEE Transactions on Computational Imaging, 6:1471– 1485, 2020. (Cited on page 34) Robert Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society: Series B (Methodological), 58(1):267–288, 1996. (Cited on page 2) Trang H. Tran, Lam M. Nguyen, and Quoc Tran-Dinh. Shuffling gradient-based methods with momentum. arXiv preprint arXiv:2011.11884, 2020. (Cited on pages 4 and 31) Blake Woodworth, Kumar Kshitij Patel, and Nathan Srebro. Minibatch vs Local SGD for Heterogeneous Distributed Learning. arXiv preprint arXiv:2006.04735. Neural Information Processing Systems (NeurIPS) 2020, 2020. (Cited on pages 4, 8, and 24) Honglin Yuan, Manzil Zaheer, and Sashank Reddi. Federated composite optimization. arXiv preprint arXiv:2011.08474, 2020. (Cited on page 8) Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67, 2006. (Cited on page 2) Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In Proceedings of the 32nd International Conference on Machine Learning, PMLR, volume 37, pages 1–9, 2015. (Cited on page 4)
|
| 520 |
+
|
| 521 |
+
1. For all authors...
|
| 522 |
+
|
| 523 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 524 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 525 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 526 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 527 |
+
|
| 528 |
+
2. If you are including theoretical results...
|
| 529 |
+
|
| 530 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
|
| 531 |
+
|
| 532 |
+
3. If you ran experiments...
|
| 533 |
+
|
| 534 |
+
(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]
|
| 535 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 536 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 537 |
+
(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]
|
| 538 |
+
|
| 539 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 540 |
+
|
| 541 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 542 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 543 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 544 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 545 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 546 |
+
|
| 547 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 548 |
+
|
| 549 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 550 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 551 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/66H4g_OHdnl/66H4g_OHdnl.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/6MaBrlQ5JM/6MaBrlQ5JM.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE EFFICACY OF $L _ { 1 }$ REGULARIZATION IN NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
A crucial problem in neural networks is to select the most appropriate number of hidden neurons and obtain tight statistical risk bounds. In this work, we present a new perspective towards the bias-variance tradeoff in neural networks. As an alternative to selecting the number of neurons, we theoretically show that $L _ { 1 }$ regularization can control the generalization error and sparsify the input dimension. In particular, with an appropriate $L _ { 1 }$ regularization on the output layer, the network can produce a statistical risk that is near minimax optimal. Moreover, an appropriate $L _ { 1 }$ regularization on the input layer leads to a risk bound that does not involve the input data dimension. Our analysis is based on a new amalgamation of dimension-based and norm-based complexity analysis to bound the generalization error. A consequent observation from our results is that an excessively large number of neurons do not necessarily inflate generalization errors under a suitable regularization.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Neural networks have been successfully applied in modeling nonlinear regression functions in various domains of applications. A critical evaluation metric for a predictive learning model is to measure its statistical risk bound. For example, the $L _ { 1 }$ or $L _ { 2 }$ risks of typical parametric models such as linear regressions are at the order of $( d / n ) ^ { 1 / 2 }$ for small $d$ (Seber & Lee, 2012), where $d$ and $n$ denote respectively the input dimension and number of observations. Obtaining the risk bound for a nonparametric regression model such as neural networks is highly nontrivial. It involves an approximation error (or bias) term as well as a generalization error (or variance) term. The standard analysis of generalization error bounds may not be sufficient to describe the overall predictive performance of a model class unless the data is assumed to be generated from it. For the model class of two-layer feedforward networks and a rather general data-generating process, Barron (1993; 1994) proved an approximation error bound of $O ( r ^ { - 1 / 2 } )$ where $r$ denotes the number of neurons. The author further developed a statistical risk error bound of $O ( ( d / n ) ^ { 1 / 4 } )$ , which is the tightest statistical risk bound for the class of two-layer neural networks up to the authors’ knowledge (for $d < n$ ). This risk bound is based on an optimal bias-variance tradeoff involving an deliberate choice of $r$ . Note that the risk is at a convergence rate much slower than the classical parametric rate. We will tackle the same problem from a different perspective, and obtain a much tighter risk bound.
|
| 12 |
+
|
| 13 |
+
A practical challenge closely related to statistical risks is to select the most appropriate neural network architecture for a particular data domain (Ding et al., 2018). For two-layer neural networks, this is equivalent to selecting the number of hidden neurons $r$ . While a small $r$ tends to underfit, researchers have observed that the network is not overfitting even for moderately large $r$ . Nevertheless, recent research has also shown that an overly large $r$ (e.g., when $r > n$ ) does cause overfitting with high probability (Zhang et al., 2016). It can be shown under some non-degeneracy conditions that a two-layer neural network with more than $n$ hidden neurons can perfectly fit $n$ arbitrary data, even in the presence of noise, which inevitably leads to overfitting. A theoretical choice of $r$ suggested by the asymptotic analysis in (Barron, 1994) is at the order of $( n / d ) ^ { 1 / 2 }$ , and a practical choice of $r$ is often from cross-validation with an appropriate splitting ratio (Ding et al., 2018). An alternative perspective that we advocate is to learn from a single neural network with sufficiently many neurons and an appropriate $L _ { 1 }$ regularization on the neuron coefficients, instead of performing a selection from multiple candidate neural models. A potential benefit of this approach is easier hardware implementation and computation since we do not need to implement multiple models separately. Perhaps more importantly, this perspective of training enables much tighter risk bounds, as we will demonstrate. In this work, we focus on the model class of two-layer feedforward neural networks.
|
| 14 |
+
|
| 15 |
+
Our main contributions are summarized below. First, we prove that $L _ { 1 }$ regularization on the coefficients of the output layer can produce a risk bound $O ( ( d / n ) ^ { 1 / 2 } )$ (up to a logarithmic factor) under the $L _ { 1 }$ training loss, which approaches the minimax optimal rate. Such a rate has not been established under the $L _ { 2 }$ training loss so far. The result indicates a potential benefit of using $L _ { 1 }$ regularization for training a neural network, instead of selecting from a number of neurons. Additionally, a key ingredient of our result is a unique amalgamation of dimension-based and norm-based risk analysis, which may be interesting on its own right. The technique leads to an interesting observation that an excessively large $r$ can reduce approximation error while not increasing generalization error under $L _ { 1 }$ regularizations. This implies that an explicit regularization can eliminate overfitting even when the specified number of neurons is enormous. Moreover, we prove that the $L _ { 1 }$ regularization on the input layer can induce sparsity by producing a risk bound that does not involve $d$ , where $d$ may be much larger compared with the true number of significant variables.
|
| 16 |
+
|
| 17 |
+
Related work on neural network analysis. Despite the practical success of neural networks, a systematic understanding of their theoretical limit remains an ongoing challenge and has motivated research from various perspectives. Cybenko (1989) showed that any continuous function could be approximated arbitrarily well by a two-layer perceptron with sigmoid activation functions. Barron (1993; 1994) established an approximation error bound of using two-layer neural networks to fit arbitrary smooth functions and their statistical risk bounds. A dimension-free Rademacher complexity for deep ReLU neural networks was recently developed (Golowich et al., 2017; Barron & Klusowski, 2019). Based on a contraction lemma, a series of norm-based complexities and their corresponding generalization errors are developed (Neyshabur et al., 2015, and the references therein). Another perspective is to assume that the data are generated by a neural network and convert its parameter estimation into a tensor decomposition problem through the score function of the known or estimated input distribution (Anandkumar et al., 2014; Janzamin et al., 2015; Ge et al., 2017; Mondelli & Montanari, 2018). Also, tight error bounds have been established recently by assuming that neural networks of parsimonious structures generate the data. In this direction, Schmidt-Hieber (2017) proved that specific deep neural networks with few non-zero network parameters can achieve minimax rates of convergence. Bauer & Kohler (2019) developed an error bound that is free from the input dimension, by assuming a generalized hierarchical interaction model.
|
| 18 |
+
|
| 19 |
+
Related work on $L _ { 1 }$ regularization. The use of $L _ { 1 }$ regularization has been widely studied in linear regression problems (Hastie et al., 2009, Chapter 3). The use of $L _ { 1 }$ regularization for training neural networks has been recently advocated in deep learning practice. A prominent use of $L _ { 1 }$ regularization was to empirically sparsify weight coefficients and thus compress a network that requires intensive memory usage (Cheng et al., 2017). The extension of $L _ { 1 }$ regularization to group$L _ { 1 }$ regularization (Yuan & Lin, 2006) has also been extensively used in learning various neural networks (Han et al., 2015; Zhao et al., 2015; Wen et al., 2016; Scardapane et al., 2017). Despite the above practice, the efficacy of $L _ { 1 }$ regularization in neural networks deserves more theoretical study. In the context of two-layer neural networks, we will show that the $L _ { 1 }$ regularizations in the output and input layers play two different roles: the former for reducing generalization error caused by excessive neurons while the latter for sparsifying input signals in the presence of substantial redundancy. Unlike previous theoretical work, we consider the $L _ { 1 }$ loss, which ranks among the most popular loss functions in, e.g., learning from ordinal data (Pedregosa et al., 2017) or imaging data (Zhao et al., 2016), and for which the statistical risk has not been studied previously. In practice, the use of $L _ { 1 }$ loss for training has been implemented in prevalent computational frameworks such as Tensorflow (Google, 2016), Pytorch (Ketkar, 2017), and Keras (Gulli & Pal, 2017).
|
| 20 |
+
|
| 21 |
+
# 2 PROBLEM FORMULATION
|
| 22 |
+
|
| 23 |
+
# 2.1 MODEL ASSUMPTION AND EVALUATION
|
| 24 |
+
|
| 25 |
+
Suppose we have $n$ labeled observations $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 , \dots , n }$ , where $y _ { i }$ ’s are continuously-valued responses or labels. We assume that the underlying data generating model is $y _ { i } = f _ { * } ( \bar { x } _ { i } ) + \varepsilon _ { i }$ for some unknown function $f _ { * } ( \cdot )$ , where $x _ { i }$ ’ $\mathbf { \Phi } _ { \mathbf { \bar { \nu } } } \in \dot { \mathbb { X } } \subset \mathbb { R } ^ { d }$ are independent and identically distributed,
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: A graph showing the two-layer neural network model considered in (2).
|
| 29 |
+
|
| 30 |
+
and $\varepsilon _ { i }$ ’s are independent and identically distributed that is symmetric at zero and
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\mathbb { E } \left( \varepsilon _ { i } ^ { 2 } \mid x _ { i } \right) \leq \tau ^ { 2 } .
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
Here, $\mathbb { X }$ is a bounded set that contains zero, for example $\{ x : \| x \| _ { \infty } \leq M \}$ for some constant $M$ . Our goal is learn a regression model ${ \hat { f } } _ { n } : x \mapsto { \hat { f } } _ { n } ( x )$ for prediction. The $\hat { f } _ { n }$ is obtained from the following form of neural networks
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $a _ { 0 } , a _ { j } , b _ { j } \in \mathbb { R } , w _ { j } \in \mathbb { R } ^ { d }$ , $\textit { j } = \ 1 , \ldots , r$ , are parameters to estimate. We let $a =$
|
| 43 |
+
$[ a _ { 0 } , a _ { 1 } , \ldots , \bar { a } _ { r } ] ^ { \mathrm { { \scriptscriptstyle T } } }$ denote the output layer coefficients. An illustray accomplished by minimizing the empirical risk plus a regularization term. We first consider th The esti-, for somethe output $\textstyle n ^ { - 1 } \sum _ { i = 1 } ^ { \bar { n } } \ell ( y _ { i } , { \overline { { f ( x _ { i } ) } } } )$ $l ( \cdot )$ $L _ { 1 }$
|
| 44 |
+
layer. In particular, we search for such $f$ by the empirical risk minimization from the function class
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\mathcal { F } _ { V } = \left\{ f : \mathbb { R } ^ { d } \to \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V \right\}
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $V$ is a constant. The following statistical risk measures the predictive performance of a learned model $f$ :
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\begin{array} { r } { \mathcal { R } ( f ) \overset { \Delta } { = } \mathbb { E } \ell ( y , f ( x ) ) - \mathbb { E } \ell ( y , f _ { * } ( x ) ) . } \end{array}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
The loss function $\ell ( \cdot )$ is pre-determined by data analysts, usually the $L _ { 1 }$ loss defined by $\ell ( y , \tilde { y } ) =$ $| y - \tilde { y } |$ or the $L _ { 2 }$ loss defined by $\ell _ { 2 } ( y , \tilde { y } ) = ( y - \bar { y } ) ^ { 2 }$ . Under the $L _ { 1 }$ loss, the risk is $\textstyle { \mathcal { R } } ( f ) =$ $\mathbb { E } \left| f _ { * } ( x ) + \varepsilon - f ( x ) \right| - \mathbb { E } \left| \varepsilon \right|$ , which is nonnegative for symmetric random variables $\varepsilon$ . It is typical to use the same loss function for both training and evaluation.
|
| 57 |
+
|
| 58 |
+
# 2.2 NOTATION
|
| 59 |
+
|
| 60 |
+
Throughout the paper, we use $n , d , k , r$ to denote the number of observations, the number of input variables or input dimension, the number of significant input variables or sparsity level, the number of neurons (or hidden dimension), respectively. We write $a _ { n } \gtrsim b _ { n }$ , $b _ { n } \lesssim a _ { n }$ , or $b _ { n } = O ( a _ { n } )$ , if $\left| b _ { n } / a _ { n } \right| < c$ for some constant $c$ for all sufficiently large $n$ . We write $a _ { n } \asymp b _ { n }$ if $a _ { n } \gtrsim b _ { n }$ as well as $a _ { n } \lesssim b _ { n }$ . Let $\mathcal { N } ( \boldsymbol { \mu } , V )$ denote Gaussian distribution with mean $\pmb { \mu }$ and covariance $V$ . Let $\| \cdot \| _ { 1 }$ and $\| \cdot \| _ { 2 }$ denote the common $L _ { 1 }$ and $L _ { 2 }$ vector norms, respectively. Let $\mathbb { X }$ denote the essential support of $X$ . For any vector $z \in \mathbb { R } ^ { d }$ , we define $\begin{array} { r } { \| \boldsymbol { z } \| _ { \mathbb { X } } \triangleq \operatorname* { s u p } _ { \boldsymbol { x } \in \mathbb { X } } | \boldsymbol { x } ^ { \top } \boldsymbol { z } | } \end{array}$ , which may or may not be infinity. If $\mathbb { X } = \{ x : \| x \| _ { \infty } \leq M \}$ , $\| \boldsymbol { z } \| _ { \mathbb { X } }$ is equivalent to $M \| z \| _ { 1 }$ . Throughout the paper, $\hat { f } _ { n }$ denotes the estimated regression function with $n$ being the number of observations.
|
| 61 |
+
|
| 62 |
+
# 2.3 ASSUMPTIONS AND CLASSICAL RESULTS
|
| 63 |
+
|
| 64 |
+
We introduce some technical assumptions necessary for our analysis, and state-of-the-art statistical risk bounds built through dimension-based complexity analysis.
|
| 65 |
+
|
| 66 |
+
Assumption 1. The activation function $\sigma ( \cdot )$ is a bounded function on the real line satisfying $\sigma ( x ) $ 1 as $x \to \infty$ and $\sigma ( x ) 0$ as $x \to - \infty$ , and it is $L$ -Lipschitz for some constant $L$ .
|
| 67 |
+
|
| 68 |
+
Assumption 2. The regularization constant $V$ is larger than $2 C + f _ { * } ( 0 )$ , where $C$ is any constant such that the Fourier transform of $f _ { * }$ , denoted by $F$ , satisfies
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\int _ { \mathbb { R } ^ { d } } \| \omega \| _ { \mathbb { X } } F ( d \omega ) \leq C .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
Assumption 3. $\sigma ( x )$ approaches its limits at least polynomially fast, meaning that $| \sigma ( x ) - \mathbf { 1 } \{ x >$ $0 \} | < \varepsilon$ for all $| x | > x _ { \varepsilon }$ where $x _ { \varepsilon }$ is a polynomial of $1 / \varepsilon$ . Also, the value of $\eta \triangleq \operatorname* { s u p } _ { j } \| w _ { j } \| _ { \mathbb { X } }$ scales with $n$ polynomially meaning that $\log \eta = O ( \log n )$ as $n \to \infty$ .
|
| 75 |
+
|
| 76 |
+
Assumption 4. There exists a constant $c > 0$ and a bounded subset ${ \mathcal { S } } \subset \mathbb { R }$ such that $\mathbb { P } ( X \in { \mathcal { S } } ) > c$ and $\mathrm { i n f } _ { x \in S } \sigma ^ { \prime } ( x ) > c$ for $X \sim \mathcal { N } ( 0 , 1 )$ .
|
| 77 |
+
|
| 78 |
+
We explain each assumption below. The above notation of $C , V$ follow those in (Barron, 1993; 1994). Assumption 1 specifies the class of the activation functions we consider. A specific case is the popular activation function $\sigma ( x ) = 1 / \{ 1 { + } \exp ( - x ) \}$ . Assumption 2, first introduced in (Barron, 1993), specifies the smoothness condition for $f _ { * }$ to ensure the approximation property of neural networks (see Theorem 2.1). In Assumption 3, the condition for $w$ is for technical convenience. It could also be replaced with the following alternative condition: There exists a constant $c > 0$ such that the distribution of $x$ satisfies
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\operatorname* { s u p } _ { w : \| w \| _ { 2 } = 1 } \mathbb { P } \big ( \log ( | w ^ { \top } x | ) < c \log \varepsilon \big ) < \varepsilon
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
for any $\varepsilon \in ( 0 , 1 )$ . Simply speaking, the input data $x$ is not too small with high probability. This condition is rather mild. For example, it holds when each component of $x$ has a a bounded density function. This alternative condition ensures that for some small constant $\varepsilon > 0$ and any $w \in \mathbb { R } ^ { \tilde { d } }$ , there exists a surrogate of $w$ $, \hat { w } \in \mathbb R ^ { d }$ with $\log \| \hat { w } \| _ { 2 } = O ( - \log \varepsilon )$ , such that
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathbb { P } ( | \sigma ( w ^ { \top } x ) - \sigma ( \hat { w } ^ { \top } x ) | > \varepsilon ) < \varepsilon .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
And this can be used to surrogate the assumption of $w$ in Assumption 3 throughout the proofs in the appendix. Assumption 4 means that $\sigma ( \cdot )$ is not a nearly-constant function. This condition is only used to bound the minimax lower bound in Theorem 3.2.
|
| 91 |
+
|
| 92 |
+
Theorem 2.1 (Approximation error bound (Barron, 1993)). Suppose that Assumptions 1, 2, 3 hold. We have
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\operatorname* { i n f } _ { f \in \mathcal { F } _ { V } } \left\{ \int _ { \mathbb { X } } ( f ( x ) - f _ { * } ( x ) ) ^ { 2 } \mu ( d x ) \right\} ^ { 1 / 2 } \leq 2 C \left( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \right) ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $\mu$ denotes a probability measure on $\mathbb { X } ,$
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\delta _ { \eta } = \operatorname* { i n f } _ { 0 < \varepsilon < 1 / 2 } \biggl \{ 2 \varepsilon + \operatorname* { s u p } _ { | x | > \varepsilon } \bigl | \sigma ( \eta x ) - \mathbf { 1 } \bigl \{ x > 0 \bigr \} \bigr | \biggr \} ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
$\eta$ is defined in Assumption 3, and $C$ is defined in (4).
|
| 105 |
+
|
| 106 |
+
Theorem 2.2 (Statistical risk bound (Barron, 1994)). Suppose that Assumptions $^ { l }$ , 2, 3 hold. Then the $L _ { 2 }$ estimator ${ \hat { f } } _ { n }$ in $\mathcal { F } _ { V }$ satisfies $\mathbb { E } \left\{ \hat { f } _ { n } ( x ) - f _ { * } ( x ) \right\} ^ { 2 } \lesssim V ^ { 2 } / r + ( r d \log n ) / n$ . In particular, $i f$ we choose $r \asymp V { \sqrt { n / ( d \log n ) } }$ , then ${ \mathbb E } \left\{ \hat { f } _ { n } ( x ) - f _ { * } ( x ) \right\} ^ { 2 } \lesssim V \sqrt { ( d \log n ) / n }$ .
|
| 107 |
+
|
| 108 |
+
It is known that a typical parametric rate under the $L _ { 2 }$ loss is at the order of $O ( d / n )$ , much faster than the above result. This gap is mainly due to excessive model complexity in bounding generalization errors. We will show in Section 3 that the gap in the rate of convergence can be filled when using $L _ { 1 }$ loss. Our technique will be based on the machinery of Rademacher complexity, and we bound this complexity through a joint analysis of the norm of coefficients (‘norm-based’) as well as dimension of parameters (‘dimension-based’).
|
| 109 |
+
|
| 110 |
+
# 2.4 MODEL COMPLEXITY AND GENERALIZATION ERROR
|
| 111 |
+
|
| 112 |
+
The statistical risk consists of two parts. The first part is an approximation error term non-increasing in the number of neurons $r$ , and the second part describes generalization errors. The key issue for risk analysis is to bound the second term using a suitable model complexity and then tradeoff with the first term. We will develop our theory based on the following measure of complexity.
|
| 113 |
+
|
| 114 |
+
Let $\mathcal { F }$ denote a class of functions each mapping from $\mathbb { X }$ to $\mathbb { R }$ , and $x _ { 1 } , x _ { 2 } , \ldots , x _ { n } \in \mathbb { X }$ . Following a similar terminology as in (Neyshabur et al., 2015), the Rademacher complexity, or simply ‘complexity’, of a function class $\mathcal { F }$ is defined by $\begin{array} { r } { \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } | n ^ { - 1 } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) | } \end{array}$ , where $\xi _ { i } , i = 1 , 2 , \ldots , n$ are independent symmetric Bernoulli random variables.
|
| 115 |
+
|
| 116 |
+
Lemma 2.3 (Rademacher complexity of $\mathcal { F } _ { V }$ ). Suppose that Assumptions $^ { l }$ , 3 hold. Then for the Rademacher complexity of $\mathcal { F } _ { V }$ , we have
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \lesssim \frac { V \sqrt { d \log n } } { \sqrt { n } } .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
The proof is included in Appendix A.1. The bound in (6) is derived from an amalgamation of dimension-based and norm-based analysis elaborated in the appendix. It is somewhat surprising that the bound does not explicitly involve the approximation error part (that depends on $r$ and $\eta$ ). This Rademacher complexity bound enables us to derive tight statistical risk bounds in the following section.
|
| 123 |
+
|
| 124 |
+
# 3 MAIN RESULTS
|
| 125 |
+
|
| 126 |
+
3.1 STATISTICAL RISK BOUND FOR THE $L _ { 1 }$ REGULARIZED NETWORKS IN (3)
|
| 127 |
+
|
| 128 |
+
Theorem 3.1 (Statistical risk bound). Suppose that Assumptions 1, 2, 3 hold. Then the constrained $L _ { 1 }$ estimator $\hat { f } _ { n }$ over $\mathcal { F } _ { V }$ satisfies
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim \bigg ( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \bigg ) C + \frac { V \sqrt { d \log n } + \tau } { \sqrt { n } } ,
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $\delta _ { \eta }$ is defined in (5), and $\tau$ was introduced in $( l )$ . Moreover, choosing the parameters $r , \eta$ large enough, we have
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim \frac { V \sqrt { d \log n } + \tau } { \sqrt { n } } .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
The proof is in Appendix A.2. We briefly explain our main idea in deriving the risk bound (7). A standard statistical risk bound contains two parts which correspond to the approximation error and generalization error, respectively. The approximation error part in (7) is the first term, which involves the hidden dimension $r$ and the norm of input coefficients through $\eta$ . This observation motivates us to use the norm of output-layer coefficients through $V$ and the input dimension $d$ to derive a generalization error bound. In this way, the generalization error term does not involve $r$ already used for bounding the approximation error, and thus a bias-variance tradeoff through $r$ is avoided. This thought leads to the generalization error part in (7), which is the second term involving $V$ and $d$ . Its proof combines the machinery of both dimension-based and norm-based complexity analysis. From our analysis, the error bound in Theorem 3.1 is a consequence of the $L _ { 1 }$ loss function and the employed $L _ { 1 }$ regularization. In comparison with the previous result of Theorem 2.2, the bound obtained in Theorem 3.1 is tight and it approaches the parametric rate $\sqrt { d / n }$ for the $d < n$ regime. Though we can only prove for $L _ { 1 }$ loss in this work, we conjecture that the same rate is achieved using $L _ { 2 }$ loss.
|
| 141 |
+
|
| 142 |
+
In the following, we further show that the above risk bound is minimax optimal. The minimax optimality indicates that deep neural networks with more than two layers will not perform much better than shallow neural networks when the underlying regression function belongs to $\mathcal { F } _ { V }$ .
|
| 143 |
+
|
| 144 |
+
Theorem 3.2 (Minimax risk bound). Suppose that Assumptions 1 and 4 hold, and $x _ { 1 } , x _ { 2 } , \dotsc , x _ { n } \stackrel { i : } { \sim }$ id∼ $\mathcal { N } ( 0 , \pmb { I } _ { d } )$ , then $\operatorname { i n f } _ { \hat { f } _ { n } }$ $\begin{array} { r } { \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \mathcal { R } ( \hat { f } _ { n } ( x ) ) \gtrsim V \sqrt { d / n } } \end{array}$ .
|
| 145 |
+
|
| 146 |
+
Here the $\mathcal { F } _ { V }$ is the same one as defined in (3). All the smooth functions $f _ { * } ( \cdot )$ that satisfy $V >$ $2 C + f _ { * } ( 0 )$ and (4) belong to $\mathcal { F } _ { V }$ according to Theorem 2.1. The proof is included in Appendix A.3.
|
| 147 |
+
|
| 148 |
+
# 3.2 ADAPTIVENESS TO THE INPUT SPARSITY
|
| 149 |
+
|
| 150 |
+
It is common to input a large dimensional signal to a neural network, while only few components are genuinely significant for prediction. For example, in environmental science, high dimensional weather signals are input for prediction while few are physically related (Shi et al., 2015). In image processing, the image label is relevant to few background pixels (Han et al., 2015). In natural language processing, a large number of redundant sentences sourced from Wikipedia articles are input for language prediction (Diao et al., 2019). The practice motivates our next results to provide a tight risk bound for neural networks whose input signals are highly sparse.
|
| 151 |
+
|
| 152 |
+
Assumption 5. There exists a positive integer $k \leq d$ and an index set $S \subset \{ 1 , \ldots , d \}$ with card $( S ) =$ $k$ , such that $f _ { \ast } ( x ) = g _ { \ast } ( x _ { S } )$ for some function $g _ { * } ( \cdot )$ with probability one.
|
| 153 |
+
|
| 154 |
+
The subset $S$ is generally unknown to data analysts. Nevertheless, if we know $k$ , named the sparsity level, the risk bound could be further improved by a suitable regularization on the input coefficients. We have the following result where $d$ is replaced with $k$ in the risk bound of Theorem 3.1.
|
| 155 |
+
|
| 156 |
+
Proposition 3.3. Suppose that that Assumptions 1, 2, 3, 5 hold. Suppose that $\hat { f } _ { n }$ is the $L _ { 1 }$ estimator over the following function class
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\bigg \{ f : \mathbb { R } ^ { d } \to \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V , \operatorname* { s u p } _ { j } \| w _ { j } \| _ { 0 } \leq k \bigg \} .
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
Then $\mathcal { R } ( \hat { f } _ { n } ) \lesssim \sqrt { \{ k \log ( d n ) \} / n }$ .
|
| 163 |
+
|
| 164 |
+
The proof is included in Appendix A.4. The above statistical risk bound is also minimax optimal according to a similar argument in Theorem 3.2. From a practical point of view, the above $L _ { 0 }$ constraint is usually difficult to implement, especially for a large input dimension $d$ . Alternatively, one may impose an $L _ { 1 }$ constraint instead of an $L _ { 0 }$ constraint on the input coefficients. Our next result is concerned with the risk bound when the model is learned from a joint regularization on the output and input layers. For technical convenience, we will assume that $\mathbb { X }$ is a bounded set.
|
| 165 |
+
|
| 166 |
+
Theorem 3.4. Consider the following function class of two-layer neural networks
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\mathcal { F } _ { V , \eta } = \Bigg \{ f : \mathbb { R } ^ { d } \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V , \operatorname* { s u p } _ { 1 \leq j \leq r } ( \| w _ { j } \| _ { 1 } + | b _ { j } | ) \leq \eta \Bigg \} .
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
Suppose that $V \gtrsim C$ , where $C$ is defined in (4). Then the constrained $L _ { 1 }$ estimator $\hat { f } _ { n }$ over $\mathcal { F } _ { V , \eta }$ satisfies
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim C \left( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \right) + \frac { V \eta + \tau } { \sqrt { n } } ,
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
where $\delta _ { \eta }$ is defined in (5). In particular, choosing $r$ large enough, we have
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim C \delta _ { \eta } + \frac { V \eta + \tau } { \sqrt { n } }
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
which does not involve the input dimension $d$ and the number of hidden neurons $r$ . Moreover,
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\sigma ( x ) = 1 / ( 1 + e ^ { - x } ) , \quad \eta \asymp \biggl ( n \log ^ { 2 } n \biggr ) ^ { 1 / 3 } , t h e n \mathscr { R } ( \hat { f } _ { n } ) \lesssim V \{ ( \log n ) / n \} ^ { 1 / 3 } .
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
The proof is included in Appendix A.5. In the above result, the risk bound is at the order of $O ( n ^ { - 1 / 3 } )$ , which is slower than the $O ( n ^ { - 1 / 2 } )$ in the previous Theorem 3.1 and Proposition 3.3 if ignoring $d$ and logarithmic factors of $n$ . However, for a large input dimension $d$ that is even much larger than $n$ , the bound can be much tighter than the previous bounds since it is dimension-free.
|
| 191 |
+
|
| 192 |
+
# 4 CONCLUSION AND FURTHER REMARKS
|
| 193 |
+
|
| 194 |
+
We studied the tradeoff between model complexity and statistical risk in two-layer neural networks from the explicit regularization perspective. We end our paper with two future problems. First, in Theorem 3.4, For a small $d$ , the order of $n ^ { - 1 / 3 }$ seems to be an artifact resulting from our technical arguments. We conjecture that in the small $d$ regime, this risk bound could be improved to $O ( n ^ { - 1 / 2 } )$ by certain adaptive regularizations. Second, it would be interesting to emulate the current approach to yield similarly tight risk bounds for deep forward neural networks.
|
| 195 |
+
|
| 196 |
+
REFERENCES
|
| 197 |
+
Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. J. Mach. Learn. Res., 15:2773–2832, 2014.
|
| 198 |
+
Andrew R Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Trans. Inf. Theory, 39(3):930–945, 1993.
|
| 199 |
+
Andrew R Barron. Approximation and estimation bounds for artificial neural networks. Machine learning, 14(1):115–133, 1994.
|
| 200 |
+
Andrew R Barron and Jason M Klusowski. Complexity, statistical risk, and metric entropy of deep nets using total path variation. arXiv preprint arXiv:1902.00800, 2019.
|
| 201 |
+
Benedikt Bauer and Michael Kohler. On deep learning as a remedy for the curse of dimensionality in nonparametric regression. Ann. Stat., 47(4):2261–2285, 2019.
|
| 202 |
+
Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. A survey of model compression and acceleration for deep neural networks. arXiv preprint arXiv:1710.09282, 2017.
|
| 203 |
+
George Cybenko. Approximations by superpositions of a sigmoidal function. Math. Control Signals Syst., 2:183–192, 1989.
|
| 204 |
+
Enmao Diao, Jie Ding, and Vahid Tarokh. Restricted recurrent neural networks. 2019 IEEE Conf. on Big Data, 2019.
|
| 205 |
+
Jie Ding, Vahid Tarokh, and Yuhong Yang. Model selection techniques: An overview. IEEE Signal Process. Mag., 35(6):16–34, 2018.
|
| 206 |
+
Rong Ge, Jason D Lee, and Tengyu Ma. Learning one-hidden-layer neural networks with landscape design. arXiv preprint arXiv:1711.00501, 2017.
|
| 207 |
+
Noah Golowich, Alexander Rakhlin, and Ohad Shamir. Size-independent sample complexity of neural networks. arXiv preprint arXiv:1712.06541, 2017.
|
| 208 |
+
Research Team Google. Tensorflow: A system for large-scale machine learning. Proc. 12th Symp. Operating Syst. Des. Implementation, pp. 265–283, 2016.
|
| 209 |
+
Antonio Gulli and Sujit Pal. Deep Learning with Keras. Packt Publishing Ltd, 2017.
|
| 210 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. Advance. Neural Inf. Process. Sys., pp. 1135–1143, 2015.
|
| 211 |
+
Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The elements of statistical learning: data mining, inference, and prediction. Springer Science & Business Media, 2009.
|
| 212 |
+
Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv preprint arXiv:1506.08473, 2015.
|
| 213 |
+
Nikhil Ketkar. Introduction to pytorch. Deep learning with python, pp. 195–208, 2017.
|
| 214 |
+
Marco Mondelli and Andrea Montanari. On the connection between learning two-layers neural networks and tensor decomposition. arXiv preprint arXiv:1802.07301, 2018.
|
| 215 |
+
Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. Conf. Learning Theory, pp. 1376–1401, 2015.
|
| 216 |
+
Fabian Pedregosa, Francis Bach, and Alexandre Gramfort. On the consistency of ordinal regression methods. J. Mach. Learn. Res., 18(1):1769–1803, 2017.
|
| 217 |
+
Simone Scardapane, Danilo Comminiello, Amir Hussain, and Aurelio Uncini. Group sparse regularization for deep neural networks. Neurocomputing, 241:81–89, 2017.
|
| 218 |
+
Johannes Schmidt-Hieber. Nonparametric regression using deep neural networks with relu activation function. arXiv preprint arXiv:1708.06633, 2017.
|
| 219 |
+
George AF Seber and Alan J Lee. Linear regression analysis, volume 329. John Wiley & Sons, 2012.
|
| 220 |
+
Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advance. Neural Inf. Process. Sys., pp. 802–810, 2015.
|
| 221 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. Advance. Neural Inf. Process. Sys., pp. 2074–2082, 2016.
|
| 222 |
+
Yuhong Yang and Andrew Barron. Information-theoretic determination of minimax rates of convergence. Ann. Stat., pp. 1564–1599, 1999.
|
| 223 |
+
Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. J. R. Stat. Soc. Ser. B Methodol., 68(1):49–67, 2006.
|
| 224 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
|
| 225 |
+
Hang Zhao, Orazio Gallo, Iuri Frosio, and Jan Kautz. Loss functions for image restoration with neural networks. IEEE Trans. Comput., 3(1):47–57, 2016.
|
| 226 |
+
Lei Zhao, Qinghua Hu, and Wenwu Wang. Heterogeneous feature selection with multi-modal deep neural networks and sparse group LASSO. IEEE Trans. Multimed., 17(11):1936–1948, 2015.
|
| 227 |
+
|
| 228 |
+
# A APPENDIX
|
| 229 |
+
|
| 230 |
+
# A.1 PROOF OF LEMMA 2.3
|
| 231 |
+
|
| 232 |
+
We first prove (6), which uses an amalgamation of dimension-based and norm-based analysis. For the output layer, we use the following norm-based analysis
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\begin{array} { r l } & { \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) \right| = \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \langle a , \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( W ^ { \top } z _ { i } + b ) \rangle \right| } \\ & { \leq \operatorname* { s u p } \left\| a \right\| _ { 1 } \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left\| \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( W ^ { \top } z _ { i } + b ) \right\| _ { \infty } \leq V \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \underset { j } { \operatorname* { m a x } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } z _ { i } + b _ { j } ) \bigg | } \\ & { \leq V \mathbb { E } \underset { w \in \mathbb { R } ^ { d } } { \operatorname* { s u p } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \bigg | . } \end{array}
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
For notational convenience, we define $w _ { 0 } = 0 , b _ { 0 } = 0$ , and $a _ { 0 } = \sigma ( 0 ) ^ { - 1 } a _ { 0 } \sigma ( w _ { 0 } ^ { \top } z + b _ { 0 } )$ so that $a _ { 0 }$ can be treated in a similar manner as other $a _ { i }$ ’s. Without loss of generality, we do not separately consider $a _ { 0 }$ in the following proofs.
|
| 239 |
+
|
| 240 |
+
Next, we prove that
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
\mathbb { E } \operatorname* { s u p } _ { w \in \mathbb { R } ^ { d } } \Big | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \Big | \lesssim \sqrt { \frac { d \log n } { n } } ,
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
and thus conclude the proof. The proof will be based on an $\varepsilon$ -net argument together with the union bound. For any $\varepsilon$ , let $\bar { W } _ { \varepsilon } \subset \mathbb { R } ^ { d }$ denote the subset
|
| 247 |
+
|
| 248 |
+
$$
|
| 249 |
+
W _ { \varepsilon } = \left\{ w = \frac { \varepsilon } { 2 d } ( i _ { 1 } , i _ { 2 } , \ldots , i _ { d } ) : i _ { j } \in \mathbb { Z } , \| w \| _ { 1 } \leq \eta _ { n } \right\} .
|
| 250 |
+
$$
|
| 251 |
+
|
| 252 |
+
Then, for any $w , b$ , there exists some element $\hat { w } \in W _ { \varepsilon }$ such that
|
| 253 |
+
|
| 254 |
+
$$
|
| 255 |
+
\begin{array} { r l } & { \underset { \tau \in \mathbb X } { \operatorname* { s u p } } | \sigma ( w ^ { \top } z + b ) - \sigma ( \hat { w } ^ { \top } z + \hat { b } ) | \leq \underset { z } { \operatorname* { s u p } } | ( w ^ { \top } z + b ) - ( \hat { w } ^ { \top } z + \hat { b } ) | \leq \underset { z } { \operatorname* { s u p } } | ( w - \hat { w } ) ^ { \top } z | + | b - \hat { b } | } \\ & { \qquad \leq \| w - \hat { w } \| _ { 1 } \underset { z } { \operatorname* { s u p } } \| z \| _ { \infty } + | b - \hat { b } | \leq \varepsilon , } \end{array}
|
| 256 |
+
$$
|
| 257 |
+
|
| 258 |
+
where $\hat { b } = \left( \varepsilon / 2 d \right) \lfloor \left( 2 d b / \varepsilon \right) \rfloor$ and $\lfloor \cdot \rfloor$ is the floor function. By Bernstein’s Inequality, for any $w , b$
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
\mathbb { P } \bigg ( \vert \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \vert > t \bigg ) \le 2 \exp \Biggl \{ - \frac { n t ^ { 2 } } { 2 ( 1 + t / 3 ) } \Biggr \} .
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
By taking the union bound over $W _ { \varepsilon }$ , and use the fact that log card $\lfloor ( W _ { \varepsilon } ) \lesssim d \log ( n d / \varepsilon )$ , we obtain
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
\operatorname* { s u p } _ { w \in \mathbb { R } ^ { d } } \left. \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \right. \lesssim \varepsilon + \sqrt { \frac { d } { n } \log \frac { n d } { \varepsilon } \log \frac { 1 } { \delta } } ,
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
with probability at least $1 - \delta$ . Then the desired result is obtained by taking $\varepsilon \sim \sqrt { ( d \log n ) / n }$
|
| 271 |
+
|
| 272 |
+
# A.2 PROOF OF THEOREM 3.1
|
| 273 |
+
|
| 274 |
+
The proof is based on the following contraction lemma used in (Neyshabur et al., 2015).
|
| 275 |
+
|
| 276 |
+
Lemma A.1 (Contraction Lemma). Suppose that $g$ is $L$ -Lipschitz and $g ( 0 ) = 0$ . Then for any function class $\mathcal { F }$ mapping from $\mathbb { X }$ to $\mathbb { R }$ and any set $\{ x _ { 1 } , x _ { 2 } , \ldots , x _ { n } \}$ , we have
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } \biggl | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } g ( f ( x _ { i } ) ) \biggr | \leq 2 L \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } \biggl | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \biggr | .
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
With the above lemma, we have the following result.
|
| 283 |
+
|
| 284 |
+
Lemma A.2. The constrained $L _ { 1 }$ estimator ${ \hat { f } } _ { n }$ over $\mathcal { F }$ satisfies
|
| 285 |
+
|
| 286 |
+
$$
|
| 287 |
+
\mathcal { R } ( \hat { f } _ { n } ) \leq \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } | f ( x ) - f _ { * } ( x ) | + 2 \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) | + 2 \sqrt { \frac { \mathbb { E } y ^ { 2 } } { n } } .
|
| 288 |
+
$$
|
| 289 |
+
|
| 290 |
+
Proof. Define the empirical risk as:
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
\mathcal { R } _ { n } ( f ) = \mathbb { E } \left( \frac { 1 } { n } \sum _ { i = 1 } ^ { n } | f _ { * } ( x _ { i } ) + \varepsilon _ { i } - f ( x _ { i } ) | \right) - \mathbb { E } | \varepsilon | .
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
Since $\hat { f } _ { n }$ minimizes $\begin{array} { r } { n ^ { - 1 } \sum _ { i = 1 } ^ { n } | f _ { * } ( x _ { i } ) + \varepsilon _ { i } - f ( x _ { i } ) | } \end{array}$ in $\mathcal { F }$ , we have
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\begin{array} { r } { \mathcal { R } ( \hat { f } _ { n } ) \leq \mathcal { R } ( \hat { f } _ { n } ) - \{ \mathcal { R } _ { n } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } ) \} = \{ \mathcal { R } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } _ { n } ) \} + \mathcal { R } _ { n } ( f _ { 0 } ) , } \end{array}
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
where $f _ { 0 } = \arg \operatorname* { m i n } _ { f \in \mathcal { F } } \mathcal { R } ( f )$ . We also have
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\mathcal { R } _ { n } ( f _ { 0 } ) = \mathcal { R } ( f _ { 0 } ) = \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } \left( | f _ { * } ( x ) + \varepsilon - f ( x _ { i } ) | - | \varepsilon | \right) \leq \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } \left| f ( x ) - f _ { * } ( x ) \right| .
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
In the following, we will analyze the term $\mathcal { R } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } _ { n } )$ in (14). Let $z _ { i }$ ’s denote independent and identically distributed copies of $x _ { i }$ ’s.
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\begin{array} { r l } & { \mathcal { R } \big ( \hat { f } _ { n } \big ) - \mathcal { R } _ { n } \big ( \hat { f } _ { n } \big ) = \mathbb { E } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \bigg \{ | \hat { f } _ { n } ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | - | \hat { f } _ { n } ( x _ { i } ) - f _ { * } ( x _ { i } ) - \varepsilon _ { i } | \bigg \} } \\ & { \qquad \leq \mathbb { E } \displaystyle \operatorname* { s u p } _ { f \in \mathcal { F } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \bigg \{ | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | - | f ( x _ { i } ) - f _ { * } ( x _ { i } ) - \varepsilon _ { i } | \bigg \} } \\ & { \qquad \leq 2 \mathbb { E } \displaystyle \operatorname* { s u p } _ { f \in \mathcal { F } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | , } \end{array}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
where $\xi _ { 1 } , \ldots , \xi _ { n }$ are independent and identically distributed symmetric Bernoulli random variables that are independent with $z _ { i }$ ’s. According to Lemma A.1, since $g ( x ) \ = \ | x |$ is 1-Lipschitz and $g ( 0 ) = 0$ , we have
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\begin{array} { r l } & { \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \big | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } \big | \leq 2 \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \Big | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \big ( f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } \big ) \Big | } \\ & { \qquad \leq 2 \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) \bigg | + 2 \sqrt { \frac { \mathbb { E } y ^ { 2 } } { n } } . } \end{array}
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
Combining this and (15), we conclude the proof of Lemma A.2.
|
| 321 |
+
|
| 322 |
+
Proof of Theorem 3.1. The proof of (7) is a direct consequence of Lemma 2.3, Lemma A.2, Theorem 2.1 and the fact that the first moment is no more than the second moment. The proof of (8) follows from the fact that $\delta ( \eta ) \to 0$ as $\eta \infty$ .
|
| 323 |
+
|
| 324 |
+
# A.3 PROOF OF THEOREM 3.2
|
| 325 |
+
|
| 326 |
+
Define a subclass of $\mathcal { F } _ { V }$ by
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\mathcal { F } _ { 0 } = \Bigg \{ f : \mathbb { R } ^ { d } \mathbb { R } \Big | f ( x ) = V \sigma ( w ^ { \top } x ) , \| w \| _ { 2 } = 1 \Bigg \} .
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
In the following, we will prove the minimax bound for $\mathcal { F } _ { V }$ by analyzing $\mathcal { F } _ { 0 }$ . Notice that
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { r } { \mathbb { E } | \sigma ( w _ { 1 } ^ { \top } x ) - \sigma ( w _ { 2 } ^ { \top } x ) | \geq \mathbb { E } \operatorname* { i n f } _ { u } \sigma ^ { \prime } ( u ) \cdot | w _ { 1 } ^ { \top } x - w _ { 2 } ^ { \top } x | \cdot \mathbb { I } ( w _ { 1 } ^ { \top } x , w _ { 2 } ^ { \top } x \in S ) \gtrsim \| w _ { 1 } - w _ { 2 } \| _ { 2 } . } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Let $M _ { 1 } ( \varepsilon )$ denote the packing $\varepsilon$ -entropy of $\mathcal { F } _ { 0 }$ with $L _ { 1 }$ distance, then $M _ { 1 } ( \varepsilon )$ is greater than the packing $\varepsilon$ -entropy of $\mathbb { B } _ { 1 } ^ { \bar { d } }$ with $L _ { 2 }$ distance, which means $M _ { 1 } ( \varepsilon ) \gtrsim d$ . Let $V _ { k } ( \varepsilon )$ denote the covering $\varepsilon$ -entropy of $\mathcal { F } _ { 0 }$ with the square root Kullback-Leibler divergence, then according to its relation with the $L _ { 2 }$ distance shown in (Yang & Barron, 1999), we have
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
V _ { k } ( \varepsilon ) \leq M _ { 2 } ( \sqrt { 2 } \varepsilon ) \lesssim d \log \frac { 1 } { \varepsilon } ,
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
where $M _ { 2 } ( \varepsilon )$ denote the packing $\varepsilon$ -entropy of $\mathcal { F } _ { V }$ with $L _ { 2 }$ loss function. The second inequality is proved in a similar way to the proof of Lemma 2.3, which is omitted here for brevity. Hence, according to (Yang & Barron, 1999, Theorem 1),
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\operatorname* { i n f } _ { \hat { f } _ { n } } \operatorname* { s u p } _ { f \in { \mathcal { F } } _ { V } } { \mathcal { R } } ( \hat { f } _ { n } ( x ) ) \geq \operatorname* { i n f } _ { \hat { f } _ { n } } \operatorname* { s u p } _ { f \in { \mathcal { F } } _ { 0 } } { \mathcal { R } } ( \hat { f } _ { n } ( x ) ) \gtrsim V { \sqrt { \frac { d } { n } } } ,
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
This concludes the proof.
|
| 351 |
+
|
| 352 |
+
# A.4 PROOF OF PROPOSITION 3.3
|
| 353 |
+
|
| 354 |
+
To prove the proposition, it is sufficient to verify the following Rademacher complexity bound
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\mathbb { E } \operatorname { s u p } \bigg | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \bigg | \lesssim \sqrt { k \log d \log n } ,
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
which can be derived easily by adjusting the proof in Lemma 2.3. Then the result follows with a similar analysis as in Theorem 3.1.
|
| 361 |
+
|
| 362 |
+
# A.5 PROOF OF THEOREM 3.4
|
| 363 |
+
|
| 364 |
+
It can be verified from the identity (9) that
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \leq \sum _ { j = 0 } ^ { r } \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| a _ { j } \right| \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } x _ { i } + b _ { j } ) \right| .
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
Then according to Lemma A.1, we have
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in { \mathcal F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } x _ { i } + b _ { j } ) \right| \lesssim \sqrt { \frac { \log n } { n } } ( \| w _ { j } \| _ { \mathbb { X } } + | b _ { j } | ) .
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Combining (16) and (17), we obtain the following lemma that may be interesting on its own right.
|
| 377 |
+
|
| 378 |
+
# Lemma A.3. We have
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \lesssim \sqrt { \frac { \log n } { n } } \sum _ { j = 0 } ^ { r } | a _ { j } | ( \| w _ { j } \| _ { \mathfrak { X } } + | b _ { j } | ) \lesssim V \sqrt { \frac { \log n } { n } } \operatorname* { m a x } _ { j } \| w _ { j } \| _ { \mathfrak { X } } .
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
Since $\| w \| _ { \mathbb { X } } \lesssim \| w \| _ { 1 }$ and $\{ w : \| w \| _ { \mathbb { X } } \lesssim \eta \} \subset \{ w : \| w \| _ { 1 } \lesssim \eta \}$ , the $\| \cdot \| _ { \mathbb { X } }$ can be replaced with $\| \cdot \| _ { 1 }$ in the bounds in Lemmas A.3 and A.2. Then, with a similar argument as in the proof of Theorem 3.1, we conclude the proof of Theorem 3.4.
|
md/train/6RB77-6-_oI/6RB77-6-_oI.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# How Powerful are Performance Predictors in Neural Architecture Search?
|
| 2 |
+
|
| 3 |
+
Colin White1∗, Arber $\mathbf { Z e l a ^ { 2 } }$ , Binxin $\mathbf { R } \mathbf { u } ^ { 3 }$ , Yang $\mathbf { L i u } ^ { 1 }$ , Frank Hutter2,4 1 Abacus.AI, 2 University of Freiburg, 3 University of Oxford, 4 Bosch Center for Artificial Intelligence
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Early methods in the rapidly developing field of neural architecture search (NAS) required fully training thousands of neural networks. To reduce this extreme computational cost, dozens of techniques have since been proposed to predict the final performance of neural architectures. Despite the success of such performance prediction methods, it is not well-understood how different families of techniques compare to one another, due to the lack of an agreed-upon evaluation metric and optimization for different constraints on the initialization time and query time. In this work, we give the first large-scale study of performance predictors by analyzing 31 techniques ranging from learning curve extrapolation, to weight-sharing, to supervised learning, to zero-cost proxies. We test a number of correlation- and rank-based performance measures in a variety of settings, as well as the ability of each technique to speed up predictor-based NAS frameworks. Our results act as recommendations for the best predictors to use in different settings, and we show that certain families of predictors can be combined to achieve even better predictive power, opening up promising research directions. Our code, featuring a library of 31 performance predictors, is available at https://github.com/automl/naslib.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Neural architecture search (NAS) is a popular area of machine learning, which aims to automate the process of developing neural architectures for a given dataset. Since 2017, a wide variety of NAS techniques have been proposed [78, 45, 32, 49]. While the first NAS techniques trained thousands of architectures to completion and then evaluated the performance using the final validation accuracy [78], modern algorithms use more efficient strategies to estimate the performance of partially-trained or even untrained neural networks [11, 2, 54, 34, 38].
|
| 12 |
+
|
| 13 |
+
Recently, many performance prediction methods have been proposed based on training a model to predict the final validation accuracy of an architecture just from an encoding of the architecture. Popular choices for these models include Gaussian processes [60, 17, 51], neural networks [36, 54, 65, 69], tree-based methods [33, 55], and so on. However, these methods often require hundreds of fully-trained architectures to be used as training data, thus incurring high initialization time. In contrast, learning curve extrapolation methods [11, 2, 20] need little or no initialization time, but each individual prediction requires partially training the architecture, incurring high query time. Very recently, a few techniques have been introduced which are fast both in query time and initialization time [38, 1], computing predictions based on a single minibatch of data. Finally, using shared weights [45, 4, 32] is a popular paradigm for NAS [73, 25], although the effectiveness of these methods in ranking architectures is disputed [53, 74, 76].
|
| 14 |
+
|
| 15 |
+
Despite the widespread use of performance predictors, it is not known how methods from different families compare to one another. While there have been some analyses on the best predictors within each class [41, 72], for many predictors, the only evaluation is from the original work that proposed the method. Furthermore, no work has previously compared the predictors across different families of performance predictors. This leads to two natural questions: how do zero-cost methods, model-based methods, learning curve extrapolation methods, and weight sharing methods compare to one another across different constraints on initialization time and query time? Furthermore, can predictors from different families be combined to achieve even better performance?
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Categories of performance predictors (left). Kendall Tau rank correlation for performance predictors with respect to initialization time and query time (right). Each type of predictor is plotted differently based on whether it allows variable initialization time and/or variable query time. For example, the sixteen model-based predictors have a fixed query time and variable initialization time, so they are plotted as curves parallel to the X-Z plane.
|
| 19 |
+
|
| 20 |
+
In this work, we answer the above questions by giving the first large-scale study of performance predictors for NAS. We study 31 predictors across four popular search spaces and four datasets: NAS-Bench-201 [13] with CIFAR-10, CIFAR-100, and ImageNet16-120, NAS-Bench-101 [71] and DARTS [32] with CIFAR-10, and NAS-Bench-NLP [21] with Penn TreeBank. In order to give a fair comparison among different classes of predictors, we run a full portfolio of experiments, measuring the Pearson correlation and rank correlation metrics (Spearman, Kendall Tau, and sparse Kendall Tau), across a variety of initialization time and query time budgets. We run experiments using a training and test set of architectures generated both uniformly at random, as well as by mutating the highest-performing architectures (the latter potentially more closely resembling distributions encountered during an actual NAS run). Finally, we test the ability of each predictor to speed up NAS algorithms, namely Bayesian optimization [36, 54, 69, 51] and predictor-guided evolution [66, 59].
|
| 21 |
+
|
| 22 |
+
Since many predictors so far had only been evaluated on one search space, our work shows which predictors have consistent performance across search spaces. Furthermore, by conducting a study with three axes of comparison (see Figure 1), and by comparing various types of predictors, we see a more complete view of the state of performance predictor techniques that leads to interesting insights. Notably, we show that the performance of predictors from different families are complementary and can be combined to achieve significantly higher performance. The success of these experiments opens up promising avenues for future work.
|
| 23 |
+
|
| 24 |
+
Overall, our experiments bridge multiple areas of NAS research and act as recommendations for the best predictors to use under different runtime constraints. Our code, based on the NASLib library [52], can be used as a testing ground for future performance prediction techniques. In order to ensure reproducibility of the original results, we created a table to clarify which of the 31 predictors had previously published results on a NAS-Bench search space, and how these published results compared to our results (Table 7). We also adhere to the NeurIPS 2021 checklist along with the specialized NAS best practices checklist [31].
|
| 25 |
+
|
| 26 |
+
Our contributions. We summarize our main contributions below.
|
| 27 |
+
|
| 28 |
+
• We conduct the first large-scale study of performance predictors for neural architecture search by comparing model-based methods, learning curve extrapolation methods, zero-cost methods, and weight sharing methods across a variety of settings.
|
| 29 |
+
• We release a comprehensive library of 31 performance predictors on four different search spaces.
|
| 30 |
+
• We show that different families of performance predictors can be combined to achieve substantially better predictive power than any single predictor.
|
| 31 |
+
|
| 32 |
+
# 2 Related Work
|
| 33 |
+
|
| 34 |
+
NAS has been studied since at least the 1990s [19, 58], and has been revitalized in the last few years [78]. While initial techniques focused on reinforcement learning [78, 45] and evolutionary search [37, 49], one-shot NAS algorithms [32, 12, 4] and predictor-based NAS algorithms [65, 54, 69] have recently become popular. We give a brief survey of performance prediction techniques in Section 3. For a survey on NAS, see [15]. The most widely used type of search space in prior work is the cell-based search space [79], where the architecture search is over a relatively small directed acyclic graph representing an architecture.
|
| 35 |
+
|
| 36 |
+
A few recent works have compared different performance predictors on popular cell-based search spaces for NAS. Siems et al. [55] studied graph neural networks and tree-based methods, and found that gradient-boosted trees and graph isomorphism networks performed the best. However, the comparison was only on a single search space and dataset, and the explicit goal was to achieve maximum performance given a training set of around 60 000 architectures. Another recent paper [41] studied various aspects of supernetwork training, and separately compared four model-based methods: random forest, MLP, LSTM, and GATES [42]. However, the comparisons were again on a single search space and dataset and did not compare between multiple families of performance predictors. Other papers have proposed new model-based predictors and compared the new predictors to other model-based baselines [34, 65, 54, 69]. Finally, a recent paper analyzed training heuristics to make weight-sharing more effective at ranking architectures [72]. To the best of our knowledge, no prior work has conducted comparisons across multiple families of performance predictors.
|
| 37 |
+
|
| 38 |
+
# 3 Performance Prediction Methods for NAS
|
| 39 |
+
|
| 40 |
+
In NAS, given a search space $\mathcal { A }$ , the goal is to find $a ^ { * } = \operatorname * { a r g m i n } _ { a \in { \mathcal { A } } } f ( a )$ , where $f$ denotes the validation error of architecture $a$ after training on a fixed dataset for a fixed number of epochs $E$ . Since evaluating $f ( a )$ typically takes hours (as it requires training a neural network from scratch), many NAS algorithms make use of performance predictors to speed up this process. A performance predictor $f ^ { \prime }$ is defined generally as any function which predicts the final accuracy or ranking of architectures, without fully training the architectures. That is, evaluating $f ^ { \prime }$ should take less time than evaluating $f$ , and $\{ f ^ { \prime } ( a ) \mid a \in \mathcal { A } \}$ should ideally have high correlation or rank correlation with $\{ f ( a ) \mid a \in { \bar { \mathcal { A } } } \}$ .
|
| 41 |
+
|
| 42 |
+
Each performance predictor is defined by two main routines: an initialization routine which performs general pre-computation, and a query routine which performs the final architecture-specific computation: it takes as input an architecture specification, and outputs its predicted accuracy. For example, one of the simplest performance predictors is early stopping: for any query $( a )$ , train $a$ for $E / 2$ epochs instead of $E$ [77]. In this case, there is no general pre-computation, so initialization time is zero. On the other hand, the query time for each input architecture is high because it involves training the architecture for $E / 2$ epochs. In fact, the runtime of the initialization and query routines varies substantially based on the type of predictor. In the context of NAS algorithms, the initialization routine is typically performed once at the start of the algorithm, and the query routine is typically performed many times throughout the NAS algorithm. Some performance predictors also make use of an update routine, when part of the computation from initialization needs to be updated without running the full procedure again (for example, in a NAS algorithm, a model may be updated periodically based on newly trained architectures). Now we give an overview of the main families of predictors. See Figure 1 (left) for a taxonomy of performance predictors.
|
| 43 |
+
|
| 44 |
+
Model-based (trainable) methods. The most common type of predictor, the model-based predictor, is based on supervised learning. The initialization routine consists of fully training many architectures (i.e., evaluating $f ( a )$ for many architectures $a \in { \mathcal { A } }$ ) to build a training set of datapoints $\{ a , f ( a ) \}$ . Then a model $f ^ { \prime }$ is trained to predict $f ( a )$ given $a$ . While the initialization time for model-based predictors is very high, the query time typically takes less than a second, which allows thousands of predictions to be made throughout a NAS algorithm. The model is also updated regularly based on the new datapoints. These predictors are typically used within BO frameworks [36, 54], evolutionary frameworks [66], or by themselves [67], to perform NAS. Popular choices for the model include tree-based methods (where the features are the adjacency matrix representation of the architectures) [33, 55], graph neural networks [36, 54], Gaussian processes [47, 51], and neural networks based on specialized encodings of the architecture [69, 42].
|
| 45 |
+
|
| 46 |
+
Learning curve-based methods. Another family predicts the final performance of architectures using only a partially trained network, by extrapolating the learning curve. This is accomplished by fitting the partial learning curve to an ensemble of parametric models [11], or by simply summing the training losses observed so far [50]. Early stopping as described earlier is also a learning curve-based method. Learning curve methods do not require any initialization time, yet the query time typically takes minutes or hours, which is orders of magnitude slower than the query time in model-based methods. Learning curve-based methods can be used in conjunction with multi-fidelty algorithms, such as Hyperband or BOHB [27, 16, 24].
|
| 47 |
+
|
| 48 |
+
Hybrid methods. Some predictors are hybrids between learning curve and model-based methods. These predictors train a model at initialization time to predict $f ( a )$ given both $a$ and a partial learning curve of $a$ as features. Models in prior work include an SVR [2], or a Bayesian neural network [20]. Although the query time and initialization time are both high, hybrid predictors tend to have strong performance.
|
| 49 |
+
|
| 50 |
+
Zero-cost methods. Another class of predictors have no initialization time and very short query times (so-called “zero-cost” methods). These predictors compute statistics from just a single forward/backward propagation pass for a single minibatch of data, by computing the correlation of activations within a network [38], or by adapting saliency metrics proposed in pruning-at-initialization literatures [23, 1]. Similar to learning curve-based methods, since the only computation is specific to each architecture, the initialization time is zero. Zero-cost methods have recently been used to warm start NAS algorithms [1].
|
| 51 |
+
|
| 52 |
+
Weight sharing methods. Weight sharing [45] is a popular approach to substantially speed up NAS, especially in conjunction with a one-shot algorithm [32, 12]. In this approach, all architectures in the search space are combined to form a single over-parameterized supernetwork. By training the weights of the supernetwork, all architectures in the search space can be evaluated quickly using this set of weights. To this end, the supernetwork can be used as a performance predictor. This results in NAS algorithms [32, 28] which are significantly faster than sequential NAS algorithms, such as evolution or Bayesian optimization. Recent work has shown that although the shared weights are sometimes not effective at ranking architectures [53, 74, 76], one-shot NAS techniques using shared weights still achieve strong performance [73, 25].
|
| 53 |
+
|
| 54 |
+
Tradeoff between intialization and query time. The main families mentioned above all have different initialization and query times. The tradeoffs between initialization time, query time, and performance depend on a few factors such as the type of NAS algorithm and its total runtime budget, and different settings are needed in different situations. For example, if there are many architectures whose performance we want to estimate, then we should have a low query time, and if we have a high total runtime budget, then we can afford a high initialization time. We may also change our runtime budget throughout the run of a single NAS algorithm. For example, at the start of a NAS algorithm, we may want to have coarse estimates of a large number of architectures (low initialization time, low query time such as zero-cost predictors). As the NAS algorithm progresses, it is more desirable to receive higher-fidelity predictions on a smaller set of architectures (model-based or hybrid predictors). The exact budgets depend on the type of NAS algorithm.
|
| 55 |
+
|
| 56 |
+
Choice of performance predictors. We analyze 31 performance predictors defined in prior work: BANANAS [69], Bayesian Linear Regression [6], BOHAMIANN [57], BONAS [54], DNGO [56], Early Stopping with Val. Acc. (e.g. [77, 27, 16, 79]) Early Stopping with Val. Loss. [50], Fisher [1], Gaussian Process (GP) [48], GCN [75], Grad Norm [1], Grasp [64], Jacobian Covariance [38], LCE [11], LCE-m [20], LcSVR [2], LGBoost/GBDT [33], MLP [69], NAO [35], NGBoost [55], OneShot [73], Random Forest (RF) [55], Random Search with Weight Sharing (RSWS) [26], SemiNAS [34], SNIP [23], SoTL [50], SoTL-E [50], Sparse GP [3], SynFlow [61], Variational Sparse GP [63], and XGBoost [55]. For any method that did not have an architecture encoding already defined (such as the tree-based methods, GP-based methods, and Bayesian Linear Regression), we use the standard adjacency matrix encoding, which consists of the adjacency matrix of the architecture along with a one-hot list of the operations [71, 68]. By open-sourcing our code, we encourage implementing more (existing and future) performance predictors which can then be compared to the 31 which we focus on in this work. In Section B.1, we give descriptions and detailed implementation details for each performance predictor. In Section D, we give a table that describes for which predictors we were able to reproduce published results, and for which predictors it is not possible (e.g., since some predictors were released before the creation of NAS benchmarks).
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 2: The performance predictors with the highest Kendall Tau values for all initialization time and query time budgets on NAS-Bench-201, NAS-Bench-101, NAS-Bench-NLP and DARTS. For example, on NAS-Bench-201 CIFAR-10 (left) with an initialization time of $1 0 ^ { 6 }$ seconds and query time of 10 seconds, XGBoost achieves a Kendall Tau value of .73 which is the highest value out of the 31 predictors that we tested at that budget.
|
| 60 |
+
|
| 61 |
+
# 4 Experiments
|
| 62 |
+
|
| 63 |
+
We now discuss our experimental setup and results. We discuss reproducibility in Sections A and D, and our code (based on the NASLib library [52]) is available at https://github.com/automl/ naslib. We split up our experiments into two categories: evaluating the performance of each predictor with respect to various correlation metrics (Section 4.1), and evaluating the ability of each predictor to speed up predictor-based NAS algorithms (Section 4.2). We start by describing the four NAS benchmarks used in our experiments.
|
| 64 |
+
|
| 65 |
+
NAS benchmark datasets. NAS-Bench-101 [71] consists of over 423 000 unique neural architectures with precomputed training, validation, and test accuracies after training for 4, 12, 36, and 108 epochs on CIFAR-10 [71]. The cell-based search space consists of five nodes which can take on any directed acyclic graph (DAG) structure, and each node can be one of three operations. Since learning curve information is only available at four epochs, it is not possible to run most learning curve extrapolation methods on NAS-Bench-101. NAS-Bench-201 [13] consists of 15 625 architectures (out of which 6 466 are unique after removing isomorphisms [13]). Each architecture has full learning curve information for training, validation, and test losses/accuracies for 200 epochs on CIFAR-10 [22], CIFAR-100, and ImageNet-16-120 [10]. The search space consists of a cell which is a complete DAG with 4 nodes. Each edge can take one of five different operations. The DARTS search space [32] is significantly larger with roughly $1 0 ^ { 1 8 }$ architectures. The search space consists of two cells, each with seven nodes. The first two nodes are inputs from previous layers, and the intermediate four nodes can take on any DAG structure such that each node has two incident edges. The last node is the output node. Each edge can take one of eight operations. In our experiments, we make use of the training data from NAS-Bench-301 [55], which consists of 23 000 architectures drawn uniformly at random and trained on CIFAR-10 for 100 epochs. Finally, the NAS-Bench-NLP search space [21] is even larger, at $1 0 ^ { 5 3 }$ LSTM-like cells, each with at most 25 nodes in any DAG structure. Each cell can take one of seven operations. In our experiments, we use the NAS-Bench-NLP dataset, which consists of 14 000 architectures drawn uniformly at random and trained on Penn Tree Bank [40] for 50 epochs.
|
| 66 |
+
|
| 67 |
+
Hyperparameter tuning. Although we used the code directly from the original repositories (sometimes making changes when necessary to adapt to NAS-Bench search spaces), the predictors had significantly different levels of hyperparameter tuning. For example, some of the predictors had undergone heavy hyperparameter tuning on the DARTS search space (used in NAS-Bench-301), while other predictors (particularly those from 2017 or earlier) had never been run on cell-based search spaces. Furthermore, most predictor-based NAS algorithms can utilize cross-validation to tune the predictor periodically throughout the NAS algorithm. This is because the bottleneck for predictorbased NAS algorithms is typically the training of architectures, not fitting the predictor [56, 30, 16]. Therefore, it is fairer and also more informative to compare performance predictors which have had the same level of hyperparameter tuning through cross-validation. For each search space, we run random search on each performance predictor for 5000 iterations, with a maximum total runtime of 15 minutes. The final evaluation uses a separate test set. The hyperparameter value ranges for each predictor can be found in Section B.2.
|
| 68 |
+
|
| 69 |
+
# 4.1 Performance Predictor Evaluation
|
| 70 |
+
|
| 71 |
+
We evaluate each predictor based on three axes of comparison: initialization time, query time, and performance. We measured performance with respect to several different metrics: Pearson correlation and three different rank correlation metrics (Spearman, Kendall Tau, and sparse Kendall Tau [72, 55]). The experimental setup is as follows: the predictors are tested with 11 different initialization time budgets and 14 different query time budgets, leading to a total of 154 settings. On NAS-Bench-201 CIFAR-10, the 11 initialization time budgets are spaced logarithmically from 1 second to $1 . 8 \times 1 0 ^ { 7 }$ seconds on a $1 0 8 0 \mathrm { T i }$ GPU (which corresponds to training 1000 random architectures on average) which is consistent with experiments conducted in prior work [65, 69, 34]. For other search spaces, these times are adjusted based on the average time to train 1000 architectures. The 14 query time budgets are spaced logarithmically from 1 second to $1 . 8 \times 1 0 ^ { 4 }$ seconds (which corresponds to training an architecture for 199 epochs). These times are adjusted for other search spaces based on the training time and different number of epochs. Once the predictor is initialized, we draw a test set of 200 architectures uniformly at random from the search space. For each architecture in the test set, the predictor uses the specified query time budget to make a prediction. We then evaluate the quality of the predictions using the metrics described above. We average the results over 100 trials for each (initialization time, query time) pair.
|
| 72 |
+
|
| 73 |
+
Results and discussion. Figure 1 shows a full three-dimensional plot for NAS-Bench-201 on CIFAR-10 over initialization time, query time, and Kendall Tau rank correlation. Of the 31 predictors we tested, we found that just seven of them are Pareto-optimal with respect to Kendall Tau, initialization time, and query time. That is, only seven algorithms have the highest Kendall Tau value for at least one of the 154 query time/initialization time budgets on NAS-Bench-201 CIFAR-10. This can be seen more clearly in Figure 2 (left), which is a view from above Figure 1: each lattice point displays the predictor with the highest Kendall Tau value for the corresponding budget. In Figure 2 (right), we plot the Pareto-optimal predictors for five different dataset/search space combinations. In Section B.3, we give the full 3D plots and report the variance across trials for each method. In Figure 4 (left), we also plot the Pearson and Spearman correlation coefficients for NAS-Bench-201 CIFAR-10. The trends between these measures are largely the same, although we see that SemiNAS performs better on the rank-based metrics. For the rest of this section, we focus on the popular Kendall Tau metric, giving the full results for the other metrics in Section B.3.
|
| 74 |
+
|
| 75 |
+
We see similar trends across DARTS and the two NAS-Bench-201 datasets. NAS-Bench-NLP also has fairly similar trends, although early stopping performs comparatively stronger. NAS-Bench-101 is different from the other search spaces both in terms of the topology and the benchmark itself, which we discuss later in this section.
|
| 76 |
+
|
| 77 |
+
In the low initialization time, low query time region, Jacobian covariance or SynFlow perform well across NAS-Bench-101 and NAS-Bench-201. However, none of the six zero-cost methods perform well on the larger DARTS search space. Weight sharing (which also has low initialization and low query time, as seen in Figure 1), did not yield high Kendall Tau values for these search spaces, either, which is consistent with recent work [53, 74, 76]. However, rank correlation is not as crucial to one-shot NAS algorithms as it is for black box predictor-based methods, as demonstrated by prior one-shot NAS methods that do perform well [25, 73, 32, 28, 12]. In the low initialization time, high query time region, sum of training losses (SoTL-E) consistently performed the best, outperforming other learning-curve based methods.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3: Percentage of OMNI’s Kendall Tau value compared to the next-best predictors for each budget constraint.
|
| 81 |
+
|
| 82 |
+
The high initialization time, low query time region (especially the bottom row of the plots, corresponding to a query time of 1 second) is by far the most competitive region in the recent NAS literature. Sixteen of the 31 predictors had query times under one second, because many NAS algorithms are designed to initialize (and continually update) performance predictors that are used to quickly query thousands of candidate architectures. GCN and SemiNAS, the specialized GCN/semi-supervised methods, perform especially well in the first half of this critical region, when the initialization time is relatively low. However, boosted tree methods actually performed best in the second half of the critical region where the initialization time is high, which is consistent with prior work [33, 55]. Recall that for model-based methods, the initialization time corresponds to training architectures to be used as training data for the performance predictor. Therefore, our results suggest that techniques which can extract better latent features of the architectures can make up for a small training dataset, but methods based purely on performance data work better when there is enough such data.
|
| 83 |
+
|
| 84 |
+
Perhaps the most interesting finding is that on NAS-Bench-101/201, SynFlow and Jacobian covariance, which take three seconds each to compute, both outperform all model-based methods even after $3 0$ hours of initialization. Put another way, NAS algorithms that make use of model-based predictors may be able to see substantial improvements by using Jacobian covariance instead of a model-based predictor in the early iterations.
|
| 85 |
+
|
| 86 |
+
The Omnipotent Predictor. One conclusion from Figure 2 is that different types of predictors are specialized for specific initialization time and query time constraints. A natural follow-up question is whether different families are complementary and can be combined to achieve stronger performance. In this section, we run a proof-of-concept to answer this question. We combine the best-performing predictors from three different families in a simple way: the best learning curve method (SoTL-E), and the best zero-cost method (Jacobian covariance), are used as additional input features for a model-based predictor (we separately test SemiNAS and NGBoost). We call this method OMNI, the omnipotent predictor. We give results in Figure 3 and pseudo-code as well as additional experiments in Section B.4. In contrast to all other predictors, the performance of OMNI is strong across almost all budget constraints and search spaces. In some settings, OMNI achieves a Kendall Tau value $30 \%$ higher than the next-best predictors.
|
| 87 |
+
|
| 88 |
+
The success of OMNI verifies that the information learned by different families of predictors are complementary: the information learned by extrapolating a learning curve, by computing a zero-cost proxy, and by encoding the architecture, all improve performance. We further confirm this by running an ablation study for OMNI in Section B.4. We can hypothesize that each predictor type measures distinct quantities: SOTL-E measures the training speed, zero-cost predictors measure the covariance between activations on different datapoints, and model-based predictors simply learn patterns between the architecture encodings and the validation accuracies. Finally, while we showed a proof-of-concept, there are several promising areas for future work such as creating ensembles of the model-based approaches, combining zero-cost methods with model-based methods in more sophisticated ways, and giving a full quantification of the correlation among different families of predictors.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 4: The best predictors on NAS-Bench-201 CIFAR-10 with respect to Pearson (left) and Spearman (middle). Kendall Tau values from a mutation-based training and test set (right).
|
| 92 |
+
|
| 93 |
+
NAS-Bench-101: a more complex search space. In Figure 2, the plot for NAS-Bench-101 looks significantly different than the plots for the other search spaces, for two reasons. The first reason is a technical one: the NAS-Bench-101 API only gives the validation accuracy at four epochs, and does not give the training loss for any epochs. Therefore, we could not implement SoTL or any learning curve extrapolation method. However, all sixteen of the model-based predictors were implemented on NAS-Bench-101. In this case, BANANAS significantly outperformed the next-best predictors (GCN and SemiNAS) across every initialization time. One explanation is due to the complexity of the NAS-Bench-101 search space: while all NAS-Bench-201 architectures have the same graph topology and DARTS architectures’ nodes have exactly two incoming edges, the NAS-Bench-101 search space is much more diverse with architectures ranging from a single node and no edges, to five nodes with nine connecting edges. In fact, the architecture encoding used in BANANAS, the path encoding, was designed specifically to deal with the complexity of the NAS-Bench-101 search space (replacing the standard adjacency matrix encoding). To test this explanation, in Appendix B we run several of the simpler tree-based and GP-based predictors using the path encoding, and we see that these methods now surpass BANANAS in performance.
|
| 94 |
+
|
| 95 |
+
A mutation-based test set. The results from Figure 2 used a test set drawn uniformly at random from the search space (and the training set used by model-based predictors was also drawn uniformly at random). However, neighborhood-based NAS algorithms such as local search, regularized evolution, and some versions of Bayesian optimization consider architectures which are local perturbations of the architectures encountered so far. Therefore, the predictors used in these NAS algorithms must be able to distinguish architectures which are local mutations of a small set of seed architectures.
|
| 96 |
+
|
| 97 |
+
We run an experiment in which the test set is created by mutating architectures from an initial set of seed architectures. Specifically, we draw a set of 50 random architectures and choose the five with the highest validation accuracy as seed architectures. Then we create a set of 200 test architectures by randomly mutating up to three attributes of the seed architectures. Therefore, all architectures in the test set are at most an edit distance of three from a seed architecture, where two architectures are a single edit distance away if they differ by one operation or edge.
|
| 98 |
+
|
| 99 |
+
We create the training set by randomly choosing architectures from the test set and mutating one random attribute. As in all of our experiments, we ensure that the training set and test set are disjoint. In Figure 4 (right), we plot the correlation results for NAS-Bench-201 CIFAR-10. While the zero-cost and learning curve-based approaches have similar performance, the model-based approaches have significantly worse performance compared to the uniform random setting. This is because the average edit distance between architectures in the test set is low, making it significantly harder for model-based predictors to distinguish the performance of these architectures, even when using a training set that is based on mutations of the test set. In fact, interestingly, the performance of many model-based approaches starts to perform worse after $1 0 ^ { 6 }$ seconds. SemiNAS in particular performs much worse in this setting, and boosted trees have comparatively stronger performance in this setting.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 5: Validation error vs. runtime for the predictor-guided evolution framework and the Bayesian optimization $^ +$ predictor framework using different predictors.
|
| 103 |
+
|
| 104 |
+
# 4.2 Predictor-Based NAS Experiments
|
| 105 |
+
|
| 106 |
+
Now we evaluate the ability of each model-based performance predictor to speed up NAS. We use two popular predictor-based NAS methods: the predictor-guided evolution framework [66, 59], and the Bayesian optimization $^ +$ predictor framework [17, 36, 54]. The predictor-guided evolution framework is an iterative procedure in which the best architectures in the current population are mutated to create a set of candidate architectures. A predictor (trained on the entire population) chooses $k$ architectures which are then evaluated. In our experiments, the candidate pool is created by mutating the top five architectures 40 times each, and we set $k = 2 0$ . For each predictor, we run predictor-guided evolution for 25 iterations and average the results over 100 trials. The $\mathrm { B O + }$ predictor framework is similar to the evolution framework, but an ensemble of three performance predictors are used so that uncertainty estimates for each prediction can be computed. In each iteration, the candidate architectures whose predictions maximize an acquisition function are then evaluated. Similar to prior work, we use independent Thompson sampling [69], as the acquisition function, and an ensemble is created by using a different ordering of the training set and different random weight initializations (if applicable) of the same predictor. In each iteration, the top 20 architectures are chosen from a randomly sampled pool of 200 architectures.
|
| 107 |
+
|
| 108 |
+
In Figure 5, we present results for both NAS frameworks on NAS-Bench-201 CIFAR-10 and ImageNet16-120 for the 16 model-based predictors. We also test OMNI, using its lowest query time setting (consisting of NGBoost $^ +$ Jacobian covariance), and another version of OMNI that replaces NGBoost with SemiNAS. Our results show that the model-based predictors with the top Kendall Tau rank correlations in the low query time region from Figure 2 also roughly achieve the best performance when applied for NAS: SemiNAS and NAO perform the best for shorter runtime, and boosted trees perform best for longer runtime. OMNI(NGBoost) consistently outperforms NGBoost, and OMNI(SemiNAS) often achieves top performance. This suggests that using zero-cost methods in conjunction with model-based methods is a promising direction for future study.
|
| 109 |
+
|
| 110 |
+
# 4.3 So, how powerful are performance predictors?
|
| 111 |
+
|
| 112 |
+
Throughout Section 4, we tested performance predictors in a variety of settings, by varying the search spaces, datasets, runtime budgets, and training/test distributions. We saw largely the same trends among all of our experiments. Interesting findings included the success of zero-cost predictors even when compared to model-based predictors and learning curve extrapolation predictors with longer runtime budgets, and the fact that information from different families of predictors are complementary. When choosing a performance predictor for new applications, we recommend deciding on a target initialization time and query time budget, consulting Figures 2 and 6, and then combining the best predictors from the desired runtime setting, similar to OMNI. For example, if a performance predictor with medium initialization time and low runtime is desired for a search space similar to NAS-Bench201 or DARTS, we recommend using NGBoost with Jacobian covariance and SynFlow as additional features.
|
| 113 |
+
|
| 114 |
+
# 5 Societal Impact
|
| 115 |
+
|
| 116 |
+
Our hope is that our work will have a positive impact on the AutoML community by making it quicker and easier to develop and fairly compare performance predictors. For example, AutoML practitioners can consult our experiments to more easily decide on the performance prediction methods best suited to their application, rather than conducting computationally intensive experiments of their own [43]. Furthermore, AutoML researchers can use our library to develop new performance prediction techniques and compare new methods to 31 other algorithms across four search spaces. Since the topic of this work is AutoML, it is a level of abstraction away from real applications. This work may be used to improve deep learning applications, both beneficial (e.g. reducing $\mathrm { C O _ { 2 } }$ emissions), or harmful (e.g. creating language models with heavy bias) to society.
|
| 117 |
+
|
| 118 |
+
# 6 Conclusions and Limitations
|
| 119 |
+
|
| 120 |
+
In this work, we gave the first large-scale study of performance predictors for neural architecture search. We compared 31 different performance predictors, including learning curve extrapolation methods, weight sharing methods, zero-cost methods, and model-based methods. We tested the performance of the predictors in a variety of settings and with respect to different metrics. Although we ran experiments on four different search spaces, it will be interesting to extend our experiments to even more machine learning tasks beyond image classification and language modeling.
|
| 121 |
+
|
| 122 |
+
Our new predictor, OMNI, is the first predictor to combine complementary information from three families of performance preditors, leading to substantially improved performance. While the simplicity of OMNI is appealing, it also opens up new directions for future work by combining different predictors in more sophisticated ways. To facilitate follow-up work, we release our code featuring a library of performance predictors. Our goal is for our repository to grow over time as it is used by the community, so that experiments in our library can be even more comprehensive.
|
| 123 |
+
|
| 124 |
+
# Acknowledgments and Disclosure of Funding
|
| 125 |
+
|
| 126 |
+
This work was done while CW and YL were employed at Abacus.AI. AZ and FH acknowledge support by the European Research Council (ERC) under the European Union Horizon 2020 research and innovation programme through grant no. 716721, and by BMBF grant DeToL. BR was supported by the Clarendon Fund of University of Oxford.
|
| 127 |
+
|
| 128 |
+
References
|
| 129 |
+
[1] Mohamed S Abdelfattah, Abhinav Mehrotra, Łukasz Dudziak, and Nicholas Donald Lane. Zero-cost proxies for lightweight nas. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 130 |
+
[2] Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating neural architecture search using performance prediction. arXiv preprint arXiv:1705.10823, 2017.
|
| 131 |
+
[3] Matthias Bauer, Mark van der Wilk, and Carl Edward Rasmussen. Understanding probabilistic sparse gaussian process approximations. arXiv preprint arXiv:1606.04820, 2016.
|
| 132 |
+
[4] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In Proceedings of the International Conference on Machine Learning (ICML), pages 550–559, 2018.
|
| 133 |
+
[5] Eli Bingham, Jonathan P Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul Szerlip, Paul Horsfall, and Noah D Goodman. Pyro: Deep universal probabilistic programming. The Journal of Machine Learning Research, 20(1):973– 978, 2019.
|
| 134 |
+
[6] Christopher M Bishop. Pattern recognition and machine learning. springer, 2006.
|
| 135 |
+
[7] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 136 |
+
[8] Akshay Chandrashekaran and Ian R Lane. Speeding up hyper-parameter optimization by extrapolation of learning curves using previous builds. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 477–492. Springer, 2017.
|
| 137 |
+
[9] Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining, pages 785–794, 2016.
|
| 138 |
+
[10] Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the CIFAR datasets. CoRR, abs/1707.08819, 2017.
|
| 139 |
+
[11] Tobias Domhan, Jost Tobias Springenberg, and Frank Hutter. Speeding up automatic hyperparameter optimization of deep neural networks by extrapolation of learning curves. In Twenty-Fourth International Joint Conference on Artificial Intelligence, 2015.
|
| 140 |
+
[12] Xuanyi Dong and Yi Yang. Searching for a robust neural architecture in four gpu hours. In Proceedings of the IEEE Conference on computer vision and pattern recognition, pages 1761–1770, 2019.
|
| 141 |
+
[13] Xuanyi Dong and Yi Yang. Nas-bench-201: Extending the scope of reproducible neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 142 |
+
[14] Tony Duan, Avati Anand, Daisy Yi Ding, Khanh K Thai, Sanjay Basu, Andrew Ng, and Alejandro Schuler. Ngboost: Natural gradient boosting for probabilistic prediction. In International Conference on Machine Learning, pages 2690–2700. PMLR, 2020.
|
| 143 |
+
[15] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. arXiv preprint arXiv:1808.05377, 2018.
|
| 144 |
+
[16] Stefan Falkner, Aaron Klein, and Frank Hutter. Bohb: Robust and efficient hyperparameter optimization at scale. In Proceedings of the International Conference on Machine Learning (ICML), 2018.
|
| 145 |
+
[17] 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, pages 2016–2025, 2018.
|
| 146 |
+
[18] Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu. Lightgbm: A highly efficient gradient boosting decision tree. Advances in neural information processing systems, 30:3146–3154, 2017.
|
| 147 |
+
[19] Hiroaki Kitano. Designing neural networks using genetic algorithms with graph generation system. Complex systems, 4(4):461–476, 1990.
|
| 148 |
+
[20] Aaron Klein, Stefan Falkner, Jost Tobias Springenberg, and Frank Hutter. Learning curve prediction with Bayesian neural networks. ICLR 2017, 2017.
|
| 149 |
+
[21] Nikita Klyuchnikov, Ilya Trofimov, Ekaterina Artemova, Mikhail Salnikov, Maxim Fedorov, and Evgeny Burnaev. Nas-bench-nlp: neural architecture search benchmark for natural language processing. arXiv preprint arXiv:2006.07116, 2020.
|
| 150 |
+
[22] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 151 |
+
[23] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-shot network pruning based on connection sensitivity. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 152 |
+
[24] Liam Li, Kevin Jamieson, Afshin Rostamizadeh, Ekaterina Gonina, Moritz Hardt, Benjamin Recht, and Ameet Talwalkar. A system for massively parallel hyperparameter tuning. In Proceedings of the Conference on Machine Learning Systems, 2020.
|
| 153 |
+
[25] Liam Li, Mikhail Khodak, Maria-Florina Balcan, and Ameet Talwalkar. Geometry-aware gradient algorithms for neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 154 |
+
[26] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019.
|
| 155 |
+
[27] Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: A novel bandit-based approach to hyperparameter optimization. arXiv preprint arXiv:1603.06560, 2016.
|
| 156 |
+
[28] 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.
|
| 157 |
+
[29] Andy Liaw, Matthew Wiener, et al. Classification and regression by randomforest. R news, 2(3):18–22, 2002.
|
| 158 |
+
[30] Marius Lindauer, Katharina Eggensperger, Matthias Feurer, Stefan Falkner, André Biedenkapp, and Frank Hutter. Smac v3: Algorithm configuration in python. URL https://github. com/automl/SMAC3, 2017.
|
| 159 |
+
[31] Marius Lindauer and Frank Hutter. Best practices for scientific research on neural architecture search. arXiv preprint arXiv:1909.02453, 2019.
|
| 160 |
+
[32] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.
|
| 161 |
+
[33] Renqian Luo, Xu Tan, Rui Wang, Tao Qin, Enhong Chen, and Tie-Yan Liu. Neural architecture search with gbdt. arXiv preprint arXiv:2007.04785, 2020.
|
| 162 |
+
[34] Renqian Luo, Xu Tan, Rui Wang, Tao Qin, Enhong Chen, and Tie-Yan Liu. Semi-supervised neural architecture search. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2020.
|
| 163 |
+
[35] Renqian Luo, Fei Tian, Tao Qin, Enhong Chen, and Tie-Yan Liu. Neural architecture optimization. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2018.
|
| 164 |
+
[36] Lizheng Ma, Jiaxu Cui, and Bo Yang. Deep neural architecture search with deep graph Bayesian optimization. In 2019 IEEE/WIC/ACM International Conference on Web Intelligence (WI), pages 500–507. IEEE, 2019.
|
| 165 |
+
[37] Krzysztof Maziarz, Andrey Khorlin, Quentin de Laroussilhe, and Andrea Gesmundo. Evolutionary-neural hybrid agents for architecture search. arXiv preprint arXiv:1811.09828, 2018.
|
| 166 |
+
[38] Joseph Mellor, Jack Turner, Amos Storkey, and Elliot J Crowley. Neural architecture search without training. arXiv preprint arXiv:2006.04647, 2020.
|
| 167 |
+
[39] Szymon Jakub Mikler. Snip: Single-shot network pruning based on connection sensitivity. GitHub repository gahaalt/SNIP-pruning, 2019.
|
| 168 |
+
[40] Tomáš Mikolov, Martin Karafiát, Lukáš Burget, Jan Cernock ˇ y, and Sanjeev Khudanpur. Recur- \` rent neural network based language model. In Annual conference of the international speech communication association, 2010.
|
| 169 |
+
[41] Xuefei Ning, Wenshuo Li, Zixuan Zhou, Tianchen Zhao, Yin Zheng, Shuang Liang, Huazhong Yang, and Yu Wang. A surgery of the neural architecture evaluators. arXiv preprint arXiv:2008.03064, 2020.
|
| 170 |
+
[42] Xuefei Ning, Yin Zheng, Tianchen Zhao, Yu Wang, and Huazhong Yang. A generic graph-based neural architecture encoding scheme for predictor-based nas. arXiv preprint arXiv:2004.01899, 2020.
|
| 171 |
+
[43] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.
|
| 172 |
+
[44] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikitlearn: Machine learning in python. the Journal of machine Learning research, 12:2825–2830, 2011.
|
| 173 |
+
[45] 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.
|
| 174 |
+
[46] Joaquin Quiñonero Candela and Carl Edward Rasmussen. A unifying view of sparse approximate gaussian process regression. J. Mach. Learn. Res., 6:1939–1959, December 2005.
|
| 175 |
+
[47] Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer School on Machine Learning, pages 63–71. Springer, 2003.
|
| 176 |
+
[48] Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer School on Machine Learning, pages 63–71. Springer, 2003.
|
| 177 |
+
[49] 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, pages 4780–4789, 2019.
|
| 178 |
+
[50] Binxin Ru, Clare Lyle, Lisa Schut, Mark van der Wilk, and Yarin Gal. Revisiting the train loss: an efficient performance estimator for neural architecture search. arXiv preprint arXiv:2006.04492, 2020.
|
| 179 |
+
[51] Binxin Ru, Xingchen Wan, Xiaowen Dong, and Michael Osborne. Neural architecture search using Bayesian optimisation with weisfeiler-lehman kernel. arXiv preprint arXiv:2006.07556, 2020.
|
| 180 |
+
[52] Michael Ruchte, Arber Zela, Julien Siems, Josif Grabocka, and Frank Hutter. Naslib: a modular and flexible neural architecture search library, 2020.
|
| 181 |
+
[53] Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. arXiv preprint arXiv:1902.08142, 2019.
|
| 182 |
+
[54] Han Shi, Renjie Pi, Hang Xu, Zhenguo Li, James Kwok, and Tong Zhang. Bridging the gap between sample-based and one-shot neural architecture search with bonas. Advances in Neural Information Processing Systems, 33, 2020.
|
| 183 |
+
[55] Julien Siems, Lucas Zimmer, Arber Zela, Jovita Lukasik, Margret Keuper, and Frank Hutter. Nas-bench-301 and the case for surrogate benchmarks for neural architecture search. arXiv preprint arXiv:2008.09777, 2020.
|
| 184 |
+
[56] Jasper Snoek, Oren Rippel, Kevin Swersky, Ryan Kiros, Nadathur Satish, Narayanan Sundaram, Mostofa Patwary, Mr Prabhat, and Ryan Adams. Scalable Bayesian optimization using deep neural networks. In International conference on machine learning, pages 2171–2180, 2015.
|
| 185 |
+
[57] Jost Tobias Springenberg, Aaron Klein, Stefan Falkner, and Frank Hutter. Bayesian optimization with robust Bayesian neural networks. In Advances in Neural Information Processing Systems, pages 4134–4142, 2016.
|
| 186 |
+
[58] Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
|
| 187 |
+
[59] Yanan Sun, Xian Sun, Yuhan Fang, and Gary Yen. A new training protocol for performance predictors of evolutionary neural architecture search algorithms. arXiv preprint arXiv:2008.13187, 2020.
|
| 188 |
+
[60] Kevin Swersky, David Duvenaud, Jasper Snoek, Frank Hutter, and Michael Osborne. Raiders of the lost architecture: Kernels for Bayesian optimization in conditional parameter spaces. In NIPS workshop on Bayesian Optimization in Theory and Practice, December 2013.
|
| 189 |
+
[61] Hidenori Tanaka, Daniel Kunin, Daniel LK Yamins, and Surya Ganguli. Pruning neural networks without any data by iteratively conserving synaptic flow. arXiv preprint arXiv:2006.05467, 2020.
|
| 190 |
+
[62] Lucas Theis, Iryna Korshunova, Alykhan Tejani, and Ferenc Huszár. Faster gaze prediction with dense networks and fisher pruning. arXiv preprint arXiv:1801.05787, 2018.
|
| 191 |
+
[63] Michalis Titsias. Variational learning of inducing variables in sparse gaussian processes. In Artificial Intelligence and Statistics, pages 567–574, 2009.
|
| 192 |
+
[64] Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 193 |
+
[65] Linnan Wang, Yiyang Zhao, Yuu Jinnai, and Rodrigo Fonseca. Alphax: exploring neural architectures with deep neural networks and monte carlo tree search. arXiv preprint arXiv:1805.07440, 2018.
|
| 194 |
+
[66] Chen Wei, Chuang Niu, Yiping Tang, and Jimin Liang. Npenas: Neural predictor guided evolution for neural architecture search. arXiv preprint arXiv:2003.12857, 2020.
|
| 195 |
+
[67] Wei Wen, Hanxiao Liu, Hai Li, Yiran Chen, Gabriel Bender, and Pieter-Jan Kindermans. Neural predictor for neural architecture search. arXiv preprint arXiv:1912.00848, 2019.
|
| 196 |
+
[68] Colin White, Willie Neiswanger, Sam Nolen, and Yash Savani. A study on encodings for neural architecture search. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2020.
|
| 197 |
+
[69] Colin White, Willie Neiswanger, and Yash Savani. Bananas: Bayesian optimization with neural architectures for neural architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, 2021.
|
| 198 |
+
[70] Antoine Yang, Pedro M Esperança, and Fabio M Carlucci. Nas evaluation is frustratingly hard. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 199 |
+
[71] Chris Ying, Aaron Klein, Esteban Real, Eric Christiansen, Kevin Murphy, and Frank Hutter. Nasbench-101: Towards reproducible neural architecture search. arXiv preprint arXiv:1902.09635, 2019.
|
| 200 |
+
[72] Kaicheng Yu, Rene Ranftl, and Mathieu Salzmann. How to train your super-net: An analysis of training heuristics in weight-sharing nas. arXiv preprint arXiv:2003.04276, 2020.
|
| 201 |
+
[73] Arber Zela, Thomas Elsken, Tonmoy Saikia, Yassine Marrakchi, Thomas Brox, and Frank Hutter. Understanding and robustifying differentiable architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 202 |
+
[74] Arber Zela, Julien Siems, and Frank Hutter. Nas-bench-1shot1: Benchmarking and dissecting one-shot neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 203 |
+
[75] Yuge Zhang. Neural predictor for neural architecture search. GitHub repository ultmaster/neuralpredictor.pytorch, 2020.
|
| 204 |
+
[76] Yuge Zhang, Zejun Lin, Junyang Jiang, Quanlu Zhang, Yujing Wang, Hui Xue, Chen Zhang, and Yaming Yang. Deeper insights into weight sharing in neural architecture search. arXiv preprint arXiv:2001.01431, 2020.
|
| 205 |
+
[77] Dongzhan Zhou, Xinchi Zhou, Wenwei Zhang, Chen Change Loy, Shuai Yi, Xuesen Zhang, and Wanli Ouyang. Econas: Finding proxies for economical neural architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11396–11404, 2020.
|
| 206 |
+
[78] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2017.
|
| 207 |
+
[79] 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, pages 8697–8710, 2018.
|
| 208 |
+
|
| 209 |
+
# Checklist
|
| 210 |
+
|
| 211 |
+
1. For all authors...
|
| 212 |
+
|
| 213 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Our abstract and introduction accurately reflect our paper.
|
| 214 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 6.
|
| 215 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Section 5.
|
| 216 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We discuss the ethics guidelines in Section 5.
|
| 217 |
+
|
| 218 |
+
2. If you are including theoretical results...
|
| 219 |
+
|
| 220 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] We did not include theoretical results.
|
| 221 |
+
(b) Did you include complete proofs of all theoretical results? [N/A] We did not include theoretical results.
|
| 222 |
+
|
| 223 |
+
3. If you ran experiments...
|
| 224 |
+
|
| 225 |
+
(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] We included all code, data, and instructions in the supplementary material.
|
| 226 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] All training details are specified in the supplementary material.
|
| 227 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We ran 100 trials for all experiments. Our plots that are performance vs. runtime (e.g. Figure 5) have error bars. For our Pareto-optimality plots (e.g. Figure 7), see the supplementary material for the error bars for all 31 predictors.
|
| 228 |
+
(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] We report the compute time and resources used in Section 4 and in the supplementary material.
|
| 229 |
+
|
| 230 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 231 |
+
|
| 232 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We cite the creators of all code, data, and models used.
|
| 233 |
+
(b) Did you mention the license of the assets? [Yes] We mention the licenses in the supplementary material.
|
| 234 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] We do not include new assets.
|
| 235 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] We did not use or release any datasets with personal data.
|
| 236 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] The data we are using does not contain personal information or offensive content.
|
| 237 |
+
|
| 238 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 239 |
+
|
| 240 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] We did not run experiments with human subjects.
|
| 241 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] We did not run experiments with human subjects.
|
| 242 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] We did not run experiments with human subjects.
|
md/train/7J-fKoXiReA/7J-fKoXiReA.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Does Knowledge Distillation Really Work?
|
| 2 |
+
|
| 3 |
+
Samuel Stanton NYU
|
| 4 |
+
|
| 5 |
+
Pavel Izmailov NYU
|
| 6 |
+
|
| 7 |
+
Polina Kirichenko NYU
|
| 8 |
+
|
| 9 |
+
Alexander A. Alemi Google Research
|
| 10 |
+
|
| 11 |
+
Andrew Gordon Wilson NYU
|
| 12 |
+
|
| 13 |
+
# Abstract
|
| 14 |
+
|
| 15 |
+
Knowledge distillation is a popular technique for training a small student network to emulate a larger teacher model, such as an ensemble of networks. We show that while knowledge distillation can improve student generalization, it does not typically work as it is commonly understood: there often remains a surprisingly large discrepancy between the predictive distributions of the teacher and the student, even in cases when the student has the capacity to perfectly match the teacher. We identify difficulties in optimization as a key reason for why the student is unable to match the teacher. We also show how the details of the dataset used for distillation play a role in how closely the student matches the teacher — and that more closely matching the teacher paradoxically does not always lead to better student generalization.
|
| 16 |
+
|
| 17 |
+
# 1 Introduction
|
| 18 |
+
|
| 19 |
+
Large, deep networks can learn representations that generalize well. While smaller, more efficient networks lack the inductive biases to find these representations from training data alone, they may have the capacity to represent these solutions [e.g., 2, 18, 32, 45]. Influential work on knowledge distillation $\overline { { \| 2 2 } }$ argues that Bucila et al. ˘ [5] “demonstrate convincingly that the knowledge acquired by a large ensemble of models [the teacher] can be transferred to a single small model [the student]”. Indeed this quote encapsulates the conventional narrative of knowledge distillation: a student model learns a high-fidelity representation of a larger teacher, enabled by the teacher’s soft labels.
|
| 20 |
+
|
| 21 |
+
Conversely, in Figure $\perp$ we show that with modern architectures knowledge distillation can lead to students with very different predictions from their teachers, even when the student has the capacity to perfectly match the teacher. Indeed, it is becoming well-known that in self-distillation the student fails to match the teacher and, paradoxically, student generalization improves as a result [14, 40]. However, when the teacher is a large model (e.g. a deep ensemble) improvements in fidelity translate into improvements in generalization, as we show in Figure $1 ( \mathsf { b } )$ . For these large models there is still a significant accuracy gap between student and teacher, so fidelity is aligned with generalization.
|
| 22 |
+
|
| 23 |
+
We will distinguish between fidelity, the ability of a student to match a teacher’s predictions, and generalization, the performance of a student in predicting unseen, in-distribution data. We show that in many cases it is surprisingly difficult to obtain good student fidelity. In Section 5 we investigate the hypothesis that low fidelity is an identifiability problem that can be solved by augmenting the distillation dataset. In Section $\boxed { 6 }$ we investigate the hypothesis that low fidelity is an optimization problem resulting in a failure of the student to match the teacher even on the original training dataset. We present a summary of our conclusions in Section 7.
|
| 24 |
+
|
| 25 |
+
Does knowledge distillation really work? In short: Yes, in the sense that it often improves student generalization. No, in that knowledge distillation often fails to live up to its name, transferring very limited knowledge from teacher to student.
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: Evaluating the fidelity of knowledge distillation. The effect of enlarging the CIFAR-100 distillation dataset with GAN-generated samples. (a): The student and teacher are both single ResNet-56 networks. Student fidelity increases as the dataset grows, but test accuracy decreases. (b): The student is a single ResNet-56 network and the teacher is a 3-component ensemble. Student fidelity again increases as the dataset grows, but test accuracy now slightly increases. The shaded region corresponds to $\mu \pm \sigma$ , estimated over 3 trials.
|
| 29 |
+
|
| 30 |
+
# 2 Related Work
|
| 31 |
+
|
| 32 |
+
Knowledge distillation can improve model efficiency [38, 45], unsupervised domain adaptation [37], improved object detection $\pmb { \Vert }$ , model transparency $\lVert \rVert \bigotimes \rVert$ , and adversarial robustness [15, 42].
|
| 33 |
+
|
| 34 |
+
Seminal work by Bucila et al. ˘ [5] showed that teacher-ensembles with thousands of simple components could be compressed into a single shallow network that matched or outperformed its teacher. Other early work proposed distilling ensembles of shallow networks into a single network [55], an idea which resonates with more recent work on the distillation of deep ensembles [2, 7, 46, 50, 53]. Recently Fakoor et al. [13] developed a data-augmentation scheme for the distillation of large ensembles of simple models for tabular data, achieving impressive results on a wide range of tabular benchmarks. Malinin et al. [35] proposed a method to model the implicit distribution over predictive distributions from which the ensemble component predictive distributions are drawn, rather than just the ensemble model average.
|
| 35 |
+
|
| 36 |
+
Our work focuses explicitly on student fidelity, decoupling our understanding of good fidelity from good generalization. We show that achieving good fidelity is extremely difficult, even with a variety of interventions, and seek to understand, by systematically considering several hypotheses, why knowledge distillation does not produce high fidelity students for modern architectures and datasets. In contrast, the distillation literature focuses largely on improving student generalization, without particularly distinguishing between fidelity and generalization.
|
| 37 |
+
|
| 38 |
+
For example, concurrent work by Beyer et al. [4] does not carefully distinguish generalization and fidelity metrics, but they assert that high student fidelity is conceptually desirable and apparently difficult to achieve when measured as the gap between teacher and student accuracy. As a result their work focuses most heavily on practical modifications to the distillation procedure for the best student top-1 accuracy. In this paper we investigate many of the same prescriptions, including careful treatment of data augmentation (such as showing the teacher and student the exact same input images), the addition of MixUp, and extended training duration. We also find that such interventions do improve student accuracy, but there still remains a large discrepancy between the predictive distributions of the teacher and the student. We also investigate multiple optimizers. While we do not pursue Shampoo $\mathbb { I Z } \mathbb { I I }$ specifically, Beyer et al. $\pmb { \Vert 4 \Vert }$ find similar qualitative results for Shampoo and Adam, besides faster convergence for Shampoo.
|
| 39 |
+
|
| 40 |
+
# 3 Preliminaries
|
| 41 |
+
|
| 42 |
+
We will focus on the supervised classification setting, with input space $\mathcal { X }$ and label space $\mathcal { V }$ , where $| { \mathcal { V } } | = c$ . Let $f : \mathcal { X } \times \Theta \mathbb { R } ^ { c }$ be a classifier parameterized by $\theta \in \Theta$ whose outputs define a categorical predictive distribution over $\mathcal { V }$ , $\hat { p } ( y = i | \mathbf { x } ) = \sigma _ { i } ( f ( \mathbf { x } , \theta ) )$ , where $\sigma _ { i } ( { \bf z } ) : = \dot { \exp ( z _ { i } ) } / \sum _ { j } \exp \bar { ( } z _ { j } )$ is the softmax link function. We will often refer to the outputs of a classifier $\mathbf { z } : = f ( \mathbf { x } , \theta )$ as logits. For convenience, we will use $t$ and $s$ as shorthand for $f _ { \mathrm { t e a c h e r } }$ and $f _ { \mathrm { s t u d e n t } }$ , respectively. When the teacher is an $m$ -component ensemble, the component logits $\left( \mathbf { z } _ { 1 } , \ldots , \mathbf { z } _ { m } \right)$ , where $\mathbf { z } _ { i } = f _ { i } ( \mathbf { x } , \theta _ { i } )$ , are combined to form the teacher logits: $\begin{array} { r } { \mathbf { z } _ { t } = \log \bar { ( \sum _ { i = 1 } ^ { m } \sigma ( \mathbf { \bar { z } } _ { i } ) / m ) } } \end{array}$ . These combined logits correspond to the predictive distribution of the ensemble model average. The experiments in the main text consider $m \in \{ 1 , 3 , 5 \}$ , and we include results up to $m = 1 2$ in Appendix B.2.1
|
| 43 |
+
|
| 44 |
+
# 3.1 Knowledge Distillation
|
| 45 |
+
|
| 46 |
+
Hinton et al. $[ [ 2 2 ] ]$ proposed a simple approach to knowledge distillation. The student minimizes a weighted combination of two objectives, $\mathcal { L } _ { s } : = \alpha \mathcal { L } _ { \mathrm { N L L } } + ( 1 - \alpha ) \mathcal { L } _ { \mathrm { K D } }$ , where $\alpha \in [ 0 , 1 )$ . Specifically,
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\mathcal { L } _ { \mathrm { N L L } } ( \mathbf { z } _ { s } , \mathbf { y } ) : = - \sum _ { j = 1 } ^ { c } y _ { j } \log \sigma _ { j } ( \mathbf { z } _ { s } ) , ~ \mathcal { L } _ { \mathrm { K D } } ( \mathbf { z } _ { s } , \mathbf { z } _ { t } ) : = - \tau ^ { 2 } \sum _ { j = 1 } ^ { c } \sigma _ { j } \left( \frac { \mathbf { z } _ { t } } { \tau } \right) \log \sigma _ { j } \left( \frac { \mathbf { z } _ { s } } { \tau } \right) .
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
$\mathcal { L } _ { \mathrm { N L L } }$ is the usual supervised cross-entropy between the student logits $\mathbf { z } _ { s }$ and the one-hot labels $\mathbf { y }$ . Recalling that $\begin{array} { r } { \mathrm { K L } ( p | | q ) = \sum _ { j } p _ { j } ( \log q _ { j } - \log p _ { j } ) } \end{array}$ , we see that $\mathcal { L } _ { \mathrm { N L L } }$ is equivalent (up to a constant) to the KL from the empirical data distribution to the student predictive distribution $( \hat { p } _ { s } )$ . ${ \mathcal { L } } _ { \mathrm { K D } }$ is the added knowledge distillation term that encourages the student to match the teacher. It is the cross-entropy between the teacher and student predictive distributions $\hat { p } _ { t } = \sigma ( \mathbf { z } _ { t } )$ and $\hat { p } _ { s } = \sigma ( { \bf z } _ { s } )$ , both scaled by a temperature hyperparameter $\tau > 0$ . If $\tau = 1$ then ${ \mathcal { L } } _ { \mathrm { K D } }$ is similarly equivalent to the KL from the teacher to the student, $\mathrm { K L } ( \hat { p } _ { t } | | \hat { p } _ { s } )$ . Since we focus on distillation fidelity, we choose $\alpha = 0$ for all experiments in the main text to avoid any confounding from true labels, but we also include a limited ablation of $\alpha$ in Figure $\boxed { 1 4 }$ in Appendix $C . 5$ for the curious reader.
|
| 53 |
+
|
| 54 |
+
As $\tau \to + \infty$ , $\nabla _ { \mathbf { z } _ { s } } \mathcal { L } _ { \mathrm { K D } } ( \mathbf { z } _ { s } , \mathbf { z } _ { t } ) \approx \mathbf { z } _ { t } - \mathbf { z } _ { s }$ , and thus in the limit $\nabla _ { \mathbf { z } _ { s } } \mathcal { L } _ { \mathrm { K D } }$ is approximately equivalent to $\nabla _ { \mathbf { z } _ { s } } | | \mathbf { z } _ { t } - \mathbf { z } _ { s } | | _ { 2 } ^ { 2 } / 2$ , assigning equal significance to every class logit, regardless of its contribution to the predictive distribution. In other words $\tau$ determines the “softness” of the teacher labels, which in turn determines the allocation of student capacity. If the student is much smaller than the teacher, the student capacity can be focused on matching the teacher’s top- $k$ predictions, rather than matching the full teacher distribution by choosing a moderate value (e.g. $\tau = 4$ ). In Appendix ${ \bf B . l }$ we include further discussion on the interplay of teacher ensemble size, teacher network capacity, and distillation temperature on the student labels.
|
| 55 |
+
|
| 56 |
+
The teacher and student often share at least some training data. It is also common to enlarge the student training data in some way (e.g. incorporating unlabeled examples as in Ba and Caruana $\pmb { \mathbb { D } } \mathbf { l }$ ). When there is a possibility of confusion, we will refer to the student’s training data as the distillation data to distinguish it from the teacher’s training data.
|
| 57 |
+
|
| 58 |
+
# 3.2 Metrics and Evaluation
|
| 59 |
+
|
| 60 |
+
To measure generalization, we report top-1 accuracy, negative log-likelihood (NLL) and expected calibration error (ECE) $\boxed { 1 1 6 }$ . To measure fidelity, we report the following:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { r l } & { \displaystyle \mathrm { A v e r a g e ~ T o p - 1 ~ A g r e e m e n t : } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } 1 \{ \mathrm { a r g m a x } \sigma _ { j } ( \mathbf { z } _ { t , i } ) = \underset { j } { \mathrm { a r g m a x } } \sigma _ { j } ( \mathbf { z } _ { s , i } ) \} , } \\ & { \displaystyle \mathrm { A v e r a g e ~ P r e d i c t i v e ~ K L : } = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \mathrm { K L } \left( \hat { p } _ { t } ( \mathbf { y } | \mathbf { x } _ { i } ) \parallel \hat { p } _ { s } ( \mathbf { y } | \mathbf { x } _ { i } ) \right) , } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Eqn. $( 2 )$ is the average agreement between the student and teacher’s top-1 label. Eqn. $\textcircled{3}$ is the average KL divergence from the predictive distribution of the teacher to that of the student, a measure of fidelity sensitive to all of the labels.
|
| 67 |
+
|
| 68 |
+
While improvements in generalization metrics are relatively easy to understand, interpreting fidelity metrics requires some care. For example, suppose we have three independent models: $f _ { 1 } , f _ { 2 }$ , and $f _ { 3 }$ that respectively achieve $55 \%$ , $7 5 \%$ , and $9 5 \%$ test accuracy. $f _ { 1 }$ and $f _ { 3 }$ can agree on at most $60 \%$ of points, whereas $f _ { 2 }$ and $f _ { 3 }$ agree on at least $70 \%$ , but it would obviously be incorrect to make any claim about $f _ { 2 }$ being a better distillation of $f _ { 3 }$ since each model was trained completely independently. To account for such confounding when evaluating the distillation of a student $s$ from a teacher $t$ , we also evaluate another student $s ^ { \prime }$ distilled through an identical procedure from an independent teacher.
|
| 69 |
+
|
| 70 |
+
By comparing the fidelity of $( t , s )$ and $( t , s ^ { \prime } )$ we can distinguish between a generic improvement in generalization and an improvement specifically to fidelity. If $s$ and $s ^ { \prime }$ have comparable fidelity, then the students agree with the teacher at many points because they generalize well, and not the reverse.
|
| 71 |
+
|
| 72 |
+
# 4 Knowledge Distillation Transfers Knowledge Poorly
|
| 73 |
+
|
| 74 |
+
In this section, we present evidence that we are not able to distill large networks such as a ResNet-56 with high fidelity, and discuss why high fidelity is an important objective.
|
| 75 |
+
|
| 76 |
+
# 4.1 When is knowledge transfer successful?
|
| 77 |
+
|
| 78 |
+
We first consider the easy task of distilling a LeNet-5 teacher into an identical student network as a motivating example. We train the teacher on a random subset of 200 examples from the MNIST training set for 100 epochs, resulting in a $8 4 \%$ to $8 6 \%$ teacher test accuracy across different subsets.2 We then distill the teacher using the full MNIST train dataset with 60,000 examples, as well as $2 5 \%$ , $50 \%$ , and $100 \%$ of the EMNIST train dataset [11]. The EMNIST train set contains 697,932 images.
|
| 79 |
+
|
| 80 |
+
In Figure $2$ we see that knowledge distillation works as expected. With enough examples the student learns to make the same predictions as the teacher (over $9 9 \%$ top-1 test agreement). Notably, in this case, self-distillation does not improve generalization, since the slight difference between the teacher and student accuracy is explained by variance between trials.
|
| 81 |
+
|
| 82 |
+
Now we consider a more challenging task: distilling a ResNet-56 teacher trained on CIFAR-100 into an identical student network (Figure $^ { 1 , }$ left). Since no dataset drawn from the same distribution as CIFAR-100 is publicly available, to augment the distillation data, we instead combined samples from an SN-GAN $\textcircled { \ 3 9 }$ pre-trained on CIFAR-100 with the original CIFAR-100 train dataset. Appendix A.3 details the hyperparameters and training procedure for the GAN, teacher, and student.
|
| 83 |
+
|
| 84 |
+
Like the MNIST experiment, as we enlarge the distillation dataset the student fidelity improves. However, in this case the improvement is modest, with the fidelity reaching nowhere near $9 9 \%$ test agreement. Since a ResNet-56 has many more parameters than a LeNet-5, it is possible that the student simply has not seen enough examples to perfectly emulate the teacher, a hypothesis we discuss in more detail in Section $\underline { { \boldsymbol { \mathsf { F . 1 } } } } \big \| .$ Also, like the MNIST experiment, as the distillation dataset grows the student accuracy approaches the teacher’s. Unlike the MNIST experiment, the student test accuracy is higher than the teacher’s when the distillation dataset is small, so increasing fidelity decreases student generalization.
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: LeNet-5 self-distillation on MNIST with additional distillation data. The shaded region corresponds to $\mu \pm \sigma$ , estimated over 3 trials.
|
| 88 |
+
|
| 89 |
+
# 4.2 What can self-distillation tell us about knowledge distillation in general?
|
| 90 |
+
|
| 91 |
+
We have seen in Figure $\mathbb { U } ( { \mathrm { a } } )$ that with self-distillation the student can exceed the teacher performance, in accordance with Furlanello et al. [14]. This result is only possible by virtue of failing at the distillation procedure: if the student matched the teacher perfectly then the student could not outperform the teacher. On the other hand, if the teacher generalizes significantly better than an independently trained student, we would expect the benefits of fidelity to dominate other regularization effects associated with not matching the teacher. This setting reflects the original motivation for knowledge distillation, where we wish to faithfully transfer the representation discovered by a large model or ensemble of models into a more efficient student.
|
| 92 |
+
|
| 93 |
+
In Figure $\mathbb { M } ( { \mathsf { b } } )$ we see that if we move from self-distillation to the distillation of a 3 ResNet-56 teacher ensemble, fidelity becomes positively correlated with generalization. But there is still a significant gap in fidelity, even after the distillation set is enlarged with $5 0 k$ GAN samples. In practice, the gap remains large enough that higher fidelity students do not always have better generalization, and the regularization effects we see in self-distillation do play a role for more broadly understanding student generalization. We will indeed show in Section $\boxed { 5 }$ that higher fidelity students do not always generalize better, even if the teacher generalizes much better than the student.
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 3: Data augmentation and distillation: Test accuracy and teacher-student agreement when distilling a 5-component ResNet-56 teacher ensemble into a ResNet-56 student on CIFAR-100 with varying augmentation policies. The best performing policy is shown in green, results averaged over 3 runs. Additional metrics are reported in Figure $1 \bar { 1 }$ in Appendix $\mathbf { C } .$ Mixup and GAN augmentation provide the best generalization, and Mixup $\tau = 4$ ) provides the best fidelity. The baseline policy (crops and flips) with $\tau = 4$ is a surprisingly strong baseline. The error bars indicate $\pm \sigma$ .
|
| 97 |
+
|
| 98 |
+
# 4.3 If distillation already improves generalization, why care about fidelity?
|
| 99 |
+
|
| 100 |
+
While knowledge distillation does often improve generalization, understanding the relationship between fidelity and generalization, and how to maximize fidelity, is important for several reasons — including better generalization!
|
| 101 |
+
|
| 102 |
+
Better generalization in distilling large teacher models and ensembles. Knowledge distillation was initially motivated as a means to deploy powerful models to small devices or low-latency controllers [e.g., 10, 21, 26, 52, 54]. While in self-distillation generalization and fidelity are in tension, there is often a significant disparity in generalization between large teacher models, including ensembles, and smaller students. We have seen this disparity in Figure $\bar { \mathbb { M } } ( { \mathfrak { b } } )$ . We additionally show in Figure 10 in Appendix $\underline { { \overline { { \mathbf { B . l } } } } } ]$ that as we increase the number of ensemble components, the generalization disparity between teacher and distilled student increases. Improving student fidelity is the most obvious way to close the generalization disparity between student and teacher in these settings. Even if one exclusively cares about student accuracy, fidelity is a key consideration outside self-distillation.
|
| 103 |
+
|
| 104 |
+
Interpretability and reliability. Knowledge distillation has been identified as a means to transfer representations discovered by large black-box models into simpler more interpretable models, for example to provide insights into medical diagnostics, or discovering rules for understanding sentiment in text [e.g., 23, 24, 6, 33, 8]. The ability to perform this transfer could have extraordinary scientific consequences: large models can often discover structure in data that we would not have anticipated a priori. Moreover, we often want to transfer properties such as well-calibrated uncertainties or robustness, which have been well-established for larger models, so that we can safely deploy more efficient models in their place. In both cases, achieving good distillation fidelity is crucial.
|
| 105 |
+
|
| 106 |
+
Understanding. The name knowledge distillation implies we are transferring knowledge from the teacher to the student. For this reason, improved student generalization as a consequence of a distillation procedure is sometimes conflated with fidelity. Decoupling fidelity and generalization, and explicitly studying fidelity, is foundational to understanding how knowledge distillation works and how we can make it more useful across a variety of applications.
|
| 107 |
+
|
| 108 |
+
# 4.4 Possible causes of low distillation fidelity
|
| 109 |
+
|
| 110 |
+
If we are able to match the student model to the teacher on a comprehensive distillation dataset, we expect it to match on the test data as well, achieving high distillation fidelity3. Possible causes of the poor distillation fidelity in our CIFAR-100 experiments include:
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 4: Data recycling and distillation: results on subsampled CIFAR-100. Top: We fix the temperature $( \tau = 4$ ) and vary the number of ensemble components $( m )$ , comparing students distilled on the same dataset as the teacher $( \mathcal { D } _ { 0 } / \mathcal { D } _ { 0 } )$ , a reserved dataset $( \mathcal { D } _ { 0 } / \mathcal { D } _ { 1 } )$ , or both $( \mathcal { D } _ { 0 } / \mathcal { D } _ { 0 } \cup \mathcal { D } _ { 1 } )$ . Distilling on both produces the best result, while distilling on $\mathcal { D } _ { 0 }$ increases accuracy and decreases fidelity, relative to $\mathcal { D } _ { 1 }$ . Bottom: We repeat the experiment, but fix $m = 3$ and vary $\tau$ . The shaded region corresponds to $\mu \pm \sigma$ , estimated over 3 trials.
|
| 114 |
+
|
| 115 |
+
Student capacity – We observe low fidelity even in the self-distillation setting, so we can rule out student capacity as a primary cause, but we also confirm in Figure 12 in Appendix $\mathbb { E . l }$ that increasing the student capacity has very little effect on fidelity in the ensemble-distillation setting.
|
| 116 |
+
|
| 117 |
+
Network architecture – Low fidelity could be specific to ResNet-like architectures, an explanation we rule out by showing similar results with VGG networks [47] in Figure 13 in Appendix C.2.
|
| 118 |
+
|
| 119 |
+
Dataset scale and complexity – we provide similar results in Section C.3 for ImageNet, showing that our findings apply to datasets of larger scale and complexity.
|
| 120 |
+
|
| 121 |
+
Data domain – Similarly in Section $\boxed { C . 4 }$ we observe low distillation fidelity in the context of text classification (sentiment analysis on the IMDB dataset), showing our results are relevant beyond image classification.
|
| 122 |
+
|
| 123 |
+
Identifiability (Section $5$ ) – the distillation data is insufficient to distinguish high-fidelity and lowfidelity students. In other words, matching the teacher predictions on the distillation dataset does not lead to matching predictions on the test data.
|
| 124 |
+
|
| 125 |
+
Optimization (Section 6) – we are unable to solve the distillation optimization problem sufficiently well. The student does not agree with the teacher on test because it does not even agree on train.
|
| 126 |
+
|
| 127 |
+
# 5 Identifiability: Are We Using the Right Distillation Dataset?
|
| 128 |
+
|
| 129 |
+
We investigate whether it is possible to attain the level of fidelity observed with LeNet-5s on MNIST with ResNets on CIFAR-100 by addressing the identifiability problem — have we shown the student enough of the right input-teacher label pairs to define the solution we want?
|
| 130 |
+
|
| 131 |
+
# 5.1 Should we do more data augmentation?
|
| 132 |
+
|
| 133 |
+
Data augmentation is a simple and practical method to increase the support of the distillation data distribution. If identifiability is a primary cause of poor distillation fidelity, using a more extensive data augmentation strategy during distillation should improve fidelity.
|
| 134 |
+
|
| 135 |
+
To test this hypothesis, we evaluated the effect of several augmentation strategies on student fidelity and generalization. In Figure $^ { 3 , }$ the teacher is a 5-component ensemble of ResNet-56 networks trained on CIFAR-100 with the Baseline augmentation strategy: horizontal flips and random crops.
|
| 136 |
+
|
| 137 |
+
We report the student accuracy and teacher-student agreement for each augmentation strategy, and also include results for Baseline with $\tau = 1$ and $\tau = 4$ to demonstrate the effect of logit tempering.
|
| 138 |
+
|
| 139 |
+
We first observe that the best augmentation policies for generalization, $M i x U p$ , and $G A N \mathbb { H }$ are not the best policies for fidelity. Furthermore, although many augmentation strategies enable slightly higher distillation fidelity compared to Baseline $\tau = 1 .$ ), even the best augmentation policy, Mixup $\tau = 4 ,$ ), only achieves a modest $86 \%$ test agreement. In fact the Baseline $\tau = 4 ,$ ) policy is quite competitive, achieving $8 4 . 5 \%$ test agreement. Many of the augmentation strategies also slightly improve teacher-student KL relative to Baseline $\tau = 4$ ) (see Figure $^ { 1 1 ) }$
|
| 140 |
+
|
| 141 |
+
In Figure 11 in Appendix ${ \bf B } . 3$ we report all generalization and fidelity metrics for a range of ensemble sizes, as well as the results for the independent student baseline discussed in Section $\underline { { \bar { 3 . 2 } } }$ Often these independent students, taught how to mimic a completely different model, have nearly as good test agreement with the teacher as the student explicitly trained to emulate it. See Appendix $\mathbf { \bar { A } } . 1$ for a detailed description of the augmentation procedures.
|
| 142 |
+
|
| 143 |
+
Should data augmentation be close to the data distribution? In theory, any data augmentation should help with identifiability: if a student matches a teacher on more data, it is more likely to match the teacher elsewhere. However, the Noise and $O O D$ augmentation strategies based on noise and outof-distribution data fail on all metrics, decreasing performance compared to the baseline. In practice, data augmentation has an effect beyond improving identifiability — it has a regularizing effect, making optimization more challenging. We explore this facet of data augmentation in Section 6.
|
| 144 |
+
|
| 145 |
+
The slight improvements to fidelity with extensive augmentations suggest that increasing the support of the distillation dataset can indeed improve distillation fidelity. However, since the benefit is so small compared to heuristics like logit tempering (which does not modify the support at all), it is very unlikely that an insufficient quantity of teacher labels is the primary obstacle to high fidelity.
|
| 146 |
+
|
| 147 |
+
# 5.2 The data recycling hypothesis
|
| 148 |
+
|
| 149 |
+
If simply showing the student more labels does not always significantly improve fidelity, perhaps we are not showing the student the right labels. Additional data augmentation during distillation does give the student more teacher labels to match, but also introduces a distribution shift between the images the teacher was trained on and the images the student is distilling on. Even when the teacher and student have the same augmentation policy, reusing the teacher’s training data for distillation violates the assumptions of empirical risk minimization (ERM) because the distillation data is not an independent draw from the true joint distribution over images and teacher labels. What if there was no augmentation distribution shift, and the student was distilled on a fresh draw from the joint test distribution over images and teacher labels?
|
| 150 |
+
|
| 151 |
+
To investigate the effect of recycling teacher data during distillation we randomly split the CIFAR-100 training dataset $\mathcal { D }$ into two equal parts, $\mathcal { D } _ { 0 }$ and $\mathcal { D } _ { 1 }$ . We train teacher ResNet-56 ensembles on $\mathcal { D } _ { 0 }$ , and then compare $s _ { 0 }$ , a student distilled on the original $\mathcal { D } _ { 0 }$ , $s _ { 1 }$ , a student distilled on the unseen $\mathcal { D } _ { 1 }$ , and $s _ { 0 \cup 1 }$ , a student distilled on both: $\mathcal { D } _ { 0 } \cup \mathcal { D } _ { 1 }$ . Note that the students cannot access the true labels, only those provided by the teacher. We present the results in Figure 4, varying the ensemble size in the top row and the logit temperature in the bottom row.
|
| 152 |
+
|
| 153 |
+
Surprisingly, $s _ { 0 }$ attains higher test accuracy than $s _ { 1 }$ , while showing worse ECE and lower fidelity (measured by test teacher-student agreement and test teacher-student KL). Therefore, the hypothesis that $s _ { 1 }$ should be a higher fidelity distillation of the teacher than $s _ { 0 }$ does hold, but the gain in fidelity does not result in $s _ { 1 }$ best replicating the teacher’s accuracy. The best attributes of $s _ { 0 }$ and $s _ { 1 }$ are combined by $s _ { 0 \cup 1 }$ , which coincides with how unlabeled data is typically used in practice $\pmb { \left. 2 \right. }$ . The reason for this puzzling observation is simply that for the larger teachers fidelity has not improved enough to also improve generalization. In fact, the best teacher-student agreement is only around $8 5 \%$ , no improvement when compared to the results from extensive data augmentation in the last section. We again find that modifying the distillation data can slightly improve fidelity, but the evidence does not support blaming poor distillation fidelity on the wrong choice of distillation data.
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 5: The train agreement for teacher ensembles $( m \in \{ 1 , 3 , 5 \} )$ ) and student on the distillation data for a ResNet-56 on CIFAR-100 under different augmentation policies. In all panels, increasing the softness of the teacher labels by adding examples not in the teacher train data makes distillation more difficult. Left: agreement for the synthetic GAN-augmentation policy from Figure 1. Middle: agreement from subsampled CIFAR-100 experiment in Figure $\sharp$ Right: agreement for some of the augmentation policies in Figure 3. The shaded region is not visible because the variance is very low.
|
| 157 |
+
|
| 158 |
+
# 6 Optimization: Does the Student Match the Teacher on Distillation Data?
|
| 159 |
+
|
| 160 |
+
If poor fidelity is not primarily an identifiability problem from the wrong choice of distillation data, perhaps there is a simpler explanation. Up to this point, we have focused on student fidelity on a held-out test set. Now we turn our attention to student behavior on the distillation data itself. Does the student match the teacher on the data it is trained to match it on?
|
| 161 |
+
|
| 162 |
+
# 6.1 More distillation data lowers train agreement
|
| 163 |
+
|
| 164 |
+
In Figure 1 we presented an experiment distilling ResNet-56 networks on CIFAR-100 augmented with synthetic GAN-generated images. We saw that enlarging the distillation dataset leads to improved teacher-student agreement on test, but the agreement remains relatively low (below $8 0 \%$ ) even for the largest distillation dataset that we considered. In Figure $5$ (left panel), we report the teacher-student agreement for the same experiment, but now on the distillation dataset. We now observe the opposite trend: as the distillation dataset becomes larger, it becomes more challenging for the student to match the teacher. Even when the student has identical capacity to the teacher, the student only achieves $9 5 \%$ agreement with the teacher when we use $5 0 k$ synthetic images for distillation.
|
| 165 |
+
|
| 166 |
+
The drop in train agreement is even more pronounced when we use extensive data augmentation. In Figure $\checkmark$ right panel, we report the teacher-student agreement on the train set with data augmentation for a subset of augmentation strategies presented in Section $\underline { { \boldsymbol { \mathsf { F . 1 } } } } \big \| .$ We use the CIFAR-100 dataset and the ResNet-56 model for the teachers and the students (for details, see Section $5 . 1 )$ . In each case, we measure agreement on the augmented training set that was used during distillation. While for the baseline augmentation strategy, we can achieve almost perfect teacher-student agreement, for heavier augmentations the agreement drops dramatically. For the Rotation, Vertical Flip and Color Jitter augmentations, the agreement is between $8 0 \%$ and $9 0 \%$ for all the considered teacher sizes. For Combined Augs, the combination of these three augmentation strategies, the agreement drops even further, to just $6 0 \%$ in self-distillation!
|
| 167 |
+
|
| 168 |
+
Our intuition about how knowledge distillation should work largely hinges on the assumption that after distillation the student matches the teacher on the distillation set. However, the results presented in this section suggest that in practice the optimization method is unable to achieve high fidelity even on the distillation dataset when extensive data augmentation or synthetic data is used. The inability to solve the optimization problem undermines distillation: in order to find a student that would match the teacher on all inputs, we need to at least be able to find a student that would match the teacher on all of the distillation data.
|
| 169 |
+
|
| 170 |
+
Optimization and the train-test fidelity gap. Notably, despite having the lowest train agreement, the Combined Augs policy results in better test agreement than other polices with better train agreement (Figure $3 )$ ). This result highlights a fundamental trade-off in knowledge distillation: the student needs many teacher labels match the teacher on test, but introducing examples not in the teacher train data makes matching the teacher on the distillation data very difficult.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 6: Optimization and distillation: self-distillation with ResNet-20s with LayerNorm on CIFAR-100. (a): Final train agreement for SGD and Adam optimizers. Training longer improves agreement, but it remains below $8 5 \%$ even after $5 k$ epochs. (b): Final train loss and agreement when the initialization is a convex combination of teacher and random weights, $\theta _ { s } = \lambda \theta _ { t } + \mathbf { \bar { ( } 1 - } \lambda ) \theta _ { r }$ . (c): Projections of the distillation loss surface on the plane intersecting $\theta _ { t }$ , the initial student weights, and the final student weights for different $\lambda$ . When $\lambda$ is small, the student converges to a suboptimal solution with low agreement. The uncertainty regions correspond to $\mu \pm \sigma$ , estimated over 3 trials.
|
| 174 |
+
|
| 175 |
+
# 6.2 Why is train agreement so low?
|
| 176 |
+
|
| 177 |
+
A simplified distillation experiment. To simplify our exploration, we focus on self-distillation of a ResNet-20 on CIFAR-100. We use the Baseline data augmentation strategy, as we found that a ResNet-20 student is unable to match the teacher on train even with basic augmentation. We also replace the BatchNorm layers $\mathbb { \left. \overline { { 2 5 } } \right. }$ in ResNet-20 with LayerNorm $\pmb { \left[ \sqrt { 3 } \right] }$ , because we found that with BatchNorm layers even when the teacher and the student have identical weights, they can make different predictions due to differences in the activation statistics accumulated by the BatchNorm layers. Layer normalization does not collect any activation statistics, so the student will match the teacher as long as the weights coincide.
|
| 178 |
+
|
| 179 |
+
Can we solve the optimization problem better? We verify that the distillation fidelity cannot be significantly improved by training longer or with a different optimizer. By default, in our experiments we use stochastic gradient descent (SGD) with momentum, train the student for 300 epochs, and use a weight decay value of $1 0 ^ { - 4 }$ . In Figure $\boxed { 6 }$ we report the results for the SGD and Adam $\mathbb { \ Z } \mathbb { 1 }$ optimizers run for $1 k$ and $5 k$ epochs without weight decay. Switching from SGD to Adam only reduced fidelity.
|
| 180 |
+
|
| 181 |
+
For both optimizers, training for more epochs does slightly improve train agreement. In particular, with SGD we achieve $8 3 . 3 \%$ agreement when training for $5 k$ epochs compared to $7 8 . 9 5 \%$ when training for 300 epochs. It is possible, though unlikely, that if we train for even more epochs the train agreement could reach $1 0 0 \%$ . However, training for $5 k$ epochs is significantly longer than what is typically done in practice (100 to 500 epochs). Furthermore, the improvement from $1 k$ to $5 k$ epochs is only about $2 \%$ , suggesting that we would need to train for tens of thousands of epochs, even in the optimistic case that agreement improves linearly, in order to get close to $1 0 0 \%$ train agreement.
|
| 182 |
+
|
| 183 |
+
The distillation loss surface hypothesis: If we cannot perfectly distill a ResNet-20 on CIFAR-100 with any of the interventions we have discussed so far, we now ask if there is any modification of the problem that can produce a high-fidelity student.
|
| 184 |
+
|
| 185 |
+
In the self-distillation setting, we do know of at least one set of weights that is optimal w.r.t. the distillation loss — the teacher’s own weights $\theta _ { t }$ . Letting $\theta _ { r }$ be a random weight initialization, in Figure $\boxed { 6 }$ (a) we examine the effect of choosing the student initialization to be a convex combination of the teacher and random weights, $\theta _ { s } = \lambda \bar { \theta _ { t } } + ( 1 - \lambda ) \theta _ { r }$ . After being initialized in this way, the student was trained as before. In other words $\lambda = 0$ corresponds to a random initialization and $\lambda = 1$ corresponds to initializing the student weights at the final teacher weights.
|
| 186 |
+
|
| 187 |
+
We find that if the student is initialized far from the teacher $\lambda \leq 0 . 2 5 )$ , the optimizer converges to a sub-optimal value of the distillation loss, producing a student that significantly disagrees with the teacher. However at $\lambda = 0 . 3 7 5$ there is a sudden change. The final train loss drops to the optimal value and the agreement drastically increases, and the behavior continues for $\lambda > 0 . 3 7 5$ . To further investigate, in Figure $6 ( \mathrm { c ) }$ we visualize the distillation loss surface for $\lambda \in \{ 0 , 0 . 2 5 , 0 . 3 7 5 \}$ projected on the 2D subspace intersecting $\theta _ { t }$ , the initial student weights, and the final student weights. If the student is initialized far from the teacher $( \lambda \in \{ 0 , 0 . 2 5 \} )$ , it converges to a distinct, sub-optimal basin of the loss surface. On the other hand, when initialized close to the teacher $\lambda = 0 . 3 7 5$ ), the student converges to the same basin as the teacher, achieving nearly $100 \%$ agreement.
|
| 188 |
+
|
| 189 |
+
Table 1: We examine whether fidelity can be improved in the context of ResNet-20 self-distillation on CIFAR-100 if the teacher and student share the same weight initialization. All metrics are computed on the test set. A shared initialization does make the student slightly more similar to the teacher in activation space (measured by CKA), but in function space the results are indistinguishable from randomly initialized students. We report the mean and standard deviation, estimated from 10 trials. The average teacher accuracy was 70.522 (0.412).
|
| 190 |
+
|
| 191 |
+
<table><tr><td colspan="3"></td><td colspan="3">CKA (1)</td></tr><tr><td>Init.</td><td>Agree. (↑)</td><td>KL (↓)</td><td>Stage 1</td><td> Stage 2</td><td>Stage 3</td></tr><tr><td>Rand.</td><td>77.174 (0.352)</td><td>0.836 (0.016)</td><td>0.939 (0.017)</td><td>0.925 (0.027)</td><td>0.885 (0.011)</td></tr><tr><td>Teach.</td><td>77.098 (0.238)</td><td>0.838 (0.020)</td><td>0.951 (0.017)</td><td>0.937 (0.020)</td><td>0.890 (0.015)</td></tr></table>
|
| 192 |
+
|
| 193 |
+
Is using the initial teacher weights enough for good fidelity? If good fidelity can be obtained by initializing the student near the final teacher weights, it is possible that similar results could be obtained by initializing the student at the initial teacher weights. In Table $^ 1$ we compare students distilled from random initializations with those initialized at the initial teacher weights. In addition to the metrics reported in the rest of the paper, we also include the centered kernel alignment (CKA) $\pmb { \Vert 2 8 \Vert }$ of the preactivations of each of the teacher and student networks. There is a small increase in CKA, indicating that sharing an initialization between teacher and student does increase alignment in activation space, but functionally the students are identical to their randomly initialized counterparts – there is no observable change in accuracy, agreement, or predictive KL when compared to random initialization.
|
| 194 |
+
|
| 195 |
+
To summarize, we have at last identified a root cause of the ineffectiveness of all our previous interventions on the knowledge distillation procedure. Knowledge distillation is unable to converge to optimal student parameters, even when we know a solution and give the initialization a small head start in the direction of an optimum. Indeed, while identifiability can be an issue, in order to match the teacher on all inputs, the student has to at least match the teacher on the data used for distillation, and achieve a near-optimal value of the distillation loss. Furthermore, the suboptimal convergence of knowledge distillation appears to be a consequence of the optimization dynamics specifically, and not simply initialization bias. In practice, optimization converges to sub-optimal solutions, leading to poor distillation fidelity.
|
| 196 |
+
|
| 197 |
+
# 7 Discussion
|
| 198 |
+
|
| 199 |
+
Our work provides several new key findings about knowledge distillation:
|
| 200 |
+
|
| 201 |
+
• Good student accuracy does not imply good distillation fidelity: even outside of selfdistillation, the models with the best generalization do not always achieve the best fidelity. • Student fidelity is correlated with calibration when distilling ensembles: although the highest-fidelity student is not always the most accurate, it is always the best calibrated. • Optimization is challenging in knowledge distillation: even in cases when the student has sufficient capacity to match the teacher on the distillation data, it is unable to do so. • There is a trade-off between optimization complexity and distillation data quality: Enlarging the distillation dataset beyond the teacher training data makes it easier for the student to identify the correct solution, but also makes an already difficult optimization problem harder.
|
| 202 |
+
|
| 203 |
+
In standard deep learning, we are saved by not needing to solve the optimization problem well: while it true that our training loss is highly multimodal, properties such as the flatness of good solutions, the inductive biases of the network, and the implicit biases of SGD, often enable good generalization in practice. In knowledge distillation, however, good fidelity is directly aligned with solving what turns out to be an exceptionally difficult optimization problem.
|
| 204 |
+
|
| 205 |
+
# Acknowledgements
|
| 206 |
+
|
| 207 |
+
The authors would like to thank Gregory Benton, Marc Finzi, Sanae Lotfi, Nate Gruver, and Ben Poole for helpful feedback. This research is supported by an Amazon Research Award, NSF I-DISRE 193471, NIH R01DA048764-01A1, NSF IIS-1910266, and NSF 1922658NRT-HDR: FUTURE Foundations, Translation, and Responsibility for Data Science. Samuel Stanton is also supported by a United States Department of Defense NDSEG fellowship.
|
| 208 |
+
|
| 209 |
+
# References
|
| 210 |
+
|
| 211 |
+
[1] Anil, R., Gupta, V., Koren, T., Regan, K., and Singer, Y. (2021). Scalable second order optimization for deep learning. arXiv preprint arXiv:2002.09018.
|
| 212 |
+
[2] Ba, J. and Caruana, R. (2014). Do deep nets really need to be deep? Advances in neural information processing systems, 27:2654–2662.
|
| 213 |
+
[3] Ba, J. L., Kiros, J. R., and Hinton, G. E. (2016). Layer normalization. Proceedings of the NIPS 2016 Deep Learning Symposium.
|
| 214 |
+
[4] Beyer, L., Zhai, X., Royer, A., Markeeva, L., Anil, R., and Kolesnikov, A. (2021). Knowledge distillation: A good teacher is patient and consistent.
|
| 215 |
+
[5] Bucila, C., Caruana, R., and Niculescu-Mizil, A. (2006). Model compression. In ˘ Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 535–541.
|
| 216 |
+
[6] Che, Z., Purushotham, S., Khemani, R., and Liu, Y. (2015). Distilling knowledge from deep networks with applications to healthcare domain. arXiv preprint arXiv:1512.03542.
|
| 217 |
+
[7] Chebotar, Y. and Waters, A. (2016). Distilling knowledge from ensembles of neural networks for speech recognition. In Interspeech, pages 3439–3443.
|
| 218 |
+
[8] Chen, D., Mei, J.-P., Wang, C., Feng, Y., and Chen, C. (2020). Online knowledge distillation with diverse peers. In AAAI, pages 3430–3437.
|
| 219 |
+
[9] Chen, G., Choi, W., Yu, X., Han, T., and Chandraker, M. (2017). Learning efficient object detection models with knowledge distillation. In Advances in neural information processing systems, pages 742–751.
|
| 220 |
+
[10] Cho, J. H. and Hariharan, B. (2019). On the efficacy of knowledge distillation. In Proceedings of the IEEE International Conference on Computer Vision, pages 4794–4802.
|
| 221 |
+
[11] Cohen, G., Afshar, S., Tapson, J., and Van Schaik, A. (2017). Emnist: Extending mnist to handwritten letters. In 2017 International Joint Conference on Neural Networks (IJCNN), pages 2921–2926. IEEE.
|
| 222 |
+
[12] Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. (2009). Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee.
|
| 223 |
+
[13] Fakoor, R., Mueller, J. W., Erickson, N., Chaudhari, P., and Smola, A. J. (2020). Fast, accurate, and simple models for tabular data via augmented distillation. Advances in Neural Information Processing Systems, 33.
|
| 224 |
+
[14] Furlanello, T., Lipton, Z., Tschannen, M., Itti, L., and Anandkumar, A. (2018). Born again neural networks. In International Conference on Machine Learning, pages 1607–1616. PMLR.
|
| 225 |
+
[15] Goldblum, M., Fowl, L., Feizi, S., and Goldstein, T. (2020). Adversarially robust distillation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 3996–4003.
|
| 226 |
+
[16] Guo, C., Pleiss, G., Sun, Y., and Weinberger, K. Q. (2017). On calibration of modern neural networks. In International Conference on Machine Learning, pages 1321–1330. PMLR.
|
| 227 |
+
[17] Gupta, V., Koren, T., and Singer, Y. (2018). Shampoo: Preconditioned stochastic tensor optimization. In International Conference on Machine Learning, pages 1842–1850.
|
| 228 |
+
[18] Han, S., Mao, H., and Dally, W. J. (2016). Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. In International Conference on Learning Representations.
|
| 229 |
+
[19] Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M. H., Brett, M., Haldane, A., del Río, J. F., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E. (2020). Array programming with NumPy. Nature, 585(7825):357–362.
|
| 230 |
+
[20] He, K., Zhang, X., Ren, S., and Sun, J. (2016). Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778.
|
| 231 |
+
[21] Heo, B., Lee, M., Yun, S., and Choi, J. Y. (2019). Knowledge transfer via distillation of activation boundaries formed by hidden neurons. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 3779–3787.
|
| 232 |
+
[22] Hinton, G., Vinyals, O., and Dean, J. (2015). Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531.
|
| 233 |
+
[23] Hu, Z., Ma, X., Liu, Z., Hovy, E., and Xing, E. (2016a). Harnessing deep neural networks with logic rules. In Association for Computational Linguistics.
|
| 234 |
+
[24] Hu, Z., Yang, Z., Salakhutdinov, R., and Xing, E. (2016b). Deep neural networks with massive learned knowledge. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1670–1679.
|
| 235 |
+
[25] Ioffe, S. and Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448–456. PMLR.
|
| 236 |
+
[26] Kim, Y. and Rush, A. M. (2016). Sequence-level knowledge distillation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1317–1327.
|
| 237 |
+
[27] Kingma, D. P. and Ba, J. (2015). Adam: A method for stochastic optimization. In International Conference on Learning Representations.
|
| 238 |
+
[28] Kornblith, S., Norouzi, M., Lee, H., and Hinton, G. (2019). Similarity of neural network representations revisited. In International Conference on Machine Learning, pages 3519–3529. PMLR.
|
| 239 |
+
[29] Krizhevsky, A. et al. (2009). Learning multiple layers of features from tiny images.
|
| 240 |
+
[30] LeCun, Y., Boser, B., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W., and Jackel, L. D. (1989a). Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551.
|
| 241 |
+
[31] LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324.
|
| 242 |
+
[32] LeCun, Y., Denker, J. S., Solla, S. A., Howard, R. E., and Jackel, L. D. (1989b). Optimal brain damage. In NIPs, volume 2, pages 598–605. Citeseer.
|
| 243 |
+
[33] Liu, X., Wang, X., and Matwin, S. (2018). Improving the interpretability of deep neural networks with knowledge distillation. In 2018 IEEE International Conference on Data Mining Workshops (ICDMW), pages 905–912. IEEE.
|
| 244 |
+
[34] Maas, A. L., Daly, R. E., Pham, P. T., Huang, D., Ng, A. Y., and Potts, C. (2011). Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.
|
| 245 |
+
[35] Malinin, A., Mlodozeniec, B., and Gales, M. (2019). Ensemble distribution distillation. In International Conference on Learning Representations.
|
| 246 |
+
[36] Marcel, S. and Rodriguez, Y. (2010). Torchvision the machine-vision package of torch. In Proceedings of the 18th ACM international conference on Multimedia, pages 1485–1488.
|
| 247 |
+
[37] Meng, Z., Li, J., Gong, Y., and Juang, B.-H. (2018). Adversarial teacher-student learning for unsupervised domain adaptation. In 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 5949–5953. IEEE.
|
| 248 |
+
[38] Mishra, A. and Marr, D. (2018). Apprentice: Using knowledge distillation techniques to improve low-precision network accuracy. In International Conference on Learning Representations.
|
| 249 |
+
[39] Miyato, T., Kataoka, T., Koyama, M., and Yoshida, Y. (2018). Spectral normalization for generative adversarial networks. In International Conference on Learning Representations.
|
| 250 |
+
[40] Mobahi, H., Farajtabar, M., and Bartlett, P. L. (2020). Self-distillation amplifies regularization in hilbert space. Advances in Neural Information Processing Systems.
|
| 251 |
+
[41] Netzer, Y., Wang, T., Coates, A., Bissacco, A., Wu, B., and Ng, A. Y. (2011). Reading digits in natural images with unsupervised feature learning. In Advances in Neural Information Processing Systems.
|
| 252 |
+
[42] Papernot, N., McDaniel, P., Wu, X., Jha, S., and Swami, A. (2016). Distillation as a defense to adversarial perturbations against deep neural networks. In 2016 IEEE Symposium on Security and Privacy $( S P )$ , pages 582–597. IEEE.
|
| 253 |
+
[43] Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. (2019a). Pytorch: An imperative style, high-performance deep learning library. In Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc.
|
| 254 |
+
[44] Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. (2019b). Pytorch: An imperative style, high-performance deep learning library. In Wallach, H., Larochelle, H., Beygelzimer, A., d'Alché-Buc, F., Fox, E., and Garnett, R., editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc.
|
| 255 |
+
[45] Romero, A., Ballas, N., Kahou, S. E., Chassang, A., Gatta, C., and Bengio, Y. (2015). Fitnets: Hints for thin deep nets. International Conference on Learning Representations.
|
| 256 |
+
[46] Shen, Z., He, Z., and Xue, X. (2019). Meal: Multi-model ensemble via adversarial learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 4886–4893.
|
| 257 |
+
[47] Simonyan, K. and Zisserman, A. (2015). Very deep convolutional networks for large-scale image recognition. International Conference on Learning Representations.
|
| 258 |
+
[48] Tan, S., Caruana, R., Hooker, G., and Lou, Y. (2018). Distill-and-compare: Auditing black-box models using transparent model distillation. In Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society, pages 303–310.
|
| 259 |
+
[49] Tokozume, Y., Ushiku, Y., and Harada, T. (2018). Between-class learning for image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5486–5494.
|
| 260 |
+
[50] Urban, G., Geras, K. J., Kahou, S. E., Aslan, O., Wang, S., Caruana, R., Mohamed, A., Philipose, M., and Richardson, M. (2017). Do deep convolutional nets really need to be deep and convolutional? International Conference on Learning Representations.
|
| 261 |
+
[51] Van Rossum, G. and Drake, F. L. (2009). Python 3 Reference Manual. CreateSpace, Scotts Valley, CA.
|
| 262 |
+
[52] Yim, J., Joo, D., Bae, J., and Kim, J. (2017). A gift from knowledge distillation: Fast optimization, network minimization and transfer learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4133–4141.
|
| 263 |
+
[53] You, S., Xu, C., Xu, C., and Tao, D. (2017). Learning from multiple teacher networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 1285–1294.
|
| 264 |
+
[54] Zagoruyko, S. and Komodakis, N. (2017). Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. International Conference on Learning Representations.
|
| 265 |
+
[55] Zeng, X. and Martinez, T. R. (2000). Using a neural network to approximate an ensemble of classifiers. Neural Processing Letters, 12(3):225–237.
|
| 266 |
+
[56] Zhang, H., Cisse, M., Dauphin, Y. N., and Lopez-Paz, D. (2018). Mixup: Beyond empirical risk minimization. International Conference on Learning Representations.
|
md/train/7dpmlkBuJFC/7dpmlkBuJFC.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/9az9VKjOx00/9az9VKjOx00.md
ADDED
|
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TOPOTER: UNSUPERVISED LEARNING OF TOPOLOGY TRANSFORMATION EQUIVARIANT REPRESENTATIONS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We present the Topology Transformation Equivariant Representation (TopoTER) learning, a general paradigm of unsupervised learning of node representations of graph data for the wide applicability to Graph Convolutional Neural Networks (GCNNs). We formalize the TopoTER from an information-theoretic perspective, by maximizing the mutual information between topology transformations and node representations before and after the transformations. We derive that maximizing such mutual information can be relaxed to minimizing the cross entropy between the applied topology transformation and its estimation from node representations. In particular, we seek to sample a subset of node pairs from the original graph and flip the edge connectivity between each pair to transform the graph topology. Then, we self-train a representation encoder to learn node representations by reconstructing the topology transformations from the feature representations of the original and transformed graphs. In experiments, we apply the TopoTER to the downstream node and graph classification tasks, and results show that the TopoTER outperforms the state-of-the-art unsupervised approaches.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Graphs provide a natural and efficient representation for non-Euclidean data, such as brain networks, social networks, citation networks, and 3D point clouds. Graph Convolutional Neural Networks (GCNNs) (Bronstein et al., 2017) have been proposed to generalize the CNNs to learn representations from non-Euclidean data, which has made significant advances in various applications such as node classification (Kipf & Welling, 2017; Velickovi ˇ c et al., 2018; Xu et al., 2019a) and graph ´ classification (Xu et al., 2019b). However, most existing GCNNs are trained in a supervised fashion, requiring a large amount of labeled data for network training. This limits the applications of the GCNNs since it is often costly to collect adequately labeled data, especially on large-scale graphs. Hence, this motivates the proposed research to learn graph feature representations in an unsupervised fashion, which enables the discovery of intrinsic graph structures and thus adapts to various downstream tasks.
|
| 12 |
+
|
| 13 |
+
Auto-Encoders (AEs) and Generative Adversarial Networks (GANs) are two most representative unsupervised learning methods. Based on the AEs and GANs, many approaches have sought to learn transformation equivariant representations (TERs) to further improve the quality of unsupervised representation learning. It assumes that the learned representations equivarying to transformations are able to encode the intrinsic structures of data such that the transformations can be reconstructed from the representations before and after transformations (Qi et al., 2019b). Learning TERs traces back to Hinton’s seminal work on learning transformation capsules (Hinton et al., 2011), and embodies a variety of methods developed for Euclidean data (Kivinen & Williams, 2011; Sohn & Lee, 2012; Schmidt & Roth, 2012; Skibbe, 2013; Lenc & Vedaldi, 2015; Gens & Domingos, 2014; Dieleman et al., 2015; 2016; Zhang et al., 2019; Qi et al., 2019a). Further, Gao et al. (2020) extend transformation equivariant representation learning to non-Euclidean domain, which formalizes Graph Transformation Equivariant Representation (GraphTER) learning by auto-encoding nodewise transformations in an unsupervised fashion. Nevertheless, only transformations on node features are explored, while the underlying graph may vary implicitly. The graph topology has not been fully explored yet, which however is crucial in unsupervised graph representation learning.
|
| 14 |
+
|
| 15 |
+
To this end, we propose the Topology Transformation Equivariant Representation (TopoTER) learning to infer unsupervised graph feature representations by estimating topology transformations. Instead of transforming node features as in the GraphTER, the proposed TopoTER studies the transformation equivariant representation learning by transforming the graph topology, i.e., adding or removing edges to perturb the graph structure. Then the same input signals are attached to the resultant graph topologies, resulting in different graph representations. This provides an insight into how the same input signals associated with different graph topologies would lead to equivariant representations enabling the fusion of node feature and graph topology in GCNNs. Formally, we propose the TopoTER from an information-theoretic perspective, aiming to maximize the mutual information between topology transformations and feature representations with respect to the original and transformed graphs. We derive that maximizing such mutual information can be relaxed to the cross entropy minimization between the applied topology transformations and the estimation from the learned representations of graph data under the topological transformations.
|
| 16 |
+
|
| 17 |
+
Specifically, given an input graph and its associated node features, we first sample a subset of node pairs from the graph and flip the edge connectivity between each pair at a perturbation rate, leading to a transformed graph with attached node features. Then, we design a graph-convolutional auto-encoder architecture, where the encoder learns the node-wise representations over the original and transformed graphs respectively, and the decoder predicts the topology transformations of edge connectivity from both representations by minimizing the cross entropy between the applied and estimated transformations. Experimental results demonstrate that the proposed TopoTER model outperforms the state-of-the-art unsupervised models, and even achieves comparable results to the (semi-)supervised approaches in node classification and graph classification tasks at times.
|
| 18 |
+
|
| 19 |
+
Our main contributions are summarized as follows.
|
| 20 |
+
|
| 21 |
+
• We propose the Topology Transformation Equivariant Representation (TopoTER) learning to infer expressive node feature representations in an unsupervised fashion, which can characterize the intrinsic structures of graphs and the associated features by exploring the graph transformations of connectivity topology. We formulate the TopoTER from an information-theoretic perspective, by maximizing the mutual information between feature representations and topology transformations, which can be relaxed to the cross entropy minimization between the applied transformations and the prediction in an end-to-end graph-convolutional auto-encoder architecture.
|
| 22 |
+
• Experiments demonstrate that the proposed TopoTER model outperforms the state-of-the-art unsupervised methods in both node classification and graph classification.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Graph Auto-Encoders. Graph Auto-Encoders (GAEs) are the most representative unsupervised methods. GAEs encode graph data into feature space via an encoder and reconstruct the input graph data from the encoded feature representations via a decoder. GAEs are often used to learn network embeddings and graph generative distributions (Wu et al., 2020). For network embedding learning, GAEs learn the feature representations of each node by reconstructing graph structural information, such as the graph adjacency matrix (Kipf & Welling, 2016) and the positive pointwise mutual information (PPMI) matrix (Cao et al., 2016; Wang et al., 2016). For graph generation, some methods generate nodes and edges of a graph alternately (You et al., 2018), while other methods output an entire graph (Simonovsky & Komodakis, 2018; Ma et al., 2018; De Cao & Kipf, 2018).
|
| 27 |
+
|
| 28 |
+
Graph Contrastive Learning. An important paradigm called contrastive learning aims to train an encoder to be contrastive between the representations of positive samples and negative samples. Recent contrastive learning frameworks can be divided into two categories (Liu et al., 2020): context-instance contrast and context-context contrast. Context-instance contrast focuses on modeling the relationships between the local feature of a sample and its global context representation. Deep InfoMax (DIM) (Hjelm et al., 2018) first proposes to maximize the mutual information between a local patch and its global context through a contrastive learning task. Deep Graph InfoMax (DGI) (Velickovic et al., 2019) proposes to learn node-level feature representation by extending DIM to graph-structured data, while InfoGraph (Sun et al., 2020a) aims to use mutual information maximization for unsupervised representation learning on entire graphs. Peng et al. (2020) propose a Graphical Mutual Information (GMI) approach to maximize the mutual information of both features and edges between inputs and outputs. In contrast to context-instance methods, contextcontext contrast studies the relationships between the global representations of different samples. M3S (Sun et al., 2020b) adopts a self-supervised pre-training paradigm as in DeepCluster (Caron et al., 2018) for better semi-supervised prediction in GCNNs. Graph Contrastive Coding (GCC)
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 1: An example of graphs before and after topology transformations.
|
| 32 |
+
|
| 33 |
+
(Qiu et al., 2020) designs the pre-training task as subgraph instance discrimination in and across networks to empower graph neural networks to learn the intrinsic structural representations.
|
| 34 |
+
|
| 35 |
+
Transformation Equivariant Representation Learning. Many approaches have sought to learn transformation equivariant representations. Learning transformation equivariant representations has been advocated in Hinton’s seminal work on learning transformation capsules. Following this, a variety of approaches have been proposed to learn transformation equivariant representations (Gens & Domingos, 2014; Dieleman et al., 2015; 2016; Cohen & Welling, 2016; Lenssen et al., 2018). To generalize to generic transformations, Zhang et al. (2019) propose to learn unsupervised feature representations via Auto-Encoding Transformations (AET) by estimating transformations from the learned feature representations of both the original and transformed images, while Qi et al. (2019a) extend AET from an information-theoretic perspective by maximizing the lower bound of mutual information between transformations and representations. Wang et al. (2020) extend the AET to Generative Adversarial Networks (GANs) for unsupervised image synthesis and representation learning. Gao et al. (2020) introduce the GraphTER model that extends AET to graph-structured data, which is formalized by auto-encoding node-wise transformations in an unsupervised manner. de Haan et al. (2020) propose Gauge Equivariant Mesh CNNs which generalize GCNNs to apply anisotropic gauge equivariant kernels. Fuchs et al. (2020) introduce a self-attention mechanism specifically for 3D point cloud data, which adheres to equivariance constraints, improving robustness to nuisance transformations.
|
| 36 |
+
|
| 37 |
+
# 3 METHOD
|
| 38 |
+
|
| 39 |
+
# 3.1 PRELIMINARY
|
| 40 |
+
|
| 41 |
+
We consider an undirected graph $\mathcal { G } = \{ \mathcal { V } , \mathcal { E } , \mathbf { A } \}$ composed of a node set $\nu$ of cardinality $| \nu | = N$ , an edge set $\mathcal { E }$ connecting nodes of cardinality $| { \mathcal { E } } | = M$ . $\mathbf { A }$ is a real symmetric $N \times N$ matrix that encodes the graph structure, where $a _ { i , j } = 1$ if there exists an edge $( i , j )$ between nodes $i$ and $j$ , and $a _ { i , j } = 0$ otherwise. Graph signal refers to data that reside on the nodes of a graph $\mathcal { G }$ , denoted by $\mathbf { X } \in \mathbb { R } ^ { N \times C }$ with the $i$ -th row representing the $C$ -dimensional graph signal on the $i$ -th node of $\nu$ .
|
| 42 |
+
|
| 43 |
+
# 3.2 TOPOLOGY TRANSFORMATION
|
| 44 |
+
|
| 45 |
+
We define the topology transformation $\mathbf { t }$ as adding or removing edges from the original edge set $\mathcal { E }$ in graph $\mathcal { G }$ . This can be done by sampling, i.i.d., a switch parameter $\sigma _ { i , j }$ as in (Velickovic et al., 2019), which determines whether to modify edge $( i , j )$ in the adjacency matrix. Assuming a Bernoulli distribution $B ( p )$ , where $p$ denotes the probability of each edge being modified, we draw a random matrix $\Sigma = \{ \bar { \sigma _ { i , j } } \} _ { N \times N }$ from $B ( p )$ , i.e., $\Sigma \sim B ( p )$ . We then acquire the perturbed adjacency matrix as
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\widetilde { \mathbf { A } } = \mathbf { A } \oplus \Sigma ,
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\oplus$ is the exclusive OR (XOR) operation. This strategy produces a transformed graph through the topology transformation $\mathbf { t }$ , i.e., $\overset { \sim } { \mathbf { A } } = \mathbf { t } ( \mathbf { A } )$ . Here, the edge perturbation probability of $p = 0$ corresponds to a non-transformed adjacency matrix, which is a special case of an identity transformation to A.
|
| 52 |
+
|
| 53 |
+
The transformed adjacency matrix $\widetilde { \bf A }$ can also be written as the sum of the original adjacency matrix A and a topology perturbation matrix $\Delta \mathbf { A }$ :
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
\begin{array} { r } { \widetilde { \bf A } = { \bf A } + \Delta { \bf A } , } \end{array}
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
where $\Delta \mathbf { A } = \{ \delta a _ { i , j } \} _ { N \times N }$ encodes the perturbation of edges, with $\delta a _ { i , j } \in \{ - 1 , 0 , 1 \}$ . As shown in Fig. 1, when $\delta a _ { i , j } = 0$ , the edge between node $i$ and node $j$ keeps unchanged (i.e., black solid lines); when $\delta a _ { i , j } = - 1$ or 1, it means removing (i.e., orange dotted lines) or adding (i.e., blue solid lines) the edge between node $i$ and node $j$ , respectively.
|
| 60 |
+
|
| 61 |
+
# 3.3 THE FORMULATION OF TOPOTER
|
| 62 |
+
|
| 63 |
+
Definition 1 Given a pair of graph signal and adjacency matrix $( \mathbf { X } , \mathbf { A } )$ , and a pair of graph signal and transformed adjacency matrix $( \mathbf { X } , { \widetilde { \mathbf { A } } } )$ by a topology transformation $\mathbf { t } ( \cdot )$ , a function $E ( \cdot )$ is transformation equivariant if it satisfies
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
E ( \mathbf { X } , { \widetilde { \mathbf { A } } } ) = E \left( \mathbf { X } , \mathbf { t } ( \mathbf { A } ) \right) = \rho ( \mathbf { t } ) \left[ E ( \mathbf { X } , \mathbf { A } ) \right] ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
where $\rho ( \mathbf t ) [ \cdot ]$ is a homomorphism of transformation t in the representation space.
|
| 70 |
+
|
| 71 |
+
Let us denote $\mathbf { H } = E ( \mathbf { X } , \mathbf { A } )$ , and $\widetilde { \mathbf { H } } = E ( \mathbf { X } , \widetilde { \mathbf { A } } )$ . We seek to learn an encoder $E : ( { \bf X } , { \bf A } ) \mapsto$ $\mathbf { H } ; ( \mathbf { X } , \widetilde { \mathbf { A } } ) \mapsto \widetilde { \mathbf { H } }$ that maps both the original and transformed sample to representations $\{ \mathbf { H } , \widetilde { \mathbf { H } } \}$ equivariant to the sampled transformation $\mathbf { t }$ , whose information can thus be inferred from the representations via a decoder $D : ( \widetilde { \mathbf { H } } , \mathbf { H } ) \mapsto \widehat { \Delta \mathbf { A } }$ as much as possible. From an information-theoretic perspective, this requires $( \mathbf { H } , \Delta \mathbf { A } )$ should jointly contain all necessary information about $\widetilde { \bf H }$ .
|
| 72 |
+
|
| 73 |
+
Then a natural choice to formalize the topology transformation equivariance is the mutual information $I ( \mathbf { H } , \Delta \mathbf { A } ; \widetilde { \mathbf { H } } )$ between $( \mathbf { H } , \Delta \mathbf { A } )$ and $\widetilde { \bf H }$ . The larger the mutual information is, the more knowledge about $\Delta \mathbf { A }$ can be inferred from the representations $\{ \mathbf { H } , \widetilde { \mathbf { H } } \}$ . Hence, we propose to maximize the mutual information to learn the topology transformation equivariant representations as follows:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\operatorname* { m a x } _ { \theta } I ( \mathbf { H } , \Delta \mathbf { A } ; \widetilde { \mathbf { H } } ) ,
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\theta$ denotes the parameters of the auto-encoder network.
|
| 80 |
+
|
| 81 |
+
Nevertheless, it is difficult to compute the mutual information directly. Instead, we derive that maximizing the mutual information can be relaxed to minimizing the cross entropy, as described in the following theorem.
|
| 82 |
+
|
| 83 |
+
Theorem 1 The maximization of the mutual information $I ( \mathbf { H } , \Delta \mathbf { A } ; \widetilde { \mathbf { H } } )$ can be relaxed to the minimization of the cross entropy $H ( p \parallel q )$ between the probability distributions $p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } )$ and $q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } )$ :
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\operatorname* { m i n } _ { \theta } ~ H \left( p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) \parallel q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } ) \right) \triangleq - \underset { p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) } { \mathbb { E } } \log q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } ) .
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
Proof By using the chain rule of mutual information, we have
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
I ( \mathbf { H } , \Delta \mathbf { A } ; \widetilde { \mathbf { H } } ) = I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } ) + I ( \mathbf { H } ; \widetilde { \mathbf { H } } ) \ge I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } ) .
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
Thus the mutual information $I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } )$ is the lower bound of the mutual information $I ( \mathbf { H } , \Delta \mathbf { A } ; \widetilde { \mathbf { H } } )$ that attains its minimum value when $I ( \mathbf { H } ; \widetilde { \mathbf { H } } ) = 0$ .
|
| 96 |
+
|
| 97 |
+
Therefore, we relax the objective to maximizing the lower bound mutual information $I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } )$ between the transformed representation $\widetilde { \bf H }$ and the topology transformation $\Delta \mathbf { A }$ :
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } ) = H ( \Delta \mathbf { A } | \mathbf { H } ) - H ( \Delta \mathbf { A } | \widetilde { \mathbf { H } } , \mathbf { H } ) ,
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where $H ( \cdot )$ denotes the conditional entropy. Since $\Delta \mathbf { A }$ and $\mathbf { H }$ are independent, we have $H ( \Delta \mathbf { A } | \mathbf { H } ) = H ( \Delta \mathbf { A } )$ . Hence, maximizing $I ( \Delta \mathbf { A } ; \widetilde { \mathbf { H } } | \mathbf { H } )$ becomes
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\operatorname* { m i n } _ { \theta } \ H ( \Delta \mathbf { A } | \widetilde { \mathbf { H } } , \mathbf { H } ) .
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
According to the chain rule of conditional entropy, we have
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
H ( \Delta \mathbf { A } | \widetilde { \mathbf { H } } , \mathbf { H } ) = H ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) - H ( \widetilde { \mathbf { H } } , \mathbf { H } ) \leq H ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) ,
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 2: The architecture of the proposed TopoTER.
|
| 117 |
+
|
| 118 |
+
where the conditional entropy ${ \cal H } ( \Delta { \bf A } | \widetilde { \bf H } , { \bf H } )$ is upper bounded by the joint entropy $H ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } )$ . Thus, the minimization problem in Eq. (6) becomes
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\operatorname* { m i n } _ { \theta } \ H ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
We next introduce a conditional probability distribution $q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } )$ to approximate the intractable posterior $\tilde { q } ( \Delta \mathbf { A } | \tilde { \mathbf { H } } , \mathbf { H } )$ with an estimated $\widehat { \Delta \mathbf { A } }$ . According to the definition of the Kullback-Leibler divergence, we have
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
H ( \Delta \mathbf { A } , { \widetilde { \mathbf { H } } } , \mathbf { H } ) = H ( p ) = H ( p \parallel q ) - D _ { \mathrm { K L } } ( p \parallel q ) \leq H ( p \parallel q ) ,
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $D _ { \mathrm { K L } } ( p \parallel q )$ denotes the Kullback-Leibler divergence of $p$ and $q$ that is non-negative, and $H ( p \parallel q )$ is the cross entropy between $p$ and $q$ . Thus, Eq. (6) is converted to minimizing the cross entropy as the upper bound:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\operatorname* { m i n } _ { \theta } ~ H \left( p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) \parallel q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } ) \right) \triangleq - \underset { p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) } { \mathbb { E } } \log q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } ) .
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
Hence, we relax the maximization problem in Eq. (4) to the optimization in Eq. (5).
|
| 137 |
+
|
| 138 |
+
Based on Theorem 1, we train the decoder $D$ to learn the distribution $q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } )$ so as to estimate the topology transformation $\widehat { \Delta \mathbf { A } }$ from the encoded $\{ \widetilde { \mathbf { H } } , \mathbf { H } \}$ , where the input pairs of original and transformed graph representations $\{ \widetilde { \mathbf { H } } , \mathbf { H } \}$ as well as the ground truth target $\Delta \mathbf { A }$ can be sampled tractably from the factorization of $p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } ) \triangleq p ( \Delta \mathbf { A } ) p ( \mathbf { H } ) p ( \widetilde { \mathbf { H } } | \Delta \mathbf { A } , \mathbf { H } )$ . This allows us to minimize the cross entropy between $p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } )$ and $q ( \widehat { \Delta \mathbf { A } } | \widetilde { \mathbf { H } } , \mathbf { H } )$ as in (5) with the training triplets $( \widetilde { \mathbf { H } } , \mathbf { H } ; \Delta \mathbf { A } )$ drawn from the tractable factorization of $p ( \Delta \mathbf { A } , \widetilde { \mathbf { H } } , \mathbf { H } )$ . Hence, we formulate the TopoTER as the joint optimization of the representation encoder $E$ and the transformation decoder $D$ .
|
| 139 |
+
|
| 140 |
+
# 3.4 THE ALGORITHM
|
| 141 |
+
|
| 142 |
+
We design a graph-convolutional auto-encoder network for the TopoTER learning, as illustrated in Fig. 2. Given a graph signal $\mathbf { X }$ associated with a graph $\mathcal { G } = \{ \bar { \nu _ { , } } \mathcal { E } , \mathbf { A } \}$ , the proposed unsupervised learning algorithm for the TopoTER consists of three steps: 1) topology transformation, which samples and perturbs some edges from $\mathcal { E }$ to acquire a transformed adjacency matrix $\widetilde { \bf A }$ ; 2) representation encoding, which extracts the feature representations of graph signals before and after the topology transformation; 3) transformation decoding, which estimates the topology transformation parameters from the learned feature representations. We elaborate on the three steps as follows.
|
| 143 |
+
|
| 144 |
+
Topology Transformation. We randomly sample a subset of edges from $\mathcal { E }$ for topology perturbation—adding or removing edges, which not only enables to characterize local graph structures at various scales, but also reduces the number of edge transformation parameters to estimate for computational efficiency. In practice, in each iteration of training, we sample all the node pairs with connected edges $\mathbf { S } _ { 1 }$ , and randomly sample a subset of disconnected node pairs $\mathbf { S } _ { 0 }$ , i.e.,
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\begin{array} { r } { \mathbf { S } _ { 0 } = \left\{ ( i , j ) \big | a _ { i , j } = 0 \right\} , \mathbf { S } _ { 1 } = \left\{ ( i , j ) \big | a _ { i , j } = 1 \right\} , } \end{array}
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
where $| \mathbf { S } _ { 0 } | = | \mathbf { S } _ { 1 } | = M$ . Next, we randomly split $\mathbf { S } _ { 0 }$ and $\mathbf { S } _ { 1 }$ into two disjoint sets, respectively, i.e.,
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\mathbf { S } _ { i } = \left\{ \mathbf { S } _ { i } ^ { ( 1 ) } , \mathbf { S } _ { i } ^ { ( 2 ) } \ \big \vert \ \mathbf { S } _ { i } ^ { ( 1 ) } \cap \mathbf { S } _ { i } ^ { ( 2 ) } = \mathcal { Q } , \mathbf { S } _ { i } ^ { ( 1 ) } \cup \mathbf { S } _ { i } ^ { ( 2 ) } = \mathbf { S } _ { i } , \big \vert \mathbf { S } _ { i } ^ { ( 1 ) } \big \vert = r \cdot \big \vert \mathbf { S } _ { i } \big \vert \right\} , i \in \{ 0 , 1 \} ,
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
where $r$ is the edge perturbation rate. Then, for each node pair $( i , j )$ in $\mathbf { S } _ { 0 } ^ { ( 1 ) }$ and $\mathbf { S } _ { 1 } ^ { ( 1 ) }$ , we flip the corresponding entry in the original graph adjacency matrix. That is, if $a _ { i , j } = 0$ , then we set $\tilde { a } _ { i , j } = 1$ ; otherwise, we set $\tilde { a } _ { i , j } = 0$ . For each node pair $( i , j )$ in $\mathbf { S } _ { 0 } ^ { ( 2 ) }$ and $\mathbf { S } _ { 1 } ^ { ( 2 ) }$ , we keep the original connectivities unchanged, i.e., $\tilde { a } _ { i , j } = a _ { i , j }$ .
|
| 157 |
+
|
| 158 |
+
This leads to the transformed adjacency matrix $\widetilde { \bf A }$ , as well as the sampled transformation parameters by accessing $\Delta \mathbf { A }$ at position $( i , j )$ from $\mathbf { S } _ { 0 }$ and $\mathbf { S } _ { 1 }$ . Also, we can category the sampled topology transformation parameters into four types:
|
| 159 |
+
|
| 160 |
+
1. add an edge to a disconnected node pair, i.e., $\{ \mathbf { t } : a _ { i , j } = 0 \mapsto \tilde { a } _ { i , j } = 1 , ( i , j ) \in \mathbf { S } _ { 0 } ^ { ( 1 ) } \} ;$ ;
|
| 161 |
+
2. delete the edge between a connected node pair, i.e., $\{ \mathbf { t } : a _ { i , j } = 1 \mapsto \tilde { a } _ { i , j } = 0 , ( i , j ) \in \mathbf { S } _ { 1 } ^ { ( 1 ) } \}$ ;
|
| 162 |
+
3. keep the disconnection between node pairs in $\mathbf { S } _ { 0 } ^ { ( 2 ) }$ , i.e., $\{ \mathbf { t } : a _ { i , j } = 0 \mapsto \tilde { a } _ { i , j } = 0 , ( i , j ) \in \mathbf { S } _ { 0 } ^ { ( 2 ) } \} ;$
|
| 163 |
+
4. keep the connection between node pairs in $\mathbf { S } _ { 1 } ^ { ( 2 ) }$ , i.e., $\{ \mathbf { t } : a _ { i , j } = 1 \mapsto \tilde { a } _ { i , j } = 1 , ( i , j ) \in \mathbf { S } _ { 1 } ^ { ( 2 ) } \}$ .
|
| 164 |
+
|
| 165 |
+
Thus, we cast the problem of estimating transformation parameters in $\Delta \mathbf { A }$ from $( \widetilde { \mathbf { H } } , \mathbf { H } )$ as the classification problem of the transformation parameter types. The percentage of these four types is $r : r : ( 1 - r ) : ( 1 - r )$ .
|
| 166 |
+
|
| 167 |
+
Representation Encoder. We train an encoder $E : ( \mathbf { X } , \mathbf { A } ) \mapsto E ( \mathbf { X } , \mathbf { A } )$ to encode the feature representations of each node in the graph. As demonstrated in Fig. 2, we leverage GCNNs with shared weights to extract feature representations of each node in the graph signal. Taking the GCN (Kipf & Welling, 2017) as an example, the graph convolution in the GCN is defined as
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\mathbf { H } = E ( \mathbf { X } , \mathbf { A } ) = \mathbf { D } ^ { - { \frac { 1 } { 2 } } } ( \mathbf { A } + \mathbf { I } ) \mathbf { D } ^ { - { \frac { 1 } { 2 } } } \mathbf { X } \mathbf { W } ,
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
where $\mathbf { D }$ is the degree matrix of $\mathbf { A } + \mathbf { I }$ , $\mathbf { W } \in \mathbb { R } ^ { C \times F }$ is a learnable parameter matrix, and $\mathbf { H } =$ $[ \mathbf { h } _ { 1 } , . . . , \mathbf { h } _ { N } ] ^ { \top } \in \mathbb { R } ^ { \breve { N } \times F }$ denotes the node-wise feature matrix with $F$ output channels. Similarly, the node feature of the transformed counterpart is as follows with the shared weights $\mathbf { W }$ .
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\begin{array} { r } { \widetilde { \mathbf { H } } = E ( \mathbf { X } , \widetilde { \mathbf { A } } ) = \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } ( \widetilde { \mathbf { A } } + \mathbf { I } ) \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \mathbf { X } \mathbf { W } \quad } \\ { = \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } ( \mathbf { A } + \mathbf { I } ) \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \mathbf { X } \mathbf { W } + \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \Delta \mathbf { A } \widetilde { \mathbf { D } } ^ { - \frac { 1 } { 2 } } \mathbf { X } \mathbf { W } . } \end{array}
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
We thus acquire the feature representations $\mathbf { H }$ and $\widetilde { \bf H }$ of graph signals before and after topology transformations.
|
| 180 |
+
|
| 181 |
+
Transformation Decoder. Comparing Eq. (10) and Eq. (11), the prominent difference between $\widetilde { \bf H }$ and $\mathbf { H }$ lies in the second term of Eq. (11) featuring $\Delta \mathbf { A }$ . This enables us to train a decoder $D : ( \widetilde { \mathbf { H } } , \mathbf { H } ) \mapsto \widehat { \Delta \mathbf { A } }$ to estimate the topology transformation from the joint representations before and after transformation. We first take the difference between the extracted feature representations before and after transformations along the feature channel,
|
| 182 |
+
|
| 183 |
+
$$
|
| 184 |
+
\Delta { \bf H } = \widetilde { { \bf H } } - { \bf H } = [ \delta { \bf h } _ { 1 } , . . . , \delta { \bf h } _ { N } ] ^ { \top } \in \mathbb { R } ^ { N \times F } .
|
| 185 |
+
$$
|
| 186 |
+
|
| 187 |
+
Thus, we can predict the topology transformation between node $i$ and node $j$ through the node-wise feature difference $\Delta \mathbf { H }$ by constructing the edge representation as
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
\mathbf { e } _ { i , j } = \frac { \exp \{ - ( \delta \mathbf { h } _ { i } - \delta \mathbf { h } _ { j } ) \odot ( \delta \mathbf { h } _ { i } - \delta \mathbf { h } _ { j } ) \} } { \lVert \exp \{ - ( \delta \mathbf { h } _ { i } - \delta \mathbf { h } _ { j } ) \odot ( \delta \mathbf { h } _ { i } - \delta \mathbf { h } _ { j } ) \} \rVert _ { 1 } } \in \mathbb { R } ^ { F } , \quad \forall ( i , j ) \in \mathbf { S } _ { 0 } \cup \mathbf { S } _ { 1 } ,
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
where $\odot$ denotes the Hadamard product of two vectors to capture the feature representation, and $\| \cdot \| _ { 1 }$ is the $\ell _ { 1 }$ -norm of a vector for normalization. The edge representation $\mathbf { e } _ { i , j }$ of node $i$ and $j$ is then fed into several linear layers for the prediction of the topology transformation,
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\widehat { \mathbf { y } } _ { i , j } = \mathrm { s o f t m a x } \left( \mathrm { l i n e a r } ( \mathbf { e } _ { i , j } ) \right) , \quad \forall ( i , j ) \in \mathbf { S } _ { 0 } \cup \mathbf { S } _ { 1 } ,
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
where softmax $( \cdot )$ is an activation function.
|
| 200 |
+
|
| 201 |
+
According to Eq. (5), the entire auto-encoder network is trained by minimizing the cross entropy
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
\mathcal { L } = - \underset { ( i , j ) \in { \bf S } _ { 0 } \cup { \bf S } _ { 1 } } { \mathbb { E } } \sum _ { f = 0 } ^ { 3 } { \bf y } _ { i , j } ^ { ( f ) } \log \widehat { \bf y } _ { i , j } ^ { ( f ) } ,
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
where $f$ denotes the transformation type $( f \in \{ 0 , 1 , 2 , 3 \}$ ), and $\mathbf { y }$ is the ground-truth binary indicator (0 or 1) for each transformation parameter type.
|
| 208 |
+
|
| 209 |
+
Table 1: Node classification accuracies (with standard deviation) in percentage on three datasets. X, A, Y denote the input data, adjacency matrix and labels respectively.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Method</td><td>TrainingData</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td colspan="5">Semi-SupervisedMethods</td></tr><tr><td>GCN(Kipf&Welling,2017)</td><td>X,A,Y</td><td>81.5</td><td>70.3</td><td>79.0</td></tr><tr><td>MoNet (Monti et al.,2017)</td><td>X,A,Y</td><td>81.7 ± 0.5</td><td>-</td><td>78.8± 0.3</td></tr><tr><td>GAT(Velickovic et al.,2018)</td><td>X,A,Y</td><td>83.0 ±0.7</td><td>72.5±0.7</td><td>79.0±0.3</td></tr><tr><td>SGC (Wu et al., 2019)</td><td>X,A,Y</td><td>81.0 ±0.0</td><td>71.9 ± 0.1</td><td>78.9 ± 0.0</td></tr><tr><td>GWNN (Xu et al.,2019a)</td><td>X,A,Y</td><td>82.8</td><td>71.7</td><td>79.1</td></tr><tr><td>MixHop (Abu-El-Haija et al., 2019)</td><td>X,A,Y</td><td>81.9 ± 0.4</td><td>71.4 ± 0.8</td><td>80.8±0.6</td></tr><tr><td>DFNet (Wijesinghe& Wang,2019)</td><td>X,A,Y</td><td>85.2 ±0.5</td><td>74.2 ± 0.3</td><td>84.3 ± 0.4</td></tr><tr><td colspan="5">Unsupervised Methods</td></tr><tr><td>RawFeatures(Velickovic et al.,2019)</td><td>X</td><td>47.9±0.4</td><td>49.3±0.2</td><td>69.1±0.3</td></tr><tr><td>DeepWalk (Perozzi et al.,2014)</td><td>A</td><td>67.2</td><td>43.2</td><td>65.3</td></tr><tr><td>DeepWalk + Features (Velickovic et al., 2019)</td><td>X,A</td><td>70.7 ± 0.6</td><td>51.4 ± 0.5</td><td>74.3 ± 0.9</td></tr><tr><td>GAE (Kipf & Welling,2016)</td><td>X,A</td><td>80.9 ± 0.4</td><td>66.7±0.4</td><td>77.1 ±0.7</td></tr><tr><td>VGAE (Kipf & Welling,2016)</td><td>X,A</td><td>80.0±0.2</td><td>64.1 ± 0.2</td><td>76.9 ± 0.1</td></tr><tr><td>DGI (Velickovic et al.,2019)</td><td>X,A</td><td>81.1 ± 0.1</td><td>71.4 ± 0.2</td><td>77.0± 0.2</td></tr><tr><td>GMI (Peng et al.,2020)</td><td>X,A</td><td>82.2 ±0.2</td><td>71.4± 0.5</td><td>78.5 ±0.1</td></tr><tr><td>TopoTER</td><td>X,A</td><td>83.7 ± 0.3</td><td>71.7 ± 0.5</td><td>79.1 ± 0.1</td></tr></table>
|
| 212 |
+
|
| 213 |
+
Table 2: Model size comparison of DGI, GMI, and the proposed TopoTER
|
| 214 |
+
|
| 215 |
+
<table><tr><td>Model</td><td>DGI</td><td>GMI</td><td>TopoTER</td></tr><tr><td>No.of Parameters</td><td>996,354</td><td>1,730,052</td><td>736,260</td></tr></table>
|
| 216 |
+
|
| 217 |
+
# 4 EXPERIMENTS
|
| 218 |
+
|
| 219 |
+
# 4.1 NODE CLASSIFICATION
|
| 220 |
+
|
| 221 |
+
Datasets. We adopt three citation networks to evaluate our model: Cora, Citeseer, and Pubmed (Sen et al., 2008), where nodes correspond to documents and edges represent citations. We follow the standard train/test split in (Kipf & Welling, 2017) to conduct the experiments.
|
| 222 |
+
|
| 223 |
+
Implementation Details. In this task, the auto-encoder network is trained via Adam optimizer, and the learning rate is set to $1 0 ^ { - 4 }$ . We use the same early stopping strategy as DGI (Velickovic et al., 2019) on the observed training loss, with a patience of 20 epochs. We deploy one Simple Graph Convolution (SGC) layer (Wu et al., 2019) as our encoder, and the order of the adjacency matrix is set to 2, while we will study the order of the adjacency matrix in Appendix A. The LeakyReLU activation function with a negative slope of 0.1 is employed after the SGC layer. Similar to DGI (Velickovic et al., 2019), we set the output channel $F = 5 1 2$ for Cora and Citeseer dataset, and 256 for Pubmed dataset due to memory limitations. After the encoder, we use one linear layer to classify the transformation types. We set the edge perturbation rate in Eq. (9) as $r = \{ 0 . 7 , 0 . 4 , 0 . 7 \}$ for Cora, Citeseer, and Pubmed, respectively. The analysis of the edge perturbation rate will be presented in Appendix B.
|
| 224 |
+
|
| 225 |
+
During the training procedure of the classifier, the SGC layer in the encoder is used to extract graph feature representations with the weights frozen. After the SGC layer, we apply one linear layer to map the features to the classification scores.
|
| 226 |
+
|
| 227 |
+
Experimental Results. We compare the proposed method with five unsupervised methods, including one node embedding method DeepWalk, two graph auto-encoders GAE and VGAE (Kipf & Welling, 2016), and two contrastive learning methods DGI (Velickovic et al., 2019) and GMI (Peng et al., 2020). Additionally, we report the results of Raw Features and DeepWalk+Features (Perozzi et al., 2014) under the same settings. For fair comparison, the results of all other unsupervised methods are reproduced by using the same encoder architecture of the TopoTER except DeepWalk and Raw Features. We report the mean classification accuracy (with standard deviation) on the test nodes for all methods after 50 runs of training. As reported in Tab. 1, the TopoTER outperforms all other competing unsupervised methods on three datasets. Further, the proposed unsupervised method also achieves comparable performance with semi-supervised results. This significantly closes the gap between unsupervised approaches and the semi-supervised methods.
|
| 228 |
+
|
| 229 |
+
Moreover, we compare the proposed TopoTER with two contrastive learning methods DGI and GMI in terms of the model complexity, as reported in Tab. 2. The number of parameters in our model is less than that of DGI and even less than half of that of GMI, which further shows the TopoTER model is lightweight.
|
| 230 |
+
|
| 231 |
+
Table 3: Graph classification accuracies (with standard deviation) in percentage on 6 datasets. $^ { 6 6 } > 1$ Day” represents that the computation exceeds 24 hours. “OOM” is out of memory error.
|
| 232 |
+
|
| 233 |
+
<table><tr><td>Dataset (No.Graphs) (No. Classes)</td><td>MUTAG 188 2</td><td>PTC-MR 344 2</td><td>RDT-B 2000 2</td><td>RDT-M5K 4999 5</td><td>IMDB-B 1000 2</td><td>IMDB-M 1500 3</td></tr><tr><td colspan="7">GraphKernelMethods</td></tr><tr><td>RW</td><td>83.72 ±1.50</td><td>57.85 ±1.30</td><td>OOM</td><td>OOM</td><td>50.68±0.26</td><td>34.65 ±0.19</td></tr><tr><td>SP</td><td>85.22 ± 2.43</td><td>58.24 ± 2.44</td><td>64.11 ± 0.14</td><td>39.55 ±0.22</td><td>55.60±0.22</td><td>37.99 ± 0.30</td></tr><tr><td>GK</td><td>81.66 ± 2.11</td><td>57.26 ± 1.41</td><td>77.34 ± 0.18</td><td>41.01 ± 0.17</td><td>65.87 ±0.98</td><td>43.89 ±0.38</td></tr><tr><td>WL</td><td>80.72 ±3.00</td><td>57.97 ± 0.49</td><td>68.82 ±0.41</td><td>46.06 ±0.21</td><td>72.30 ± 3.44</td><td>46.95 ± 0.46</td></tr><tr><td>DGK</td><td>87.44 ±2.72</td><td>60.08 ±2.55</td><td>78.04±0.39</td><td>41.27 ± 0.18</td><td>66.96 ±0.56</td><td>44.55± 0.52</td></tr><tr><td>MLG</td><td>87.94 ± 1.61</td><td>63.26 ± 1.48</td><td>>1Day</td><td>>1Day</td><td>66.55 ± 0.25</td><td>41.17 ± 0.03</td></tr><tr><td colspan="7">SupervisedMethods</td></tr><tr><td>GCN</td><td>85.6±5.8</td><td>64.2± 4.3</td><td>50.0±0.0</td><td>20.0±0.0</td><td>74.0±3.0</td><td>51.9±3.8</td></tr><tr><td>GraphSAGE</td><td>85.1± 7.6</td><td>63.9 ±7.7</td><td></td><td>=</td><td>72.3 ± 5.3</td><td>50.9 ± 2.2</td></tr><tr><td>GIN-0</td><td>89.4±5.6</td><td>64.6±7.0</td><td>92.4±2.5</td><td>57.5 ± 1.5</td><td>75.1 ± 5.1</td><td>52.3±2.8</td></tr><tr><td>GIN-e</td><td>89.0±6.0</td><td>63.7±8.2</td><td>92.2±2.3</td><td>57.0 ±1.7</td><td>74.3 ± 5.1</td><td>52.1±3.6</td></tr><tr><td colspan="7">Unsupervised Methods</td></tr><tr><td>node2vec</td><td>72.63±10.20</td><td>58.58±8.00</td><td></td><td>=</td><td>=</td><td></td></tr><tr><td>sub2vec</td><td>61.05 ± 15.80 83.15 ±9.25</td><td>59.99 ±6.38</td><td>71.48 ± 0.41 75.78 ±1.03</td><td>36.68 ±0.42 47.86 ±0.26</td><td>55.26 ± 1.54</td><td>36.67±0.83</td></tr><tr><td>graph2vec</td><td>89.01 ± 1.13</td><td>60.17 ±6.86 61.65 ±1.43</td><td>82.50 ±1.42</td><td>53.46 ± 1.03</td><td>71.10 ±0.54 73.03 ± 0.87</td><td>50.44 ± 0.87</td></tr><tr><td>InfoGraph TopoTER</td><td>89.25 ±0.81</td><td>64.59 ±1.26</td><td>84.93 ±0.18</td><td>55.52±0.20</td><td>73.46 ±0.38</td><td>49.69 ± 0.53</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>49.68 ±0.31</td></tr></table>
|
| 234 |
+
|
| 235 |
+
# 4.2 GRAPH CLASSIFICATION
|
| 236 |
+
|
| 237 |
+
Datasets. We conduct graph classification experiments on six well-known graph benchmark datasets (Yanardag & Vishwanathan, 2015): MUTAG, PTC, REDDIT-BINARY, REDDIT-MULTI5K, IMDB-BINARY, and IMDB-MULTI.
|
| 238 |
+
|
| 239 |
+
Implementation Details. In this task, the entire network is trained via Adam optimizer with a batch size of 64, and the learning rate is set to $1 0 ^ { - 3 }$ . For the encoder architecture, we follow the same encoder settings in the released code of InfoGraph (Sun et al., 2020a), i.e., three Graph Isomorphism Network (GIN) layers (Xu et al., 2019b) with batch normalization. We also use one linear layer to classify the transformation types. We set the sampling rate $r = 0 . 5$ for all datasets.
|
| 240 |
+
|
| 241 |
+
During the evaluation stage, the entire encoder will be frozen to extract node-level feature representations, which will go through a global add pooling layer to acquire global features. We then use LIBSVM to classify these global features to classification scores. We adopt the same procedure of previous works (Sun et al., 2020a) to make a fair comparison and use 10-fold cross validation accuracy to report the classification performance, and the experiments are repeated five times.
|
| 242 |
+
|
| 243 |
+
Experimental Results. We take six graph kernel approaches for comparison: Random Walk (RW) (Gartner et al., 2003), Shortest Path Kernel (SP) (Borgwardt & Kriegel, 2005), Graphlet Kernel ¨ (GK) (Shervashidze et al., 2009), Weisfeiler-Lehman Sub-tree Kernel (WL) (Shervashidze et al., 2011), Deep Graph Kernels (DGK) (Yanardag & Vishwanathan, 2015), and Multi-Scale Laplacian Kernel (MLG) (Kondor & Pan, 2016). Aside from graph kernel methods, we also compare with three unsupervised graph-level representation learning methods: node2vec (Grover & Leskovec, 2016), sub2vec (Adhikari et al., 2018), and graph2vec (Narayanan et al., 2017), and one contrastive learning method: InfoGraph (Sun et al., 2020a). The experimental results of unsupervised graph classification are preseted in Tab. 3. The proposed TopoTER outperforms all unsupervised baseline methods on the first five datasets, and achieves comparable results on the other dataset. Also, the proposed approach reaches the performance of supervised methods at times, thus validating the effectiveness of the TopoTER model.
|
| 244 |
+
|
| 245 |
+
# 5 CONCLUSION
|
| 246 |
+
|
| 247 |
+
We propose Topology Transformation Equivariant Representation (TopoTER) for learning unsupervised representations on graph data. By maximizing the mutual information between topology transformations and feature representations before and after transformations, the TopoTER enforces the encoder to learn intrinsic graph feature representations that contain sufficient information about structures under applied topology transformations. We apply the TopoTER model to node classification and graph classification tasks, and results demonstrate that the TopoTER outperforms stateof-the-art unsupervised approaches and reaches the performance of supervised methods at times.
|
| 248 |
+
|
| 249 |
+
# REFERENCES
|
| 250 |
+
|
| 251 |
+
Sami Abu-El-Haija, Bryan Perozzi, Amol Kapoor, Nazanin Alipourfard, Kristina Lerman, Hrayr Harutyunyan, Greg Ver Steeg, and Aram Galstyan. Mixhop: Higher-order graph convolutional architectures via sparsified neighborhood mixing. In Proceedings of the 36th International Conference on Machine Learning (ICML), pp. 21–29, 2019.
|
| 252 |
+
|
| 253 |
+
Bijaya Adhikari, Yao Zhang, Naren Ramakrishnan, and B Aditya Prakash. Sub2vec: Feature learning for subgraphs. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pp. 170–182. Springer, 2018.
|
| 254 |
+
|
| 255 |
+
Karsten M Borgwardt and Hans-Peter Kriegel. Shortest-path kernels on graphs. In IEEE International Conference on Data Mining (ICDM), pp. 8–pp. IEEE, 2005.
|
| 256 |
+
|
| 257 |
+
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.
|
| 258 |
+
|
| 259 |
+
Shaosheng Cao, Wei Lu, and Qiongkai Xu. Deep neural networks for learning graph representations. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), volume 16, pp. 1145– 1152, 2016.
|
| 260 |
+
|
| 261 |
+
Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 132–149, 2018.
|
| 262 |
+
|
| 263 |
+
Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 2990–2999, 2016.
|
| 264 |
+
|
| 265 |
+
Nicola De Cao and Thomas Kipf. MolGAN: An implicit generative model for small molecular graphs. In International Conference on Machine Learning Workshop on Theoretical Foundations and Applications of Deep Generative Models, 2018.
|
| 266 |
+
|
| 267 |
+
Pim de Haan, Maurice Weiler, Taco Cohen, and Max Welling. Gauge equivariant mesh cnns: Anisotropic convolutions on geometric graphs. arXiv preprint arXiv:2003.05425, 2020.
|
| 268 |
+
|
| 269 |
+
Sander Dieleman, Kyle W Willett, and Joni Dambre. Rotation-invariant convolutional neural networks for galaxy morphology prediction. Monthly Notices of the Royal Astronomical Society, 450 (2):1441–1459, 2015.
|
| 270 |
+
|
| 271 |
+
Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolutional neural networks. In International Conference on Machine Learning (ICML), pp. 1889– 1898, 2016.
|
| 272 |
+
|
| 273 |
+
Fabian B Fuchs, Daniel E Worrall, Volker Fischer, and Max Welling. Se (3)-transformers: 3d rototranslation equivariant attention networks. arXiv preprint arXiv:2006.10503, 2020.
|
| 274 |
+
|
| 275 |
+
Xiang Gao, Wei Hu, and Guo-Jun Qi. GraphTER: Unsupervised learning of graph transformation equivariant representations via auto-encoding node-wise transformations. In Proceedings of IEEE/CVF Conferences on Computer Vision and Pattern Recognition (CVPR), 2020.
|
| 276 |
+
|
| 277 |
+
Thomas Gartner, Peter Flach, and Stefan Wrobel. On graph kernels: Hardness results and efficient ¨ alternatives. In Learning Theory and Kernel Machines, pp. 129–143. Springer, 2003.
|
| 278 |
+
|
| 279 |
+
Robert Gens and Pedro M Domingos. Deep symmetry networks. In Advances in Neural Information Processing Systems (NIPS), pp. 2537–2545, 2014.
|
| 280 |
+
|
| 281 |
+
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, 2016.
|
| 282 |
+
|
| 283 |
+
Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks (ICANN), pp. 44–51. Springer, 2011.
|
| 284 |
+
|
| 285 |
+
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. In International Conference on Learning Representations (ICLR), 2018.
|
| 286 |
+
|
| 287 |
+
Thomas N Kipf and Max Welling. Variational graph auto-encoders. In Proceedings of the NIPS Workshop on Bayesian Deep Learning, 2016.
|
| 288 |
+
|
| 289 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017.
|
| 290 |
+
|
| 291 |
+
Jyri J Kivinen and Christopher KI Williams. Transformation equivariant boltzmann machines. In International Conference on Artificial Neural Networks (ICANN), pp. 1–9. Springer, 2011.
|
| 292 |
+
|
| 293 |
+
Risi Kondor and Horace Pan. The multiscale laplacian graph kernel. In Advances in Neural Information Processing Systems (NIPS), pp. 2990–2998, 2016.
|
| 294 |
+
|
| 295 |
+
Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 991–999, 2015.
|
| 296 |
+
|
| 297 |
+
Jan Eric Lenssen, Matthias Fey, and Pascal Libuschewski. Group equivariant capsule networks. In Advances in Neural Information Processing Systems (NIPS), pp. 8844–8853, 2018.
|
| 298 |
+
|
| 299 |
+
Xiao Liu, Fanjin Zhang, Zhenyu Hou, Zhaoyu Wang, Li Mian, Jing Zhang, and Jie Tang. Selfsupervised learning: Generative or contrastive. arXiv, pp. arXiv–2006, 2020.
|
| 300 |
+
|
| 301 |
+
Tengfei Ma, Jie Chen, and Cao Xiao. Constrained generation of semantically valid graphs via regularizing variational autoencoders. In Advances in Neural Information Processing Systems (NIPS), pp. 7113–7124, 2018.
|
| 302 |
+
|
| 303 |
+
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 (CVPR), pp. 5115–5124, 2017.
|
| 304 |
+
|
| 305 |
+
Annamalai Narayanan, Mahinthan Chandramohan, Rajasekar Venkatesan, Lihui Chen, Yang Liu, and Shantanu Jaiswal. graph2vec: Learning distributed representations of graphs. In Proceedings of the 13th International Workshop on Mining and Learning with Graphs (MLG), 2017.
|
| 306 |
+
|
| 307 |
+
Zhen Peng, Wenbing Huang, Minnan Luo, Qinghua Zheng, Yu Rong, Tingyang Xu, and Junzhou Huang. Graph representation learning via graphical mutual information maximization. In Proceedings of The Web Conference, pp. 259–270, 2020.
|
| 308 |
+
|
| 309 |
+
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, 2014.
|
| 310 |
+
|
| 311 |
+
Guo-Jun Qi, Liheng Zhang, Chang Wen Chen, and Qi Tian. AVT: Unsupervised learning of transformation equivariant representations by autoencoding variational transformations. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019a.
|
| 312 |
+
|
| 313 |
+
Guo-Jun Qi, Liheng Zhang, and Xiao Wang. Learning generalized transformation equivariant representations via autoencoding transformations. arXiv preprint arXiv:1906.08628, 2019b.
|
| 314 |
+
|
| 315 |
+
Jiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang, Hongxia Yang, Ming Ding, Kuansan Wang, and Jie Tang. Gcc: Graph contrastive coding for graph neural network pre-training. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 1150–1160, 2020.
|
| 316 |
+
|
| 317 |
+
Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2050–2057. IEEE, 2012.
|
| 318 |
+
|
| 319 |
+
Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
|
| 320 |
+
|
| 321 |
+
Nino Shervashidze, SVN Vishwanathan, Tobias Petri, Kurt Mehlhorn, and Karsten Borgwardt. Efficient graphlet kernels for large graph comparison. In Artificial Intelligence and Statistics, pp. 488–495, 2009.
|
| 322 |
+
|
| 323 |
+
Nino Shervashidze, Pascal Schweitzer, Erik Jan Van Leeuwen, Kurt Mehlhorn, and Karsten M Borgwardt. Weisfeiler-lehman graph kernels. Journal of Machine Learning Research, 12(9), 2011.
|
| 324 |
+
|
| 325 |
+
Martin Simonovsky and Nikos Komodakis. Graphvae: Towards generation of small graphs using variational autoencoders. In International Conference on Artificial Neural Networks (ICANN), pp. 412–422. Springer, 2018.
|
| 326 |
+
|
| 327 |
+
Henrik Skibbe. Spherical Tensor Algebra for Biomedical Image Analysis. PhD thesis, Verlag nicht ermittelbar, 2013.
|
| 328 |
+
|
| 329 |
+
Kihyuk Sohn and Honglak Lee. Learning invariant representations with local transformations. In International Conference on Machine Learning (ICML), pp. 1339–1346, 2012.
|
| 330 |
+
|
| 331 |
+
Fan-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semisupervised graph-level representation learning via mutual information maximization. In International Conference on Learning Representations (ICLR), 2020a.
|
| 332 |
+
|
| 333 |
+
Ke Sun, Zhouchen Lin, and Zhanxing Zhu. Multi-stage self-supervised learning for graph convolutional networks on graphs with few labeled nodes. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pp. 5892–5899, 2020b.
|
| 334 |
+
|
| 335 |
+
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua ´ Bengio. Graph attention networks. In International Conference on Learning Representations (ICLR), 2018.
|
| 336 |
+
|
| 337 |
+
Petar Velickovic, William Fedus, William L Hamilton, Pietro Lio, Yoshua Bengio, and R Devon \` Hjelm. Deep graph infomax. In International Conference on Learning Representations (ICLR), 2019.
|
| 338 |
+
|
| 339 |
+
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, 2016.
|
| 340 |
+
|
| 341 |
+
Jiayu Wang, Wengang Zhou, Guo-Jun Qi, Zhongqian Fu, Qi Tian, and Houqiang Li. Transformation gan for unsupervised image synthesis and representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 472–481, 2020.
|
| 342 |
+
|
| 343 |
+
WOK Asiri Suranga Wijesinghe and Qing Wang. Dfnets: Spectral cnns for graphs with feedbacklooped filters. In Advances in Neural Information Processing Systems (NIPS), pp. 6009–6020, 2019.
|
| 344 |
+
|
| 345 |
+
Felix Wu, Tianyi Zhang, Amauri Holanda de Souza Jr, Christopher Fifty, Tao Yu, and Kilian Q Weinberger. Simplifying graph convolutional networks. In Proceedings of the 36th International Conference on Machine Learning (ICML), pp. 6861–6871, 2019.
|
| 346 |
+
|
| 347 |
+
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.
|
| 348 |
+
|
| 349 |
+
Bingbing Xu, Huawei Shen, Qi Cao, Yunqi Qiu, and Xueqi Cheng. Graph wavelet neural network. In International Conference on Learning Representations (ICLR), 2019a.
|
| 350 |
+
|
| 351 |
+
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations (ICLR), 2019b.
|
| 352 |
+
|
| 353 |
+
Pinar Yanardag and SVN Vishwanathan. Deep graph kernels. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1365–1374, 2015.
|
| 354 |
+
|
| 355 |
+
Jiaxuan You, Rex Ying, Xiang Ren, William L Hamilton, and Jure Leskovec. Graphrnn: Generating realistic graphs with deep auto-regressive models. In Proceedings of the 35th International Conference on Machine Learning (ICML), pp. 5694–5703, 2018.
|
| 356 |
+
|
| 357 |
+
Liheng Zhang, Guo-Jun Qi, Liqiang Wang, and Jiebo Luo. AET vs. AED: Unsupervised representation learning by auto-encoding transformations rather than data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 2547–2555, 2019.
|
| 358 |
+
|
| 359 |
+
# A EXPERIMENTS ON DIFFERENT ORDERS OF THE ADJACENCY MATRIX
|
| 360 |
+
|
| 361 |
+
As presented in Sec. 3.2, we perturb the 1-hop neighborhoods via the proposed topology transformations, leading to possibly significant changes in the graph topology. This increases the difficulties of predicting the topology transformations when using one-layer GCN (Kipf & Welling, 2017) by aggregating the 1-hop neighborhood information. Therefore, we employ one Simple Graph Convolution (SGC) layer (Wu et al., 2019) with order $k$ as our encoder $E ( \cdot )$ , where the output feature representations aggregate multi-hop neighborhood information. Formally, the SGC layer is defined as
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
\mathbf { H } = E ( \mathbf { X } , \mathbf { A } ) = \left( \mathbf { D } ^ { - { \frac { 1 } { 2 } } } ( \mathbf { A } + \mathbf { I } ) \mathbf { D } ^ { - { \frac { 1 } { 2 } } } \right) ^ { k } \mathbf { X } \mathbf { W } ,
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
where $\mathbf { D }$ is the degree matrix of $\mathbf { A } + \mathbf { I }$ , $\mathbf { W } \in \mathbb { R } ^ { C \times F }$ is a learnable parameter matrix, and $k$ is the order of the normalized adjacency matrix.
|
| 368 |
+
|
| 369 |
+
To study the influence of different orders of the adjacency matrix, we adopt five orders from 1 to 5 to train five models on the node classification task. Fig. 3 presents the node classification accuracy under different orders of the adjacency matrix for TopoTER and DGI respectively. As we can see, the proposed TopoTER achieves best classification performance when $\bar { k } = \{ 4 , 2 , 3 \}$ on the three datasets respectively. When $k = 1$ , our model still achieves reasonable results although it is difficult to predict the topology transformations from 1-hop neighborhood information; when $k > 1$ , our proposed TopoTER outperforms DGI by a large margin on Cora and Pubmed dataset, and achieves comparable results to DGI on Citeseer dataset. This is because DGI adopts feature shuffling to generate negative samples, which is insufficient to learn contrastive feature representations when aggregating multi-hop neighborhood information, while TopoTER takes advantage of multi-hop neighborhood information to predict the topology transformations, leading to improved performance.
|
| 370 |
+
|
| 371 |
+

|
| 372 |
+
Figure 3: Node classification accuracies under different orders of the adjacency matrix on the Cora, Citeseer, and Pubmed datasets.
|
| 373 |
+
|
| 374 |
+
# B EXPERIMENTS ON DIFFERENT EDGE PERTURBATION RATES
|
| 375 |
+
|
| 376 |
+
Further, we evaluate the influence of the edge perturbation rate in Eq. (9) on the node classification task. We choose 11 edge perturbation rates from 0.0 to 1.0 at an interval of 0.1 to train the proposed TopoTER. We use one SGC layer as our encoder $E ( \cdot )$ , where the order of the adjacency matrix is set to 1. As presented in Fig. 4, the blue solid line with error bar shows the classification accuracy of our TopoTER under different edge perturbation rates. We also provide the classification accuracy on feature representations of graphs from a randomly initialized encoder $E ( \cdot )$ , denoted as Random Init., which serves as the lower bound of the performance.
|
| 377 |
+
|
| 378 |
+
As we can see, the classification performance reaches the best when the graph is perturbed under a reasonable edge perturbation rate, e.g., $r = \{ 0 . 6 , 0 . 5 , 0 . 6 \}$ for the Cora, Citeseer, and Pubmed dataset, respectively. When the edge perturbation rate $r ~ = ~ 0 . 0$ , the unsupervised training task of TopoTER becomes link prediction, which cannot take advantage of the proposed method by predicting the topology transformations; when the edge perturbation rate $r = 1 . 0$ , our TopoTER still achieves reasonable classification results, which shows the stability of our model under high edge perturbation rates. At the same time, we observe that the proposed TopoTER outperforms Random Init. by a large margin, which validates the effectiveness of the proposed unsupervised training strategy.
|
| 379 |
+
|
| 380 |
+

|
| 381 |
+
Figure 4: Node classification accuracies under different edge perturbation rates on the Cora, Citeseer, and Pubmed datasets.
|
md/train/Arn2E4IRjEB/Arn2E4IRjEB.md
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation
|
| 2 |
+
|
| 3 |
+
Emmanuel Bengio1,2, Moksh Jain1,5, Maksym Korablyov1 Doina Precup1,2,4, Yoshua Bengio1,3 1Mila, 2McGill University, 3Université de Montréal, 4DeepMind, 5Microsof
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
This paper is about the problem of learning a stochastic policy for generating an object (like a molecular graph) from a sequence of actions, such that the probability of generating an object is proportional to a given positive reward for that object. Whereas standard return maximization tends to converge to a single return-maximizing sequence, there are cases where we would like to sample a diverse set of high-return solutions. These arise, for example, in black-box function optimization when few rounds are possible, each with large batches of queries, where the batches should be diverse, e.g., in the design of new molecules. One can also see this as a problem of approximately converting an energy function to a generative distribution. While MCMC methods can achieve that, they are expensive and generally only perform local exploration. Instead, training a generative policy amortizes the cost of search during training and yields to fast generation. Using insights from Temporal Difference learning, we propose GFlowNet, based on a view of the generative process as a flow network, making it possible to handle the tricky case where different trajectories can yield the same final state, e.g., there are many ways to sequentially add atoms to generate some molecular graph. We cast the set of trajectories as a flow and convert the flow consistency equations into a learning objective, akin to the casting of the Bellman equations into Temporal Difference methods. We prove that any global minimum of the proposed objectives yields a policy which samples from the desired distribution, and demonstrate the improved performance and diversity of GFlowNet on a simple domain where there are many modes to the reward function, and on a molecule synthesis task.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
The maximization of expected return $R$ in reinforcement learning (RL) is generally achieved by putting all the probability mass of the policy $\pi$ on the highest-return sequence of actions. In this paper, we study the scenario where our objective is not to generate the single highest-reward sequence of actions but rather to sample a distribution of trajectories whose probability is proportional to a given positive return or reward function. This can be useful in tasks where exploration is important, i.e., we want to sample from the leading modes of the return function. This is equivalent to the problem of turning an energy function into a corresponding generative model, where the object to be generated is obtained via a sequence of actions. By changing the temperature of the energy function (i.e., scaling it multiplicatively) or by taking the power of the return, one can control how selective the generator should be, i.e., only generate from around the highest modes at low temperature or explore more with a higher temperature.
|
| 12 |
+
|
| 13 |
+
A motivating application for this setup is iterative black-box optimization where the learner has access to an oracle which can compute a reward for a large batch of candidates at each round, e.g., in drug-discovery applications. Diversity of the generated candidates is particularly important when the oracle is itself uncertain, e.g., it may consist of cellular assays which is a cheap proxy for clinical trials, or it may consist of the result of a docking simulation (estimating how well a candidate small molecule binds to a target protein) which is a proxy for more accurate but more expensive downstream evaluations (like cellular assays or in-vivo assays in mice).
|
| 14 |
+
|
| 15 |
+
When calling the oracle is expensive (e.g. it involves a biological experiment), a standard way (Angermueller et al., 2020) to apply machine learning in such exploration settings is to take the data already collected from the oracle (say a set of $( x , y )$ pairs where $x$ is a candidate solution an $y$ is a scalar evaluation of $x$ from the oracle) and train a supervised proxy $f$ (viewed as a simulator) which predicts $y$ from $x$ . The function $f$ or a variant of $f$ which incorporates uncertainty about its value, like in Bayesian optimization (Srinivas et al., 2010; Negoescu et al., 2011), can then be used as a reward function $R$ to train a generative model or a policy that will produce a batch of candidates for the next experimental assays. Searching for $x$ which maximizes $R ( x )$ is not sufficient because we would like to sample for the batch of queries a representative set of $x$ ’s with high values of $R$ , i.e., around modes of $R ( x )$ . Note that alternative ways to obtain diversity exist, e.g., with batch Bayesian optimization (Kirsch et al., 2019). An advantage of the proposed approach is that the computational cost is linear in the size of the batch (by opposition with methods which compare pairs of candidates, which is at least quadratic). With the possibility of assays of a hundred thousand candidates using synthetic biology, linear scaling would be a great advantage.
|
| 16 |
+
|
| 17 |
+
In this paper, we thus focus on the specific machine learning problem of turning a given positive reward or return function into a generative policy which samples with a probability proportional to the return. In applications like the one mentioned above, we only apply the reward function after having generated a candidate, i.e., the reward is zero except in a terminal state, and the return is the terminal reward. We are in the so-called episodic setting of RL.
|
| 18 |
+
|
| 19 |
+
The proposed approach views the probability assigned to an action given a state as the flow associated with a network whose nodes are states, and outgoing edges from that node are deterministic transitions driven by an action (not to be confused with normalizing flows; Rezende and Mohamed (2016)). The total flow into the network is the sum of the rewards in the terminal states (i.e., a partition function) and can be shown to be the flow at the root node (or start state). The proposed algorithm is inspired by Bellman updates and converges when the incoming and outgoing flow into and out of each state match. A policy which chooses an action with probability proportional to the outgoing flow corresponding to that action is proven to achieve the desired result, i.e., the probability of sampling a terminal state is proportional to its reward. In addition, we show that the resulting setup is off-policy; it converges to the above solution even if the training trajectories come from a different policy, so long as it has large enough support on the state space.
|
| 20 |
+
|
| 21 |
+
The main contributions of this paper are as follows:
|
| 22 |
+
|
| 23 |
+
• We propose GFlowNet, a novel generative method for unnormalized probability distributions based on flow networks and local flow-matching conditions: the flow incoming to a state must match the outgoing flow.
|
| 24 |
+
• We prove crucial properties of GFlowNet, including the link between the flow-matching conditions (which many training objectives can provide) and the resulting match of the generated policy with the target reward function. We also prove its offline properties and asymptotic convergence (if the training objective can be minimized). We also demonstrate that previous related work (Buesing et al., 2019) which sees the generative process like a tree would fail when there are many action sequences which can lead to the same state.
|
| 25 |
+
We demonstrate on synthetic data the usefulness of departing from seeking one mode of the return, and instead seeking to model the entire distribution and all its modes.
|
| 26 |
+
• We successfully apply GFlowNet to a large scale molecule synthesis domain, with comparative experiments against PPO and MCMC methods.
|
| 27 |
+
|
| 28 |
+
All implementations are available at https://github.com/bengioe/gflownet.
|
| 29 |
+
|
| 30 |
+
# 2 Approximating Flow Network generative models with a TD-like objective
|
| 31 |
+
|
| 32 |
+
Consider a discrete set $\mathcal { X }$ and policy $\pi ( a | s )$ to sequentially build $x \in \mathcal { X }$ with probability $\pi ( x )$ with
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\pi ( x ) \approx { \frac { R ( x ) } { Z } } = { \frac { R ( x ) } { \sum _ { x ^ { \prime } \in { \mathcal { X } } } R ( x ^ { \prime } ) } }
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where $R ( x ) > 0$ is a reward for a terminal state $x$ . This would be useful to sample novel drug-like molecules when given a reward function $R$ that scores molecules based on their chemical properties. Being able to sample from the high modes of $R ( x )$ would provide diversity in the batches of generated molecules sent to assays. This is in contrast with the typical RL objective of maximizing return which we have found to often end up focusing around one or very few good molecules. In our context, $R ( x )$ is a proxy for the actual values obtained from assays, which means it can be called often and cheaply. $R ( x )$ is retrained or fine-tuned each time we acquire new data from the assays.
|
| 39 |
+
|
| 40 |
+
What method should one use to generate batches sampled from $\pi ( x ) \propto R ( x ) ?$ Let’s first think of the state space under which we would operate.
|
| 41 |
+
|
| 42 |
+
Let $s$ denote the set of states and $\mathcal { X } \subset \mathcal { S }$ denote the set of terminal states. Let $\mathcal { A }$ be a finite set, the alphabet, ${ \mathcal { A } } ( s ) \subseteq A$ be the set of allowed actions at state $s$ , and let $\mathcal { A } ^ { \ast } ( s )$ be the set of all sequences of actions allowed after state $s$ . To every action sequence $\vec { a } = ( a _ { 1 } , a _ { 2 } , a _ { 3 } , . . . , a _ { h } )$ of $a _ { i } \in \mathcal { A } , h \le H$ corresponds a single $x$ , i.e. the environment is deterministic so we can define a function $C$ mapping a sequence of actions $\vec { a }$ to an $x$ . If such a sequence is ‘incomplete’ we define its reward to be 0. When the correspondence between action sequences and states is bijective, a state $s$ is uniquely described by some sequence $\vec { a }$ , and we can visualize the generative process as the traversal of a tree from a single root node to a leaf corresponding to the sequence of actions along the way.
|
| 43 |
+
|
| 44 |
+
However, when this correspondence is non-injective, i.e. when multiple action sequences describe the same $x$ , things get trickier. Instead of a tree, we get a directed acyclic graph or DAG (assuming that the sequences must be of finite length, i.e., there are no deterministic cycles), as illustrated in Figure 1. For example, and of interest here, molecules can be seen as graphs, which can be described in multiple orders (canonical representations such as SMILES strings also have this problem: there may be multiple descriptions for the same actual molecule). The standard approach to such a sampling problem is to use iterative MCMC methods (Xie et al., 2021; Grathwohl et al., 2021). Another option is to relax the desire to have $p ( x ) \propto R ( x )$ and to use non-interative (sequential) RL methods (Gottipati et al., 2020), but these are at high risk of getting stuck in local maxima and of missing modes. Indeed, in our setting, the policy which maximizes the expected return (which is the expected final reward) generates the sequence with the highest return (i.e., a single molecule).
|
| 45 |
+
|
| 46 |
+
# 2.1 Flow Networks
|
| 47 |
+
|
| 48 |
+
In this section we propose the Generative Flow Network framework, or GFlowNet, which enables us to learn policies such that $p ( x ) \propto R ( x )$ when sampled. We first discuss why existing methods are inadequate, and then show how we can use the metaphor of flows, sinks and sources, to construct adequate policies. We then show that such policies can be learned via a flow-matching objective.
|
| 49 |
+
|
| 50 |
+
With existing methods in the bijective case, one can think of the sequential generation of one $x$ as an episode in a tree-structured deterministic MDP, where all leaves $x$ are terminal states (with reward $R ( x ) )$ and the root is initial state $s _ { 0 }$ . Interestingly, in such a case one can express the pseudo-value of a state $\tilde { V } ( s )$ as the sum of all the rewards of the descendants of $s$ (Buesing et al., 2019).
|
| 51 |
+
|
| 52 |
+
In the non-injective case, these methods are inadequate. Constructing $\pi ( \tau ) \approx R ( \tau ) / Z$ , e.g. as per Buesing et al. (2019), MaxEnt RL (Haarnoja et al., 2017), or via an autoregressive method (Nash and Durkan, 2019; Shi et al., 2021) has a particular problem as shown below: if multiple action sequences $\vec { a }$ (i.e. multiple trajectories $\tau$ ) lead to a final state $x$ , then a serious bias can be introduced in the generative probabilities. Let us denote ${ \vec { a } } + { \vec { b } }$ as the concatenation of the two sequences of actions $\vec { a }$ and $\vec { b }$ , and by extension $s + { \vec { b } }$ the state reached by applying the actions in $\vec { b }$ from state $s$ .
|
| 53 |
+
|
| 54 |
+
Proposition 1. Let $C : { \mathcal { A } } ^ { * } \mapsto { \mathcal { S } }$ associate each allowed action sequence $\vec { a } \in \mathcal { A } ^ { \ast }$ to a state $s = C ( \vec { a } ) \in S$ . Let $\tilde { V } : { \cal S } \mapsto { { \bf R } ^ { + } }$ associate each state $s \in S$ to $\begin{array} { r } { \tilde { V } ( s ) = \sum _ { \vec { b } \in \mathcal { A } ^ { * } ( s ) } R ( s + \vec { b } ) > 0 , } \end{array}$ where $\mathcal { A } ^ { \ast } ( s )$ is the set of allowed continuations from s and $s + { \vec { b } }$ denotes the resulting state, i.e., $\tilde { V } ( s )$ is the sum of the rewards of all the states reachable from $s$ . Consider a policy $\pi$ which starts from the state corresponding to the empty string $s _ { 0 } = C ( \emptyset )$ and chooses from state $s \in S$ an allowable action a ∈ A(s) with probability π(a|s) = $\begin{array} { r } { \pi ( a | s ) = \frac { \tilde { V } ( s + a ) } { \sum _ { b \in { \cal A } ( s ) } \tilde { V } ( s + b ) } } \end{array}$ . Denote $\pi ( \vec { a } = ( a _ { 1 } , \ldots , a _ { N } ) ) =$ $\begin{array} { r } { \prod _ { i = 1 } ^ { N } \pi ( a _ { i } | C ( a _ { 1 } , \dots , a _ { i - 1 } ) ) } \end{array}$ and $\pi ( s )$ with $s \in S$ the probability of visiting a state s with this policy. The following then obtains:
|
| 55 |
+
(a) $\begin{array} { r } { \dot { \pi } ( s ) = \dot { \sum } _ { \vec { a } _ { i } : C ( \vec { a } _ { i } ) = s } \pi ( \vec { a } _ { i } ) } \end{array}$ .
|
| 56 |
+
|
| 57 |
+
$( b )$ If $C$ is bijective, then $\begin{array} { r } { \pi ( s ) = \frac { \tilde { V } ( s ) } { \tilde { V } ( s _ { 0 } ) } } \end{array}$ and as a special case for terminal states $x$ , $\begin{array} { r } { \pi ( x ) = \frac { R ( x ) } { \sum _ { x \in \mathcal { X } } R ( x ) } } \end{array}$ . (c) If $C$ is non-injective and there are $n ( x )$ distinct action sequences $\vec { a } _ { i }$ s.t. $C ( \vec { a } _ { i } ) = \dot { x }$ , then $\begin{array} { r } { \pi ( x ) = \frac { n ( x ) R ( x ) } { \sum _ { x ^ { \prime } \in \mathcal { X } } n ( x ^ { \prime } ) R ( x ^ { \prime } ) } } \end{array}$ .
|
| 58 |
+
|
| 59 |
+
See Appendix A.1 for the proof. In combinatorial spaces, such as for molecules, where $C$ is noninjective (there are many ways to construct a molecule graph), this can become exponentially bad as trajectory lengths increase. It means that larger molecules would be exponentially more likely to be sampled than smaller ones, just because of the many more paths leading to them. In this scenario, the pseudo-value $\tilde { V }$ is “misinterpreting” the MDP’s structure as a tree, leading to the wrong $\pi ( x )$ .
|
| 60 |
+
|
| 61 |
+
An alternative is to see the MDP as a flow network, that is, leverage the DAG structure of the MDP, and learn a flow $F$ , rather than estimating the pseudo-value $\tilde { V }$ as a sum of descendant rewards, as elaborated below. We define the flow network as a having a single source, the root node (or initial state) $s _ { 0 }$ with in-flow $Z$ , and one sink for each leaf (or terminal state) $x$ with out-flow $R ( x ) > 0$ . We write $T ( s , a ) = s ^ { \prime }$ to denote that the state-action pair $( s , a )$ leads to state $s ^ { \prime }$ . Note that because $C$ is not a bijection, i.e., there are many paths (action sequences) leading to some node, a node can have multiple parents, i.e. $| \{ ( s , a ) \mid \bar { T ( s , a ) } = s ^ { \prime } \} | \geq 1$ , except for the root, which has no parent. We write $F ( s , a )$ for the flow between node $s$ and node $s ^ { \prime } = T ( s , a )$ , $F ( s )$ for the total flow going through $s ^ { \th }$ 1. This construction is illustrated in Fig. 1.
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 1: A flow network MDP. Episodes start at source $s _ { 0 }$ with flow $Z$ . Like with SMILES strings, there are no cycles. Terminal states are sinks with out-flow $R ( s )$ . Exemplar state $s _ { 3 }$ has parents $\left\{ ( s , a ) | T ( s , a ) = s _ { 3 } \right\} = \left\{ ( s _ { 1 } , a _ { 2 } ) , ( s _ { 2 } , a _ { 5 } ) \right\}$ and allowed actions $\overset { \cdot } { \underset { \cdot } { A } } ( s _ { 3 } ) = \{ a _ { 4 } , a _ { 7 } \}$ . $s _ { 4 }$ is a terminal sink state with $R ( s _ { 4 } ) > 0$ and only one parent. The goal is to estimate $F ( s , a )$ such that the flow equations are satisfied for all states: for each node, incoming flow equals outgoing flow.
|
| 65 |
+
|
| 66 |
+
To satisfy flow conditions, we require that for any node, the incoming flow equals the outgoing flow, which is the total flow $F ( s )$ of node $s$ . Boundary conditions are given by the flow into the terminal nodes $x$ , $R ( x )$ . Formally, for any node $s ^ { \prime }$ , we must have that the in-flow
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
F ( s ^ { \prime } ) = \sum _ { s , a : T ( s , a ) = s ^ { \prime } } F ( s , a )
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
equals the out-flow
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
F ( s ^ { \prime } ) = \sum _ { a ^ { \prime } \in \mathcal { A } ( s ^ { \prime } ) } F ( s ^ { \prime } , a ^ { \prime } ) .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
More concisely, with $R ( s ) = 0$ for interior nodes, and $\mathcal { A } ( s ) = \emptyset$ for leaf (sink/terminal) nodes, we write the following flow consistency equations:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\sum _ { s , a : T ( s , a ) = s ^ { \prime } } F ( s , a ) = R ( s ^ { \prime } ) + \sum _ { a ^ { \prime } \in A ( s ^ { \prime } ) } F ( s ^ { \prime } , a ^ { \prime } ) .
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
with $F$ being a flow, $F ( s , a ) > 0 \forall s , a$ (for this we needed to constrain $R ( x )$ to be positive too). One could include in principle nodes and edges with zero flow but it would make it difficult to talk about the logarithm of the flow, as we do below, and such states can always be excluded by the allowed set of actions for their parent states. Let us now show that such a flow correctly produces $\pi ( x ) = R ( x ) / Z$ when the above flow equations are satisfied.
|
| 85 |
+
|
| 86 |
+
Proposition 2. Let us define a policy $\pi$ that generates trajectories starting in state $s _ { 0 }$ by sampling actions $a \in { \mathcal { A } } ( s )$ according to
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\pi ( a | s ) = { \frac { F ( s , a ) } { F ( s ) } }
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $F ( s , a ) > 0$ is the flow through allowed edge $( s , a )$ , $\begin{array} { r } { F ( s ) = R ( s ) + \sum _ { a \in \mathcal { A } ( s ) } F ( s , a ) } \end{array}$ where $R ( s ) = 0$ for non-terminal nodes s and $F ( x ) = R ( x ) > 0$ for terminal nodes $x$ , and the flow consistency equation $\begin{array} { r } { \sum _ { s , a : T ( s , a ) = s ^ { \prime } } F ( s , a ) = R ( s ^ { \prime } ) + \sum _ { a ^ { \prime } \in A ( s ^ { \prime } ) } F ( s ^ { \prime } , a ^ { \prime } ) } \end{array}$ is satisfied. Let $\pi ( s )$ denote the probability of visiting state $s$ when starting at $s _ { 0 }$ and following $\pi ( \cdot | \cdot )$ . Then
|
| 93 |
+
|
| 94 |
+
(a) $\begin{array} { r } { \pi ( s ) = \frac { F ( s ) } { F ( s _ { 0 } ) } } \end{array}$ (b) $\begin{array} { r } { F ( s _ { 0 } ) = \sum _ { x \in \mathcal { X } } R ( x ) } \end{array}$ (c) π(x) = P R(x)x0∈X R(x0) .
|
| 95 |
+
|
| 96 |
+
Proof. We have $\pi ( s _ { 0 } ) = 1$ since we always start in root node $s _ { 0 }$ . Note that $\begin{array} { r } { \sum _ { x \in \mathcal { X } } \pi ( x ) = 1 } \end{array}$ because terminal states are mutually exclusive, but in the case of non-bijective $C$ , we cannot say that $\textstyle \sum _ { s \in S } \pi ( s )$ equals 1 because the different states are not mutually exclusive in general. This notation is different from the one typically used in RL where $\pi ( s )$ refers to the asymptotic distribution of the Markov chain. Then
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\pi ( s ^ { \prime } ) = \sum _ { ( a , s ) : T ( s , a ) = s ^ { \prime } } \pi ( a | s ) \pi ( s )
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
i.e., using Eq. 5,
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\pi ( s ^ { \prime } ) = \sum _ { ( a , s ) : T ( s , a ) = s ^ { \prime } } { \frac { F ( s , a ) } { F ( s ) } } \pi ( s ) .
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
We can now conjecture that the statement
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\pi ( s ) = { \frac { F ( s ) } { F ( s _ { 0 } ) } }
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
is true and prove it by induction. This is trivially true for the root, which is our base statement, since $\pi ( s _ { 0 } ) = 1$ . By induction, we then have that if the statement is true for parents $s$ of $s ^ { \prime }$ , then
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\pi ( s ^ { \prime } ) = \sum _ { s , a : T ( s , a ) = s ^ { \prime } } { \frac { F ( s , a ) } { F ( s ) } } { \frac { F ( s ) } { F ( s _ { 0 } ) } } = { \frac { \sum _ { s , a : T ( s , a ) = s ^ { \prime } } F ( s , a ) } { F ( s _ { 0 } ) } } = { \frac { F ( s ^ { \prime } ) } { F ( s _ { 0 } ) } }
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
which proves the statement, i.e., the first conclusion (a) of the theorem. We can then apply it to the case of terminal states $x$ , whose flow is fixed to $F ( x ) = R ( x )$ and obtain
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\pi ( x ) = { \frac { R ( x ) } { F ( s _ { 0 } ) } } .
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
Noting that $\begin{array} { r } { \sum _ { x \in X } \pi ( x ) = 1 } \end{array}$ and summing both sides of Eq. 10 over $x$ we thus obtain (b), i.e., F (s0) = Px∈X R(x). Plugging this back into Eq. 10, we obtain (c), i.e., π(x) = P R(x)x0∈X R(x0) . □
|
| 127 |
+
|
| 128 |
+
Thus our choice of $\pi ( a | s )$ satisfies our desiderata: it maps a reward function $R$ to a generative model which generates $x$ with probability $\pi ( x ) \propto R ( x )$ , whether $C$ is bijective or non-injective (the former being a special case of the latter, and we just provided a proof for the general non-injective case).
|
| 129 |
+
|
| 130 |
+
# 2.2 Objective Functions for GFlowNet
|
| 131 |
+
|
| 132 |
+
We can now leverage our RL intuitions to create a learning algorithm out of the above theoretical results. In particular, we propose to approximate the flows $F$ such that the flow consistency equations are respected at convergence with enough capacity in our estimator of $F$ , just like the Bellman equations for temporal-difference (TD) algorithms (Sutton and Barto, 2018). This could yield the following objective for a trajectory $\tau$ :
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\tilde { \mathcal { L } } _ { \theta } ( \tau ) = \sum _ { s ^ { \prime } \in \tau \neq s _ { 0 } } \left( \sum _ { s , a : T ( s , a ) = s ^ { \prime } } F _ { \theta } ( s , a ) - R ( s ^ { \prime } ) - \sum _ { a ^ { \prime } \in A ( s ^ { \prime } ) } F _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) \right) ^ { 2 } .
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
One issue from a learning point of view is that the flow will be very large for nodes near the root (early in the trajectory) and tiny for nodes near the leaves (late in the trajectory). In high-dimensional spaces where the cardinality of $\mathcal { X }$ is exponential (e.g., in the typical number of actions to form an $x$ ), the $F ( s , a )$ and $F ( s )$ for early states will be exponentially larger than for later states. Since we want $F ( s , a )$ to be the output of a neural network, this would lead to serious numerical issues.
|
| 139 |
+
|
| 140 |
+
To avoid this problem, we define the flow matching objective on a log-scale, where we match not the incoming and outgoing flows but their logarithms, and we train our predictor to estimate $F _ { \theta } ^ { \log } ( s , a ) = \log F ( s , a )$ , and exponentiate-sum-log the of logs: $F _ { \theta } ^ { \mathrm { l o g } }$ predictions to compute the loss, yielding
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\mathcal { L } _ { \theta , \epsilon } ( \tau ) = \sum _ { s ^ { \prime } \in \tau \neq s _ { 0 } } \left( \log \left[ \epsilon + \sum _ { s , a : T ( s , a ) = s ^ { \prime } } F _ { \theta } ^ { \log } ( s , a ) \right] - \log \left[ \epsilon + R ( s ^ { \prime } ) + \sum _ { a ^ { \prime } \in A ( s ^ { \prime } ) } \exp F _ { \theta } ^ { \log } ( s ^ { \prime } , a ^ { \prime } ) \right] \right) ^ { 2 }
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
which gives equal gradient weighing to large and small magnitude predictions. Note that matching the logs of the flows is equivalent to making the ratio of the incoming and outgoing flow closer to 1. To give more weight to errors on large flows and avoid taking the logarithm of a tiny number, we compare log( $\epsilon +$ incoming flow) with log( $\epsilon +$ outgoing flow). It does not change the global minimum, which is still when the flow equations are satisfied, but it avoids numerical issues with taking the log of a tiny flow. The hyper-parameter $\epsilon$ also trades-off how much pressure we put on matching large versus small flows, and in our experiments is set to be close to the smallest value $R$ can take. Since we want to discover the top modes of $R$ , it makes sense to care more for the larger flows. Many other objectives are possible for which flow matching is also a global minimum.
|
| 147 |
+
|
| 148 |
+
An interesting advantage of such objective functions is that they yield off-policy offline methods. The predicted flows $F$ do not depend on the policy used to sample trajectories (apart from the fact that the samples should sufficiently cover the space of trajectories in order to obtain generalization). This is formalized below, which shows that we can use any broad-support policy to sample training trajectories and still obtain the correct flows and generative model, i.e., training can be off-policy.
|
| 149 |
+
|
| 150 |
+
Proposition 3. Let trajectories $\tau$ used to train $F _ { \theta }$ be sampled from an exploratory policy $P$ with the same support as the optimal $\pi$ defined in Eq. 5 for a consistent flow $F ^ { * } \in { \mathcal { F } } ^ { * }$ . A flow is consistent if Eq. 4 is respected. Also assume that $\exists \theta : F _ { \theta } = F ^ { * }$ , i.e., we choose a sufficiently rich family of predictors. Let $\theta ^ { * } \in \mathrm { a r g m i n } _ { \theta } E _ { P ( \tau ) } [ L _ { \theta } ( \tau ) ]$ a minimizer of the expected training loss. Let $L _ { \theta } ( \tau )$ have the property that when flows are matched it achieves its lowest possible value. First, it can $b e$ shown that this property is satisfied for the loss in Eq. 12. Then
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
{ \cal F } _ { \theta ^ { * } } = { \cal F } ^ { * } , \mathrm { a n d } { \cal L } _ { \theta ^ { * } } ( \tau ) = 0 \forall \tau \sim { \cal P } ( \theta ) ,
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
i.e., a global optimum of the expected loss provides the correct flows. If πθ∗ (a|s) = P Fθ∗ (s,a)a0∈A(s) Fθ∗ (s,a0) then we also have
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\pi _ { \theta ^ { \ast } } ( x ) = \frac { R ( x ) } { Z } .
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
The proof is in Appendix A.1. Note that, in RL terms, this method is akin to asynchronous dynamic programming (Sutton and Barto, 2018, $\ S 4 . 5$ ), which is an off-policy off-line method which converges provided every state is visited infinitely many times asymptotically.
|
| 163 |
+
|
| 164 |
+
# 3 Related Work
|
| 165 |
+
|
| 166 |
+
The objective of training a policy generating states with a probability proportional to rewards was presented by Buesing et al. (2019) but the proposed method only makes sense when there is a bijection between action sequences and states. In contrast, GFlowNet is applicable in the more general setting where many paths can lead to the same state. The objective to sample with probability proportional to a given unnormalized positive function is achieved by many MCMC methods (Grathwohl et al., 2021; Dai et al., 2020). However, when mixing between modes is challenging (e.g., in high-dimensional spaces with well-separated modes occupying a fraction of the total volume) convergence to the target distribution can be extremely slow. In contrast, GFlowNet is not iterative and amortizes the challenge of sampling from such modes through a training procedure which must be sufficiently exploratory.
|
| 167 |
+
|
| 168 |
+
This sampling problem comes up in molecule generation and has been studied in this context with numerous generative models (Shi et al., 2020; Jin et al., 2020; Luo et al., 2021), MCMC methods (Seff et al., 2019; Xie et al., 2021), RL (Segler et al., 2017; Cao and Kipf, 2018; Popova et al., 2019; Gottipati et al., 2020; Angermueller et al., 2020) and evolutionary methods (Brown et al., 2004; Jensen, 2019; Swersky et al., 2020). Some of these methods rely on a given set of "positive examples" (high-reward) to train a generative model, thus not taking advantage of the "negative examples" and the continuous nature of the measurements (some examples should be generated more often than others). Others rely on the traditional return maximization objectives of RL, which tends to focus on one or a few dominant modes, as we find in our experiments. Beyond molecules, there are previous works generating data non-greedily through RL (Bachman and Precup, 2015) or energy-based GANs (Dai et al., 2017).
|
| 169 |
+
|
| 170 |
+
The objective that we formulate in (12) may remind the reader of the objective of control-asinference’s Soft Q-Learning (Haarnoja et al., 2017), with the difference that we include all the parents of a state in the in-flow, whereas Soft Q-Learning only uses the parent contained in the trajectory. Soft Q-Learning induces a different policy, as shown by Proposition 1, one where $P ( \tau ) \propto R ( \tau )$ rather than $P ( x ) \propto \bar { R } ( x )$ . More generally, we only consider deterministic generative settings whereas RL is a more general framework for stochastic environments.
|
| 171 |
+
|
| 172 |
+
Literature at the intersection of network flow and deep learning is sparse, and is mostly concerned with solving maximum flow problems (Nazemi and Omidi, 2012; Chen and Zhang, 2020) or classification within existing flow networks (Rahul et al., 2017; Pekta¸s and Acarman, 2019). Finally, the idea of accounting for the search space being a DAG rather than a tree in MCTS, known as transpositions (Childs et al., 2008), also has some links with the proposed method.
|
| 173 |
+
|
| 174 |
+
# 4 Empirical Results
|
| 175 |
+
|
| 176 |
+
We first verify that GFlowNet works as advertised on an artificial domain small enough to compute the partition function exactly, and compare its abilities to recover modes compared to standard MCMC and RL methods, with its sampling distribution better matching the normalized reward. We find that GFlowNet (A) converges to $\pi ( x ) \propto R ( x )$ , (B) requires less samples to achieve some level of performance than MCMC and PPO methods and (C) recovers all the modes and does so faster than MCMC and PPO, both in terms of wall-time and number of states visited and queried. We then test GFlowNet on a large scale domain, which consists in generating small drug molecule graphs, with a reward that estimates their binding affinity to a target protein (see Appendix A.3). We find that GFlowNet finds higher reward and more diverse molecules faster than baselines.
|
| 177 |
+
|
| 178 |
+
# 4.1 A (hyper-)grid domain
|
| 179 |
+
|
| 180 |
+
Consider an MDP where states are the cells of a $n$ -dimensional hypercubic grid of side length $H$ . The agent starts at coordinate $x = ( 0 , 0 , \ldots )$ and is only allowed to increase coordinate $i$ with action $a _ { i }$ (up to $H$ , upon which the episode terminates). A stop action indicates to terminate the trajectory. There are many action sequences that lead to the same coordinate, making this MDP a DAG.The reward for ending the trajectory in $x$ is some $R ( x ) > 0$ . For MCMC methods, in order to have an ergodic chain, we allow the iteration to decrease coordinates as well, and there is no stop action.
|
| 181 |
+
|
| 182 |
+
We ran experiments with this reward function:
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\begin{array} { r } { R ( x ) = R _ { 0 } + R _ { 1 } \prod _ { i } \mathbb { I } ( 0 . 2 5 < | x _ { i } / H - 0 . 5 | ) + R _ { 2 } \prod _ { i } \mathbb { I } ( 0 . 3 < | x _ { i } / H - 0 . 5 | < 0 . 4 ) } \end{array}
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
with $0 < R _ { 0 } \ll R _ { 1 } < R _ { 2 }$ , pictured when $n = 2$ on the right. For this choice of $R$ , there are only interesting rewards near the corners of the grid, and there are exactly $2 ^ { n }$ modes. We set $R _ { 1 } \stackrel { \cdot } { = } 1 / 2$ , $R _ { 2 } = 2$ . By varying $R _ { 0 }$ and setting it closer to 0, we make this problem artificially harder, creating a region of the state space which it is undesirable to explore. To measure the performance of a method, we measure the empirical L1 error $\mathbb { E } [ | p ( x ) - \pi ( { \bar { x } } ) | ]$ . $p ( x ) = R ( x ) / Z$ is known in this domain, and $\pi$ is estimated by repeated sampling and counting frequencies for each possible $x$ . We also measure the number of modes with at least 1 visit as a function of the number of states visited.
|
| 189 |
+
|
| 190 |
+
We run the above experiment for $R _ { 0 } \in \{ 1 0 ^ { - 1 } , 1 0 ^ { - 2 } , 1 0 ^ { - 3 } \}$ with $n = 4$ , $H = 8$ . In Fig. 2 we see that GFlowNet is robust to $R _ { 0 }$ and obtains a low L1 error, while a Metropolis-Hastings-MCMC based method requires exponentially more samples than GFlowNet to achieve some level of L1 error. This is apparent in Fig. 2 (with a log-scale horizontal axis) by comparing the slope of progress of GFlowNet (beyond the initial stage) and that of the MCMC sampler. We also see that MCMC takes much longer to visit each mode once as $R _ { 0 }$ decreases, while GFlowNet is only slightly affected, with GFlowNet converging to some level of L1 error faster, as per hypothesis (B). This suggests that
|
| 191 |
+
|
| 192 |
+
GFlowNet is robust to the separation between modes (represented by $R _ { 0 }$ being smaller) and thus recovers all the modes much faster than MCMC (again, noting the log-scale of the horizontal axis).
|
| 193 |
+
|
| 194 |
+
To compare to RL, we run PPO (Schulman et al., 2017). To discover all the modes in a reasonable time, we need to set the entropy maximization term much higher (0.5) than usual $( \ll 1 )$ ). We verify that PPO is not overly regularized by comparing it to a random agent. PPO finds all the modes faster than uniform sampling, but much more slowly than GFlowNet, and is also robust to the choice of $R _ { 0 }$ . This and the previous result validates hypothesis (C). We also run SAC (Haarnoja et al., 2018), finding similar or worse results. We provide additional results and discussion in Appendix A.6.
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
Figure 2: Hypergrid domain. Changing the task difficulty $R _ { 0 }$ to illustrate the advantage of GFlowNet over others. We see that as $R _ { 0 }$ gets smaller, MCMC struggles to fit the distribution because it struggles to visit all the modes. PPO also struggles to find all the modes, and requires very large entropy regularization, but is robust to the choice of $R _ { 0 }$ . We plot means over 10 runs for each setting.
|
| 198 |
+
|
| 199 |
+
# 4.2 Generating small molecules
|
| 200 |
+
|
| 201 |
+
Here our goal is to generate a diverse set of small molecules that have a high reward. We define a large-scale environment which allows an agent to sequentially generate molecules. This environment is challenging, with up to $1 0 ^ { 1 6 }$ states and between 100 and 2000 actions depending on the state.
|
| 202 |
+
|
| 203 |
+
We follow the framework of Jin et al. (2020) and generate molecules by parts using a predefined vocabulary of building blocks that can be joined together forming a junction tree (detailed in A.3). This is also known as fragment-based drug design (Kumar et al., 2012; Xie et al., 2021). Generating such a graph can be described as a sequence of additive edits: given a molecule and constraints of chemical validity, we choose an atom to attach a block to. The action space is thus the product of choosing where to attach a block and choosing which block to attach. There is an extra action to stop the editing sequence. This sequence of edits yields a DAG MDP, as there are multiple action sequences that lead to the same molecule graph, and no edge removal actions, which prevents cycles.
|
| 204 |
+
|
| 205 |
+
The reward is computed with a pretrained proxy model that predicts the binding energy of a molecule to a particular protein target (soluble epoxide hydrolase, sEH, see A.3). Although computing binding energy is computationally expensive, we can call this proxy cheaply. Note that for realistic drug design, we would need to consider many more quantities such as drug-likeness (Bickerton et al., 2012), toxicity, or synthesizability. Our goal here is not solve this problem, and our work situates itself within such a larger project. Instead, we want to show that given a proxy $R$ in the space of molecules, we can quickly match its induced distribution $\pi ( x ) \propto R ( x )$ and find many of its modes.
|
| 206 |
+
|
| 207 |
+
We parameterize the proxy with an MPNN (Gilmer et al., 2017) over the atom graph. Our flow predictor $F _ { \theta }$ is parameterized similarly to MARS (Xie et al., 2021), with an MPNN, but over the junction tree graph (the graph of blocks), which had better performance. For fairness, this architecture is used for both GFlowNet and the baselines. Complete details can be found in Appendix A.4.
|
| 208 |
+
|
| 209 |
+
We pretrain the proxy with a semi-curated semi-random dataset of $3 0 0 \mathrm { k }$ molecules (see A.4) down to a test MSE of 0.6; molecules are scored according to the docking score (Trott and Olson, 2010), renormalized so that most scores fall between 0 and 10 (to have $\bar { R ( } x { ) } > 0 { ) }$ . We plot the dataset’s reward distribution in Fig. 3. We train all generative models with up to $1 0 ^ { 6 }$ molecules. During training, sampling follows exploratory policy $P ( \boldsymbol { a } | \boldsymbol { s } )$ which is a mixture between $\pi ( a | s )$ (Eq. 5), used with probability 0.95, and a uniform distribution over allowed actions with probability 0.05.
|
| 210 |
+
|
| 211 |
+
Experimental results In Fig. 3 we show the empirical distribution of rewards in two settings; first when we train our model with $R ( x )$ , then with ${ \bar { R } } ( x ) ^ { \beta }$ . If GFlowNet learns a reasonable policy $\pi$ this should shift the distribution to the right. This is indeed what we observe. We compare GFlowNet to MARS (Xie et al., 2021), known to work well in the molecule domain, and observe the same shift. Note that GFlowNet finds more high reward molecules than MARS with these $\beta$ values; this is consistent with the hypothesis that it finds high-reward modes faster (since MARS is an MCMC method, it would eventually converge to the same distribution, but takes more time).
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 3: Empirical density of rewards. We verify that GFlowNet is consistent by training it with $R ^ { \beta }$ , $\beta = 4$ , which has the hypothesized effect of shifting the density to the right.
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 4: The average reward of the top- $k$ as a function of learning (averaged over 3 runs). Only unique hits are counted. Note the log scale. Our method finds more unique good molecules faster.
|
| 218 |
+
|
| 219 |
+
In Fig. 4, we show the average reward of the top- $k$ molecules found so far, without allowing for duplicates (based on SMILES). We compare GFlowNet with MARS, PPO, and JT-VAE (Jin et al., 2020) with Bayesian Optimization. As expected, PPO plateaus after a while; RL tends to be satisfied with good enough trajectories unless it is strongly regularized with exploration mechanisms. For GFlowNet and for MARS, the more molecules are visited, the better they become, with a slow convergence towards the proxy’s max reward. Given the same compute time, $\scriptstyle \mathbf { J } \mathbf { T } - \mathbf { V } \mathbf { A } \mathbf { E } + \mathbf { B } \mathbf { O }$ generates only about $1 0 ^ { 3 }$ molecules (due to its expensive Gaussian Process) and so does not perform well.
|
| 220 |
+
|
| 221 |
+
The maximum reward in the proxy’s dataset is 10, with only 233 examples above 8. In our best run, we find 2339 unique molecules during training with a score above 8, only 39 of which are in the dataset. We compute the average pairwise Tanimoto similarity for the top 1000 samples: GFlowNet has a mean of $0 . 4 4 \pm 0 . 0 1$ , PPO, $0 . 6 2 \pm 0 . 0 3$ , and MARS, $0 . 5 9 \pm 0 . 0 2$ (mean and std over 3 runs). As expected, our MCMC baseline (MARS) and RL baseline (PPO) find less diverse candidates. We also find that GFlowNet discovers many more modes $( > 1 5 0 0$ with $R > 8$ vs $< 1 0 0$ for MARS). This is shown in Fig. 5 where we consider a mode to be a Bemis-Murcko scaffold (Bemis and Murcko, 1996), counted for molecules above a certain reward threshold. We provide additional insights into how GFlowNet matches the rewards in Appendix A.7.
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Figure 5: Number of diverse Bemis-Murcko scaffolds found above reward threshold $T$ as a function of the number of molecules seen. Left, $T = 7 . 5$ . Right, $T = 8$ .
|
| 225 |
+
|
| 226 |
+
# 4.3 Multi-Round Experiments
|
| 227 |
+
|
| 228 |
+
To demonstrate the importance of diverse candidate generation in an active learning setting, we consider a sequential acquisition task. We simulate the setting where there is a limited budget for calls to the true oracle $O$ . We use a proxy $M$ initialized by training on a limited dataset of $( x , R ( x ) )$
|
| 229 |
+
|
| 230 |
+
pairs $D _ { 0 }$ , where $R ( x )$ is the true reward from the oracle. The generative model $\left( \pi _ { \boldsymbol { \theta } } \right)$ is trained to fit to the unnormalized probability function learned by the proxy $M$ . We then sample a batch $B = \{ x _ { 1 } , x _ { 2 } , . . . x _ { k } \}$ where $x _ { i } \sim \pi _ { \theta }$ , which is evaluated with the oracle $O$ . The proxy $M$ is updated with this newly acquired and labeled batch, and the process is repeated for $N$ iterations. We discuss the experimental setting in more detail in Appendix A.5.
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
Figure 6: The top- $\mathbf { \nabla } \cdot \mathbf { k }$ return (mean over 3 runs) in the 4-D Hyper-grid task with active learning. GFlowNet gets the highest return faster.
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Figure 7: The top- $\mathbf { \nabla } \cdot \mathbf { k }$ docking reward (mean over 3 runs) in the molecule task with active learning. GFlowNet consistently generates better samples.
|
| 237 |
+
|
| 238 |
+
Hyper-grid domain We present results for the multi-round task in the 4-D hyper-grid domain in Figure 6. We use a Gaussian Process (Williams and Rasmussen, 1995) as the proxy. We compare the Top- $k$ Return for all the methods, which is defined as mean(t $\mathrm { \gamma } \mathrm { p } { - } k ( D _ { i } ) ) { - } \mathrm { m e a n } \big ( \mathrm { t o p } { - } k ( D _ { i - 1 } ) \big )$ , where $D _ { i }$ is the dataset of points acquired until step $i$ , and $k = 1 0$ for this experiment. The initial dataset $D _ { 0 }$ $\left. \left| D _ { 0 } \right| \right. = \left. 5 1 2 \right.$ is the same for all the methods compared. We observe that GFlowNet consistently outperforms the baselines in terms of return over the initial set. We also observe that the mean pairwise L2-distance between the top - $k$ points at the end of the final round is $0 . 8 3 \pm 0 . 0 3$ , $0 . 6 1 \pm 0 . 0 1$ and $0 . 5 1 \pm 0 . 0 2$ for GFlowNet, MCMC and PPO respectively. This demonstrates the ability of GFlowNet to capture the modes, even in the absence of the true oracle, as well as the importance of capturing this diversity in multi-round settings.
|
| 239 |
+
|
| 240 |
+
Small Molecules For the molecule discovery task, we initialize an MPNN proxy to predict docking scores from AutoDock (Trott and Olson, 2010), with $| D _ { 0 } | = 2 0 0 0$ molecules. At the end of each round we generate 200 molecules which are evaluated with AutoDock and used to update the proxy. Figure 7 shows GFlowNet discovers molecules with significantly higher energies than the initial set $D _ { 0 }$ . It also consistently outperforms MARS as well as Random Acquisition. PPO training was unstable and diverged consistently so the numbers are not reported. The mean pairwise Tanimoto similarity in the initial set is 0.60. At the end of the final round, it is $0 . 5 4 \pm 0 . 0 4$ for GFlowNet and $0 . 6 4 \pm 0 . 0 3$ for MARS. This further demonstrates the ability of GFlowNet to generate diverse candidates, which ultimately helps improve the final performance on the task. Similar to the single step setting, we observe that JT-VAE $+ \mathrm { B O }$ is only able to generate $1 0 ^ { 3 }$ molecules with similar compute time, and thus performs poorly.
|
| 241 |
+
|
| 242 |
+
# 5 Discussion & Limitations
|
| 243 |
+
|
| 244 |
+
In this paper we have introduced a novel TD-like objective for learning a flow for each state and (state, action) pair such that policies sampling actions proportional to these flows draw terminal states in proportion to their reward. This can be seen as an alternative approach to turn an energy function into a fast generative model, without the need for an iterative method like that needed with MCMC methods, and with the advantage that when training succeeds, the policy generates a great diversity of samples near the main modes of the target distribution without being slowed by issues of mixing between modes.
|
| 245 |
+
|
| 246 |
+
Limitations. One downside of the proposed method is that, as for TD-based methods, the use of bootstrapping may cause optimization challenges (Kumar et al., 2020; Bengio et al., 2020) and limit its performance. In applications like drug discovery, sampling from the regions surrounding each mode is already an important advantage, but future work should investigate how to combine such a generative approach to local optimization in order to refine the generated samples and approach the local maxima of reward while keeping the batches of candidates diverse.
|
| 247 |
+
|
| 248 |
+
Negative Social Impact. The authors do not foresee negative social impacts of this work specifically.
|
| 249 |
+
|
| 250 |
+
# Acknowledgments and Disclosure of Funding
|
| 251 |
+
|
| 252 |
+
This research was enabled in part by computational resources provided by Calcul Québec (www. calculquebec.ca) and Compute Canada (www.computecanada.ca). All authors are funded by their primary academic institution. We also acknowledge funding from Samsung Electronics Co., Ldt., CIFAR and IBM.
|
| 253 |
+
|
| 254 |
+
The authors are grateful to Andrei Nica for generating the molecule dataset, to Maria Kadukova for advice on molecular docking, to Harsh Satija for feedback on the paper, as well as to all the members of the Mila Molecule Discovery team for the many research discussions on the challenges we faced.
|
| 255 |
+
|
| 256 |
+
# Author Contributions
|
| 257 |
+
|
| 258 |
+
EB and YB contributed to the original idea, and wrote most sections of the paper. YB wrote the proofs of Propositions 1-3, EB the proof of Proposition 4. EB wrote the code and ran experiments for sections 4.1 (hypergrid) and 4.2 (small molecules). MJ wrote the code and ran experiments for section 4.3 (multi-round) and wrote the corresponding results section of the paper. MK wrote the biochemical framework upon which the molecule experiments are built, assisted in debugging and running experiments for section 4.3, implemented mode-counting routines used in 4.2, and wrote the biochemical details of the paper.
|
| 259 |
+
|
| 260 |
+
MK, DP and YB provided supervision for the project. All authors contributed to proofreading and editing the paper.
|
| 261 |
+
|
| 262 |
+
# References
|
| 263 |
+
|
| 264 |
+
Christof Angermueller, David Dohan, David Belanger, Ramya Deshpande, Kevin Murphy, and Lucy Colwell. Model-based reinforcement learning for biological sequence design. In International Conference on Learning Representations, 2020.
|
| 265 |
+
Philip Bachman and Doina Precup. Data generation as sequential decision making. Advances in Neural Information Processing Systems, 28:3249–3257, 2015.
|
| 266 |
+
Guy W Bemis and Mark A Murcko. The properties of known drugs. 1. molecular frameworks. Journal of medicinal chemistry, 39(15):2887–2893, 1996.
|
| 267 |
+
Emmanuel Bengio, Joelle Pineau, and Doina Precup. Interference and generalization in temporal difference learning. In International Conference on Machine Learning, pages 767–777. PMLR, 2020.
|
| 268 |
+
G Richard Bickerton, Gaia V Paolini, Jérémy Besnard, Sorel Muresan, and Andrew L Hopkins. Quantifying the chemical beauty of drugs. Nature chemistry, 4(2):90–98, 2012.
|
| 269 |
+
Nathan Brown, Ben McKay, François Gilardoni, and Johann Gasteiger. A graph-based genetic algorithm and its application to the multiobjective evolution of median molecules. Journal of chemical information and computer sciences, 44(3):1079–1087, 2004.
|
| 270 |
+
Lars Buesing, Nicolas Heess, and Theophane Weber. Approximate inference in discrete distributions with monte carlo tree search and value functions, 2019.
|
| 271 |
+
Nicola De Cao and Thomas Kipf. Molgan: An implicit generative model for small molecular graphs, 2018.
|
| 272 |
+
Yize Chen and Baosen Zhang. Learning to solve network flow problems via neural decoding. arXiv preprint arXiv:2002.04091, 2020.
|
| 273 |
+
Benjamin E Childs, James H Brodeur, and Levente Kocsis. Transpositions and move groups in monte carlo tree search. In 2008 IEEE Symposium On Computational Intelligence and Games, pages 389–395. IEEE, 2008.
|
| 274 |
+
Hanjun Dai, Rishabh Singh, Bo Dai, Charles Sutton, and Dale Schuurmans. Learning discrete energy-based models via auxiliary-variable local exploration. In Neural Information Processing Systems (NeurIPS), 2020.
|
| 275 |
+
|
| 276 |
+
Zihang Dai, Amjad Almahairi, Philip Bachman, Eduard Hovy, and Aaron Courville. Calibrating energy-based generative adversarial networks. arXiv preprint arXiv:1702.01691, 2017.
|
| 277 |
+
|
| 278 |
+
Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry, 2017.
|
| 279 |
+
|
| 280 |
+
Sai Krishna Gottipati, Boris Sattarov, Sufeng Niu, Yashaswi Pathak, Haoran Wei, Shengchao Liu, Karam M. J. Thomas, Simon Blackburn, Connor W. Coley, Jian Tang, Sarath Chandar, and Yoshua Bengio. Learning to navigate the synthetically accessible chemical space using reinforcement learning, 2020.
|
| 281 |
+
|
| 282 |
+
Will Grathwohl, Kevin Swersky, Milad Hashemi, David Duvenaud, and Chris J. Maddison. Oops i took a gradient: Scalable sampling for discrete distributions, 2021.
|
| 283 |
+
|
| 284 |
+
Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. In International Conference on Machine Learning, pages 1352–1361. PMLR, 2017.
|
| 285 |
+
|
| 286 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor, 2018.
|
| 287 |
+
|
| 288 |
+
Jan H Jensen. A graph-based genetic algorithm and generative model/monte carlo tree search for the exploration of chemical space. Chemical science, 10(12):3567–3572, 2019.
|
| 289 |
+
|
| 290 |
+
Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Chapter 11. junction tree variational autoencoder for molecular graph generation. Drug Discovery, page 228–249, 2020. ISSN 2041-3211. doi: 10. 1039/9781788016841-00228. URL http://dx.doi.org/10.1039/9781788016841-00228.
|
| 291 |
+
|
| 292 |
+
Andreas Kirsch, Joost van Amersfoort, and Yarin Gal. Batchbald: Efficient and diverse batch acquisition for deep bayesian active learning, 2019.
|
| 293 |
+
|
| 294 |
+
Ashutosh Kumar, A Voet, and KYJ Zhang. Fragment based drug design: from experimental to computational approaches. Current medicinal chemistry, 19(30):5128–5147, 2012.
|
| 295 |
+
|
| 296 |
+
Aviral Kumar, Rishabh Agarwal, Dibya Ghosh, and Sergey Levine. Implicit under-parameterization inhibits data-efficient deep reinforcement learning, 2020.
|
| 297 |
+
|
| 298 |
+
Greg Landrum. Rdkit: Open-source cheminformatics. URL http://www.rdkit.org.
|
| 299 |
+
|
| 300 |
+
Youzhi Luo, Keqiang Yan, and Shuiwang Ji. Graphdf: A discrete flow model for molecular graph generation, 2021.
|
| 301 |
+
|
| 302 |
+
Charlie Nash and Conor Durkan. Autoregressive energy machines, 2019.
|
| 303 |
+
|
| 304 |
+
Alireza Nazemi and Farahnaz Omidi. A capable neural network model for solving the maximum flow problem. Journal of Computational and Applied Mathematics, 236(14):3498–3513, 2012.
|
| 305 |
+
|
| 306 |
+
Diana M. Negoescu, Peter I. Frazier, and Warren B. Powell. The knowledge-gradient algorithm for sequencing experiments in drug discovery. 23(3):346–363, 2011. ISSN 1526-5528. doi: 10.1287/ijoc.1100.0417. URL https://doi.org/10.1287/ijoc.1100.0417.
|
| 307 |
+
|
| 308 |
+
Andrew Y Ng, Stuart J Russell, et al. Algorithms for inverse reinforcement learning. In Icml, volume 1, page 2, 2000.
|
| 309 |
+
|
| 310 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché- Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/ 9015-pytorch-an-imperative-style-high-performance-deep-learning-library. pdf.
|
| 311 |
+
|
| 312 |
+
Abdurrahman Pekta¸s and Tankut Acarman. Deep learning to detect botnet via network flow summaries. Neural Computing and Applications, 31(11):8021–8033, 2019.
|
| 313 |
+
|
| 314 |
+
Mariya Popova, Mykhailo Shvets, Junier Oliva, and Olexandr Isayev. Molecularrnn: Generating realistic molecular graphs with optimized properties, 2019.
|
| 315 |
+
|
| 316 |
+
RK Rahul, T Anjali, Vijay Krishna Menon, and KP Soman. Deep learning for network flow analysis and malware classification. In International Symposium on Security in Computing and Communication, pages 226–235. Springer, 2017.
|
| 317 |
+
|
| 318 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows, 2016.
|
| 319 |
+
|
| 320 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms, 2017.
|
| 321 |
+
|
| 322 |
+
Ari Seff, Wenda Zhou, Farhan Damani, Abigail Doyle, and Ryan P Adams. Discrete object generation with reversible inductive construction. arXiv preprint arXiv:1907.08268, 2019.
|
| 323 |
+
|
| 324 |
+
Marwin H. S. Segler, Thierry Kogej, Christian Tyrchan, and Mark P. Waller. Generating focussed molecule libraries for drug discovery with recurrent neural networks, 2017.
|
| 325 |
+
|
| 326 |
+
Chence Shi, Minkai Xu, Zhaocheng Zhu, Weinan Zhang, Ming Zhang, and Jian Tang. Graphaf: a flow-based autoregressive model for molecular graph generation, 2020.
|
| 327 |
+
|
| 328 |
+
Yunsheng Shi, Zhengjie Huang, Shikun Feng, Hui Zhong, Wenjin Wang, and Yu Sun. Masked label prediction: Unified message passing model for semi-supervised classification, 2021.
|
| 329 |
+
|
| 330 |
+
Niranjan Srinivas, Andreas Krause, S. Kakade, and M. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In ICML, 2010.
|
| 331 |
+
|
| 332 |
+
Teague Sterling and John J Irwin. Zinc 15–ligand discovery for everyone. Journal of chemical information and modeling, 55(11):2324–2337, 2015.
|
| 333 |
+
|
| 334 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 335 |
+
|
| 336 |
+
Kevin Swersky, Yulia Rubanova, David Dohan, and Kevin Murphy. Amortized bayesian optimization over discrete spaces. In Conference on Uncertainty in Artificial Intelligence, pages 769–778. PMLR, 2020.
|
| 337 |
+
|
| 338 |
+
Oleg Trott and Arthur J Olson. Autodock vina: improving the speed and accuracy of docking with a new scoring function, efficient optimization, and multithreading. Journal of computational chemistry, 31(2):455–461, 2010.
|
| 339 |
+
|
| 340 |
+
C. K. Williams and C. Rasmussen. Gaussian processes for regression. In Neural Information Processing Systems (NeurIPS), 1995.
|
| 341 |
+
|
| 342 |
+
Yutong Xie, Chence Shi, Hao Zhou, Yuwei Yang, Weinan Zhang, Yong Yu, and Lei Li. {MARS}: Markov molecular sampling for multi-objective drug discovery. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=kHSu4ebxFXY.
|
| 343 |
+
|
| 344 |
+
# Checklist
|
| 345 |
+
|
| 346 |
+
1. For all authors...
|
| 347 |
+
|
| 348 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We provide proofs (see Section 2 and Appendix) for our theoretical claims and fair empirical results with our proposed methods and baselines (see Section 4).
|
| 349 |
+
(b) Did you describe the limitations of your work? [Yes] GFlowNet is limited by its use of bootstrapping, which is known to be challenging in Deep RL (see Section 5).
|
| 350 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] Our theoretical work is fairly agnostic to applications, and aims to compete with existing MCMC-based methods (see Sections 1, 4, and 5). Our empirical work situates itself in the context of automated drug-discovery.
|
| 351 |
+
|
| 352 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 353 |
+
|
| 354 |
+
2. If you are including theoretical results...
|
| 355 |
+
|
| 356 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] All complete proofs are available in the Appendix.
|
| 357 |
+
|
| 358 |
+
3. If you ran experiments...
|
| 359 |
+
|
| 360 |
+
(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]
|
| 361 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Hyperparameters and architectural choices are reported in the Appendix, and verifiable in the provided code.
|
| 362 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] We omit error bars for clarity, but we report standard deviations in the Appendix to verify the significance of our results.
|
| 363 |
+
(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 A.3.
|
| 364 |
+
|
| 365 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 366 |
+
|
| 367 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 368 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 369 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 370 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 371 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 372 |
+
|
| 373 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 374 |
+
|
| 375 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 376 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 377 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/B1-q5Pqxl/B1-q5Pqxl.md
ADDED
|
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MACHINE COMPREHENSION USING MATCH-LSTM AND ANSWER POINTER
|
| 2 |
+
|
| 3 |
+
# Jing Jiang
|
| 4 |
+
|
| 5 |
+
Shuohang Wang School of Information Systems Singapore Management University shwang.2014@phdis.smu.edu.sg
|
| 6 |
+
|
| 7 |
+
School of Information Systems Singapore Management University jingjiang@smu.edu.sg
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Machine comprehension of text is an important problem in natural language processing. A recently released dataset, the Stanford Question Answering Dataset (SQuAD), offers a large number of real questions and their answers created by humans through crowdsourcing. SQuAD provides a challenging testbed for evaluating machine comprehension algorithms, partly because compared with previous datasets, in SQuAD the answers do not come from a small set of candidate answers and they have variable lengths. We propose an end-to-end neural architecture for the task. The architecture is based on match-LSTM, a model we proposed previously for textual entailment, and Pointer Net, a sequence-to-sequence model proposed by Vinyals et al. (2015) to constrain the output tokens to be from the input sequences. We propose two ways of using Pointer Net for our tasks. Our experiments show that both of our two models substantially outperform the best results obtained by Rajpurkar et al. (2016) using logistic regression and manually crafted features. Besides, our boundary model also achieves the best performance on the MSMARCO dataset (Nguyen et al., 2016).
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Machine comprehension of text is one of the ultimate goals of natural language processing. While the ability of a machine to understand text can be assessed in many different ways, in recent years, several benchmark datasets have been created to focus on answering questions as a way to evaluate machine comprehension (Richardson et al., 2013; Hermann et al., 2015; Hill et al., 2016; Weston et al., 2016; Rajpurkar et al., 2016; Nguyen et al., 2016). In this setup, typically the machine is first presented with a piece of text such as a news article or a story. The machine is then expected to answer one or multiple questions related to the text.
|
| 16 |
+
|
| 17 |
+
In most of the benchmark datasets, a question can be treated as a multiple choice question, whose correct answer is to be chosen from a set of provided candidate answers (Richardson et al., 2013; Hill et al., 2016). Presumably, questions with more given candidate answers are more challenging. The Stanford Question Answering Dataset (SQuAD) introduced recently by Rajpurkar et al. (2016) contains such more challenging questions whose correct answers can be any sequence of tokens from the given text. Moreover, unlike some other datasets whose questions and answers were created automatically in Cloze style (Hermann et al., 2015; Hill et al., 2016), the questions and answers in SQuAD were created by humans through crowdsourcing, which makes the dataset more realistic. Another real dataset, the Human-Generated MAchine Reading COmprehension dataset (MSMARCO) (Nguyen et al., 2016), provided a query together with several related documents collected from Bing Index. The answer to the query is generated by human and the answer words can not only come from the given text.
|
| 18 |
+
|
| 19 |
+
Given these advantages of the SQuAD and MSMARCO datasets, in this paper, we focus on these new datasets to study machine comprehension of text. A sample piece of text and three of its associated questions from SQuAD are shown in Table 1. Traditional solutions to this kind of question answering tasks rely on NLP pipelines that involve multiple steps of linguistic analyses and feature engineering, including syntactic parsing, named entity recognition, question classification, semantic parsing, etc. Recently, with the advances of applying neural network models in NLP, there has been much interest in building end-to-end neural architectures for various NLP tasks, including several pieces of work on machine comprehension (Hermann et al., 2015; Hill et al., 2016; Yin et al., 2016; Kadlec et al., 2016; Cui et al., 2016). However, given the properties of previous machine comprehension datasets, existing end-to-end neural architectures for the task either rely on the candidate answers (Hill et al., 2016; Yin et al., 2016) or assume that the answer is a single token (Hermann et al., 2015; Kadlec et al., 2016; Cui et al., 2016), which make these methods unsuitable for the SQuAD/MSMARCO dataset. In this paper, we propose a new end-to-end neural architecture to address the machine comprehension problem as defined in the SQuAD/MSMARCO dataset. And for the MSMARCO dataset, we will only make use of the words in the given text to generate the answer.
|
| 20 |
+
|
| 21 |
+
Table 1: A paragraph from Wikipedia and three associated questions together with their answers, taken from the $\mathrm { S Q u A D }$ dataset. The tokens in bold in the paragraph are our predicted answers while the texts next to the questions are the ground truth answers.
|
| 22 |
+
|
| 23 |
+
<table><tr><td colspan="2">In 1870,Tesla moved to Karlovac,to attend school at the Higher Real Gymnasium,where he was profoundly influenced by a math teacher Martin Sekulic. The classes were held in German,as it was a school within the Austro-Hungarian Military Frontier.Tesla was able to perform integral calculus in his head,which prompted his teachers to believe that he was cheating.He finished a four-year term in three</td></tr><tr><td>years,graduating in 1873. 1.In what language were the classes given? 2.Who was Tesla's main influence in Karlovac? 3.Why did Tesla go to Karlovac?</td><td>German Martin Sekulic attend school at the Higher Real Gymnasium</td></tr></table>
|
| 24 |
+
|
| 25 |
+
Specifically, observing that in the SQuAD/MSMARCO dataset many questions could be entailed from some sentences in the original text, we adopt a match-LSTM model that we developed earlier for textual entailment (Wang & Jiang, 2016) as one layer of our model. We build a bi-directional match-LSTM on the given passage with attentions on the question for each word so that each position in the paragraph will have a hidden representation reflecting its relation to the question. Then we further adopt the Pointer Net (Ptr-Net) model developed by Vinyals et al. (2015) to select the words in these positions based on the hidden representations built by match-LSTM as an answer. We propose two ways to apply the Ptr-Net model for our task: a sequence model which selects the answer word by word, and a boundary model which only selects the start and end points of the answer span. Experiments on the SQuAD dataset show that our two models both outperform the best performance reported by Rajpurkar et al. (2016). Moreover, using an ensemble of several of our models, we can achieve very competitive performance on SQuAD. For the MSMARCO dataset, a real query based problem, our boundary model outperforms our sequence model with a big margin. It also outperforms the golden passage baseline.
|
| 26 |
+
|
| 27 |
+
Our contributions can be summarized as follows: (1) We propose two new end-to-end neural network models for machine comprehension, which combine match-LSTM and $\mathrm { P t r }$ -Net to handle the special properties of the SQuAD dataset. To the best of our knowledge, we are the first to propose the boundary model which is more suitable to the SQuAD/MSMARCO tasks. And we are the first to integrate the attention-based word pair matching into machine comprehension tasks. (2) We have achieved the performance of an exact match score of $7 1 . 3 \%$ and an F1 score of $8 0 . 8 \%$ on the unseen SQuAD test dataset, which is much better than the feature-engineered solution (Rajpurkar et al., 2016). Our performance is also close to the state of the art on SQuAD, which is $7 4 . 8 \%$ in terms of exact match and $8 2 . 2 \%$ in terms of F1 collected from the SQuAD Leaderboard 1. Besides, our boundary model achieves the state-of-art performance on the MSMARCO dataset with BLUE$1 / 2 / 3 / 4 4 0 . 7 / 3 3 . 9 / 3 0 . 6 / 2 8 . 7$ and Rouge-L $3 7 . { \bar { 3 } } ^ { 2 }$ . (3) Our further visualization of the models reveals some useful insights of the attention mechanism for reasoning the questions. And we also show that the boundary model can overcome the early stop prediction problem in the sequence model. Besides, we also made our code available online 3.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: An overview of our two models. Both models consist of an LSTM preprocessing layer, a match-LSTM layer and an Answer Pointer layer. For each match-LSTM in a particular direction, $\bar { h } _ { i } ^ { \mathrm { q } }$ , which is defined as $\mathbf { H } ^ { \mathrm { q } } \alpha _ { i } ^ { \mathsf { T } }$ , is computed using the $\alpha$ in the corresponding direction, as described in Eqn. (2)
|
| 31 |
+
|
| 32 |
+
# 2 METHOD
|
| 33 |
+
|
| 34 |
+
In this section, we first briefly review match-LSTM and Pointer Net. These two pieces of existing work lay the foundation of our method. We then present our end-to-end neural architecture for machine comprehension.
|
| 35 |
+
|
| 36 |
+
# 2.1 MATCH-LSTM
|
| 37 |
+
|
| 38 |
+
In a recent work on learning natural language inference, we proposed a match-LSTM model for predicting textual entailment (Wang & Jiang, 2016). In textual entailment, two sentences are given where one is a premise and the other is a hypothesis. To predict whether the premise entails the hypothesis, the match-LSTM model goes through the tokens of the hypothesis sequentially. At each position of the hypothesis, attention mechanism is used to obtain a weighted vector representation of the premise. This weighted premise is then to be combined with a vector representation of the current token of the hypothesis and fed into an LSTM, which we call the match-LSTM. The matchLSTM essentially sequentially aggregates the matching of the attention-weighted premise to each token of the hypothesis and uses the aggregated matching result to make a final prediction.
|
| 39 |
+
|
| 40 |
+
# 2.2 POINTER NET
|
| 41 |
+
|
| 42 |
+
Vinyals et al. (2015) proposed a Pointer Network (Ptr-Net) model to solve a special kind of problems where we want to generate an output sequence whose tokens must come from the input sequence. Instead of picking an output token from a fixed vocabulary, Ptr-Net uses attention mechanism as a pointer to select a position from the input sequence as an output symbol. The pointer mechanism has inspired some recent work on language processing (Gu et al., 2016; Kadlec et al., 2016). Here we adopt Ptr-Net in order to construct answers using tokens from the input text.
|
| 43 |
+
|
| 44 |
+
# 2.3 OUR METHOD
|
| 45 |
+
|
| 46 |
+
Formally, the problem we are trying to solve can be formulated as follows. We are given a piece of text, which we refer to as a passage, and a question related to the passage. The passage is represented by matrix $\mathbf { P } \in \mathbb { R } ^ { d \times P }$ , where $P$ is the length (number of tokens) of the passage and $d$ is the dimensionality of word embeddings. Similarly, the question is represented by matrix $\breve { \mathbf { Q } } \in \mathbb { R } ^ { d \times Q }$ where $Q$ is the length of the question. Our goal is to identify a subsequence from the passage as the answer to the question.
|
| 47 |
+
|
| 48 |
+
As pointed out earlier, since the output tokens are from the input, we would like to adopt the Pointer Net for this problem. A straightforward way of applying Ptr-Net here is to treat an answer as a sequence of tokens from the input passage but ignore the fact that these tokens are consecutive in the original passage, because Ptr-Net does not make the consecutivity assumption. Specifically, we represent the answer as a sequence of integers $\mathbf { a } = ( a _ { 1 } , a _ { 2 } , . . . )$ , where each $a _ { i }$ is an integer between 1 and $P$ , indicating a certain position in the passage.
|
| 49 |
+
|
| 50 |
+
Alternatively, if we want to ensure consecutivity, that is, if we want to ensure that we indeed select a subsequence from the passage as an answer, we can use the Ptr-Net to predict only the start and the end of an answer. In this case, the Ptr-Net only needs to select two tokens from the input passage, and all the tokens between these two tokens in the passage are treated as the answer. Specifically, we can represent the answer to be predicted as two integers $\mathbf { a } = ( a _ { \mathrm { s } } , a _ { \mathrm { e } } )$ , where $a _ { s }$ an $a _ { \mathrm { e } }$ are integers between 1 and $P$ .
|
| 51 |
+
|
| 52 |
+
We refer to the first setting above as a sequence model and the second setting above as a boundary model. For either model, we assume that a set of training examples in the form of triplets $\{ ( \mathbf { P } _ { n } , \mathbf { Q } _ { n } , \mathbf { a } _ { n } ) \} _ { n = 1 } ^ { N }$ are given.
|
| 53 |
+
|
| 54 |
+
An overview of the two neural network models are shown in Figure 1. Both models consist of three layers: (1) An LSTM preprocessing layer that preprocesses the passage and the question using LSTMs. (2) A match-LSTM layer that tries to match the passage against the question. (3) An Answer Pointer (Ans-Ptr) layer that uses Ptr-Net to select a set of tokens from the passage as the answer. The difference between the two models only lies in the third layer.
|
| 55 |
+
|
| 56 |
+
# LSTM Preprocessing Layer
|
| 57 |
+
|
| 58 |
+
The purpose for the LSTM preprocessing layer is to incorporate contextual information into the representation of each token in the passage and the question. We use a standard one-directional LSTM (Hochreiter & Schmidhuber, 1997) to process the passage 4 and the question separately, as shown below:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
{ \bf H } ^ { \mathrm { p } } = \overrightarrow { L S T M } ( { \bf P } ) , ~ { \bf H } ^ { \mathrm { q } } = \overrightarrow { L S T M } ( { \bf Q } ) .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
The resulting matrices $\mathbf { H } ^ { \mathrm { p } } \in \mathbb { R } ^ { l \times P }$ and $\mathbf { H } ^ { \mathrm { q } } \in \mathbb { R } ^ { l \times Q }$ are hidden representations of the passage and the question, where $l$ is the dimensionality of the hidden vectors. In other words, the $i ^ { \mathrm { { t h } } }$ column vector $\mathbf { h } _ { i } ^ { \mathrm { p } }$ (or $\mathbf { h } _ { i . } ^ { \mathrm { q } . }$ ) in $\mathbf { H } ^ { \mathrm { p } }$ (or $\mathbf { H } ^ { \mathrm { q } }$ ) represents the $i ^ { \mathrm { { t h } } }$ token in the passage (or the question) together with some contextual information from the left.
|
| 65 |
+
|
| 66 |
+
# Match-LSTM Layer
|
| 67 |
+
|
| 68 |
+
We apply the match-LSTM model (Wang & Jiang, 2016) proposed for textual entailment to our machine comprehension problem by treating the question as a premise and the passage as a hypothesis. The match-LSTM sequentially goes through the passage. At position $i$ of the passage, it first uses the standard word-by-word attention mechanism to obtain attention weight vector $\vec { \alpha } _ { i } \in \mathbb { R } ^ { 1 \times Q }$ as follows:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\begin{array} { r c l } { \overrightarrow { \mathbf { G } } _ { i } } & { = } & { \mathrm { t a n h } ( \mathbf { W } ^ { \ P } \mathbf { H } ^ { \ P } + ( \mathbf { W } ^ { \ P } \mathbf { h } _ { i } ^ { \ P } + \mathbf { W } ^ { \Gamma } \overrightarrow { \mathbf { h } } _ { i - 1 } ^ { \top } + \mathbf { b } ^ { \ P } ) \otimes \mathbf { e } _ { Q } ) , } \\ { \overrightarrow { \alpha } _ { i } } & { = } & { \mathrm { s o f t m a x } ( \mathbf { w } ^ { \top } \overrightarrow { \mathbf { G } } _ { i } + b \otimes \mathbf { e } _ { Q } ) , } \end{array}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\mathbf { W } ^ { \mathrm { q } } , \mathbf { W } ^ { \mathrm { p } } , \mathbf { W } ^ { \mathrm { r } } \in \mathbb { R } _ { \cdot } ^ { l \times l }$ , $\mathbf { b } ^ { \mathrm { p } }$ , $\mathbf { w } \in \mathbb { R } ^ { l \times 1 }$ and $b \in \mathbb { R }$ are parameters to be learned, $\vec { \bf G } _ { i } \in \mathbb { R } ^ { l \times Q }$ is the intermediate result, $\vec { \bf h } _ { i - 1 } ^ { \mathrm { r } } \in \mathbb { R } ^ { l \times 1 }$ is the hidden vector of the one-directional match-LSTM (to be explained below) at position $i - 1$ , and the outer product $\left( \cdot \otimes \mathbf { e } _ { Q } \right)$ produces a matrix or row vector by repeating the vector or scalar on the left for $Q$ times.
|
| 75 |
+
|
| 76 |
+
Essentially, the resulting attention weight $\overrightarrow { \alpha } _ { i , j }$ above indicates the degree of matching between the $i ^ { \mathrm { { t h } } }$ token in the passage with the $j ^ { \mathrm { t h } }$ token in the question. Next, we use the attention weight vector $\vec { \alpha _ { i } }$ to obtain a weighted version of the question and combine it with the current token of the passage to form a vector $\overline { { \mathbf { z } } } _ { i }$ :
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r } { \vec { \bf z } _ { i } = \left[ \frac { { \bf h } _ { i } ^ { \mathrm { p } } } { { \bf H } ^ { \mathrm { q } } \vec { \alpha } _ { i } ^ { \top } } \right] , } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\mathbf { H } ^ { \mathrm { q } } \ \in \ \mathbb { R } ^ { l \times Q } , \ \vec { \alpha } _ { i } \ \in \ \mathbb { R } ^ { 1 \times Q }$ and $\mathbf { h } _ { i } ^ { \mathsf { p } } \in \mathbb { R } ^ { l \times 1 }$ . This vector $\vec { \textbf { z } } _ { i }$ is fed into a standard onedirectional LSTM to form our so-called match-LSTM:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l r } { \overrightarrow { \mathbf { h } } _ { i } ^ { \mathrm { r } } } & { = } & { \overrightarrow { L S T M } ( \overrightarrow { \mathbf { z } } _ { i } , \overrightarrow { \mathbf { h } } _ { i - 1 } ^ { \mathrm { r } } ) , } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $\vec { \bf h } _ { i } ^ { \mathrm { r } } \in \mathbb { R } ^ { l \times 1 }$
|
| 89 |
+
|
| 90 |
+
We further build a similar match-LSTM in the reverse direction. The purpose is to obtain a representation that encodes the contexts from both directions for each token in the passage.
|
| 91 |
+
|
| 92 |
+
Let $\vec { \bf H ^ { r } } \in \mathbb { R } ^ { l \times P }$ represent the hidden states $[ \vec { \bf h } _ { 1 } ^ { \mathrm { r } } , \vec { \bf h } _ { 2 } ^ { \mathrm { r } } , \ldots , \vec { \bf h } _ { P } ^ { \mathrm { r } } ]$ and $\smash { \mathbf { \overleftarrow { H } ^ { r } } } \in \mathbb { R } ^ { l \times P }$ represent $[ \overleftarrow { \mathbf { h } } _ { 1 } ^ { \mathrm { r } } , \overleftarrow { \mathbf { h } } _ { 2 } ^ { \mathrm { r } } , \ldots , \overleftarrow { \mathbf { h } } _ { P } ^ { \mathrm { r } } ]$ , the hidden states of match-LSTM in the reverse direction. We define ${ \bf H } ^ { \mathrm { r } } \in { \bf \Phi }$ $\mathbb { R } ^ { 2 l \times P }$ as the concatenation of the two:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\begin{array} { r l r } { \bf { H } ^ { \mathrm { r } } } & { = } & { \left[ \begin{array} { l } { \vec { \bf { H } } ^ { \mathrm { r } } } \\ { \vec { \bf { H } } ^ { \mathrm { r } } } \end{array} \right] . } \end{array}
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
# Answer Pointer Layer
|
| 99 |
+
|
| 100 |
+
The top layer, the Answer Pointer (Ans-Ptr) layer, is motivated by the Pointer Net introduced by Vinyals et al. (2015). This layer uses the sequence $\mathbf { H } ^ { \mathrm { r } }$ as input. Recall that we have two different models: The sequence model produces a sequence of answer tokens but these tokens may not be consecutive in the original passage. The boundary model produces only the start token and the end token of the answer, and then all the tokens between these two in the original passage are considered to be the answer. We now explain the two models separately.
|
| 101 |
+
|
| 102 |
+
The Sequence Model: Recall that in the sequence model, the answer is represented by a sequence of integers $\mathbf { a } = ( a _ { 1 } , a _ { 2 } , \ldots )$ indicating the positions of the selected tokens in the original passage. The Ans-Ptr layer models the generation of these integers in a sequential manner. Because the length of an answer is not fixed, in order to stop generating answer tokens at certain point, we allow each $a _ { k }$ to take up an integer value between 1 and $P + 1$ , where $P + 1$ is a special value indicating the end of the answer. Once $a _ { k }$ is set to be $P + 1$ , the generation of the answer stops.
|
| 103 |
+
|
| 104 |
+
In order to generate the $k ^ { \mathrm { { t h } } }$ answer token indicated by $a _ { k }$ , first, the attention mechanism is used again to obtain an attention weight vector $\beta _ { k } \ \in \ \mathbb { R } ^ { 1 \times \bar { ( } P + 1 ) }$ , where $\beta _ { k , j }$ $( 1 \leq j \leq P + 1 )$ is the probability of selecting the $j ^ { \mathrm { t h } }$ token from the passage as the $k ^ { \mathrm { { t h } } }$ token in the answer, and $\beta _ { k , ( P + 1 ) }$ is the probability of stopping the answer generation at position $k$ . $\beta _ { k }$ is modeled as follows:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\begin{array} { r c l } { \mathbf { F } _ { k } } & { = } & { \operatorname { t a n h } ( \mathbf { V } \widetilde { \mathbf { H } } ^ { \mathrm { r } } + ( \mathbf { W } ^ { \mathrm { a } } \mathbf { h } _ { k - 1 } ^ { \mathrm { a } } + \mathbf { b } ^ { a } ) \otimes \mathbf { e } _ { ( P + 1 ) } ) , } \\ { \beta _ { k } } & { = } & { \operatorname { s o f t m a x } ( \mathbf { v } ^ { \mathsf { T } } \mathbf { F } _ { k } + c \otimes \mathbf { e } _ { ( P + 1 ) } ) , } \end{array}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
where $\widetilde { \mathbf { H } } ^ { \mathrm { r } } \in \mathbb { R } ^ { 2 l \times ( P + 1 ) }$ is the concatenation of $\mathbf { H } ^ { \mathrm { r } }$ with a zero vector, defined as $\widetilde { \bf H } ^ { \mathrm { r } } = [ { \bf H } ^ { \mathrm { r } } ; { \bf 0 } ]$ , $\mathbf { V } \in \mathbb { R } ^ { l \times 2 l } , \mathbf { W } ^ { \mathrm { a } } \in \mathbb { R } ^ { l \times l } , \mathbf { b } ^ { a } , \mathbf { v } \in \mathbb { R } ^ { l \times 1 }$ and $c \in \mathbb { R }$ are parameters to be learned, $\mathbf { F } _ { k } \in \mathbb { R } ^ { l \times ( P + 1 ) }$ is the intermediate result, $\left( \cdot \otimes { \mathbf e } _ { \left( P + 1 \right) } \right)$ follows the same definition as before, and $\mathbf { h } _ { k - 1 } ^ { \mathrm { a } } \in \mathbb { R } ^ { l \times 1 }$ is the hidden vector at position $k - 1$ of an answer LSTM as defined below:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\mathbf { h } _ { k } ^ { \mathrm { a } } = \overrightarrow { L S T M } ( \widetilde { \mathbf { H } } ^ { \mathrm { r } } \beta _ { k } ^ { \intercal } , \mathbf { h } _ { k - 1 } ^ { \mathrm { a } } ) .
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
We can then model the probability of generating the answer sequence as
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\begin{array} { l l l } { p ( { \bf a } | { \bf H ^ { r } } ) } & { = } & { \displaystyle \prod _ { k } p ( a _ { k } | a _ { 1 } , a _ { 2 } , \ldots , a _ { k - 1 } , { \bf H ^ { r } } ) , } \end{array}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
and
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\begin{array} { r c l } { p ( a _ { k } = j | a _ { 1 } , a _ { 2 } , \ldots , a _ { k - 1 } , \mathbf { H } ^ { \mathrm { r } } ) } & { = } & { \beta _ { k , j } . } \end{array}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
To train the model, we minimize the following loss function based on the training examples:
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
- \sum _ { n = 1 } ^ { N } \log p ( \mathbf { a } _ { n } | \mathbf { P } _ { n } , \mathbf { Q } _ { n } ) .
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
The Boundary Model: The boundary model works in a way very similar to the sequence model above, except that instead of predicting a sequence of indices $a _ { 1 } , a _ { 2 } , \dotsc$ , we only need to predict two indices $a _ { s }$ and $a _ { \mathrm { e } }$ . So the main difference from the sequence model above is that in the boundary model we do not need to add the zero padding to $\mathbf { H } ^ { \mathrm { r } }$ , and the probability of generating an answer is simply modeled as
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\begin{array} { r l r } { p ( { \bf a } | { \bf H ^ { r } } ) } & { = } & { p ( a _ { \mathrm { s } } | { \bf H ^ { r } } ) p ( a _ { \mathrm { e } } | a _ { \mathrm { s } } , { \bf H ^ { r } } ) . } \end{array}
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
As this boundary model could point to a span covering too many tokens without any restriction, we try to manually limit the length of the predicted span and then search the span with the highest probability computed by $p ( \mathbf { a } _ { s } ) \times p ( \mathbf { a } _ { e } | \mathbf { a } _ { s } )$ as the answer.
|
| 141 |
+
|
| 142 |
+
# 3 EXPERIMENTS
|
| 143 |
+
|
| 144 |
+
In this section, we present our experiment results and perform some analyses to better understand how our models works.
|
| 145 |
+
|
| 146 |
+
# 3.1 DATA
|
| 147 |
+
|
| 148 |
+
We use the Stanford Question Answering Dataset (SQuAD) v1.1 and the human-generated Microsoft MAchine Reading COmprehension (MSMARCO) dataset v1.1 to conduct our experiments.
|
| 149 |
+
|
| 150 |
+
Passages in SQuAD come from 536 articles in Wikipedia covering a wide range of topics. Each passage is a single paragraph from a Wikipedia article, and each passage has around 5 questions associated with it. In total, there are 23,215 passages and 107,785 questions. The data has been split into a training set (with 87,599 question-answer pairs), a development set (with 10,570 questionanswer pairs) and a hidden test set.
|
| 151 |
+
|
| 152 |
+
For the MSMARCO dataset, the questions are user queries issued to the Bing search engine, the context passages are real Web documents and the answers are human-generated. We select the span that has the highest F1 score with the gold standard answer for training and only predict the span in the passages during evaluation. The data has been split into a training set (82326 pairs), a development set (10047 pairs) and a test set (9650 pairs).
|
| 153 |
+
|
| 154 |
+
# 3.2 EXPERIMENT SETTINGS
|
| 155 |
+
|
| 156 |
+
We first tokenize all the passages, questions and answers. We use word embeddings from GloVe (Pennington et al., 2014) to initialize the model. Words not found in GloVe are initialized as zero vectors. The word embeddings are not updated during the training of the model.
|
| 157 |
+
|
| 158 |
+
The dimensionality $l$ of the hidden layers is set to be 150. We use ADAMAX (Kingma & Ba, 2015) with the coefficients $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9 9$ to optimize the model. Each update is computed through a minibatch of 30 instances. We do not use L2-regularization.
|
| 159 |
+
|
| 160 |
+
For the SQuAD dataset, the performance is measured by two metrics: percentage of exact match with the ground truth answers and word-level F1 score when comparing the tokens in the predicted answers with the tokens in the ground truth answers. Note that in the development set and the test set each question has around three ground truth answers. F1 scores with the best matching answers are used to compute the average F1 score. For the MSMARCO dataset, the metrics in the official tool of MSMARCO evaluation are BLEU-1/2/3/4 and Rouge-L, which are widely used in many domains.
|
| 161 |
+
|
| 162 |
+
# 3.3 RESULTS
|
| 163 |
+
|
| 164 |
+
The SQuAD and MSMARCO results of our models as well as the results of the baselines (Rajpurkar et al., 2016; Yu et al., 2016) are shown in Table 2. For the “LSTM with Ans-Ptr” models, they are the experiments with the ablation of attention mechanism in match-LSTM. Specifically, we use the final representation of the question to replace the weighted sum of the question representations. For the MSMARCO dataset, as the context for each question is consisted of around 10 documents, the “Golden Passage” is to directly use the human labeled document which could answer the question as the prediction.
|
| 165 |
+
|
| 166 |
+
Table 2: Experiment Results on SQuAD and MSMARCO datasets. Here “LSTM with Ans-Ptr” removes the attention mechanism in match-LSTM (mLSTM) by using the final state of the LSTM for the question to replace the weighted sum of all the states. Our best boundary model is the further tuned model and its ablation study is shown in Table 4. “en” refers to ensemble method.
|
| 167 |
+
|
| 168 |
+
<table><tr><td></td><td colspan="4">SQuAD</td><td>MSMARCO</td></tr><tr><td></td><td colspan="2">Exact Match</td><td colspan="2">F1</td><td>BLEU1/2/3/4 /Rouge-L</td></tr><tr><td></td><td>Dev</td><td>Test</td><td>Dev</td><td>Test</td><td>Dev&Test</td></tr><tr><td>Human</td><td>80.3</td><td>77.0</td><td>90.5</td><td>86.8</td><td>-& 46/-l-l- /47</td></tr><tr><td>Golden Passage</td><td>-</td><td>-</td><td>-</td><td>1</td><td>19.6/18.8/18.1/17.5/32.3&-</td></tr><tr><td>LR (Rajpurkar et al., 2016)</td><td>40.0</td><td>40.4</td><td>51.0</td><td>51.0</td><td></td></tr><tr><td>DCR (Yu et al., 2016)</td><td>62.5</td><td>62.5</td><td>71.2</td><td>71.0</td><td></td></tr><tr><td>LSTM with Ans-Ptr (Sequence)</td><td>37.7</td><td>-</td><td>48.5</td><td>-</td><td>10.3/7.2 /5.6 /4.6 /21.6&-</td></tr><tr><td>LSTM with Ans-Ptr (Boundary)</td><td>45.2</td><td></td><td>55.3</td><td></td><td>32.0 /25.3/22.2/20.4/32.3&-</td></tr><tr><td>mLSTM with Ans-Ptr (Sequence)</td><td>54.4</td><td>=</td><td>68.2</td><td>1</td><td>12.5 /9.2 /7.5 /6.5 /22.5 & -</td></tr><tr><td>mLSTM with Ans-Ptr (Boundary)</td><td>63.0</td><td></td><td>72.7</td><td>=</td><td>32.9 /26.4/23.2/21.6/33.8&-</td></tr><tr><td>Our best boundary model</td><td>67.0</td><td>66.9</td><td>77.2</td><td>77.1</td><td>40.1/33.3/30.1/28.2/37.2 & 40.7 / 33.9 / 30.6 /28.7 / 37.3</td></tr><tr><td>mLSTM with Ans-Ptr (Boundary+en)</td><td>67.6</td><td>67.9</td><td></td><td></td><td></td></tr><tr><td>Our best boundary model (en)</td><td>71.3</td><td>72.6</td><td>76.8 80.0</td><td>77.0 80.8</td><td></td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 3: Statistical analysis on the development datasets. #w: number of words on average; P: passage; Q: question; A: answer; raw: raw data from the development dataset; seq/bou: the answers generated by the sequence/boundary models with match-LSTM.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>SQuAD #w in A/Q/P</td><td></td><td>MSMARCO #w in A/Q/P</td></tr><tr><td>raw</td><td>3.1/11/141</td><td>16.3/6/667</td></tr><tr><td>seq</td><td>2.4/-/-</td><td>6.7 /-/-</td></tr><tr><td>bou</td><td>3.0/-/-</td><td>15.7/ -/ -</td></tr></table>
|
| 173 |
+
|
| 174 |
+
Table 4: Ablation study for our best boundary model on the development datasets. Our best model is a further tuned boundary model by considering “bi-Ans-Ptr” which adds bidirectional answer pointer, “deep” which adds another twolayer bi-directional LSTMs between the match-LSTM and the Answer Pointer layers, and “elem” which adds elementwise comparison , $( \mathbf { h } _ { i } ^ { \mathrm { p } } - \mathbf { H } ^ { \mathrm { q } } \alpha _ { i } ^ { \mathsf { T } } )$ and $( \mathbf { h } _ { i } ^ { \mathrm { p } } \odot \mathbf { H } ^ { \mathrm { q } } \alpha _ { i } ^ { \mathsf { T } } )$ , into Eqn 3. “-pre-LSTM” refers to removing the pre-processing layer.
|
| 175 |
+
|
| 176 |
+
<table><tr><td></td><td>SQuAD EM&F1</td><td>MSMARCO BLEU1/2/3/4&Rouge-L</td></tr><tr><td>Best model</td><td>67.0 & 77.2</td><td>40.1/33.3/30.1/28.2 & 37.2</td></tr><tr><td>-bi-Ans-Ptr</td><td>66.5 & 76.8</td><td>39.9/32.8/29.6/27.9 & 36.7</td></tr><tr><td>-deep</td><td>65.9 & 75.8</td><td>39.6/32.6/29.4/27.4& 35.9</td></tr><tr><td>-elem</td><td>65.2 & 75.4</td><td>38.1/31.4/28.3/26.5 & 35.5</td></tr><tr><td>-pre-LSTM</td><td>64.0 & 72.9</td><td>39.6/32.8/29.8/27.7& 36.3</td></tr></table>
|
| 177 |
+
|
| 178 |
+
From the results in Table 2, we can see that the boundary model could clearly outperform the sequence model in a big margin on both datasets. We hypothesis that the sequence model is more likely to stop word generation earlier, and the boundary model can somehow overcome this problem. We have a statistical analysis on the answers generated by our sequence and boundary models shown in Table 3. We can see that the length of the answers generated by the sequence model is much shorter than the ground truth. Especially for the MSMARCO task where the answers are usually much longer, the sequence model could only generate 7 words on average, while the ground truth answers are 16 on average and the boundary model could generate nearly the same number of words with the ground truth. Several answers generated by our models are shown in Appendix A. From Table 2, we can also see that the performance gets poorer by removing the attention mechanism in match-LSTM, while for the MSMARCO dataset, the attention mechanism effects less, with no more than 2 percent reduction in BLEU and Rouge-L scores by attention mechanism ablation.
|
| 179 |
+
|
| 180 |
+
Based on the effectiveness of boundary pointer and match-LSTM, we conduct further exploration of the boundary model by adding element-wise comparison $( \mathbf { h } _ { i } ^ { \mathrm { p } } { - } \mathbf { H } ^ { \mathrm { q } } \alpha _ { i } ^ { \mathsf { T } } )$ and $( \mathbf { h } _ { i } ^ { \mathrm { p } } \odot \mathbf { H } ^ { \mathrm { q } } \alpha _ { i } ^ { \mathsf { T } } )$ into Eqn 3 in match-LSTM layer, adding 2 more bi-directional LSTM layers between match-LSTM and Ans-Ptr layers, and adding bi-directional Ans-Ptr. We show the ablation study of this further tuned model in Table 4. We can see that adding element-wise matching could make the biggest improvement for our boundary model. We also try to remove the phrase-level representation by removing the pre-process LSTM and using the word-level representations as the inputs of match-LSTM. Interestingly, we find the phrase-level representation effects little on the MSMARCO task.
|
| 181 |
+
|
| 182 |
+
Overall, we can see that both of our match-LSTM models have clearly outperformed the logistic regression model by Rajpurkar et al. (2016), which relies on carefully designed features. The improvement of our models over the logistic regression model shows that our end-to-end neural network models without much feature engineering are very effective on these tasks and datasets. Our boundary model also outperformed the DCR model (Yu et al., 2016), which maximizes the probability of the gold standard span from all the candidate spans through a neural network structure.
|
| 183 |
+
|
| 184 |
+
# 3.4 FURTHER ANALYSES
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 2: Performance breakdown by answer lengths and question types on SQuAD development dataset. Top: Plot (1) shows the performance of our two models (where $s$ refers to the sequence model , $^ b$ refers to the boundary model, and $e$ refers to the ensemble boundary model) over answers with different lengths. Plot (2) shows the numbers of answers with different lengths. Bottom: Plot (3) shows the performance our the two models on different types of questions. Plot (4) shows the numbers of different types of questions.
|
| 188 |
+
|
| 189 |
+
To better understand the strengths and weaknesses of our models, we perform some further analyses of the results below.
|
| 190 |
+
|
| 191 |
+
First, we suspect that longer answers are harder to predict. To verify this hypothesis, we analysed the performance in terms of both exact match and F1 score with respect to the answer length on the development set, as shown in Figure 2. For example, for questions whose answers contain more than 9 tokens, the F1 score of the boundary model drops to around $55 \%$ and the exact match score drops to only around $30 \%$ , compared to the F1 score and exact match score of close to $72 \%$ and $67 \%$ , respectively, for questions with single-token answers. And that supports our hypothesis.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Answer: European Parliament and the Council of the European Union
|
| 197 |
+
Figure 3: Visualization of the attention weights $\alpha$ for four questions. The first three questions share the same paragraph. The title is the answer predicted by our model.
|
| 198 |
+
|
| 199 |
+
Next, we analyze the performance of our models on different groups of questions, as shown in Figure 2. We use a crude way to split the questions into different groups based on a set of question words we have defined, including “what,” “how,” “who,” “when,” “which,” “where,” and “why.” These different question words roughly refer to questions with different types of answers. For example, “when” questions look for temporal expressions as answers, whereas “where” questions look for locations as answers. According to the performance on the development dataset, our models work the best for “when” questions. This may be because in this dataset temporal expressions are relatively easier to recognize. Other groups of questions whose answers are noun phrases, such as “what” questions, “which” questions and “where” questions, also get relatively better results. On the other hand, “why” questions are the hardest to answer. This is not surprising because the answers to “why” questions can be very diverse, and they are not restricted to any certain type of phrases.
|
| 200 |
+
|
| 201 |
+
Finally, we would like to check whether the attention mechanism used in the match-LSTM layer is effective in helping the model locate the answer. We show the attention weights $\alpha$ in Figure 3. In the figure the darker the color is the higher the weight is. We can see that some words have been well aligned based on the attention weights. For example, the word “German” in the passage is aligned well to the word “language” in the first question, and the model successfully predicts “German” as the answer to the question. For the question word “who” in the second question, the word “teacher” actually receives relatively higher attention weight, and the model has predicted the phrase “Martin Sekulic” after that as the answer, which is correct. For the third question that starts with “why”, the attention weights are more evenly distributed and it is not clear which words have been aligned to “why”. For the last question, we can see that the word knowledge needed for generating the answer can also be detected by match-LSTM. For example, the words “European”, “Parliament”, “Council”, “European” and “Union” have higher attention weights on “governing” in the question. Even though our models can solve this type of questions, they are still not able to solve the questions that need multi-sentences reasoning. More answers generated by our models for the questions related to different kinds of reasoning are shown in Appendix B.
|
| 202 |
+
|
| 203 |
+
# 4 RELATED WORK
|
| 204 |
+
|
| 205 |
+
Machine comprehension of text has gained much attention in recent years, and increasingly researchers are building data-drive, end-to-end neural network models for the task. We will first review the recently released datasets and then some end-to-end models on this task.
|
| 206 |
+
|
| 207 |
+
# 4.1 DATASETS
|
| 208 |
+
|
| 209 |
+
A number of datasets for studying machine comprehension were created in Cloze style by removing a single token from a sentence in the original corpus, and the task is to predict the missing word. For example, Hermann et al. (2015) created questions in Cloze style from CNN and Daily Mail highlights. Hill et al. (2016) created the Children’s Book Test dataset, which is based on children’s stories. Cui et al. (2016) released two similar datasets in Chinese, the People Daily dataset and the Children’s Fairy Tale dataset.
|
| 210 |
+
|
| 211 |
+
Instead of creating questions in Cloze style, a number of other datasets rely on human annotators to create real questions. Richardson et al. (2013) created the well-known MCTest dataset and Tapaswi et al. (2016) created the MovieQA dataset. In these datasets, candidate answers are provided for each question. Similar to these two datasets, the SQuAD dataset (Rajpurkar et al., 2016) was also created by human annotators. Different from the previous two, however, the SQuAD dataset does not provide candidate answers, and thus all possible subsequences from the given passage have to be considered as candidate answers.
|
| 212 |
+
|
| 213 |
+
Besides the datasets above, there are also a few other datasets created for machine comprehension, such as WikiReading dataset (Hewlett et al., 2016) and bAbI dataset (Weston et al., 2016), but they are quite different from the datasets above in nature.
|
| 214 |
+
|
| 215 |
+
# 4.2 END-TO-END NEURAL NETWORK MODELS FOR MACHINE COMPREHENSION
|
| 216 |
+
|
| 217 |
+
There have been a number of studies proposing end-to-end neural network models for machine comprehension. A common approach is to use recurrent neural networks (RNNs) to process the given text and the question in order to predict or generate the answers (Hermann et al., 2015). Attention mechanism is also widely used on top of RNNs in order to match the question with the given passage (Hermann et al., 2015; Chen et al., 2016). Given that answers often come from the given passage, Pointer Network has been adopted in a few studies in order to copy tokens from the given passage as answers (Kadlec et al., 2016; Trischler et al., 2016). Compared with existing work, we use match-LSTM to match a question and a given passage, and we use Pointer Network in a different way such that we can generate answers that contain multiple tokens from the given passage.
|
| 218 |
+
|
| 219 |
+
Memory Networks (Weston et al., 2015) have also been applied to machine comprehension (Sukhbaatar et al., 2015; Kumar et al., 2016; Hill et al., 2016), but its scalability when applied to a large dataset is still an issue. In this work, we did not consider memory networks for the SQuAD/MSMARCO datasets.
|
| 220 |
+
|
| 221 |
+
The setting of visual question answering (Antol et al., 2015) is quite similar to machine comprehension, while their answers are usually very short. So the sequence order of the word-level attention representation used to align the figure and the question(Xu & Saenko, 2016; Fukui et al., 2016; Lu et al., 2016), are not used in VQA. While our model focus on the word-by-word attention and use
|
| 222 |
+
|
| 223 |
+
LSTM to concatenate the aligned pairs and that would be helpful to generate a longer sequence as answer.
|
| 224 |
+
|
| 225 |
+
# 5 CONCLUSIONS
|
| 226 |
+
|
| 227 |
+
In this paper, We developed two models for the machine comprehension problem defined in the Stanford Question Answering (SQuAD) and A Human-Generated MAchine Reading COmprehension (MSMARCO) datasets, both making use of match-LSTM and Pointer Network. Experiments on the SQuAD and MSMARCO datasets showed that our second model, the boundary model, could achieve a performance close to the state-of-the-art performance on the SQuAD dataset and achieved the state-of-the-art on the MSMARCO dataset. We also show the boundary model could overcome the early stop prediction problem of the sequence model.
|
| 228 |
+
|
| 229 |
+
In the future, we plan to look further into the different types of questions and focus on those questions which currently have low performance, such as the “why’ questions and multi-sentences related questions. We also plan to test how our models could be applied to other machine comprehension datasets.
|
| 230 |
+
|
| 231 |
+
# 6 ACKNOWLEDGMENTS
|
| 232 |
+
|
| 233 |
+
This research is supported by the National Research Foundation, Prime Ministers Office, Singapore under its International Research Centres in Singapore Funding Initiative.
|
| 234 |
+
|
| 235 |
+
We thank Pranav Rajpurkar for testing our model on the hidden test dataset and Percy Liang for helping us with the Dockerfile for Codalab.
|
| 236 |
+
|
| 237 |
+
# REFERENCES
|
| 238 |
+
|
| 239 |
+
Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2425–2433, 2015.
|
| 240 |
+
|
| 241 |
+
Danqi Chen, Jason Bolton, and Christopher D. Manning. A thorough examination of the CNN/Daily Mail reading comprehension task. In Proceedings of the Conference on Association for Computational Linguistics, 2016.
|
| 242 |
+
|
| 243 |
+
Yiming Cui, Ting Liu, Zhipeng Chen, Shijin Wang, and Guoping Hu. Consensus attention-based neural networks for chinese reading comprehension. In arXiv preprint arXiv:1607.02250, 2016.
|
| 244 |
+
|
| 245 |
+
Akira Fukui, Dong Huk Park, Daylen Yang, Anna Rohrbach, Trevor Darrell, and Marcus Rohrbach. Multimodal compact bilinear pooling for visual question answering and visual grounding. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016.
|
| 246 |
+
|
| 247 |
+
Jiatao Gu, Zhengdong Lu, Hang Li, and Victor O.K. Li. Incorporating copying mechanism in sequence-to-sequence learning. In Proceedings of the Conference on Association for Computational Linguistics, 2016.
|
| 248 |
+
|
| 249 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Proceedings of the Conference on Advances in Neural Information Processing Systems, pp. 1693–1701, 2015.
|
| 250 |
+
|
| 251 |
+
Daniel Hewlett, Alexandre Lacoste, Llion Jones, Illia Polosukhin, Andrew Fandrianto, Jay Han, Matthew Kelcey, and David Berthelot. WIKIREADING: A novel large-scale language understanding task over wikipedia. In Proceedings of the Conference on Association for Computational Linguistics, 2016.
|
| 252 |
+
|
| 253 |
+
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The Goldilocks principle: Reading children’s books with explicit memory representations. In Proceedings of the International Conference on Learning Representations, 2016.
|
| 254 |
+
|
| 255 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 256 |
+
|
| 257 |
+
Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. In Proceedings of the Conference on Association for Computational Linguistics, 2016.
|
| 258 |
+
|
| 259 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015.
|
| 260 |
+
|
| 261 |
+
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. In Proceedings of the International Conference on Machine Learning, 2016.
|
| 262 |
+
|
| 263 |
+
Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In Proceedings of the Conference on Advances in Neural Information Processing Systems, 2016.
|
| 264 |
+
|
| 265 |
+
Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. MS MARCO: a human generated machine reading comprehension dataset. arXiv preprint arXiv:1611.09268, 2016.
|
| 266 |
+
|
| 267 |
+
Jeffrey Pennington, Richard Socher, and Christopher D Manning. GloVe: Global vectors for word representation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2014.
|
| 268 |
+
|
| 269 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016.
|
| 270 |
+
|
| 271 |
+
Matthew Richardson, Christopher JC Burges, and Erin Renshaw. MCTest: A challenge dataset for the open-domain machine comprehension of text. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2013.
|
| 272 |
+
|
| 273 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Proceedings of the Conference on Advances in neural information processing systems, 2015.
|
| 274 |
+
|
| 275 |
+
Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. MovieQA: Understanding stories in movies through question-answering. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 276 |
+
|
| 277 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the EpiReader. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, 2016.
|
| 278 |
+
|
| 279 |
+
Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Proceedings of the Conference on Advances in Neural Information Processing Systems, 2015.
|
| 280 |
+
|
| 281 |
+
Shuohang Wang and Jing Jiang. Learning natural language inference with LSTM. In Proceedings of the Conference on the North American Chapter of the Association for Computational Linguistics, 2016.
|
| 282 |
+
|
| 283 |
+
Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings of the International Conference on Learning Representations, 2015.
|
| 284 |
+
|
| 285 |
+
Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M Rush, Bart van Merrienboer, Armand ¨ Joulin, and Tomas Mikolov. Towards AI-complete question answering: A set of prerequisite toy tasks. In Proceedings of the International Conference on Learning Representations, 2016.
|
| 286 |
+
|
| 287 |
+
Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, 2016.
|
| 288 |
+
|
| 289 |
+
Wenpeng Yin, Sebastian Ebert, and Hinrich Schutze. Attention-based convolutional neural network ¨ for machine comprehension. arXiv preprint arXiv:1602.04341, 2016.
|
| 290 |
+
|
| 291 |
+
Yang Yu, Wei Zhang, Kazi Hasan, Mo Yu, Bing Xiang, and Bowen Zhou. End-to-end answer chunk extraction and ranking for reading comprehension. arXiv preprint arXiv:1610.09996, 2016.
|
| 292 |
+
|
| 293 |
+
# A APPENDIX
|
| 294 |
+
|
| 295 |
+
We show the predictions our boundary and sequence models on two cases from two datasets in Table 5. It can be seen that the sequence model is more likely to predict a shorter sequence which is the problem of early stop prediction.
|
| 296 |
+
|
| 297 |
+
<table><tr><td>(1) Context</td><td>Asopposed to broadcasts of primetime series,CBS broadcast special episodes of its late night talk shows as its lead-out programs for Super Bowl 5O, beginning with a special episode of The Late Show with Stephen Colbert following the game.</td></tr><tr><td>Question (Syntactic) Golden Anwser match-LSTM (Sequence)</td><td>What CBS show followed the Super Bowl? The Late Show with Stephen Colbert The Late Show The Late Show with Stephen Colbert</td></tr><tr><td>match-LSTM (Boundary) (2) Context</td><td>Urinalysis is a test that evaluates a sample of your urine.Urinalysis is used to detect and assess a wide range of disorders,such as uri- nary tract infection, kidney disease and diabetes. Urinalysis involves examining the appearance,concentration and content of urine.Abnor- mal urinalysis results may point to a disease or illness.For example,</td></tr><tr><td>Query</td><td>a urinary tract infection can make urine look cloudy instead of clear. Increased levels of protein in urine can be a sign of kidney disease. what can urinalysis detect?</td></tr><tr><td>Golden Anwser</td><td>Detect and assess a wide range of disorders,such as urinary tract infec- tion, kidney disease and diabetes.</td></tr><tr><td>match-LSTM (Sequence) match-LSTM (Boundary)</td><td>Urinalysis Urinalysis is used to detect and assess a wide range of disorders,such as urinary tract infection,kidney disease and diabetes</td></tr></table>
|
| 298 |
+
|
| 299 |
+
Table 5: Prediction samples for sequence and boundary models. The first case is sampled from SQuAD dataset and the second is sampled from MSMARCO dataset.
|
| 300 |
+
|
| 301 |
+
# B APPENDIX
|
| 302 |
+
|
| 303 |
+
We show how four different models work on different type of questions in SQuAD dataset through Table 6. After the analysis of a hundred cases, we see that our models are not able to solve the questions that need multi-sentences reasoning. And the model without attention mechanism has less power to identify the important key word like the third case shown in Table 6.
|
| 304 |
+
|
| 305 |
+
Table 6: Different types of reasoning samples in SQuAD dataset. “match-LSTM” refers to the “match-LSTM with Ans-Ptr” and “LSTM” refers to the “LSTM with Ans-Ptr” which is the ablation of attention mechanism in match-LSTM.
|
| 306 |
+
|
| 307 |
+
<table><tr><td>(1) Context</td><td>The Rankine cycle is sometimes referred to as a practical Carnot cycle be- cause,when an efficient turbine is used, the TS diagram begins to resemble the</td></tr><tr><td>Question (Synonymy) Golden Anwser</td><td>Carnot cycle. What is the Rankine cycle sometimes called? practical Carnot cycle</td></tr><tr><td>LSTM (Sequence) match-LSTM (Sequence)</td><td>Carnot cycle</td></tr><tr><td>LSTM (Boundary) match-LSTM (Boundary)</td><td>Carnot cycle practical Carnot cycle</td></tr><tr><td>(2) Context</td><td>Carnot cycle</td></tr><tr><td></td><td>While the Commission has a monopoly on initiating legislation,the European Parliament and the Council of the European Union have powers of amend-</td></tr><tr><td></td><td>ment and veto during the legislative process.</td></tr><tr><td>Question (Knowledge) Golden Anwser</td><td>Which two governing bodies have legislative veto power? the European Parliament and the Council of the European Union</td></tr><tr><td>LSTM (Sequence)</td><td>European Parliament and the Council of the European Union</td></tr><tr><td>match-LSTM (Sequence) LSTM (Boundary)</td><td>European Parliament and the Council of the European Union</td></tr><tr><td>match-LSTM (Boundary)</td><td>European Parliament and the Council of the European Union</td></tr><tr><td>(3) Context</td><td>European Parliament and the Council of the European Union</td></tr><tr><td></td><td>Current faculty include the anthropologist Marshall Sahlins, historian Dipesh Chakrabarty,... Shakespeare scholar David Bevington, and renowned political</td></tr><tr><td>Question (Syntactic) Golden Anwser</td><td>scientists John Mearsheimer and Robert Pape. What Shakespeare scholar is currently on the university's faculty?</td></tr><tr><td>LSTM (Sequence)</td><td>David Bevington Marshall Sahlins</td></tr><tr><td>match-LSTM (Sequence) LSTM(Boundary)</td><td>David Bevington Marshall Sahlins</td></tr><tr><td>match-LSTM (Boundary) (4) Context</td><td>David Bevington</td></tr><tr><td></td><td>The V&A Theatre & Performance galleries,formerly the Theatre Museum, opened in March 2Oo9.The collections are stored by the V&A,and are available for research,exhibitions and other shows.They hold the UK's biggest national</td></tr><tr><td></td><td>collection of material about live performance in the UK since Shakespeare's day,covering drama, dance,musical theatre, circus,music hall,rock and pop, and most other forms of live entertainment.</td></tr><tr><td>Question (Reasoning) Golden Anwser</td><td>What collection does the V&A Theatre & Performance galleries hold? material about live performance</td></tr><tr><td>LSTM (Sequence) match-LSTM (Sequence) LSTM (Boundary)</td><td>Theatre the Theatre Museum</td></tr><tr><td>match-LSTM (Boundary)</td><td>research,exhibitions and other shows</td></tr><tr><td></td><td>Theatre Museum</td></tr><tr><td></td><td></td></tr><tr><td>(5) Context</td><td>Along with giving the offender his "just deserts",achieving crime control via</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td>Question (Ambiguous)</td><td>incapacitation and deterrence is a major goal of criminal punishment.</td></tr><tr><td></td><td></td></tr><tr><td>Golden Anwser</td><td>What is the main goal of criminal punishment of civil disobedients ?</td></tr><tr><td></td><td></td></tr><tr><td></td><td>achieving crime control via incapacitation and deterrence</td></tr><tr><td>LSTM (Sequence)</td><td></td></tr><tr><td></td><td>deterrence</td></tr><tr><td>match-LSTM (Sequence) LSTM (Boundary)</td><td>just deserts incapacitation and deterrence</td></tr></table>
|
md/train/B1EPYJ-C-/B1EPYJ-C-.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FEDERATED LEARNING: STRATEGIES FOR IMPROVING COMMUNICATION EFFICIENCY
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Federated Learning is a machine learning setting where the goal is to train a highquality centralized model while training data remains distributed over a large number of clients each with unreliable and relatively slow network connections. We consider learning algorithms for this setting where on each round, each client independently computes an update to the current model based on its local data, and communicates this update to a central server, where the client-side updates are aggregated to compute a new global model. The typical clients in this setting are mobile phones, and communication efficiency is of the utmost importance.
|
| 8 |
+
|
| 9 |
+
In this paper, we propose two ways to reduce the uplink communication costs: structured updates, where we directly learn an update from a restricted space parametrized using a smaller number of variables, e.g. either low-rank or a random mask; and sketched updates, where we learn a full model update and then compress it using a combination of quantization, random rotations, and subsampling before sending it to the server. Experiments on both convolutional and recurrent networks show that the proposed methods can reduce the communication cost by two orders of magnitude.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
As datasets grow larger and models more complex, training machine learning models increasingly requires distributing the optimization of model parameters over multiple machines. Existing machine learning algorithms are designed for highly controlled environments (such as data centers) where the data is distributed among machines in a balanced and i.i.d. fashion, and high-throughput networks are available.
|
| 14 |
+
|
| 15 |
+
Recently, Federated Learning (and related decentralized approaches) (McMahan & Ramage, 2017; Konecnˇ y et al., 2016; McMahan et al., 2017; Shokri & Shmatikov, 2015) have been proposed as ´ an alternative setting: a shared global model is trained under the coordination of a central server, from a federation of participating devices. The participating devices (clients) are typically large in number and have slow or unstable internet connections. A principal motivating example for Federated Learning arises when the training data comes from users’ interaction with mobile applications. Federated Learning enables mobile phones to collaboratively learn a shared prediction model while keeping all the training data on device, decoupling the ability to do machine learning from the need to store the data in the cloud. The training data is kept locally on users’ mobile devices, and the devices are used as nodes performing computation on their local data in order to update a global model. This goes beyond the use of local models that make predictions on mobile devices, by bringing model training to the device as well. The above framework differs from conventional distributed machine learning (Reddi et al., 2016; Ma et al., 2017; Shamir et al., 2014; Zhang & Lin, 2015; Dean et al., 2012; Chilimbi et al., 2014) due to the very large number of clients, highly unbalanced and non-i.i.d. data available on each client, and relatively poor network connections. In this work, our focus is on the last constraint, since these unreliable and asymmetric connections pose a particular challenge to practical Federated Learning.
|
| 16 |
+
|
| 17 |
+
For simplicity, we consider synchronized algorithms for Federated Learning where a typical round consists of the following steps:
|
| 18 |
+
|
| 19 |
+
1. A subset of existing clients is selected, each of which downloads the current model.
|
| 20 |
+
|
| 21 |
+
2. Each client in the subset computes an updated model based on their local data.
|
| 22 |
+
|
| 23 |
+
3. The model updates are sent from the selected clients to the sever.
|
| 24 |
+
4. The server aggregates these models (typically by averaging) to construct an improved global model.
|
| 25 |
+
|
| 26 |
+
A naive implementation of the above framework requires that each client sends a full model (or a full model update) back to the server in each round. For large models, this step is likely to be the bottleneck of Federated Learning due to multiple factors. One factor is the asymmetric property of internet connection speeds: the uplink is typically much slower than downlink. The US average broadband speed was 55.0Mbps download vs. 18.9Mbps upload, with some internet service providers being significantly more asymmetric, e.g., Xfinity at 125Mbps down vs. 15Mbps up (speedtest.net, 2016). Additionally, existing model compressions schemes such as Han et al. (2015) can reduce the bandwidth necessary to download the current model, and cryptographic protocols put in place to ensure no individual client’s update can be inspected before averaging with hundreds or thousands of other updates (Bonawitz et al., 2017) further increase the amount of bits that need to be uploaded.
|
| 27 |
+
|
| 28 |
+
It is therefore important to investigate methods which can reduce the uplink communication cost. In this paper, we study two general approaches:
|
| 29 |
+
|
| 30 |
+
• Structured updates, where we directly learn an update from a restricted space that can be parametrized using a smaller number of variables.
|
| 31 |
+
• Sketched updates, where we learn a full model update, then compress it before sending to the server.
|
| 32 |
+
|
| 33 |
+
These approaches, explained in detail in Sections 2 and 3, can be combined, e.g., first learning a structured update and sketching it; we do not experiment with this combination in this work though.
|
| 34 |
+
|
| 35 |
+
In the following, we formally describe the problem. The goal of Federated Learning is to learn a model with parameters embodied in a real matrix1 $\mathbf { W } \in \mathbf { \overline { { R } } } ^ { d _ { 1 } \times d _ { 2 } }$ from data stored across a large number of clients. We first provide a communication-naive version of the Federated Learning. In round $t ~ \geq 0$ , the server distributes the current model $\mathbf { W } _ { t }$ to a subset $S _ { t }$ of $n _ { t }$ clients. These clients independently update the model based on their local data. Let the updated local models be $\mathbf { W } _ { t } ^ { 1 } , \mathbf { W } _ { t } ^ { 2 } , \dots , \mathbf { W } _ { t } ^ { n _ { t } }$ , so the update of client $i$ can be written as $\mathbf { H } _ { t } ^ { i } : = \mathbf { W } _ { t } ^ { \dot { i } } - \mathbf { W } _ { t }$ , for $i \in S _ { t }$ . These updates could be a single gradient computed on the client, but typically will be the result of a more complex calculation, for example, multiple steps of stochastic gradient descent (SGD) taken on the client’s local dataset. In any case, each selected client then sends the update back to the sever, where the global update is computed by aggregating2 all the client-side updates:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\begin{array} { r } { \mathbf { W } _ { t + 1 } = \mathbf { W } _ { t } + \eta _ { t } \mathbf { H } _ { t } , \qquad \mathbf { H } _ { t } : = \frac { 1 } { n _ { t } } \sum _ { i \in S _ { t } } \mathbf { H } _ { t } ^ { i } . } \end{array}
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
The sever chooses the learning rate $\eta _ { t }$ . For simplicity, we choose $\eta _ { t } = 1$ .
|
| 42 |
+
|
| 43 |
+
In Section 4, we describe Federated Learning for neural networks, where we use a separate 2D matrix $\mathbf { W }$ to represent the parameters of each layer. We suppose that W gets right-multiplied, i.e., $d _ { 1 }$ and $d _ { 2 }$ represent the output and input dimensions respectively. Note that the parameters of a fully connected layer are naturally represented as 2D matrices. However, the kernel of a convolutional layer is a 4D tensor of the shape $\# \mathrm { i n p u t } \times \mathrm { w i d t h } \times \mathrm { h e i g h t } \times \#$ output. In such a case, W is reshaped from the kernel to the shape $( \# \mathrm { i n p u t } \times \mathrm { w i d t h } \times \mathrm { h e i g h t } ) \times \# \mathrm { c }$ utput.
|
| 44 |
+
|
| 45 |
+
Outline and summary. The goal of increasing communication efficiency of Federated Learning is to reduce the cost of sending $\bar { \mathbf { H } } _ { t } ^ { i }$ to the server, while learning from data stored across large number of devices with limited internet connection and availability for computation. We propose two general classes of approaches, structured updates and sketched updates. In the Experiments section, we evaluate the effect of these methods in training deep neural networks.
|
| 46 |
+
|
| 47 |
+
In simulated experiments on CIFAR data, we investigate the effect of these techniques on the convergence of the Federated Averaging algorithm (McMahan et al., 2017). With only a slight degradation in convergence speed, we are able to reduce the total amount of data communicated by two orders of magnitude. This lets us obtain a good prediction accuracy with an all-convolutional model, while in total communicating less information than the size of the original CIFAR data. In a larger realistic experiment on user-partitioned text data, we show that we are able to efficiently train a recurrent neural network for next word prediction, before even using the data of every user once. Finally, we note that we achieve the best results including the preprocessing of updates with structured random rotations. Practical utility of this step is unique to our setting, as the cost of applying the random rotations would be dominant in typical parallel implementations of SGD, but is negligible, compared to the local training in Federated Learning.
|
| 48 |
+
|
| 49 |
+
# 2 STRUCTURED UPDATE
|
| 50 |
+
|
| 51 |
+
The first type of communication efficient update restricts the updates $\mathbf { H } _ { t } ^ { i }$ to have a pre-specified structure. Two types of structures are considered in the paper: low rank and random mask. It is important to stress that we train directly the updates of this structure, as opposed to approximating/sketching general updates with an object of a specific structure — which is discussed in Section 3.
|
| 52 |
+
|
| 53 |
+
Low rank. We enforce every update to local model $\mathbf { H } _ { t } ^ { i } \in \mathbb { R } ^ { d _ { 1 } \times d _ { 2 } }$ to be a low rank matrix of rank at most $k$ , where $k$ is a fixed number. In order to do so, we express $\mathbf { H } _ { t } ^ { i }$ as the product of two matrices: $\mathbf { H } _ { t } ^ { i } = \mathbf { A } _ { t } ^ { i } \mathbf { B } _ { t } ^ { i }$ , where $\mathbf { A } _ { t } ^ { i } \in \mathbb { R } ^ { d _ { 1 } \times k }$ , $\mathbf { B } _ { t } ^ { i } \in \mathbb { R } ^ { k \times d _ { 2 } }$ . In subsequent computation, we generated $\mathbf { A } _ { t } ^ { i }$ randomly and consider a constant during a local training procedure, and we optimize only $\mathbf { B } _ { t } ^ { i }$ . Note that in practical implementation, $\mathbf { A } _ { t } ^ { i }$ can in this case be compressed in the form of a random seed and the clients only need to send trained $\mathbf { B } _ { t } ^ { i }$ to the server. Such approach immediately saves a factor of $d _ { 1 } / k$ in communication. We generate the matrix $\mathbf { A } _ { t } ^ { i }$ afresh in each round and for each client independently.
|
| 54 |
+
|
| 55 |
+
We also tried fixing $\mathbf { B } _ { t } ^ { i }$ and training $\mathbf { A } _ { t } ^ { i }$ , as well as training both $\mathbf { A } _ { t } ^ { i }$ and $\mathbf { B } _ { t } ^ { i }$ ; neither performed as well. Our approach seems to perform as well as the best techniques considered in Denil et al. (2013), without the need of any hand-crafted features. An intuitive explanation for this observation is the following. We can interpret $\mathbf { B } _ { t } ^ { i }$ as a projection matrix, and $\mathbf { A } _ { t } ^ { i }$ as a reconstruction matrix. Fixing $\mathbf { A } _ { t } ^ { i }$ and optimizing for $\mathbf { B } _ { t } ^ { i }$ is akin to asking “Given a given random reconstruction, what is the projection that will recover most information?”. In this case, if the reconstruction is full-rank, the projection that recovers space spanned by top $k$ eigenvectors exists. However, if we randomly fix the projection and search for a reconstruction, we can be unlucky and the important subspaces might have been projected out, meaning that there is no reconstruction that will do as well as possible, or will be very hard to find.
|
| 56 |
+
|
| 57 |
+
Random mask. We restrict the update $\mathbf { H } _ { t } ^ { i }$ to be a sparse matrix, following a pre-defined random sparsity pattern (i.e., a random mask). The pattern is generated afresh in each round and for each client independently. Similar to the low-rank approach, the sparse pattern can be fully specified by a random seed, and therefore it is only required to send the values of the non-zeros entries of $\mathbf { H } _ { t } ^ { i }$ , along with the seed.
|
| 58 |
+
|
| 59 |
+
# 3 SKETCHED UPDATE
|
| 60 |
+
|
| 61 |
+
The second type of updates addressing communication cost, which we call sketched, first computes the full $\mathbf { H } _ { t } ^ { i }$ during local training without any constraints, and then approximates, or encodes, the update in a (lossy) compressed form before sending to the server. The server decodes the updates before doing the aggregation. Such sketching methods have application in many domains (Woodruff, 2014). We experiment with multiple tools in order to perform the sketching, which are mutually compatible and can be used jointly:
|
| 62 |
+
|
| 63 |
+
Subsampling. Instead of sending $\mathbf { H } _ { t } ^ { i }$ , each client only communicates matrix $\hat { \mathbf { H } } _ { t } ^ { i }$ which is formed from a random subset of the (scaled) values of $\mathbf { H } _ { t } ^ { i }$ . The server then averages the subsampled updates, producing the global update $\hat { { \bf H } } _ { t }$ . This can be done so that the average of the sampled updates is an unbiased estimator of the true average: $\mathbb { E } [ \hat { \mathbf { H } } _ { t } ] = \mathbf { H } _ { t }$ . Similar to the random mask structured update, the mask is randomized independently for each client in each round, and the mask itself can be stored as a synchronized seed.
|
| 64 |
+
|
| 65 |
+
Probabilistic quantization. Another way of compressing the updates is by quantizing the weights.
|
| 66 |
+
|
| 67 |
+
We first describe the algorithm of quantizing each scalar to one bit. Consider the update $\mathbf { H } _ { t } ^ { i }$ , let $h = ( h _ { 1 } , \ldots , h _ { d _ { 1 } \times d _ { 2 } } ) \bar { = } \mathrm { v e c } ( \mathbf { H } _ { t } ^ { i } )$ , and let $h _ { \operatorname* { m a x } } = \operatorname* { m a x } _ { j } ( h _ { j } )$ , $h _ { \operatorname* { m i n } } = \operatorname* { m i n } _ { j } ( h _ { j } )$ . The compressed update of $h$ , denoted by $\tilde { h }$ , is generated as follows:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\tilde { h } _ { j } = \left\{ \begin{array} { c c c } { h _ { \operatorname* { m a x } } , } & { \mathrm { w i t h ~ p r o b a b i l i t y } } & { \frac { h _ { j } - h _ { \operatorname* { m i n } } } { h _ { \operatorname* { m a x } } - h _ { \operatorname* { m i n } } } } \\ { h _ { \operatorname* { m i n } } , } & { \mathrm { w i t h ~ p r o b a b i l i t y } } & { \frac { h _ { \operatorname* { m a x } } - h _ { j } } { h _ { \operatorname* { m a x } } - h _ { \operatorname* { m i n } } } } \end{array} \right. .
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
It is easy to show that $\tilde { h }$ is an unbiased estimator of $h$ . This method provides $3 2 \times$ of compression compared to a 4 byte float. The error incurred with this compression scheme was analysed for instance in Suresh et al. (2017), and is a special case of protocol proposed in Konecnˇ y & Richt ´ arik ´ (2016).
|
| 74 |
+
|
| 75 |
+
One can also generalize the above to more than 1 bit for each scalar. For $b$ -bit quantization, we first equally divide $[ h _ { \operatorname* { m i n } } , h _ { \operatorname* { m a x } } ]$ into $2 ^ { b }$ intervals. Suppose $h _ { i }$ falls in the interval bounded by $h ^ { \prime }$ and $h ^ { \prime \prime }$ . The quantization operates by replacing $h _ { \mathrm { m i n } }$ and $h _ { \mathrm { m a x } }$ of the above equation by $h ^ { \prime }$ and $h ^ { \prime \prime }$ , respectively. Parameter $b$ then allows for simple way of balancing accuracy and communication costs.
|
| 76 |
+
|
| 77 |
+
Another quantization approach also motivated by reduction of communication while averaging vectors was recently proposed in Alistarh et al. (2016). Incremental, randomized and distributed optimization algorithms can be similarly analysed in a quantized updates setting (Rabbat & Nowak, 2005; Golovin et al., 2013; Gamal & Lai, 2016).
|
| 78 |
+
|
| 79 |
+
Improving the quantization by structured random rotations. The above 1-bit and multi-bit quantization approach work best when the scales are approximately equal across different dimensions.
|
| 80 |
+
|
| 81 |
+
For example, when max $= ~ 1$ and $\operatorname* { m i n } { } = - 1$ and most of values are 0, the 1-bit quantization will lead to a large error. We note that applying a random rotation on $h$ before the quantization (multiplying $h$ by a random orthogonal matrix) solves this issue. This claim has been theoretically supported in Suresh et al. (2017). In that work, is shows that the structured random rotation can reduce the quantization error by a factor of $\mathcal { O } ( d / \log d )$ , where $d$ is the dimension of $h$ . We will show its practical utility in the next section.
|
| 82 |
+
|
| 83 |
+
In the decoding phase, the server needs to perform the inverse rotation before aggregating all the updates. Note that in practice, the dimension of $h$ can easily be as high as $d = \bar { 1 0 ^ { 6 } }$ or more, and it is computationally prohibitive to generate $( \mathcal { O } ( d ^ { 3 } ) )$ and apply $( \mathcal { O } ( d ^ { 2 } ) )$ a general rotation matrix. Same as Suresh et al. (2017), we use a type of structured rotation matrix which is the product of a Walsh-Hadamard matrix and a binary diagonal matrix. This reduces the computational complexity of generating and applying the matrix to $\bar { \mathcal { O } } ( d )$ and ${ \mathcal { O } } ( d \log d )$ , which is negligible compared to the local training within Federated Learning.
|
| 84 |
+
|
| 85 |
+
# 4 EXPERIMENTS
|
| 86 |
+
|
| 87 |
+
We conducted experiments using Federated Learning to train deep neural networks for two different tasks. First, we experiment with the CIFAR-10 image classification task (Krizhevsky, 2009) with convolutional networks and artificially partitioned dataset, and explore properties of our proposed algorithms in detail. Second, we use more realistic scenario for Federated Learning — the public Reddit post data (Google BigQuery), to train a recurrent network for next word prediction.
|
| 88 |
+
|
| 89 |
+
The Reddit dataset is particularly useful for simulated Federated Learning experiments, as it comes with natural per-user data partition (by author of the posts). This includes many of the characteristics expected to arise in practical implementation. For example, many users having relatively few data points, and words used by most users are clustered around a specific topic of interest of the particular user.
|
| 90 |
+
|
| 91 |
+
In all of our experiments, we employ the Federated Averaging algorithm (McMahan et al., 2017), which significantly decreases the number of rounds of communication required to train a good model. Nevertheless, we expect our techniques will show a similar reduction in communication costs when applied to a synchronous distributed SGD, see for instance Alistarh et al. (2016). For Federated Averaging, on each round we select multiple clients uniformly at random, each of which performs several epochs of SGD with a learning rate of $\eta$ on their local dataset. For the structured updates, SGD is restricted to only update in the restricted space, that is, only the entries of $\mathbf { B } _ { t } ^ { i }$ for low-rank updates and the unmasked entries for the random-mask technique. From this updated model we compute the updates for each layer $\mathbf { H } _ { t } ^ { i }$ . In all cases, we run the experiments with a range of choices of learning rate, and report the best result.
|
| 92 |
+
|
| 93 |
+

|
| 94 |
+
Figure 1: Structured updates with the CIFAR data for size reduction various modes. Low rank updates in top row, random mask updates in bottom row.
|
| 95 |
+
|
| 96 |
+
# 4.1 CONVOLUTIONAL MODELS ON THE CIFAR-10 DATASET
|
| 97 |
+
|
| 98 |
+
In this section we use the CIFAR-10 dataset to investigate the properties of our proposed methods as part of Federated Averaging algorithm.
|
| 99 |
+
|
| 100 |
+
There are 50 000 training examples in the CIFAR-10 dataset, which we randomly partitioned into 100 clients each containing 500 training examples. The model architecture we used was the allconvolutional model taken from what is described as “Model $\mathbf { { C } } ^ { \ast }$ in Springenberg et al. (2014), for a total of over $1 0 ^ { 6 }$ parameters. While this model is not the state-of-the-art, it is sufficient for our needs, as our goal is to evaluate our compression methods, not to achieve the best possible accuracy on this task.
|
| 101 |
+
|
| 102 |
+
The model has 9 convolutional layers, first and last of which have significantly fewer parameters than the others. Hence, in this whole section, when we try to reduce the size the individual updates, we only compress the inner 7 layers, each of which with the same parameter3. We denote this by keyword ‘mode’, for all approaches. For low rank updates, ‘mode $= 2 5 \%$ ’ refers to the rank of the update being set to $1 / 4$ of rank of the full layer transformation, for random mask or sketching, this refers to all but $2 5 \%$ of the parameters being zeroed out.
|
| 103 |
+
|
| 104 |
+
In the first experiment, summarized in Figure 1, we compare the two types of structured updates introduced in Section 2 — low rank in the top row and random mask in the bottom row. The main message is that random mask performs significantly better than low rank, as we reduce the size of the updates. In particular, the convergence speed of random mask seems to be essentially unaffected when measured in terms of number of rounds. Consequently, if the goal was to only minimize the upload size, the version with reduced update size is a clear winner, as seen in the right column.
|
| 105 |
+
|
| 106 |
+
In Figure 2, we compare the performance of structured and sketched updates, without any quantization. Since in the above, the structured random mask updates performed better, we omit low rank update for clarity from this comparison. We compare this with the performance of the sketched updates, with and without preprocessing the update using random rotation, as described in Section 3, and for two different modes. We denote the randomized Hadamard rotation by ‘HD’, and no rotation by ‘I’.
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 2: Comparison of structured random mask updates and sketched updates without quantization on the CIFAR data.
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 3: Comparison of sketched updates, combining preprocessing the updates with rotations, quantization and subsampling on the CIFAR data.
|
| 113 |
+
|
| 114 |
+
The intuitive expectation is that directly learning the structured random mask updates should be better than learning an unstructured update, which is then sketched to be represented with the same number of parameters. This is because by sketching we throw away some of the information obtained during training. The fact that with sketching the updates, we should converge to a slightly lower accuracy can be theoretically supported, using analogous argument as carefully stated in (Alistarh et al., 2016), since sketching the updates increases the variance directly appearing in convergence analysis. We see this behaviour when using the structured random mask updates, we are able to eventually converge to slightly higher accuracy. However, we also see that with sketching the updates, we are able to attain modest accuracy (e.g. $8 5 \%$ ) slightly faster.
|
| 115 |
+
|
| 116 |
+
In the last experiment on CIFAR data, we focus on interplay of all three elements introduced in Section 3 — subsampling, quantization and random rotations. Note that combination of all these tools will enable higher compression rate than in the above experiments. Each pair of plots in Figure 3 focuses on particular mode (subsampling), and in each of them we plot performance with different bits used in quantization, with or without the random rotations. What we can see consistently in all plots, is that the random rotation improves the performance. In general, the behaviour of the algorithm is less stable without the rotations, particularly with small number of quantization bits and smaller modes.
|
| 117 |
+
|
| 118 |
+
In order to highlight the potential of communication savings, note that by preprocessing with the random rotation, sketching out all but $6 . 2 5 \%$ elements of the update and using 2 bits for quantization, we get only a minor drop in convergence, while saving factor of 256 in terms of bits needed to represent the updates to individual layers. Finally, if we were interested in minimizing the amount of data uploaded, we can obtain a modest accuracy, say $8 5 \%$ , while in total communicating less than half of what would be required to upload the original data.
|
| 119 |
+
|
| 120 |
+
# 4.2 LSTM NEXT-WORD PREDICTION ON REDDIT DATA
|
| 121 |
+
|
| 122 |
+
We constructed the dataset for simulating Federated Learning based on the data containing publicly available posts/comments on Reddit (Google BigQuery), as described by Al-Rfou et al. (2016). Critically for our purposes, each post in the database is keyed by an author, so we can group the data by these keys, making the assumption of one client device per author. Some authors have a very large number of posts, but in each round of FedAvg we process at most 32 000 tokens per user. We omit authors with fewer than 1600 tokens, since there is constant overhead per client in the simulation, and users with little data don’t contribute much to training. This leaves a dataset of 763 430 users, with an average of 24 791 tokens per user. For evaluation, we use a relatively small test set of 75 122 tokens formed from random held-out posts.
|
| 123 |
+
|
| 124 |
+
Based on this data, we train a LSTM next word prediction model. The model is trained to predict the next word given the current word and a state vector passed from the previous time step. The model works as follows: word $s _ { t }$ is mapped to an embedding vector $e _ { t } \in \mathbb { R } ^ { 9 6 }$ , by looking up the word in a dictionary of 10 017 words (tokens). $e _ { t }$ is then composed with the state emitted by the model in the previous time step $s _ { t 1 } \in \mathbb { R } ^ { 2 5 6 }$ to emit a new state vector $s _ { t }$ and an “output embedding” $o _ { t } \in \mathbf { R } ^ { 9 6 }$ . The output embedding is scored against the embedding of each item in the vocabulary via inner product, before being normalized via softmax to compute a probability distribution over the vocabulary. Like other standard language models, we treat every input sequence as beginning with an implicit “BOS” (beginning of sequence) token and ending with an implicit “EOS” (end of sequence) token. Unlike standard LSTM language models, our model uses the same learned embedding for both the embedding and softmax layers. This reduces the size of the model by about $40 \%$ for a small decrease in model quality, an advantageous tradeoff for mobile applications. Another change from many standard LSTM RNN approaches is that we train these models to restrict the word embeddings to have a fixed L2 norm of 1.0, a modification found to improve convergence time. In total the model has 1.35M parameters.
|
| 125 |
+
|
| 126 |
+
In order to reduce the size of the update, we sketch all the model variables except some small variables (such as biases) which consume less than $0 . 0 1 \%$ of memory. We evaluate using AccuracyTop1, the probability that the word to which the model assigns highest probability is correct. We always count it as a mistake if the true next word is not in the dictionary, even if the model predicts ‘unknown’.
|
| 127 |
+
|
| 128 |
+
In Figure 4, we run the Federated Averaging algorithm on Reddit data, with various parameters that specify the sketching. In every iteration, we randomly sample 50 users that compute update based on the data available locally, sketch it, and all the updates are averaged. Experiments with sampling 10, 20, and 100 clients in each round provided similar conclusions as the following.
|
| 129 |
+
|
| 130 |
+
In all of the plots, we combine the three components for sketching the updates introduced in Section 3. First, we apply a random rotation to preprocess the local update. Further, ‘sketch fraction’ set to either 0.1 or 1, denotes fraction of the elements of the update being subsampled.
|
| 131 |
+
|
| 132 |
+
In the left column, we plot this against the number of iterations of the algorithm. First, we can see that the effect of preprocessing with the random rotation has significantly positive effect, particularly with small number of quantization bits. It is interesting to see that for all choices of the subsampling ratio, randomized Hadamard transform with quantization into 2 bits does not incur any loss in performance. An important measure to highlight is the number of rounds displayed in the plots is 2000. Since we sample 50 users per round, this experiment would not touch the data of most users even once! This further strengthens the claim that applying Federated Learning in realistic setting is possible without affecting the user experience in any way.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4: Comparison of sketched updates, training a recurrent model on the Reddit data, randomly sampling 50 clients per round.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 5: Effect of the number of clients used in training per round.
|
| 139 |
+
|
| 140 |
+
In the right column, we plot the same data against the total number of megabytes that would need to be communicated by clients back to the server. From these plots, it is clear that if one needed to primarily minimize this metric, the techniques we propose are extremely efficient. Of course, neither of these objectives is what we would optimize for in a practical application. Nevertheless, given the current lack of experience with issues inherent in large scale deployment of Federated Learning, we believe that these are useful proxies for what will be relevant in a practical application.
|
| 141 |
+
|
| 142 |
+
Finally, in Figure 5, we study the effect of number of clients we use in a single round on the convergence. We run the Federated Averaging algorithm for a fixed number of rounds (500 and 2500) with varying number of clients per round, quantize updates to 1 bit, and plot the resulting accuracy. We see that with sufficient number of clients per round, 1024 in this case, we can reduce the fraction of subsampled elements down to $1 \%$ , with only minor drop in accuracy compared to $1 0 \%$ . This suggests an important and practical tradeoff in the federated setting: one can select more clients in each round while having each of them communicate less (e.g., more aggressive subsampling), and obtain the same accuracy as using fewer clients, but having each of them communicate more. The former may be preferable when many clients are available, but each has very limited upload bandwidth — which is a setting common in practice.
|
| 143 |
+
|
| 144 |
+
# REFERENCES
|
| 145 |
+
|
| 146 |
+
Rami Al-Rfou, Marc Pickett, Javier Snaider, Yun-hsuan Sung, Brian Strope, and Ray Kurzweil. Conversational contextual cues: The case of personalization and history for response ranking. arXiv:1606.00372, 2016.
|
| 147 |
+
|
| 148 |
+
Dan Alistarh, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: Randomized quantization for communication-optimal stochastic gradient descent. arXiv:1610.02132, 2016.
|
| 149 |
+
|
| 150 |
+
Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H. Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. Practical secure aggregation for privacy preserving machine learning. In ACM Conference on Computer and Communications Security (ACM CCS), 2017.
|
| 151 |
+
|
| 152 |
+
Trishul Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), pp. 571–582, 2014.
|
| 153 |
+
|
| 154 |
+
Jeffrey Dean, Greg Corrado, Rajat Monga, Kai Chen, Matthieu Devin, Mark Mao, Andrew Senior, Paul Tucker, Ke Yang, Quoc V Le, et al. Large scale distributed deep networks. In NIPS, pp. 1223–1231, 2012.
|
| 155 |
+
|
| 156 |
+
Misha Denil, Babak Shakibi, Laurent Dinh, Nando de Freitas, et al. Predicting parameters in deep learning. In NIPS, pp. 2148–2156, 2013.
|
| 157 |
+
|
| 158 |
+
Mostafa El Gamal and Lifeng Lai. On randomized distributed coordinate descent with quantized updates. arXiv:1609.05539, 2016.
|
| 159 |
+
|
| 160 |
+
Daniel Golovin, D. Sculley, H. Brendan McMahan, and Michael Young. Large-scale learning with less ram via randomization. In ICML, 2013.
|
| 161 |
+
|
| 162 |
+
Google BigQuery. Reddit comments dataset. BigQuery, 2016. https://bigquery.cloud.google. com/dataset/fh-bigquery.
|
| 163 |
+
|
| 164 |
+
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
|
| 165 |
+
|
| 166 |
+
Jakub Konecnˇ y and Peter Richt ´ arik. Randomized distributed mean estimation: Accuracy vs communication. ´ arXiv:1611.07555, 2016.
|
| 167 |
+
|
| 168 |
+
Jakub Konecnˇ y, H. Brendan McMahan, Daniel Ramage, and Peter Richt ´ arik. Federated optimization: Dis- ´ tributed machine learning for on-device intelligence. arXiv preprint arXiv:1610.02527, 2016.
|
| 169 |
+
|
| 170 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, 2009.
|
| 171 |
+
|
| 172 |
+
Chenxin Ma, Jakub Konecnˇ y, Martin Jaggi, Virginia Smith, Michael I Jordan, Peter Richt ´ arik, and Martin ´ Taka´c. Distributed optimization with arbitrary local solvers. ˇ Optimization Methods & Software, 32(4): 813–848, 2017.
|
| 173 |
+
|
| 174 |
+
H. Brendan McMahan and Daniel Ramage. Federated learning: Collaborative machine learning without centralized training data. https://research.googleblog.com/2017/04/federated-learning-collaborative.html, 2017.
|
| 175 |
+
|
| 176 |
+
H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017.
|
| 177 |
+
|
| 178 |
+
M.G. Rabbat and R.D. Nowak. Quantized incremental algorithms for distributed optimization. IEEE Journal on Selected Areas in Communications, 23(4):798–808, 2005.
|
| 179 |
+
|
| 180 |
+
Sashank J Reddi, Jakub Konecnˇ y, Peter Richt ´ arik, Barnab ´ as P ´ ocz ´ os, and Alex Smola. AIDE: Fast and commu-´ nication efficient distributed optimization. arXiv:1608.06879, 2016.
|
| 181 |
+
|
| 182 |
+
Ohad Shamir, Nathan Srebro, and Tong Zhang. Communication-efficient distributed optimization using an approximate Newton-type method. In ICML, pp. 1000–1008, 2014.
|
| 183 |
+
|
| 184 |
+
Reza Shokri and Vitaly Shmatikov. Privacy-preserving deep learning. In Proceedings of the 22Nd ACM SIGSAC Conference on Computer and Communications Security, CCS ’15, 2015.
|
| 185 |
+
|
| 186 |
+
speedtest.net. Speedtest market report. http://www.speedtest.net/reports/united-states/, August 2016.
|
| 187 |
+
|
| 188 |
+
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv:1412.6806, 2014.
|
| 189 |
+
|
| 190 |
+
Ananda Theertha Suresh, Felix X. Yu, Sanjiv Kumar, and H. Brendan McMahan. Distributed mean estimation with limited communication. In Proceedings of the 34th International Conference on Machine Learning, pp. 3329–3337, 2017.
|
| 191 |
+
|
| 192 |
+
David P. Woodruff. Sketching as a tool for numerical linear algebra. Foundations and Trends in Theoretical Computer Science, 10(12):1–157, 2014. ISSN 1551-305X. doi: 10.1561/0400000060.
|
| 193 |
+
|
| 194 |
+
Yuchen Zhang and Xiao Lin. DiSCO: Distributed optimization for self-concordant empirical loss. In ICML, pp. 362–370, 2015.
|
md/train/B1VZqjAcYX/B1VZqjAcYX.md
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SNIP: SINGLE-SHOT NETWORK PRUNING BASED ONCONNECTION SENSITIVITY
|
| 2 |
+
|
| 3 |
+
Namhoon Lee, Thalaiyasingam Ajanthan & Philip H. S. Torr University of Oxford {namhoon,ajanthan,phst}@robots.ox.ac.uk
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Pruning large neural networks while maintaining their performance is often desirable due to the reduced space and time complexity. In existing methods, pruning is done within an iterative optimization procedure with either heuristically designed pruning schedules or additional hyperparameters, undermining their utility. In this work, we present a new approach that prunes a given network once at initialization prior to training. To achieve this, we introduce a saliency criterion based on connection sensitivity that identifies structurally important connections in the network for the given task. This eliminates the need for both pretraining and the complex pruning schedule while making it robust to architecture variations. After pruning, the sparse network is trained in the standard way. Our method obtains extremely sparse networks with virtually the same accuracy as the reference network on the MNIST, CIFAR-10, and Tiny-ImageNet classification tasks and is broadly applicable to various architectures including convolutional, residual and recurrent networks. Unlike existing methods, our approach enables us to demonstrate that the retained connections are indeed relevant to the given task.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Despite the success of deep neural networks in machine learning, they are often found to be highly overparametrized making them computationally expensive with excessive memory requirements. Pruning such large networks with minimal loss in performance is appealing for real-time applications, especially on resource-limited devices. In addition, compressed neural networks utilize the model capacity efficiently, and this interpretation can be used to derive better generalization bounds for neural networks (Arora et al. (2018)).
|
| 12 |
+
|
| 13 |
+
In network pruning, given a large reference neural network, the goal is to learn a much smaller subnetwork that mimics the performance of the reference network. The majority of existing methods in the literature attempt to find a subset of weights from the pretrained reference network either based on a saliency criterion (Mozer & Smolensky (1989); LeCun et al. (1990); Han et al. (2015)) or utilizing sparsity enforcing penalties (Chauvin (1989); Carreira-Perpin˜an & Idelbayev (2018)). ´ Unfortunately, since pruning is included as a part of an iterative optimization procedure, all these methods require many expensive prune – retrain cycles and heuristic design choices with additional hyperparameters, making them non-trivial to extend to new architectures and tasks.
|
| 14 |
+
|
| 15 |
+
In this work, we introduce a saliency criterion that identifies connections in the network that are important to the given task in a data-dependent way before training. Specifically, we discover important connections based on their influence on the loss function at a variance scaling initialization, which we call connection sensitivity. Given the desired sparsity level, redundant connections are pruned once prior to training (i.e., single-shot), and then the sparse pruned network is trained in the standard way. Our approach has several attractive properties:
|
| 16 |
+
|
| 17 |
+
• Simplicity. Since the network is pruned once prior to training, there is no need for pretraining and complex pruning schedules. Our method has no additional hyperparameters and once pruned, training of the sparse network is performed in the standard way.
|
| 18 |
+
• Versatility. Since our saliency criterion chooses structurally important connections, it is robust to architecture variations. Therefore our method can be applied to various architectures including convolutional, residual and recurrent networks with no modifications.
|
| 19 |
+
|
| 20 |
+
• Interpretability. Our method determines important connections with a mini-batch of data at single-shot. By varying this mini-batch used for pruning, our method enables us to verify that the retained connections are indeed essential for the given task.
|
| 21 |
+
|
| 22 |
+
We evaluate our method on MNIST, CIFAR-10, and Tiny-ImageNet classification datasets with widely varying architectures. Despite being the simplest, our method obtains extremely sparse networks with virtually the same accuracy as the existing baselines across all tested architectures. Furthermore, we investigate the relevance of the retained connections as well as the effect of the network initialization and the dataset on the saliency score.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
Classical methods. Essentially, early works in network pruning can be categorized into two groups (Reed (1993)): 1) those that utilize sparsity enforcing penalties; and 2) methods that prune the network based on some saliency criterion. The methods from the former category (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)) augment the loss function with some sparsity enforcing penalty terms (e.g., $L _ { 0 }$ or $L _ { 1 }$ norm), so that back-propagation effectively penalizes the magnitude of the weights during training. Then weights below a certain threshold may be removed. On the other hand, classical saliency criteria include the sensitivity of the loss with respect to the neurons (Mozer & Smolensky (1989)) or the weights (Karnin (1990)) and Hessian of the loss with respect to the weights (LeCun et al. (1990); Hassibi et al. (1993)). Since these criteria are heavily dependent on the scale of the weights and are designed to be incorporated within the learning process, these methods are prohibitively slow requiring many iterations of pruning and learning steps. Our approach identifies redundant weights from an architectural point of view and prunes them once at the beginning before training.
|
| 27 |
+
|
| 28 |
+
Modern advances. In recent years, the increased space and time complexities as well as the risk of overfitting in deep neural networks prompted a surge of further investigation in network pruning. While Hessian based approaches employ the diagonal approximation due to its computational simplicity, impressive results (i.e., extreme sparsity without loss in accuracy) are achieved using magnitude of the weights as the criterion (Han et al. (2015)). This made them the de facto standard method for network pruning and led to various implementations (Guo et al. (2016); Carreira-Perpin˜an & ´ Idelbayev (2018)). The magnitude criterion is also extended to recurrent neural networks (Narang et al. (2017)), yet with heavily tuned hyperparameter setting. Unlike our approach, the main drawbacks of magnitude based approaches are the reliance on pretraining and the expensive prune – retrain cycles. Furthermore, since pruning and learning steps are intertwined, they often require highly heuristic design choices which make them non-trivial to be extended to new architectures and different tasks. Meanwhile, Bayesian methods are also applied to network pruning (Ullrich et al. (2017); Molchanov et al. (2017a)) where the former extends the soft weight sharing in Nowlan & Hinton (1992) to obtain a sparse and compressed network, and the latter uses variational inference to learn the dropout rate which can then be used to prune the network. Unlike the above methods, our approach is simple and easily adaptable to any given architecture or task without modifying the pruning procedure.
|
| 29 |
+
|
| 30 |
+
Network compression in general. Apart from weight pruning, there are approaches focused on structured simplification such as pruning filters (Li et al. (2017); Molchanov et al. (2017b)), structured sparsity with regularizers (Wen et al. (2016)), low-rank approximation (Jaderberg et al. (2014)), matrix and tensor factorization (Novikov et al. (2015)), and sparsification using expander graphs (Prabhu et al. (2018)) or Erdos-R ˝ enyi random graph (Mocanu et al. (2018)). In addition, ´ there is a large body of work on compressing the representation of weights. A non-exhaustive list includes quantization (Gong et al. (2014)), reduced precision (Gupta et al. (2015)) and binary weights (Hubara et al. (2016)). In this work, we focus on weight pruning that is free from structural constraints and amenable to further compression schemes.
|
| 31 |
+
|
| 32 |
+
# 3 NEURAL NETWORK PRUNING
|
| 33 |
+
|
| 34 |
+
The main hypothesis behind the neural network pruning literature is that neural networks are usually overparametrized, and comparable performance can be obtained by a much smaller network (Reed (1993)) while improving generalization (Arora et al. (2018)). To this end, the objective is to learn
|
| 35 |
+
|
| 36 |
+
a sparse network while maintaining the accuracy of the standard reference network. Let us first formulate neural network pruning as an optimization problem.
|
| 37 |
+
|
| 38 |
+
Given a dataset $\mathbfcal { D } = \{ ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) \} _ { i = 1 } ^ { n }$ , and a desired sparsity level $\kappa$ (i.e., the number of non-zero weights) neural network pruning can be written as the following constrained optimization problem:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\begin{array} { l } { \displaystyle \operatorname* { m i n } _ { \mathbf { w } } L ( \mathbf { w } ; \mathcal { D } ) = \displaystyle \operatorname* { m i n } _ { \mathbf { w } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell ( \mathbf { w } ; ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) ) ~ , } \\ { \mathrm { s . t . } \quad \mathbf { w } \in \mathbb { R } ^ { m } , \quad \| \mathbf { w } \| _ { 0 } \leq \kappa ~ . } \end{array}
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
Here, $\ell ( \cdot )$ is the standard loss function (e.g., cross-entropy loss), w is the set of parameters of the neural network, $m$ is the total number of parameters and $\| \cdot \| _ { 0 }$ is the standard $L _ { 0 }$ norm.
|
| 45 |
+
|
| 46 |
+
The conventional approach to optimize the above problem is by adding sparsity enforcing penalty terms (Chauvin (1989); Weigend et al. (1991); Ishikawa (1996)). Recently, Carreira-Perpin˜an´ $\&$ Idelbayev (2018) attempts to minimize the above constrained optimization problem using the stochastic version of projected gradient descent (where the projection is accomplished by pruning). However, these methods often turn out to be inferior to saliency based methods in terms of resulting sparsity and require heavily tuned hyperparameter settings to obtain comparable results.
|
| 47 |
+
|
| 48 |
+
On the other hand, saliency based methods treat the above problem as selectively removing redundant parameters (or connections) in the neural network. In order to do so, one has to come up with a good criterion to identify such redundant connections. Popular criteria include magnitude of the weights, i.e., weights below a certain threshold are redundant (Han et al. (2015); Guo et al. (2016)) and Hessian of the loss with respect to the weights, i.e., the higher the value of Hessian, the higher the importance of the parameters (LeCun et al. (1990); Hassibi et al. (1993)), defined as follows:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
s _ { j } = \left\{ \begin{array} { l l } { \left| w _ { j } \right| , } & { \mathrm { f o r m a g n i t u d e ~ b a s e d } } \\ { \frac { w _ { j } ^ { 2 } H _ { j j } } { 2 } } & { \mathrm { o r } \frac { w _ { j } ^ { 2 } } { 2 H _ { j j } ^ { - 1 } } } & { \mathrm { f o r } \mathrm { H e s s i a n ~ b a s e d } . } \end{array} \right.
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
Here, for connection $j , s _ { j }$ is the saliency score, $w _ { j }$ is the weight, and $H _ { j j }$ is the value of the Hessian matrix, where the Hessian $\mathbf { H } = \partial ^ { 2 } L / \partial \mathbf { w } ^ { 2 } \in \mathbb { R } ^ { m \times m }$ . Considering Hessian based methods, the Hessian matrix is neither diagonal nor positive definite in general, approximate at best, and intractable to compute for large networks.
|
| 55 |
+
|
| 56 |
+
Despite being popular, both of these criteria depend on the scale of the weights and in turn require pretraining and are very sensitive to the architectural choices. For instance, different normalization layers affect the scale of the weights in a different way, and this would non-trivially affect the saliency score. Furthermore, pruning and the optimization steps are alternated many times throughout training, resulting in highly expensive prune – retrain cycles. Such an exorbitant requirement hinders the use of pruning methods in large-scale applications and raises questions about the credibility of the existing pruning criteria.
|
| 57 |
+
|
| 58 |
+
In this work, we design a criterion which directly measures the connection importance in a datadependent manner. This alleviates the dependency on the weights and enables us to prune the network once at the beginning, and then the training can be performed on the sparse pruned network. Therefore, our method eliminates the need for the expensive prune – retrain cycles, and in theory, it can be an order of magnitude faster than the standard neural network training as it can be implemented using software libraries that support sparse matrix computations.
|
| 59 |
+
|
| 60 |
+
# 4 SINGLE-SHOT NETWORK PRUNING BASED ON CONNECTION SENSITIVITY
|
| 61 |
+
|
| 62 |
+
Given a neural network and a dataset, our goal is to design a method that can selectively prune redundant connections for the given task in a data-dependent way even before training. To this end, we first introduce a criterion to identify important connections and then discuss its benefits.
|
| 63 |
+
|
| 64 |
+
# 4.1 CONNECTION SENSITIVITY: ARCHITECTURAL PERSPECTIVE
|
| 65 |
+
|
| 66 |
+
Since we intend to measure the importance (or sensitivity) of each connection independently of its weight, we introduce auxiliary indicator variables $\mathbf { c } \in \{ 0 , 1 \} ^ { m }$ representing the connectivity of
|
| 67 |
+
|
| 68 |
+
parameters w.1 Now, given the sparsity level $\kappa$ , Equation 1 can be correspondingly modified as:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\begin{array} { r l } { \displaystyle \operatorname* { m i n } _ { \mathbf { c } , \mathbf { w } } L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) = \displaystyle \operatorname* { m i n } _ { \mathbf { c } , \mathbf { w } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \ell ( \mathbf { c } \odot \mathbf { w } ; ( \mathbf { x } _ { i } , \mathbf { y } _ { i } ) ) ~ , } & { } \\ { \mathrm { s . t . } \quad \mathbf { w } \in \mathbb { R } ^ { m } ~ , } & { } \\ { \displaystyle \quad \mathbf { c } \in \{ 0 , 1 \} ^ { m } , \quad \| \mathbf { c } \| _ { 0 } \leq \kappa ~ , } \end{array}
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\odot$ denotes the Hadamard product. Compared to Equation 1, we have doubled the number of learnable parameters in the network and directly optimizing the above problem is even more difficult. However, the idea here is that since we have separated the weight of the connection (w) from whether the connection is present or not (c), we may be able to determine the importance of each connection by measuring its effect on the loss function.
|
| 75 |
+
|
| 76 |
+
For instance, the value of $c _ { j }$ indicates whether the connection $j$ is active $( c _ { j } = 1 )$ ) in the network or pruned $( c _ { j } = 0 )$ . Therefore, to measure the effect of connection $j$ on the loss, one can try to measure the difference in loss when $c _ { j } = 1$ and $c _ { j } = 0$ , keeping everything else constant. Precisely, the effect of removing connection $j$ can be measured by,
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\begin{array} { r } { \Delta L _ { j } ( \mathbf { w } ; \mathcal { D } ) = L \big ( \mathbf { 1 } \odot \mathbf { w } ; \mathcal { D } \big ) - L \big ( \big ( \mathbf { 1 } - \mathbf { e } _ { j } \big ) \odot \mathbf { w } ; \mathcal { D } \big ) , } \end{array}
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\mathbf { e } _ { j }$ is the indicator vector of element $j$ (i.e., zeros everywhere except at the index $j$ where it is one) and 1 is the vector of dimension $m$ .
|
| 83 |
+
|
| 84 |
+
Note that computing $\Delta L _ { j }$ for each $j \in \{ 1 \ldots m \}$ is prohibitively expensive as it requires $m + 1$ (usually in the order of millions) forward passes over the dataset. In fact, since $\mathbf { c }$ is binary, $L$ is not differentiable with respect to $\mathbf { c }$ , and it is easy to see that $\Delta L _ { j }$ attempts to measure the influence of connection $j$ on the loss function in this discrete setting. Therefore, by relaxing the binary constraint on the indicator variables c, $\Delta L _ { j }$ can be approximated by the derivative of $L$ with respect to $c _ { j }$ , which we denote $g _ { j } ( \mathbf { w } ; \mathcal { D } )$ . Hence, the effect of connection $j$ on the loss can be written as:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\Delta L _ { j } ( \mathbf { w } ; \mathcal { D } ) \approx g _ { j } ( \mathbf { w } ; \mathcal { D } ) = \left. \frac { \partial L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) } { \partial c _ { j } } \right| _ { \mathbf { c } = \mathbf { 1 } } = \operatorname* { l i m } _ { \delta \to 0 } \left. \frac { L ( \mathbf { c } \odot \mathbf { w } ; \mathcal { D } ) - L ( ( \mathbf { c } - \delta \mathbf { e } _ { j } ) \odot \mathbf { w } ; \mathcal { D } ) } { \delta } \right| _ { \mathbf { c } = \mathbf { 1 } } .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
In fact, $\partial L / \partial c _ { j }$ is an infinitesimal version of $\Delta L _ { j }$ , that measures the rate of change of $L$ with respect to an infinitesimal change in $c _ { j }$ from $1 1 - \delta$ . This can be computed efficiently in one forward-backward pass using automatic differentiation, for all $j$ at once. Notice, this formulation can be viewed as perturbing the weight $w _ { j }$ by a multiplicative factor $\delta$ and measuring the change in loss. This approximation is similar in spirit to Koh & Liang (2017) where they try to measure the influence of a datapoint to the loss function. Here we measure the influence of connections. Furthermore, $\partial L / \partial c _ { j }$ is not to be confused with the gradient with respect to the weights $( \partial L / \partial w _ { j } )$ , where the change in loss is measured with respect to an additive change in weight $w _ { j }$ .
|
| 91 |
+
|
| 92 |
+
Notably, our interest is to discover important (or sensitive) connections in the architecture, so that we can prune unimportant ones in single-shot, disentangling the pruning process from the iterative optimization cycles. To this end, we take the magnitude of the derivatives $g _ { j }$ as the saliency criterion. Note that if the magnitude of the derivative is high (regardless of the sign), it essentially means that the connection $c _ { j }$ has a considerable effect on the loss (either positive or negative), and it has to be preserved to allow learning on $w _ { j }$ . Based on this hypothesis, we define connection sensitivity as the normalized magnitude of the derivatives:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
s _ { j } = \frac { | g _ { j } ( \mathbf { w } ; \mathcal { D } ) | } { \sum _ { k = 1 } ^ { m } | g _ { k } ( \mathbf { w } ; \mathcal { D } ) | } .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Once the sensitivity is computed, only the top- $\kappa$ connections are retained, where $\kappa$ denotes the desired number of non-zero weights. Precisely, the indicator variables $\mathbf { c }$ are set as follows:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
c _ { j } = \mathbb { 1 } [ s _ { j } - \tilde { s } _ { \kappa } \geq 0 ] , \quad \forall j \in \{ 1 \ldots m \} ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $\tilde { s } _ { \kappa }$ is the $\kappa$ -th largest element in the vector s and $\mathbb { 1 } [ \cdot ]$ is the indicator function. Here, for exactly $\kappa$ connections to be retained, ties can be broken arbitrarily.
|
| 105 |
+
|
| 106 |
+
We would like to clarify that the above criterion (Equation 6) is different from the criteria used in early works by Mozer & Smolensky (1989) or Karnin (1990) which do not entirely capture the connection sensitivity. The fundamental idea behind them is to identify elements (e.g. weights or neurons) that least degrade the performance when removed. This means that their saliency criteria (i.e. $- \partial L / \partial \mathbf { w }$ or $- \partial L / \partial \pmb { \alpha }$ ; $_ { \pmb { \alpha } }$ refers to the connectivity of neurons), in fact, depend on the loss value before pruning, which in turn, require the network to be pre-trained and iterative optimization cycles to ensure minimal loss in performance. They also suffer from the same drawbacks as the magnitude and Hessian based methods as discussed in Section 3. In contrast, our saliency criterion (Equation 6) is designed to measure the sensitivity as to how much influence elements have on the loss function regardless of whether it is positive or negative. This criterion alleviates the dependency on the value of the loss, eliminating the need for pre-training. These fundamental differences enable the network to be pruned at single-shot prior to training, which we discuss further in the next section.
|
| 107 |
+
|
| 108 |
+
<table><tr><td colspan="3">Algorithm1 SNIP: Single-shot Network Pruning based on Connection Sensitivity</td></tr><tr><td>Ensure: | w*|lo ≤ κ</td><td>Require: Loss function L, training dataset D, sparsity level K</td><td>Refer Equation 3</td></tr><tr><td></td><td>1:w_← VarianceScalingInitialization</td><td>Refer Section 4.2</td></tr><tr><td></td><td>2:Db={(xi,yi)}=1 ~D</td><td>> Sample a mini-batch of training data</td></tr><tr><td>3:Sj←</td><td>l9j(w;Db) ∑=1l9k((w;Db)l , ∀j∈{1...m}</td><td>Connection sensitivity</td></tr><tr><td></td><td>4:s ← SortDescending(s)</td><td></td></tr><tr><td></td><td>5:cj←1[sj-$κ≥0],∀j∈{1...m}</td><td>>Pruning: choose top-k connections</td></tr><tr><td>7: w* ← c⊙w*</td><td>6: W* ← arg minw∈Rm L(c ③ w;D)</td><td>Regular training</td></tr></table>
|
| 109 |
+
|
| 110 |
+
# 4.2 SINGLE-SHOT PRUNING AT INITIALIZATION
|
| 111 |
+
|
| 112 |
+
Note that the saliency measure defined in Equation 6 depends on the value of weights w used to evaluate the derivative as well as the dataset $\mathcal { D }$ and the loss function $L$ . In this section, we discuss the effect of each of them and show that it can be used to prune the network in single-shot with initial weights w.
|
| 113 |
+
|
| 114 |
+
Firstly, in order to minimize the impact of weights on the derivatives $\partial L / \partial c _ { j }$ , we need to choose these weights carefully. For instance, if the weights are too large, the activations after the non-linear function (e.g., sigmoid) will be saturated, which would result in uninformative gradients. Therefore, the weights should be within a sensible range. In particular, there is a body of work on neural network initialization (Goodfellow et al. (2016)) that ensures the gradients to be in a reasonable range, and our saliency measure can be used to prune neural networks at any such initialization.
|
| 115 |
+
|
| 116 |
+
Furthermore, we are interested in making our saliency measure robust to architecture variations. Note that initializing neural networks is a random process, typically done using normal distribution. However, if the initial weights have a fixed variance, the signal passing through each layer no longer guarantees to have the same variance, as noted by LeCun et al. (1998). This would make the gradient and in turn our saliency measure, to be dependent on the architectural characteristics. Thus, we advocate the use of variance scaling methods (e.g., Glorot & Bengio (2010)) to initialize the weights, such that the variance remains the same throughout the network. By ensuring this, we empirically show that our saliency measure computed at initialization is robust to variations in the architecture.
|
| 117 |
+
|
| 118 |
+
Next, since the dataset and the loss function defines the task at hand, by relying on both of them, our saliency criterion in fact discovers the connections in the network that are important to the given task. However, the practitioner needs to make a choice on whether to use the whole training set, or a mini-batch or the validation set to compute the connection saliency. Moreover, in case there are memory limitations (e.g., large model or dataset), one can accumulate the saliency measure over multiple batches or take an exponential moving average. In our experiments, we show that using only one mini-batch of a reasonable number of training examples can lead to effective pruning.
|
| 119 |
+
|
| 120 |
+
Finally, in contrast to the previous approaches, our criterion for finding redundant connections is simple and directly based on the sensitivity of the connections. This allows us to effectively identify and prune redundant connections in a single step even before training. Then, training can be performed on the resulting pruned (sparse) network. We name our method SNIP for Single-shot Network Pruning, and the complete algorithm is given in Algorithm 1.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 1: Test errors of LeNets pruned at varying sparsity levels $\bar { \kappa }$ , where $\bar { \kappa } = 0$ refers to the reference network trained without pruning. Our approach performs as good as the reference network across varying sparsity levels on both the models.
|
| 124 |
+
|
| 125 |
+
# 5 EXPERIMENTS
|
| 126 |
+
|
| 127 |
+
We evaluate our method, SNIP, on MNIST, CIFAR-10 and Tiny-ImageNet classification tasks with a variety of network architectures. Our results show that SNIP yields extremely sparse models with minimal or no loss in accuracy across all tested architectures, while being much simpler than other state-of-the-art alternatives. We also provide clear evidence that our method prunes genuinely explainable connections rather than performing blind pruning.
|
| 128 |
+
|
| 129 |
+
Experiment setup For brevity, we define the sparsity level to be $\bar { \kappa } = ( m - \kappa ) / m \cdot 1 0 0 ( \% )$ , where $m$ is the total number of parameters and $\kappa$ is the desired number of non-zero weights. For a given sparsity level $\bar { \kappa }$ , the sensitivity scores are computed using a batch of 100 and 128 examples for MNIST and CIFAR experiments, respectively. After pruning, the pruned network is trained in the standard way. Specifically, we train the models using SGD with momentum of 0.9, batch size of 100 for MNIST and 128 for CIFAR experiments and the weight decay rate of 0.0005, unless stated otherwise. The initial learning rate is set to 0.1 and decayed by 0.1 at every 25k or $3 0 \mathrm { k }$ iterations for MNIST and CIFAR, respectively. Our algorithm requires no other hyperparameters or complex learning/pruning schedules as in most pruning algorithms. We spare $10 \%$ of the training data as a validation set and used only $90 \%$ for training. For CIFAR experiments, we use the standard data augmentation (i.e., random horizontal flip and translation up to 4 pixels) for both the reference and sparse models. The code can be found here: https://github.com/namhoonlee/snip-public.
|
| 130 |
+
|
| 131 |
+
# 5.1 PRUNING LENETS WITH VARYING LEVELS OF SPARSITY
|
| 132 |
+
|
| 133 |
+
We first test our approach on two standard networks for pruning, LeNet-300-100 and LeNet-5-Caffe. LeNet-300-100 consists of three fully-connected (fc) layers with $2 6 7 \mathrm { k }$ parameters and LeNet-5-Caffe consists of two convolutional (conv) layers and two fc layers with 431k parameters. We prune the LeNets for different sparsity levels $\bar { \kappa }$ and report the performance in error on the MNIST image classification task. We run the experiment 20 times for each $\bar { \kappa }$ by changing random seeds for dataset and network initialization. The results are reported in Figure 1.
|
| 134 |
+
|
| 135 |
+
The pruned sparse LeNet-300-100 achieves performances similar to the reference $( \bar { \kappa } = 0$ ), only with negligible loss at $\bar { \kappa } = 9 0$ . For LeNet-5-Caffe, the performance degradation is nearly invisible. Note that our saliency measure does not require the network to be pre-trained and is computed at random initialization. Despite such simplicity, our approach prunes LeNets quickly (single-shot) and effectively (minimal accuracy loss) at varying sparsity levels.
|
| 136 |
+
|
| 137 |
+
# 5.2 COMPARISONS TO EXISTING APPROACHES
|
| 138 |
+
|
| 139 |
+
What happens if we increase the target sparsity to an extreme level? For example, would a model with only $1 \%$ of the total parameters still be trainable and perform well? We test our approach for extreme sparsity levels (e.g., up to $9 9 \%$ sparsity on LeNet-5-Caffe) and compare with various pruning algorithms as follows: LWC (Han et al. (2015)), DNS (Guo et al. (2016)), LC (Carreira-Perpin˜ an & ´
|
| 140 |
+
|
| 141 |
+
Table 1: Pruning results on LeNets and comparisons to other approaches. Here, “many” refers to an arbitrary number often in the order of total learning steps, and “soft” refers to soft pruning in Bayesian based methods. Our approach is capable of pruning up to $98 \%$ for LeNet-300-100 and $9 9 \%$ for LeNet-5-Caffe with marginal increases in error from the reference network. Notably, our approach is considerably simpler than other approaches, with no requirements such as pretraining, additional hyperparameters, augmented training objective or architecture dependent constraints.
|
| 142 |
+
|
| 143 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Criterion</td><td colspan="2">LeNet-300-100</td><td colspan="2">LeNet-5-Caffe</td><td rowspan="2">Pretrain</td><td rowspan="2">#Prune</td><td rowspan="2">Additional hyperparam.</td><td rowspan="2">Augment objective</td><td rowspan="2">Arch. constraints</td></tr><tr><td>K(%)</td><td>err. (%)</td><td>K(%)</td><td>err. (%)</td></tr><tr><td>Ref.</td><td></td><td></td><td>1.7</td><td>一</td><td>0.9</td><td></td><td>1</td><td>-></td><td>-xx></td><td>√</td></tr><tr><td>LWC</td><td>Magnitude</td><td>91.7</td><td>1.6</td><td>91.7</td><td>0.8</td><td></td><td>many</td><td></td><td></td><td></td></tr><tr><td>DNS</td><td>Magnitude</td><td>98.2</td><td>2.0</td><td>99.1</td><td>0.9</td><td></td><td>many</td><td></td><td></td><td>√</td></tr><tr><td>LC</td><td>Magnitude</td><td>99.0</td><td>3.2</td><td>99.0</td><td>1.1</td><td></td><td>many</td><td>√</td><td></td><td>X</td></tr><tr><td>SWS</td><td>Bayesian</td><td>95.6</td><td>1.9</td><td>99.5</td><td>1.0</td><td></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>SVD</td><td>Bayesian</td><td>98.5</td><td>1.9</td><td>99.6</td><td>0.8</td><td>->>>>></td><td>soft</td><td>√</td><td>√</td><td>X</td></tr><tr><td>OBD</td><td>Hessian</td><td>92.0</td><td>2.0</td><td>92.0</td><td>2.7</td><td>√</td><td>many</td><td>√</td><td>X</td><td>X</td></tr><tr><td>L-OBS</td><td>Hessian</td><td>98.5</td><td>2.0</td><td>99.0</td><td>2.1</td><td>√</td><td>many</td><td>√</td><td>X</td><td>√</td></tr><tr><td rowspan="2">SNIP (ours)</td><td>Connection</td><td>95.0</td><td>1.6</td><td>98.0</td><td>0.8</td><td>×</td><td></td><td>×</td><td>×</td><td>×</td></tr><tr><td>sensitivity</td><td>98.0</td><td>2.4</td><td>99.0</td><td>1.1</td><td></td><td>1</td><td></td><td></td><td></td></tr></table>
|
| 144 |
+
|
| 145 |
+
Idelbayev (2018)), SWS (Ullrich et al. (2017)), SVD (Molchanov et al. (2017a)), OBD (LeCun et al.
|
| 146 |
+
(1990)), L-OBS (Dong et al. (2017)). The results are summarized in Table 1.
|
| 147 |
+
|
| 148 |
+
We achieve errors that are comparable to the reference model, degrading approximately $0 . 7 \%$ and $0 . 3 \%$ while pruning $98 \%$ and $9 9 \%$ of the parameters in LeNet-300-100 and LeNet-5-Caffe respectively. For slightly relaxed sparsities (i.e., $9 5 \%$ for LeNet-300-100 and $98 \%$ for LeNet-5-Caffe), the sparse models pruned by SNIP record better performances than the dense reference network. Considering $9 9 \%$ sparsity, our method efficiently finds $1 \%$ of the connections even before training, that are sufficient to learn as good as the reference network. Moreover, SNIP is competitive to other methods, yet it is unparalleled in terms of algorithm simplicity.
|
| 149 |
+
|
| 150 |
+
To be more specific, we enumerate some key points and non-trivial aspects of other algorithms and highlight the benefit of our approach. First of all, the aforementioned methods require networks to be fully trained (if not partly) before pruning. These approaches typically perform many pruning operations even if the network is well pretrained, and require additional hyperparameters (e.g., pruning frequency in Guo et al. (2016), annealing schedule in Carreira-Perpin˜an & Idelbayev (2018)). Some ´ methods augment the training objective to handle pruning together with training, increasing the complexity of the algorithm (e.g., augmented Lagrangian in Carreira-Perpin˜an & Idelbayev (2018), ´ variational inference in Molchanov et al. (2017a)). Furthermore, there are approaches designed to include architecture dependent constraints (e.g., layer-wise pruning schemes in Dong et al. (2017)).
|
| 151 |
+
|
| 152 |
+
Compared to the above approaches, ours seems to cost almost nothing; it requires no pretraining or additional hyperparameters, and is applied only once at initialization. This means that one can easily plug-in SNIP as a preprocessor before training neural networks. Since SNIP prunes the network at the beginning, we could potentially expedite the training phase by training only the survived parameters (e.g., reduced expected FLOPs in Louizos et al. (2018)). Notice that this is not possible for the aforementioned approaches as they obtain the maximum sparsity at the end of the process.
|
| 153 |
+
|
| 154 |
+
# 5.3 VARIOUS MODERN ARCHITECTURES
|
| 155 |
+
|
| 156 |
+
In this section we show that our approach is generally applicable to more complex modern network architectures including deep convolutional, residual and recurrent ones. Specifically, our method is applied to the following models:
|
| 157 |
+
|
| 158 |
+
• AlexNet-s and AlexNet-b: Models similar to Krizhevsky et al. (2012) in terms of the number of layers and size of kernels. We set the size of fc layers to 512 (AlexNet-s) and to 1024 (AlexNet-b) to adapt for CIFAR-10 and use strides of 2 for all conv layers instead of using pooling layers. • VGG-C, VGG-D and VGG-like: Models similar to the original VGG models described in Simonyan & Zisserman (2015). VGG-like (Zagoruyko (2015)) is a popular variant adapted for CIFAR-10 which has one less fc layers. For all VGG models, we set the size of fc layers to 512, remove dropout layers to avoid any effect on sparsification and use batch normalization instead. • WRN-16-8, WRN-16-10 and WRN-22-8: Same models as in Zagoruyko & Komodakis (2016).
|
| 159 |
+
|
| 160 |
+
<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td></td><td>△</td></tr><tr><td rowspan="5">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>14.12 →</td><td>14.99</td><td>+0.87</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>13.92 →</td><td>14.50</td><td>+0.58</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>6.82 →</td><td>7.27</td><td>+0.45</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>6.76 →</td><td>7.09</td><td>+0.33</td></tr><tr><td>VGG-like</td><td>97.0</td><td>15.0m → 449k</td><td>8.26 →</td><td>8.00</td><td>-0.26</td></tr><tr><td rowspan="3">Residual</td><td>WRN-16-8</td><td>95.0</td><td>10.0m → 548k</td><td>6.21 →</td><td>6.63</td><td>+0.42</td></tr><tr><td>WRN-16-10</td><td>95.0</td><td>17.1m → 856k</td><td>5.91 →</td><td>6.43</td><td>+0.52</td></tr><tr><td>WRN-22-8</td><td>95.0</td><td>17.2m → 858k</td><td>6.14 →</td><td>5.85</td><td>-0.29</td></tr><tr><td rowspan="4">Recurrent</td><td>LSTM-s</td><td>95.0</td><td>137k → 6.8k</td><td>1.88 →</td><td>1.57</td><td>-0.31</td></tr><tr><td>LSTM-b</td><td>95.0</td><td>535k → 26.8k</td><td>1.15 →</td><td>1.35</td><td>+0.20</td></tr><tr><td>GRU-s</td><td>95.0</td><td>104k → 5.2k</td><td>1.87 →</td><td>2.41</td><td>+0.54</td></tr><tr><td>GRU-b</td><td>95.0</td><td>404k→ 20.2k</td><td>1.71 →</td><td>1.52</td><td>-0.19</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 2: Pruning results of the proposed approach on various modern architectures (before after). AlexNets, VGGs and WRNs are evaluated on CIFAR-10, and LSTMs and GRUs are evaluated on the sequential MNIST classification task. The approach is generally applicable regardless of architecture types and models and results in a significant amount of reduction in the number of parameters with minimal or no loss in performance.
|
| 163 |
+
|
| 164 |
+
• LSTM-s, LSTM-b, GRU-s, GRU-b: One layer RNN networks with either LSTM (Zaremba et al. (2014)) or GRU (Cho et al. (2014)) cells. We develop two unit sizes for each cell type, 128 and 256 for $\{ \cdot \}$ -s and $\{ \cdot \}$ -b, respectively. The model is adapted for the sequential MNIST classification task, similar to Le et al. (2015). Instead of processing pixel-by-pixel, however, we perform rowby-row processing (i.e., the RNN cell receives each row at a time).
|
| 165 |
+
|
| 166 |
+
The results are summarized in Table 2. Overall, our approach prunes a substantial amount of parameters in a variety of network models with minimal or no loss in accuracy $( < 1 \% )$ . Our pruning procedure does not need to be modified for specific architectural variations (e.g., recurrent connections), indicating that it is indeed versatile and scalable. Note that prior art that use a saliency criterion based on the weights (i.e., magnitude or Hessian based) would require considerable adjustments in their pruning schedules as per changes in the model.
|
| 167 |
+
|
| 168 |
+
We note of a few challenges in directly comparing against others: different network specifications, learning policies, datasets and tasks. Nonetheless, we provide a few comparison points that we found in the literature. On CIFAR-10, SVD prunes $9 7 . 9 \%$ of the connections in VGG-like with no loss in accuracy (ours: $9 7 \%$ sparsity) while SWS obtained $9 3 . 4 \%$ sparsity on WRN-16-4 but with a non-negligible loss in accuracy of $2 \%$ . There are a couple of works attempting to prune RNNs (e.g., GRU in Narang et al. (2017) and LSTM in See et al. (2016)). Even though these methods are specifically designed for RNNs, none of them are able to obtain extreme sparsity without substantial loss in accuracy reflecting the challenges of pruning RNNs. To the best of our knowledge, we are the first to demonstrate on convolutional, residual and recurrent networks for extreme sparsities without requiring additional hyperparameters or modifying the pruning procedure.
|
| 169 |
+
|
| 170 |
+
# 5.4 UNDERSTANDING WHICH CONNECTIONS ARE BEING PRUNED
|
| 171 |
+
|
| 172 |
+
So far we have shown that our approach can prune a variety of deep neural network architectures for extreme sparsities without losing much on accuracy. However, it is not clear yet which connections are actually being pruned away or whether we are pruning the right (i.e., unimportant) ones. What if we could actually peep through our approach into this inspection?
|
| 173 |
+
|
| 174 |
+
Consider the first layer in LeNet-300-100 parameterized by $\mathbf { w } _ { l = 1 } ~ \in ~ \mathbb { R } ^ { 7 8 4 \times 3 0 0 }$ . This is a layer fully connected to the input where input images are of size $2 8 \times 2 8 \ : = \ : 7 8 4$ . In order to understand which connections are retained, we can visualize the binary connectivity mask for this layer $\mathbf { c } _ { l = 1 }$ , by averaging across columns and then reshaping the vector into 2D matrix (i.e., $\begin{array} { r } { \mathbf { c } _ { l = 1 } ^ { \check { } } \in \{ \bar { 0 } , 1 \} ^ { \check { } 8 4 \times 3 0 \widetilde { 0 } } \mathbb { R } ^ { 7 8 4 } \mathbb { R } ^ { 2 8 \times 2 8 } } \end{array}$ ). Recall that our method computes c using a minibatch of examples. In this experiment, we curate the mini-batch of examples of the same class and see which weights are retained for that mini-batch of data. We repeat this experiment for all classes (i.e., digits for MNIST and fashion items for Fashion-MNIST) with varying sparsity levels $\bar { \kappa }$ . The results are displayed in Figure 2 (see Appendix A for more results).
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 2: Visualizations of pruned parameters of the first layer in LeNet-300-100; the parameters are reshaped to be visualized as an image. Each column represents the visualizations for a particular class obtained using a batch of 100 examples with varying levels of sparsity $\bar { \kappa }$ , from 10 (top) to 90 (bottom). Bright pixels indicate that the parameters connected to these region had high importance scores (s) and survived from pruning. As the sparsity increases, the parameters connected to the discriminative part of the image for classification survive and the irrelevant parts get pruned.
|
| 178 |
+
|
| 179 |
+
The results are significant; important connections seem to reconstruct either the complete image (MNIST) or silhouettes (Fashion-MNIST) of input class. When we use a batch of examples of the digit 0 (i.e., the first column of MNIST results), for example, the parameters connected to the foreground of the digit 0 survive from pruning while the majority of background is removed. Also, one can easily determine the identity of items from Fashion-MNIST results. This clearly indicates that our method indeed prunes the unimportant connections in performing the classification task, receiving signals only from the most discriminative part of the input. This stands in stark contrast to other pruning methods from which carrying out such inspection is not straightforward.
|
| 180 |
+
|
| 181 |
+
# 5.5 EFFECTS OF DATA AND WEIGHT INITIALIZATION
|
| 182 |
+
|
| 183 |
+
Recall that our connection saliency measure depends on the network weights w as well as the given data $\mathcal { D }$ (Section 4.2). We study the effect of each of these in this section.
|
| 184 |
+
|
| 185 |
+
Effect of data. Our connection saliency measure depends on a mini-batch of train examples $\mathcal { D } ^ { b }$ (see Algorithm 1). To study the effect of data, we vary the batch size used to compute the saliency $( | \mathcal { D } ^ { b } | )$ and check which connections are being pruned as well as how much performance change this results in on the corresponding sparse network. We test with LeNet-300-100 to visualize the remaining parameters, and set the sparsity level $\bar { \kappa } = 9 0$ . Note that the batch size used for training remains the same as 100 for all cases. The results are displayed in Figure 3.
|
| 186 |
+
|
| 187 |
+
Effect of initialization. Our approach prunes a network at a stochastic initialization as discussed. We study the effect of the following initialization methods: 1) RN (random normal), 2) TN (truncated random normal), 3) VS-X (a variance scaling method using Glorot & Bengio (2010)), and 4) VS-H (a variance scaling method He et al. (2015)). We test on LeNets and RNNs on MNIST and run 20 sets of experiments by varying the seed for initialization. We set the sparsity level $\bar { \kappa } = 9 0$ , and train with Adam optimizer (Kingma & Ba (2015)) with learning rate of 0.001 without weight decay. Note that for training VS-X initialization is used in all the cases. The results are reported in Figure 3.
|
| 188 |
+
|
| 189 |
+
For all models, VS-H achieves the best performance. The differences between initializers are marginal on LeNets, however, variance scaling methods indeed turns out to be essential for complex RNN models. This effect is significant especially for GRU where without variance scaling initialization, the pruned networks are unable to achieve good accuracies, even with different optimizers. Overall, initializing with a variance scaling method seems crucial to making our saliency measure reliable and model-agnostic.
|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
|
| 193 |
+
Figure 3: The effect of different batch sizes: (top-row) survived parameters in the first layer of LeNet-300-100 from pruning visualized as images; (bottom-row) the performance in errors of the pruned networks. For $| \mathcal { D } ^ { b } | \overset { - } { = } 1$ , the sampled example was 8; our pruning precisely retains the valid connections. As $| \mathcal { D } ^ { b } |$ increases, survived parameters get close to the average of all examples in the train set (last column), and the error decreases.
|
| 194 |
+
|
| 195 |
+
<table><tr><td>Init.</td><td>LeNet-300-100</td><td>LeNet-5-Caffe</td><td>LSTM-s</td><td>GRU-s</td></tr><tr><td>RN</td><td>1.90 ± (0.09)</td><td>0.89 ± (0.04)</td><td>2.93 ± (0.20)</td><td>47.61 ± (20.49)</td></tr><tr><td>TN</td><td>1.96 ± (0.11)</td><td>0.87 ± (0.05)</td><td>3.03 ± (0.17)</td><td>46.48± (22.25)</td></tr><tr><td>VS-X</td><td>1.91 ± (0.10)</td><td>0.88 ± (0.07)</td><td>1.48 ± (0.09)</td><td>1.80 ± (0.10)</td></tr><tr><td>VS-H</td><td>1.88 ± (0.10)</td><td>0.85 ± (0.05)</td><td>1.47 ± (0.08)</td><td>1.80 ± (0.14)</td></tr></table>
|
| 196 |
+
|
| 197 |
+
Table 3: The effect of initialization on our saliency score. We report the classification errors ( $\pm$ std).
|
| 198 |
+
Variance scaling initialization (VS-X, VS-H) improves the performance, especially for RNNs.
|
| 199 |
+
|
| 200 |
+
# 5.6 FITTING RANDOM LABELS
|
| 201 |
+
|
| 202 |
+
To further explore the use cases of SNIP, we run the experiment introduced in Zhang et al. (2017) and check whether the sparse network obtained by SNIP memorizes the dataset. Specifically, we train LeNet-5-Caffe for both the reference model and pruned model (with $\bar { \kappa } = 9 9 $ ) on MNIST with either true or randomly shuffled labels. To compute the connection sensitivity, always true labels are used. The results are plotted in Figure 4.
|
| 203 |
+
|
| 204 |
+
Given true labels, both the reference (red) and pruned (blue) models quickly reach to almost zero training loss. However, the reference model provided with random labels (green) also reaches to very low training loss, even with an explicit L2 regularizer (purple), indicating that neural networks have enough capacity to memorize completely random data. In contrast, the model pruned by SNIP (orange) fails to fit the random labels (high training error). The potential explanation is that the pruned network does not have sufficient capacity to fit the random labels, but it is able to classify MNIST with true labels, reinforcing the significance of our saliency criterion. It is possible that a similar experiment can be done with other pruning methods (Molchanov et al. (2017a)), however, being simple, SNIP enables such exploration much easier. We provide a further analysis on the effect of varying $\bar { \kappa }$ in Appendix B.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 4: The sparse model pruned by SNIP does not fit the random labels.
|
| 208 |
+
|
| 209 |
+
# 6 DISCUSSION AND FUTURE WORK
|
| 210 |
+
|
| 211 |
+
In this work, we have presented a new approach, SNIP, that is simple, versatile and interpretable; it prunes irrelevant connections for a given task at single-shot prior to training and is applicable to a variety of neural network models without modifications. While SNIP results in extremely sparse models, we find that our connection sensitivity measure itself is noteworthy in that it diagnoses important connections in the network from a purely untrained network. We believe that this opens up new possibilities beyond pruning in the topics of understanding of neural network architectures, multi-task transfer learning and structural regularization, to name a few. In addition to these potential directions, we intend to explore the generalization capabilities of sparse networks.
|
| 212 |
+
|
| 213 |
+
# ACKNOWLEDGEMENTS
|
| 214 |
+
|
| 215 |
+
This work was supported by the Korean Government Graduate Scholarship, the ERC grant ERC2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1 and EPSRC/MURI grant EP/N019474/1. We would also like to acknowledge the Royal Academy of Engineering and FiveAI.
|
| 216 |
+
|
| 217 |
+
# REFERENCES
|
| 218 |
+
|
| 219 |
+
Sanjeev Arora, Rong Ge, Behnam Neyshabur, and Yi Zhang. Stronger generalization bounds for deep nets via a compression approach. ICML, 2018.
|
| 220 |
+
|
| 221 |
+
Leo Breiman. Better subset regression using the nonnegative garrote. Technometrics, 1995.
|
| 222 |
+
|
| 223 |
+
Miguel A. Carreira-Perpi ´ n˜an and Yerlan Idelbayev. “Learning-compression” algorithms for neural ´ net pruning. CVPR, 2018.
|
| 224 |
+
|
| 225 |
+
Yves Chauvin. A back-propagation algorithm with optimal use of hidden units. NIPS, 1989.
|
| 226 |
+
|
| 227 |
+
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. EMNLP, 2014.
|
| 228 |
+
|
| 229 |
+
Xin Dong, Shangyu Chen, and Sinno Pan. Learning to prune deep neural networks via layer-wise optimal brain surgeon. NIPS, 2017.
|
| 230 |
+
|
| 231 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. AISTATS, 2010.
|
| 232 |
+
|
| 233 |
+
Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014.
|
| 234 |
+
|
| 235 |
+
Ian Goodfellow, Yoshua Bengio, Aaron Courville, and Yoshua Bengio. Deep learning. MIT press Cambridge, 2016.
|
| 236 |
+
|
| 237 |
+
Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic network surgery for efficient dnns. NIPS, 2016.
|
| 238 |
+
|
| 239 |
+
Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. ICML, 2015.
|
| 240 |
+
|
| 241 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. NIPS, 2015.
|
| 242 |
+
|
| 243 |
+
Babak Hassibi, David G Stork, and Gregory J Wolff. Optimal brain surgeon and general network pruning. Neural Networks, 1993.
|
| 244 |
+
|
| 245 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. ICCV, 2015.
|
| 246 |
+
|
| 247 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. NIPS, 2016.
|
| 248 |
+
|
| 249 |
+
Masumi Ishikawa. Structural learning with forgetting. Neural Networks, 1996.
|
| 250 |
+
|
| 251 |
+
Max Jaderberg, Andrea Vedaldi, and Andrew Zisserman. Speeding up convolutional neural networks with low rank expansions. BMVC, 2014.
|
| 252 |
+
|
| 253 |
+
Ehud D Karnin. A simple procedure for pruning back-propagation trained neural networks. Neural Networks, 1990.
|
| 254 |
+
|
| 255 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ICLR, 2015.
|
| 256 |
+
|
| 257 |
+
Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. ICML, 2017.
|
| 258 |
+
|
| 259 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. 2012.
|
| 260 |
+
|
| 261 |
+
Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. CoRR, 2015.
|
| 262 |
+
|
| 263 |
+
Yann LeCun, John S Denker, and Sara A Solla. Optimal brain damage. NIPS, 1990.
|
| 264 |
+
|
| 265 |
+
Yann LeCun, Leon Bottou, Genevieve B. Orr, and Klaus-Robert M ´ uller. Efficient backprop. ¨ Neural Networks: Tricks of the Trade, 1998.
|
| 266 |
+
|
| 267 |
+
Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. ICLR, 2017.
|
| 268 |
+
|
| 269 |
+
Christos Louizos, Max Welling, and Diederik P Kingma. Learning sparse neural networks through $l _ { 0 }$ regularization. ICLR, 2018.
|
| 270 |
+
|
| 271 |
+
Decebal Constantin Mocanu, Elena Mocanu, Peter Stone, Phuong H Nguyen, Madeleine Gibescu, and Antonio Liotta. Scalable training of artificial neural networks with adaptive sparse connectivity inspired by network science. Nature Communications, 2018.
|
| 272 |
+
|
| 273 |
+
Dmitry Molchanov, Arsenii Ashukha, and Dmitry Vetrov. Variational dropout sparsifies deep neural networks. ICML, 2017a.
|
| 274 |
+
|
| 275 |
+
Pavlo Molchanov, Stephen Tyree, Tero Karras, Timo Aila, and Jan Kautz. Pruning convolutional neural networks for resource efficient inference. ICLR, 2017b.
|
| 276 |
+
|
| 277 |
+
Michael C Mozer and Paul Smolensky. Skeletonization: A technique for trimming the fat from a network via relevance assessment. NIPS, 1989.
|
| 278 |
+
|
| 279 |
+
Sharan Narang, Erich Elsen, Gregory Diamos, and Shubho Sengupta. Exploring sparsity in recurrent neural networks. ICLR, 2017.
|
| 280 |
+
|
| 281 |
+
Alexander Novikov, Dmitrii Podoprikhin, Anton Osokin, and Dmitry P Vetrov. Tensorizing neural networks. NIPS, 2015.
|
| 282 |
+
|
| 283 |
+
Steven J Nowlan and Geoffrey E Hinton. Simplifying neural networks by soft weight-sharing. Neural Computation, 1992.
|
| 284 |
+
|
| 285 |
+
Ameya Prabhu, Girish Varma, and Anoop Namboodiri. Deep expander networks: Efficient deep networks from graph theory. ECCV, 2018.
|
| 286 |
+
|
| 287 |
+
Russell Reed. Pruning algorithms-a survey. Neural Networks, 1993.
|
| 288 |
+
|
| 289 |
+
Abigail See, Minh-Thang Luong, and Christopher D Manning. Compression of neural machine translation models via pruning. CoNLL, 2016.
|
| 290 |
+
|
| 291 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015.
|
| 292 |
+
|
| 293 |
+
Karen Ullrich, Edward Meeds, and Max Welling. Soft weight-sharing for neural network compression. ICLR, 2017.
|
| 294 |
+
|
| 295 |
+
Andreas S Weigend, David E Rumelhart, and Bernardo A Huberman. Generalization by weightelimination with application to forecasting. NIPS, 1991.
|
| 296 |
+
|
| 297 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. NIPS, 2016.
|
| 298 |
+
|
| 299 |
+
Sergey Zagoruyko. $9 2 . 4 5 \%$ on cifar-10 in torch. Torch Blog, 2015.
|
| 300 |
+
|
| 301 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. BMVC, 2016.
|
| 302 |
+
|
| 303 |
+
Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014.
|
| 304 |
+
|
| 305 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. ICLR, 2017.
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 5: Results of pruning with SNIP on inverted (Fashion-)MNIST (i.e., dark and bright regions are swapped). Notably, even if the data is inverted, the results are the same as the ones on the original (Fashion-)MNIST in Figure 2.
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
Figure 6: Results of pruning with $\partial L / \partial$ w on the original and inverted (Fashion-)MNIST. Notably, compared to the case of using SNIP (Figures 2 and 5), the results are different: Firstly, the results on the original (Fashion-)MNIST (i.e., (a) and (c) above) are not the same as the ones using SNIP (i.e., (a) and (b) in Figure 2). Moreover, the pruning patterns are inconsistent with different sparsity levels, either intra-class or inter-class. Furthermore, using ${ \partial L } / { \partial \mathbf { w } }$ results in different pruning patterns between the original and inverted data in some cases (e.g., the $2 ^ { \mathrm { n d } }$ columns between (c) and (d)).
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 7: The effect of varying sparsity levels $\left( \hat { \kappa } \right)$ . The lower $\bar { \kappa }$ becomes, the lower training loss is recorded, meaning that a network with more parameters is more vulnerable to fitting random labels. Recall, however, that all pruned models are able to learn to perform the classification task without losing much accuracy (see Figure 1). This potentially indicates that the pruned network does not have sufficient capacity to fit the random labels, but it is capable of performing the classification.
|
| 315 |
+
|
| 316 |
+
# C TINY-IMAGENET
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Architecture</td><td>Model</td><td>Sparsity (%)</td><td># Parameters</td><td>Error (%)</td><td>△</td></tr><tr><td rowspan="5">Convolutional</td><td>AlexNet-s</td><td>90.0</td><td>5.1m → 507k</td><td>62.52 → 65.27</td><td>+2.75</td></tr><tr><td>AlexNet-b</td><td>90.0</td><td>8.5m → 849k</td><td>62.76 → 65.54</td><td>+2.78</td></tr><tr><td>VGG-C</td><td>95.0</td><td>10.5m → 526k</td><td>56.49 → 57.48</td><td>+0.99</td></tr><tr><td>VGG-D</td><td>95.0</td><td>15.2m → 762k</td><td>56.85 → 57.00</td><td>+0.15</td></tr><tr><td>VGG-like</td><td>95.0</td><td>15.0m → 749k</td><td>54.86 → 55.73</td><td>+0.87</td></tr></table>
|
| 319 |
+
|
| 320 |
+
Table 4: Pruning results of SNIP on Tiny-ImageNet (before after). Tiny-ImageNet2 is a subset of the full ImageNet: there are 200 classes in total, each class has 500 and 50 images for training and validation respectively, and each image has the spatial resolution of $6 4 \times 6 4$ . Compared to CIFAR-10, the resolution is doubled, and to deal with this, the stride of the first convolution in all architectures is doubled, following the standard practice for this dataset. In general, the Tiny-ImageNet classification task is considered much more complex than MNIST or CIFAR-10. Even on Tiny-ImageNet, however, SNIP is still able to prune a large amount of parameters with minimal loss in performance. AlexNet models lose more accuracies than VGGs, which may be attributed to the fact that the first convolution stride for AlexNet is set to be 4 (by its design of no pooling) which is too large and could lead to high loss of information when pruned.
|
| 321 |
+
|
| 322 |
+
D ARCHITECTURE DETAILS
|
| 323 |
+
|
| 324 |
+
<table><tr><td rowspan=1 colspan=8>Module Weight Stride Bias BatchNorm ReLU</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[11,11, 3,96]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[2,2]</td><td rowspan=1 colspan=3>[96] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[5,5,96,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2j</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>[256]</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,256,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2.2</td><td rowspan=1 colspan=2>[384]</td><td rowspan=1 colspan=2>√</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,384]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=5>[384]</td></tr><tr><td rowspan=1 colspan=1>Conv</td><td rowspan=1 colspan=1>[3,3,384,256]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>2,2</td><td rowspan=1 colspan=2>[256]</td><td rowspan=1 colspan=2>(</td></tr><tr><td rowspan=1 colspan=1>Linear</td><td rowspan=1 colspan=1>[256,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024×k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=3>Linear [1024 × k,1024 ×k]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>[1024 × k] √</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=8>Linear [1024 × k,c] [c] X X</td></tr></table>
|
| 325 |
+
|
| 326 |
+
Table 5: AlexNet-s $k = 1 ,$ ) and AlexNet-b $( k = 2 )$ ). In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR-10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [4, 4] instead of [2, 2] to deal with the increase in the image resolution.
|
| 327 |
+
|
| 328 |
+
<table><tr><td>Module</td><td>Weight</td><td>Stride</td><td>Bias</td><td>BatchNorm</td><td>ReLU</td></tr><tr><td>Conv</td><td>[3,3,3,64]</td><td>[1,1]</td><td>[64]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 64, 64]</td><td></td><td>[64]</td><td>广</td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>×</td><td><>x></td></tr><tr><td>Conv</td><td>[3,3,64,128]</td><td>1j</td><td>[128]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,128,128]</td><td>1j</td><td>[128]</td><td>√</td><td>√</td></tr><tr><td>Pool</td><td></td><td>18E.83. 2</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,128,256]</td><td></td><td>[256]</td><td>√</td><td></td></tr><tr><td>Conv</td><td>[3,3,256,256]</td><td>1</td><td>[256]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,256,256]</td><td>1j</td><td>[256]</td><td>√</td><td></td></tr><tr><td>Pool</td><td></td><td>2j</td><td></td><td>X</td><td>X</td></tr><tr><td>Conv</td><td>[3,3,256,512]</td><td>1</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td>2</td><td></td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3,512, 512]</td><td>1j</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[3,3, 512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Conv</td><td>[1/3/3,1/3/3,512,512]</td><td>1]</td><td>[512]</td><td></td><td></td></tr><tr><td>Pool</td><td></td><td></td><td></td><td>X</td><td></td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512, 512]</td><td></td><td>[512]</td><td>√</td><td>√</td></tr><tr><td>Linear</td><td>[512,c]</td><td></td><td>[c]</td><td>X</td><td>X</td></tr></table>
|
| 329 |
+
|
| 330 |
+
Table 6: VGG-C/D/like. In the last layer, $c$ denotes the number of possible classes: $c = 1 0$ for CIFAR10 and $c = 2 0 0$ for Tiny-ImageNet. The strides in the first convolution layer for Tiny-ImageNet are set [2, 2] instead of [1, 1] to deal with the increase in the image resolution. The second Linear layer is only used in VGG-C/D.
|
md/train/B1eWbxStPH/B1eWbxStPH.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DIRECTIONAL MESSAGE PASSING FOR MOLECULAR GRAPHS
|
| 2 |
+
|
| 3 |
+
Johannes Gasteiger, Janek Groß & Stephan Günnemann
|
| 4 |
+
|
| 5 |
+
Technical University of Munich, Germany {j.gasteiger,grossja,guennemann}@in.tum.de
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Graph neural networks have recently achieved great successes in predicting quantum mechanical properties of molecules. These models represent a molecule as a graph using only the distance between atoms (nodes). They do not, however, consider the spatial direction from one atom to another, despite directional information playing a central role in empirical potentials for molecules, e.g. in angular potentials. To alleviate this limitation we propose directional message passing, in which we embed the messages passed between atoms instead of the atoms themselves. Each message is associated with a direction in coordinate space. These directional message embeddings are rotationally equivariant since the associated directions rotate with the molecule. We propose a message passing scheme analogous to belief propagation, which uses the directional information by transforming messages based on the angle between them. Additionally, we use spherical Bessel functions and spherical harmonics to construct theoretically well-founded, orthogonal representations that achieve better performance than the currently prevalent Gaussian radial basis representations while using fewer than $1 / 4$ of the parameters. We leverage these innovations to construct the directional message passing neural network (DimeNet). DimeNet outperforms previous GNNs on average by $7 6 \%$ on MD17 and by $3 1 \%$ on QM9. Our implementation is available online.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
In recent years scientists have started leveraging machine learning to reduce the computation time required for predicting molecular properties from a matter of hours and days to mere milliseconds. With the advent of graph neural networks (GNNs) this approach has recently experienced a small revolution, since they do not require any form of manual feature engineering and significantly outperform previous models (Gilmer et al., 2017; Schütt et al., 2017). GNNs model the complex interactions between atoms by embedding each atom in a high-dimensional space and updating these embeddings by passing messages between atoms. By predicting the potential energy these models effectively learn an empirical potential function. Classically, these functions have been modeled as the sum of four parts: (Leach, 2001)
|
| 14 |
+
|
| 15 |
+
$$
|
| 16 |
+
E = E _ { \mathrm { { b o n d s } } } + E _ { \mathrm { { a n g l e } } } + E _ { \mathrm { { t o r s i o n } } } + E _ { \mathrm { { n o n - b o n d e d } } } ,
|
| 17 |
+
$$
|
| 18 |
+
|
| 19 |
+
where $E _ { \mathrm { b o n d s } }$ models the dependency on bond lengths, $E _ { \mathrm { a n g l e } }$ on the angles between bonds, $E _ { \mathrm { t o r s i o n } }$ on bond rotations, i.e. the dihedral angle between two planes defined by pairs of bonds, and $E _ { \mathrm { n o n } }$ -bonded models interactions between unconnected atoms, e.g. via electrostatic or van der Waals interactions. The update messages in GNNs, however, only depend on the previous atom embeddings and the pairwise distances between atoms – not on directional information such as bond angles and rotations. Thus, GNNs lack the second and third terms of this equation and can only model them via complex higher-order interactions of messages. Extending GNNs to model them directly is not straightforward since GNNs solely rely on pairwise distances, which ensures their invariance to translation, rotation, and inversion of the molecule, which are important physical requirements.
|
| 20 |
+
|
| 21 |
+
In this paper, we propose to resolve this restriction by using embeddings associated with the directions to neighboring atoms, i.e. by embedding atoms as a set of messages. These directional message embeddings are equivariant with respect to the above transformations since the directions move with the molecule. Hence, they preserve the relative directional information between neighboring atoms. We propose to let message embeddings interact based on the distance between atoms and the angle between directions. Both distances and angles are invariant to translation, rotation, and inversion of the molecule, as required. Additionally, we show that the distance and angle can be jointly represented in a principled and effective manner by using spherical Bessel functions and spherical harmonics. We leverage these innovations to construct the directional message passing neural network (DimeNet). DimeNet can learn both molecular properties and atomic forces. It is twice continuously differentiable and solely based on the atom types and coordinates, which are essential properties for performing molecular dynamics simulations. DimeNet outperforms previous GNNs on average by $7 \hat { 6 } \%$ on MD17 and by $3 1 \%$ on QM9. Our paper’s main contributions are:
|
| 22 |
+
|
| 23 |
+
1. Directional message passing, which allows GNNs to incorporate directional information by connecting recent advances in the fields of equivariance and graph neural networks as well as ideas from belief propagation and empirical potential functions such as Eq. 1. 2. Theoretically principled orthogonal basis representations based on spherical Bessel functions and spherical harmonics. Bessel functions achieve better performance than Gaussian radial basis functions while reducing the radial basis dimensionality by $4 \mathbf { x }$ or more. 3. The Directional Message Passing Neural Network (DimeNet): A novel GNN that leverages these innovations to set the new state of the art for molecular predictions and is suitable both for predicting molecular properties and for molecular dynamics simulations.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORK
|
| 26 |
+
|
| 27 |
+
ML for molecules. The classical way of using machine learning for predicting molecular properties is combining an expressive, hand-crafted representation of the atomic neighborhood (Bartók et al., 2013) with Gaussian processes (Bartók et al., 2010; 2017; Chmiela et al., 2017) or neural networks (Behler & Parrinello, 2007). Recently, these methods have largely been superseded by graph neural networks, which do not require any hand-crafted features but learn representations solely based on the atom types and coordinates molecules (Duvenaud et al., 2015; Gilmer et al., 2017; Schütt et al., 2017; Hy et al., 2018; Unke & Meuwly, 2019). Our proposed message embeddings can also be interpreted as directed edge embeddings or embeddings on the line graph (Chen et al., 2019b). (Undirected) edge embeddings have already been used in previous GNNs for molecules (Jørgensen et al., 2018; Chen et al., 2019a). However, these GNNs use both node and edge embeddings and do not leverage any directional information.
|
| 28 |
+
|
| 29 |
+
Graph neural networks. GNNs were first proposed in the 90s (Baskin et al., 1997; Sperduti & Starita, 1997) and 00s (Gori et al., 2005; Scarselli et al., 2009). General GNNs have been largely inspired by their application to molecular graphs and have started to achieve breakthrough performance in various tasks at around the same time the molecular variants did (Kipf & Welling, 2017; Gasteiger et al., 2019; Zambaldi et al., 2019). Some recent progress has been focused on GNNs that are more powerful than the 1-Weisfeiler-Lehman test of isomorphism (Morris et al., 2019; Maron et al., 2019). However, for molecular predictions these models are significantly outperformed by GNNs focused on molecules (see Sec. 7). Some recent GNNs have incorporated directional information by considering the change in local coordinate systems per atom (Ingraham et al., 2019). However, this approach breaks permutation invariance and is therefore only applicable to chain-like molecules (e.g. proteins).
|
| 30 |
+
|
| 31 |
+
Equivariant neural networks. Group equivariance as a principle of modern machine learning was first proposed by Cohen & Welling (2016). Following work has generalized this principle to spheres (Cohen et al., 2018), molecules (Thomas et al., 2018), volumetric data (Weiler et al., 2018), and general manifolds (Cohen et al., 2019). Equivariance with respect to continuous rotations has been achieved so far by switching back and forth between Fourier and coordinate space in each layer (Cohen et al., 2018) or by using a fully Fourier space model (Kondor et al., 2018; Anderson et al., 2019). The former introduces major computational overhead and the latter imposes significant constraints on model construction, such as the inability of using non-linearities. Our proposed solution does not suffer from either of those limitations.
|
| 32 |
+
|
| 33 |
+
# 3 REQUIREMENTS FOR MOLECULAR PREDICTIONS
|
| 34 |
+
|
| 35 |
+
In recent years machine learning has been used to predict a wide variety of molecular properties, both low-level quantum mechanical properties such as potential energy, energy of the highest occupied molecular orbital (HOMO), and the dipole moment and high-level properties such as toxicity, permeability, and adverse drug reactions $\mathrm { W u }$ et al., 2018). In this work we will focus on scalar regression targets, i.e. targets $t \in \mathbb { R }$ . A molecule is uniquely defined by the atomic numbers $z = \{ z _ { 1 } , \ldots , z _ { N } \}$ and positions $\pmb { X } = \{ \pmb { x } _ { 1 } , \ldots , \pmb { x } _ { N } \}$ . Some models additionally use auxiliary information $\Theta$ such as bond types or electronegativity of the atoms. We do not include auxiliary features in this work since they are hand-engineered and non-essential. In summary, we define an ML model for molecular prediction with parameters $\theta$ via $f _ { \theta } : \{ X , z \} \to \mathbb { R }$ .
|
| 36 |
+
|
| 37 |
+
Symmetries and invariances. All molecular predictions must obey some basic laws of physics, either explicitly or implicitly. One important example of such are the fundamental symmetries of physics and their associated invariances. In principle, these invariances can be learned by any neural network via corresponding weight matrix symmetries (Ravanbakhsh et al., 2017). However, not explicitly incorporating them into the model introduces duplicate weights and increases training time and complexity. The most essential symmetries are translational and rotational invariance (follows from homogeneity and isotropy), permutation invariance (follows from the indistinguishability of particles), and symmetry under parity, i.e. under sign flips of single spatial coordinates.
|
| 38 |
+
|
| 39 |
+
Molecular dynamics. Additional requirements arise when the model should be suitable for molecular dynamics (MD) simulations and predict the forces ${ \bf \nabla } _ { F _ { i } }$ acting on each atom. The force field is a conservative vector field since it must satisfy conservation of energy (the necessity of which follows from homogeneity of time (Noether, 1918)). The easiest way of defining a conservative vector field is via the gradient of a potential function. We can leverage this fact by predicting a potential instead of the forces and then obtaining the forces via backpropagation to the atom coordinates, i.e. $\begin{array} { r } { F _ { i } ( \boldsymbol { X } , z ) = - \frac { \partial } { \partial x _ { i } } f _ { \theta } ( \boldsymbol { X } , z ) } \end{array}$ . We can even directly incorporate the forces in the training loss and directly train a model for MD simulations (Pukrittayakamee et al., 2009):
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\mathcal { L } _ { \mathrm { M D } } ( \mathbf { \boldsymbol { X } } , z ) = \left| f _ { \theta } ( \mathbf { \boldsymbol { X } } , z ) - \hat { t } ( \mathbf { \boldsymbol { X } } , z ) \right| + \frac { \rho } { 3 N } \sum _ { i = 1 } ^ { N } \sum _ { \alpha = 1 } ^ { 3 } \left| - \frac { \partial f _ { \theta } ( \mathbf { \boldsymbol { X } } , z ) } { \partial x _ { i \alpha } } - \hat { F } _ { i \alpha } ( \mathbf { \boldsymbol { X } } , z ) \right| ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where the target $\hat { t } = \hat { E }$ is the ground-truth energy (usually available as well), $\hat { F }$ are the ground-truth forces, and the hyperparameter $\rho$ sets the forces’ loss weight. For stable simulations ${ \bf \nabla } _ { F _ { i } }$ must be continuously differentiable and the model $f _ { \theta }$ itself therefore twice continuously differentiable. We hence cannot use discontinuous transformations such as ReLU non-linearities. Furthermore, since the atom positions $\boldsymbol { X }$ can change arbitrarily we cannot use pre-computed auxiliary information $\Theta$ such as bond types.
|
| 46 |
+
|
| 47 |
+
# 4 DIRECTIONAL MESSAGE PASSING
|
| 48 |
+
|
| 49 |
+
Graph neural networks. Graph neural networks treat the molecule as a graph, in which the nodes are atoms and edges are defined either via a predefined molecular graph or simply by connecting atoms that lie within a cutoff distance $c$ . Each edge is associated with a pairwise distance between atoms $d _ { i j } = \lVert \pmb { x } _ { i } - \pmb { x } _ { j } \rVert _ { 2 }$ . GNNs implement all of the above physical invariances by construction since they only use pairwise distances and not the full atom coordinates. However, note that a predefined molecular graph or a step function-like cutoff cannot be used for MD simulations since this would introduce discontinuities in the energy landscape. GNNs represent each atom $i$ via an atom embedding $\pmb { h } _ { i } \in \mathbb { R } ^ { H }$ . The atom embeddings are updated in each layer by passing messages along the molecular edges. Messages are usually transformed based on an edge embedding $\mathbf { \boldsymbol { e } } _ { ( i j ) } \in \mathbb { R } ^ { H _ { \mathrm { e } } }$ and summed over the atom’s neighbors ${ \mathcal { N } } _ { i }$ , i.e. the embeddings are updated in layer $l$ via
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\pmb { h } _ { i } ^ { ( l + 1 ) } = f _ { \mathrm { u p d a t e } } ( \pmb { h } _ { i } ^ { ( l ) } , \sum _ { j \in \mathcal { N } _ { i } } f _ { \mathrm { i n t } } ( \pmb { h } _ { j } ^ { ( l ) } , \pmb { e } _ { ( i j ) } ^ { ( l ) } ) ) ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
with the update function $f _ { \mathrm { u p d a t e } }$ and the interaction function $f _ { \mathrm { i n t } }$ , which are both commonly implemented using neural networks. The edge embeddings e(l)(ij) usually only depend on the interatomic distances, but can also incorporate additional bond information (Gilmer et al., 2017) or be recursively updated in each layer using the neighboring atom embeddings (Jørgensen et al., 2018).
|
| 56 |
+
|
| 57 |
+
Directionality. In principle, the pairwise distance matrix contains the full geometrical information of the molecule. However, GNNs do not use the full distance matrix since this would mean passing messages globally between all pairs of atoms, which increases computational complexity and can lead to overfitting. Instead, they usually use a cutoff distance $c$ , which means they cannot distinguish between certain molecules (Xu et al., 2019). E.g. at a cutoff of roughly $2 \mathring \mathrm { A }$ a regular GNN would not be able to distinguish between a hexagonal (e.g. Cyclohexane) and two triangular molecules (e.g. Cyclopropane) with the same bond lengths since the neighborhoods of each atom are exactly the same for both (see Appendix, Fig. 6). This problem can be solved by modeling the directions to neighboring atoms instead of just their distances. A principled way of doing so while staying invariant to a transformation group $G$ (such as described in Sec. 3) is via group-equivariance (Cohen & Welling, 2016). A function $f : X \to Y$ is defined as being equivariant if $f \bar { ( } \varphi _ { g } ^ { X } ( x ) ) = \varphi _ { g } ^ { Y } ( f ( x ) )$ , with the group action in the input and output space $\varphi _ { g } ^ { X }$ and $\varphi _ { g } ^ { Y }$ . However, equivariant CNNs only achieve equivariance with respect to a discrete set of rotations (Cohen & Welling, 2016). For a precise prediction of molecular properties we need continuous equivariance with respect to rotations, i.e. to the SO(3) group.
|
| 58 |
+
|
| 59 |
+
Directional embeddings. We solve this problem by noting that an atom by itself is rotationally invariant. This invariance is only broken by neighboring atoms that interact with it, i.e. those inside the cutoff $c$ . Since each neighbor breaks up to one rotational invariance they also introduce additional degrees of freedom, which we need to represent in our model. We can do so by generating a separate embedding $\boldsymbol { m } _ { j i }$ for each atom $i$ and neighbor $j$ by applying the same learned filter in the direction of each neighboring atom (in contrast to equivariant CNNs, which apply filters in fixed, global directions). These directional embeddings are equivariant with respect to global rotations since the associated directions rotate with the molecule and hence conserve the relative directional information between neighbors.
|
| 60 |
+
|
| 61 |
+
Representation via joint 2D basis. We use the directional information associated with each embedding by leveraging the angle $\alpha _ { ( k j , j i ) } = \angle { \pmb x } _ { k } { \pmb x } _ { j } { \pmb x } _ { i }$ when aggregating the neighboring embeddings $m _ { k j }$ of $\mathbf { \nabla } m _ { j i }$ . We combine the angle with the interatomic distance $d _ { k j }$ associated with the incoming message $m _ { k j }$ and jointly represent both in $\pmb { a } _ { \mathrm { S B F } } ^ { ( k j , j i ) } \in \mathbb { R } ^ { N _ { \mathrm { S H B F } } \cdot N _ { \mathrm { S R B F } } }$ using a 2D representation based on spherical Bessel functions and spherical harmonics, as explained in Sec. 5. We empirically found that this basis representation provides a better inductive bias than the raw angle alone. Note that by only using interatomic distances and angles our model becomes invariant to rotations.
|
| 62 |
+
|
| 63 |
+
Message embeddings. The directional embedding $m _ { j i }$ associated with the atom pair $j i$ can be thought of as a message being sent from atom $j$ to atom $i$ . Hence, in analogy to belief propagation, we embed each atom $i$ using a set of incoming messages $\boldsymbol { m } _ { j i }$ , i.e. $\begin{array} { r } { \mathbf { \dot { \Sigma } } \mathbf { h } _ { i } = \sum _ { j \in \mathcal { N } _ { i } } \mathbf { m } _ { j i } } \end{array}$ , and update the message $\mathbf { \nabla } m _ { j i }$ based on the incoming messages $m _ { k j }$ (Yedidia et al., 2003). Hence, as illustrated in Fig. 1, we define the update function and aggregation scheme for message embeddings as
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
m _ { j i } ^ { ( l + 1 ) } = f _ { \mathrm { u p d a t e } } ( m _ { j i } ^ { ( l ) } , \sum _ { k \in \mathcal { N } _ { j } \backslash \{ i \} } f _ { \mathrm { i n t } } ( m _ { k j } ^ { ( l ) } , e _ { \mathrm { R B F } } ^ { ( j i ) } , a _ { \mathrm { S B F } } ^ { ( k j , j i ) } ) ) ,
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 1: Aggregation scheme for message embeddings.
|
| 71 |
+
|
| 72 |
+
where e(ji)RBF denotes the radial basis function representation of the interatomic distance $d _ { j i }$ , which will be discussed in Sec. 5. We found this aggregation scheme to not only have a nice analogy to belief propagation, but also to empirically perform better than alternatives. Note that since $f _ { \mathrm { i n t } }$ now incorporates the angle between atom pairs, or bonds, we have enabled our model to directly learn the angular potential $E _ { \mathrm { a n g l e } }$ , the second term in Eq. 1. Moreover, the message embeddings are essentially embeddings of atom pairs, as used by the provably more powerful GNNs based on higher-order Weisfeiler-Lehman tests of isomorphism. Our model can therefore provably distinguish molecules that a regular GNN cannot (e.g. the previous example of a hexagonal and two triangular molecules) (Morris et al., 2019).
|
| 73 |
+
|
| 74 |
+
# 5 PHYSICALLY BASED REPRESENTATIONS
|
| 75 |
+
|
| 76 |
+
Representing distances and angles. For the interaction function $f _ { \mathrm { i n t } }$ in Eq. 4 we use a joint representation ${ \pmb a } _ { \mathrm { S B F } } ^ { ( k j , j i ) }$ of the angles $\alpha _ { ( k j , j i ) }$ between message embeddings and the interatomic distances $d _ { k j } = \| \pmb { x } _ { k } - \pmb { x } _ { j } \| _ { 2 }$ , as well as a representation $e _ { \mathrm { R B F } } ^ { ( j i ) }$ of the distances $d _ { j i }$ . Earlier works have used a set of Gaussian radial basis functions to represent interatomic distances, with tightly spaced means that are distributed e.g. uniformly (Schütt et al., 2017) or exponentially (Unke & Meuwly, 2019). Similar in spirit to the functional bases used by steerable CNNs (Cohen & Welling, 2017; Cheng et al., 2019) we propose to use an orthogonal basis instead, which reduces redundancy and thus improves parameter efficiency. Furthermore, a basis chosen according to the properties of the modeled system can even provide a helpful inductive bias. We therefore derive a proper basis representation for quantum systems next.
|
| 77 |
+
|
| 78 |
+
From Schrödinger to Fourier-Bessel. To construct a basis representation in a principled manner we first consider the space of possible solutions. Our model aims at approximating results of density functional theory (DFT) calculations, i.e. results given by an electron density $\bar { \langle \Psi ( d ) | \Psi ( d ) \rangle }$ , with the electron wave function $\Psi ( d )$ and $\pmb { d } = \pmb { x } _ { k } - \pmb { x } _ { j }$ . The solution space of $\Psi ( d )$ is defined by the time-independent Schrödinger equation − \~22m ∇2 + V (d) Ψ(d) = EΨ(d), with constant mass $m$ and energy $E$ . We do not know the potential $V ( d )$ and so choose it in an uninformative way by simply setting it to 0 inside the cutoff distance $c$ (up to which we pass messages between atoms) and to $\infty$ outside. Hence, we arrive at the Helmholtz equation $( \nabla ^ { 2 } \dot { + } k ^ { 2 } ) \Psi ( \mathbfit { d } ) \dot { = } 0$ , with the wave number $\begin{array} { r } { k = \frac { \sqrt { 2 m E } } { \hbar } } \end{array}$ and the boundary condition $\Psi ( c ) = 0$ at the cutoff $c$ . Separation of variables in polar coordinates $( d , \alpha , \varphi )$ yields the solution (Griffiths & Schroeter, 2018)
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\Psi ( d , \alpha , \varphi ) = \sum _ { l = 0 } ^ { \infty } \sum _ { m = - l } ^ { l } ( a _ { l m } j _ { l } ( k d ) + b _ { l m } y _ { l } ( k d ) ) Y _ { l } ^ { m } ( \alpha , \varphi ) ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
with the spherical Bessel functions of the first and second kind $j _ { l }$ and $y _ { l }$ and the spherical harmonics $Y _ { l } ^ { m }$ . As common in physics we only use the regular solutions, i.e. those that do not approach $- \infty$ at the origin, and hence set $b _ { l m } = 0$ . Recall that our first goal is to construct a joint 2D basis for $d _ { k j }$ and $\alpha _ { ( k j , j i ) }$ , i.e. a function that depends on $d$ and a single angle $\alpha$ . To achieve this we set $m = 0$ and obtain $\begin{array} { r } { \Psi _ { \mathrm { S B F } } ( d , \alpha ) = \bar { \sum _ { l } } a _ { l } j _ { l } \bar { ( k d ) } Y _ { l } ^ { 0 } ( \alpha ) } \end{array}$ . The boundary conditions are satisfied by setting Bessel function, w $k = \begin{array} { l } { { z _ { l n } } } \\ { { c } } \end{array}$ , where precom $z _ { l n }$ is the ed nu $n$ -th root of the rically. Norm $l$ -orderlizing $\Psi _ { \mathrm { S B F } }$ inside the cutoff distance $c$ yields the 2D spherical Fourier-Bessel basi s a˜(kj,ji)SBF ∈ RNSHBF·NSRBF , which is illustrated in Fig. 2 and defined by
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\tilde { a } _ { \mathrm { S B F } , l n } ( d , \alpha ) = \sqrt { \frac { 2 } { c ^ { 3 } j _ { l + 1 } ^ { 2 } ( z _ { l n } ) } } j _ { l } ( \frac { z _ { l n } } { c } d ) Y _ { l } ^ { 0 } ( \alpha ) ,
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 2: 2D spherical Fourier-Bessel basis $\tilde { a } _ { \mathrm { S B F } , l n } ( d , \alpha )$ .
|
| 92 |
+
|
| 93 |
+
with $l \in [ 0 . . N _ { \mathrm { S H B F } } - 1 ]$ and $n \in [ 1 . . N _ { \mathrm { S R B F } } ]$ . Our second goal is constructing a radial basis for $d _ { j i }$ , i.e. a function that solely depends on $d$ and not on the angles $\alpha$ and $\varphi$ . We achieve this by setting $l =$ $m = 0$ and obtain $\begin{array} { r } { \Psi _ { \mathrm { R B F } } ( d ) = a j _ { 0 } ( \frac { z _ { 0 , n } } { c } d ) } \end{array}$ , with roots at $z _ { 0 , n } = n \pi$ Normalizing this function on $[ 0 , c ]$ and using $j _ { 0 } ( d ) = \sin ( d ) / d$ gives the radial basis $\tilde { e } _ { \mathrm { R B F } } \in \mathbb { R } ^ { N _ { \mathrm { R B F } } }$ , as shown in Fig. 3 and defined by
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\tilde { e } _ { \mathrm { R B F } , n } ( d ) = \sqrt { \frac { 2 } { c } } \frac { \sin ( \frac { n \pi } { c } d ) } { d } ,
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: Radial Bessel basis for $N _ { \mathrm { R B F } } = 5$ .
|
| 101 |
+
|
| 102 |
+
with $n \in [ 1 \ldots N _ { \mathrm { R B F } } ]$ . Both of these bases are purely real-valued and orthogonal in the domain of interest. They furthermore enable us to bound the highest-frequency components by $\begin{array} { r } { \omega _ { \alpha } \leq \frac { N _ { \mathrm { S H B F } } } { 2 \pi } } \end{array}$ , $\begin{array} { r } { \omega _ { d _ { k j } } \ \leq \ \frac { N _ { \mathrm { S R B F } } } { c } } \end{array}$ , and $\begin{array} { r } { \omega _ { d _ { j i } } \leq \frac { N _ { \mathrm { R B F } } } { c } } \end{array}$ . This restriction is an effective way of regularizing the model and ensures that predictions are stable to small perturbations. We found $N _ { \mathrm { S R B F } } = 6$ and $N _ { \mathrm { R B F } } = 1 6$ radial basis functions to be more than sufficient. Note that $N _ { \mathrm { R B F } }$ is $_ { 4 \mathrm { X } }$ lower than PhysNet’s 64 (Unke & Meuwly, 2019) and $2 0 \mathrm { x }$ lower than SchNet’s 300 radial basis functions (Schütt et al., 2017).
|
| 103 |
+
|
| 104 |
+
Continuous cutoff. $\tilde { \mathbf { \pmb { a } } } _ { \mathrm { S B F } } ^ { ( k j , j i ) }$ and $\tilde { e } _ { \mathrm { R B F } } ( d )$ are not twice continuously differentiable due to the step function cutoff at $c$ . To alleviate this problem we introduce an envelope function $u ( d )$ that has a root of multiplicity 3 at $d = c$ , causing the final functions $\begin{array} { r } { { \pmb a } _ { \mathrm { R B F } } ( d ) = \bar { u ( d ) } \tilde { \pmb a } _ { \mathrm { R B F } } ( d ) } \end{array}$ and $e _ { \mathrm { R B F } } ( d ) =$ $u ( d ) \tilde { e } _ { \mathrm { R B F } } ( d )$ and their first and second derivatives to go to 0 at the cutoff. We achieve this with the polynomial
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
Figure 4: The DimeNet architecture. $\boxed { \begin{array} { r l } \end{array} }$ denotes the layer’s input and $\parallel$ denotes concatenation. The distances $d _ { j i }$ are represented using spherical Bessel functions and the distances $d _ { k j }$ and angles $\alpha _ { ( k j , j i ) }$ are jointly represented using a 2D spherical Fourier-Bessel basis. An embedding block generates the inital message embeddings $\mathbf { \nabla } m _ { j i }$ . These embeddings are updated in multiple interaction blocks via directional message passing, which uses the neighboring messages $m _ { k j } ^ { - } , k \in \mathcal { N } _ { j } \setminus \{ i \}$ , the 2D representations a(kj,jSBF , and the distance representations $e _ { \mathrm { R B F } } ^ { ( j i ) }$ . Each block passes the resulting embeddings to an output block, which transforms them using the radial basis $e _ { \mathrm { R B F } } ^ { ( j i ) }$ and sums them up per atom. Finally, the outputs of all layers are summed up to generate the prediction.
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
u ( d ) = 1 - { \frac { ( p + 1 ) ( p + 2 ) } { 2 } } d ^ { p } + p ( p + 2 ) d ^ { p + 1 } - { \frac { p ( p + 1 ) } { 2 } } d ^ { p + 2 } ,
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $p \in { \mathbb { N } } _ { 0 }$ . We did not find the model to be sensitive to different choices of envelope functions and choose $p = 6$ . Note that using an envelope function causes the bases to lose their orthonormality, which we did not find to be a problem in practice. We furthermore fine-tune the Bessel wave numbers $\begin{array} { r } { k _ { n } = \frac { n \pi } { c } } \end{array}$ used in give a s $\tilde { e } _ { \mathrm { R B F } } \in \mathbb { R } ^ { N _ { \mathrm { R B F } } ^ { \bullet } }$ via backpropagation after initializing them to these values, which werediction accuracy.
|
| 114 |
+
|
| 115 |
+
# 6 DIRECTIONAL MESSAGE PASSING NEURAL NETWORK (DIMENET)
|
| 116 |
+
|
| 117 |
+
The Directional Message Passing Neural Network’s (DimeNet) design is based on a streamlined version of the PhysNet architecture (Unke & Meuwly, 2019), in which we have integrated directional message passing and spherical Fourier-Bessel representations. DimeNet generates predictions that are invariant to atom permutations and translation, rotation and inversion of the molecule. DimeNet is suitable both for the prediction of various molecular properties and for molecular dynamics (MD) simulations. It is twice continuously differentiable and able to learn and predict atomic forces via backpropagation, as described in Sec. 3. The predicted forces fulfill energy conservation by construction and are equivariant with respect to permutation and rotation. Model differentiability in combination with basis representations that have bounded maximum frequencies furthermore guarantees smooth predictions that are stable to small deformations. Fig. 4 gives an overview of the architecture.
|
| 118 |
+
|
| 119 |
+
Embedding block. Atomic numbers are represented by learnable, randomly initialized atom type embeddings ${ \bf \Delta } _ { h _ { i } ^ { ( 0 ) } } \in \mathbb { R } ^ { F }$ that are shared across molecules. The first layer generates message embeddings from these and the distance between atoms via
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\begin{array} { r } { { \pmb m } _ { j i } ^ { ( 1 ) } = \sigma ( [ { \pmb h } _ { j } ^ { ( 0 ) } { \| { \pmb h } _ { i } ^ { ( 0 ) } \| } e _ { \mathrm { R B F } } ^ { ( j i ) } ] { \pmb W } + b ) , } \end{array}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
where $\parallel$ denotes concatenation and the weight matrix $W$ and bias $^ { b }$ are learnable.
|
| 126 |
+
|
| 127 |
+
Table 1: MAE on QM9. DimeNet sets the state of the art on 11 targets, outperforming the second-best model on average by $3 1 \%$ (mean std. MAE).
|
| 128 |
+
|
| 129 |
+
<table><tr><td>Target</td><td>Unit</td><td>PPGN</td><td>SchNet</td><td>PhysNet</td><td>MEGNet-s</td><td>Cormorant</td><td>DimeNet</td></tr><tr><td>μ</td><td>D</td><td>0.047</td><td>0.033</td><td>0.0529</td><td>0.05</td><td>0.13</td><td>0.0286</td></tr><tr><td>α</td><td>a03</td><td>0.131</td><td>0.235</td><td>0.0615</td><td>0.081</td><td>0.092</td><td>0.0469</td></tr><tr><td>EHOMO</td><td>meV</td><td>40.3</td><td>41</td><td>32.9</td><td>43</td><td>36</td><td>27.8</td></tr><tr><td>ELUMO</td><td>meV</td><td>32.7</td><td>34</td><td>24.7</td><td>44</td><td>36</td><td>19.7</td></tr><tr><td>△E</td><td>meV</td><td>60.0</td><td>63</td><td>42.5</td><td>66</td><td>60</td><td>34.8</td></tr><tr><td>(R²)</td><td>a02</td><td>0.592</td><td>0.073</td><td>0.765</td><td>0.302</td><td>0.673</td><td>0.331</td></tr><tr><td>ZPVE</td><td>meV</td><td>3.12</td><td>1.7</td><td>1.39</td><td>1.43</td><td>1.98</td><td>1.29</td></tr><tr><td>Uo</td><td>meV</td><td>36.8</td><td>14</td><td>8.15</td><td>12</td><td>28</td><td>8.02</td></tr><tr><td>U</td><td>meV</td><td>36.8</td><td>19</td><td>8.34</td><td>13</td><td>-</td><td>7.89</td></tr><tr><td>H</td><td>meV</td><td>36.3</td><td>14</td><td>8.42</td><td>12</td><td>-</td><td>8.11</td></tr><tr><td>G</td><td>meV cal</td><td>36.4</td><td>14</td><td>9.40</td><td>12</td><td>-</td><td>8.98</td></tr><tr><td>Cv</td><td>molK</td><td>0.055</td><td>0.033</td><td>0.0280</td><td>0.029</td><td>0.031</td><td>0.0249</td></tr><tr><td>std. MAE logMAE</td><td>%</td><td>1.84 -4.64</td><td>1.76 -5.17</td><td>1.37 -5.35</td><td>1.80 -5.17</td><td>2.14 -4.75</td><td>1.05 -5.57</td></tr></table>
|
| 130 |
+
|
| 131 |
+
Interaction block. The embedding block is followed by multiple stacked interaction blocks. This block implements $f _ { \mathrm { i n t } }$ and $f _ { \mathrm { u p d a t e } }$ of Eq. 4 as shown in Fig. 4. Note that the 2D representation ${ \pmb a } _ { \mathrm { S B F } } ^ { ( k j , j i ) }$ is first transformed into an $N _ { \mathrm { b i l i n e a r } }$ -dimensional representation via a linear layer. The main purpose of this is to make the dimensionality of a(kj,jSBF independent of the subsequent bilinear layer, which uses a comparatively large $N _ { \mathrm { b i l i n e a r } } \times F \times \ddot { F } .$ -dimensional weight tensor. We have also experimented with using a bilinear layer for the radial basis representation, but found that the element-wise multiplication e(ji)RBFW mkj performs better, which suggests that the 2D representations require more complex transformations than radial information alone. The interaction block transforms each message embedding $\mathbf { \nabla } m _ { j i }$ using multiple residual blocks, which are inspired by ResNet (He et al., 2016) and consist of two stacked dense layers and a skip connection.
|
| 132 |
+
|
| 133 |
+
Output block. The message embeddings after each block (including the embedding block) are passed to an output block. The output block transforms each message embedding $\boldsymbol { m } _ { j i }$ using the radial basis $e _ { \mathrm { R B F } } ^ { ( j i ) }$ , which ensures continuous differentiability and slightly improves performance. Afterwards the incoming messages are summed up per atom $i$ to obtain $\begin{array} { r } { \pmb { h } _ { i } = \sum _ { j } \pmb { m } _ { j i } } \end{array}$ , which is then transformed using multiple dense layers to generate the atom-wise output $t _ { i } ^ { ( l ) }$ . These outputs are then summed up to obtain the final prediction $t = \Sigma _ { i } \Sigma _ { l } t _ { i } ^ { ( l ) }$ .
|
| 134 |
+
|
| 135 |
+
Continuous differentiability. Multiple model choices were necessary to achieve twice continuous model differentiability. First, DimeNet uses the self-gated Swish activation function $\sigma ( x ) = x$ · sigmoid $( x )$ (Ramachandran et al., 2018) instead of a regular ReLU activation function. Second, we multiply the radial basis functions $\tilde { e } _ { \mathrm { R B F } } ( d )$ with an envelope function $u ( d )$ that has a root of multiplicity 3 at the cutoff $c$ . Finally, DimeNet does not use any auxiliary data but relies on atom types and positions alone.
|
| 136 |
+
|
| 137 |
+
# 7 EXPERIMENTS
|
| 138 |
+
|
| 139 |
+
Models. For hyperparameter choices and training setup see Appendix B. We use 6 state-of-theart models for comparison: SchNet (Schütt et al., 2017), PhysNet (results based on the reference implementation) (Unke & Meuwly, 2019), provably powerful graph networks (PPGN, results provided by the original authors) (Maron et al., 2019), MEGNet-simple (without auxiliary information) (Chen et al., 2019a), Cormorant (Anderson et al., 2019), and symmetrized gradient-domain machine learning (sGDML) (Chmiela et al., 2018). Note that sGDML cannot be used for QM9 since it can only be trained on a single molecule.
|
| 140 |
+
|
| 141 |
+
QM9. We test DimeNet’s performance for predicting molecular properties using the common QM9 benchmark (Ramakrishnan et al., 2014). It consists of roughly 130 000 molecules in equilibrium with up to 9 heavy C, O, N, and F atoms. We use 110 000 molecules in the training, 10 000 in the validation and $1 0 8 3 1$ in the test set. We only use the atomization energy for $U _ { 0 }$ , $U , H$ , and $G$ , i.e. subtract the atomic reference energies, which are constant per atom type, and perform the training using eV. In Table 1 we report the mean absolute error (MAE) of each target and the overall mean standardized MAE (std. MAE) and mean standardized logMAE (for details see Appendix C). We predict $\Delta \epsilon$ simply by taking $\epsilon _ { \mathrm { L U M O } } - \epsilon _ { \mathrm { H O M O } }$ , since it is calculated in exactly this way by DFT calculations. We train a separate model for each target, which significantly improves results compared to training a single shared model for all targets (see App. E). DimeNet sets the new state of the art on 11 out of 12 targets and decreases mean std. MAE by $3 1 \%$ and mean logMAE by 0.22 compared to the second-best model.
|
| 142 |
+
|
| 143 |
+
Table 2: MAE on MD17 using 1000 training samples (energies in $\frac { \mathrm { k c a l } } { \mathrm { m o l } }$ , forces in $\frac { \mathrm { k c a l } } { \mathrm { m o l } \mathrm { \AA } } .$ ). DimeNet outperforms SchNet by a large margin and performs roughly on par with sGDML.
|
| 144 |
+
|
| 145 |
+
<table><tr><td colspan="2"></td><td>sGDML</td><td>SchNet</td><td>DimeNet</td></tr><tr><td rowspan="2">Aspirin</td><td>Energy</td><td>0.19</td><td>0.37</td><td>0.204</td></tr><tr><td>Forces</td><td>0.68</td><td>1.35</td><td>0.499</td></tr><tr><td rowspan="2">Benzene</td><td>Energy</td><td>0.10</td><td>0.08</td><td>0.078</td></tr><tr><td>Forces</td><td>0.06</td><td>0.31</td><td>0.187</td></tr><tr><td rowspan="2">Ethanol</td><td>Energy</td><td>0.07</td><td>0.08</td><td>0.064</td></tr><tr><td>Forces</td><td>0.33</td><td>0.39</td><td>0.230</td></tr><tr><td rowspan="2">Malonaldehyde</td><td>Energy</td><td>0.10</td><td>0.13</td><td>0.104</td></tr><tr><td>Forces</td><td>0.41</td><td>0.66</td><td>0.383</td></tr><tr><td rowspan="2">Naphthalene</td><td>Energy</td><td>0.12</td><td>0.16</td><td>0.122</td></tr><tr><td>Forces</td><td>0.11</td><td>0.58</td><td>0.215</td></tr><tr><td rowspan="2">Salicylic acid</td><td>Energy</td><td>0.12</td><td>0.20</td><td>0.134</td></tr><tr><td>Forces</td><td>0.28</td><td>0.85</td><td>0.374</td></tr><tr><td rowspan="2">Toluene</td><td>Energy</td><td>0.10</td><td>0.12</td><td>0.102</td></tr><tr><td>Forces</td><td>0.14</td><td>0.57</td><td>0.216</td></tr><tr><td rowspan="2">Uracil</td><td>Energy</td><td>0.11</td><td>0.14</td><td>0.115</td></tr><tr><td>Forces</td><td>0.24</td><td>0.56</td><td>0.301</td></tr><tr><td rowspan="2">std. MAE (%)</td><td>Energy</td><td>2.53</td><td>3.32</td><td>2.49</td></tr><tr><td>Forces</td><td>1.01</td><td>2.38</td><td>1.10</td></tr></table>
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 5: Examples of DimeNet filters. They exhibit a clear 2D structure. For details see Appendix D.
|
| 149 |
+
|
| 150 |
+
Table 3: Ablation studies using multi-task learning on QM9. All of our contributions have a significant impact on performance.
|
| 151 |
+
|
| 152 |
+
<table><tr><td>Variation</td><td>MAE MAEDimeNet</td><td>△logMAE</td></tr><tr><td>GaussianRBF</td><td>110%</td><td>0.10</td></tr><tr><td>NSHBF =1</td><td>126%</td><td>0.11</td></tr><tr><td>Node embeddings</td><td>168%</td><td>0.45</td></tr></table>
|
| 153 |
+
|
| 154 |
+
MD17. We use MD17 (Chmiela et al., 2017) to test model performance in molecular dynamics simulations. The goal of this benchmark is predicting both the energy and atomic forces of eight small organic molecules, given the atom coordinates of the thermalized (i.e. non-equilibrium, slightly moving) system. The ground truth data is computed via molecular dynamics simulations using DFT. A separate model is trained for each molecule, with the goal of providing highly accurate individual predictions. This dataset is commonly used with $5 0 0 0 0$ training and $1 0 0 0 0$ validation and test samples. We found that DimeNet can match state-of-the-art performance in this setup. E.g. for Benzene, depending on the force weight $\rho$ , DimeNet achieves $0 . 0 { \dot { 3 } } 5 \mathrm { k c a l m o l ^ { - 1 } }$ MAE for the energy or $0 . 0 7 \mathrm { k c a l m o l ^ { - 1 } }$ and $0 . 1 7 \mathrm { k c a l m o l ^ { - 1 } \mathring { A } ^ { - 1 } }$ for energy and forces, matching the results reported by Anderson et al. (2019) and Unke & Meuwly (2019). However, this accuracy is two orders of magnitude below the DFT calculation’s accuracy (approx. $2 . 3 \mathrm { k c a l m o l ^ { - 1 } }$ for energy (Faber et al., 2017)), so any remaining difference to real-world data is almost exclusively due to errors in the DFT simulation. Truly reaching better accuracy can therefore only be achieved with more precise ground-truth data, which requires far more expensive methods (e.g. CCSD(T)) and thus ML models that are more sample-efficient (Chmiela et al., 2018). We therefore instead test our model on the harder task of using only 1000 training samples. As shown in Table 2 DimeNet outperforms SchNet by a large margin and performs roughly on par with sGDML. However, sGDML uses hand-engineered descriptors that provide a strong advantage for small datasets, can only be trained on a single molecule (a fixed set of atoms), and does not scale well with the number of atoms or training samples.
|
| 155 |
+
|
| 156 |
+
Ablation studies. To test whether directional message passing and the Fourier-Bessel basis are the actual reason for DimeNet’s improved performance, we ablate them individually and compare the mean standardized MAE and logMAE for multi-task learning on QM9. Table 3 shows that both of our contributions have a significant impact on the model��s performance. Using 64 Gaussian RBFs instead of 16 and 6 Bessel basis functions to represent $d _ { j i }$ and $d _ { k j }$ increases the error by $1 0 \%$ , which shows that this basis does not only reduce the number of parameters but additionally provides a helpful inductive bias. DimeNet’s error increases by around $2 6 \%$ when we ignore the angles between messages by setting $N _ { \mathrm { S H B F } } = 1$ , showing that directly incorporating directional information does indeed improve performance. Using node embeddings instead of message embeddings (and hence also ignoring directional information) has the largest impact and increases MAE by $6 8 \%$ , at which point DimeNet performs worse than SchNet. Furthermore, Fig. 5 shows that the filters exhibit a structurally meaningful dependence on both the distance and angle. For example, some of these filters are clearly being activated by benzene rings ( $1 2 0 ^ { \circ }$ angle, $1 . 3 9 \bar { \mathrm { A } }$ distance). This further demonstrates that the model learns to leverage directional information.
|
| 157 |
+
|
| 158 |
+
# 8 CONCLUSION
|
| 159 |
+
|
| 160 |
+
In this work we have introduced directional message passing, a more powerful and expressive interaction scheme for molecular predictions. Directional message passing enables graph neural networks to leverage directional information in addition to the interatomic distances that are used by normal GNNs. We have shown that interatomic distances can be represented in a principled and effective manner using spherical Bessel functions. We have furthermore shown that this representation can be extended to directional information by leveraging 2D spherical Fourier-Bessel basis functions. We have leveraged these innovations to construct DimeNet, a GNN suitable both for predicting molecular properties and for use in molecular dynamics simulations. We have demonstrated DimeNet’s performance on QM9 and MD17 and shown that our contributions are the essential ingredients that enable DimeNet’s state-of-the-art performance. DimeNet directly models the first two terms in Eq. 1, which are known as the important “hard” degrees of freedom in molecules (Leach, 2001). Future work should aim at also incorporating the third and fourth terms of this equation. This could improve predictions even further and enable the application to molecules much larger than those used in common benchmarks like QM9.
|
| 161 |
+
|
| 162 |
+
# ACKNOWLEDGMENTS
|
| 163 |
+
|
| 164 |
+
This research was supported by the German Federal Ministry of Education and Research (BMBF), grant no. 01IS18036B, and by the Deutsche Forschungsgemeinschaft (DFG) through the Emmy Noether grant GU 1409/2-1 and the TUM International Graduate School of Science and Engineering (IGSSE), GSC 81. The authors of this work take full responsibilities for its content.
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
Brandon M. Anderson, Truong-Son Hy, and Risi Kondor. Cormorant: Covariant Molecular Neural Networks. In NeurIPS, 2019.
|
| 169 |
+
Albert P. Bartók, Mike C. Payne, Risi Kondor, and Gábor Csányi. Gaussian Approximation Potentials: The Accuracy of Quantum Mechanics, without the Electrons. Physical Review Letters, 104(13): 136403, April 2010.
|
| 170 |
+
Albert P. Bartók, Risi Kondor, and Gábor Csányi. On representing chemical environments. Physical Review B, 87(18):184115, May 2013.
|
| 171 |
+
Albert P. Bartók, Sandip De, Carl Poelking, Noam Bernstein, James R. Kermode, Gábor Csányi, and Michele Ceriotti. Machine learning unifies the modeling of materials and molecules. Science Advances, 3(12):e1701816, December 2017.
|
| 172 |
+
Igor I. Baskin, Vladimir A. Palyulin, and Nikolai S. Zefirov. A Neural Device for Searching Direct Correlations between Structures and Properties of Chemical Compounds. Journal of Chemical Information and Computer Sciences, 37(4):715–721, July 1997.
|
| 173 |
+
Jörg Behler and Michele Parrinello. Generalized Neural-Network Representation of HighDimensional Potential-Energy Surfaces. Physical Review Letters, 98(14):146401, April 2007.
|
| 174 |
+
Chi Chen, Weike Ye, Yunxing Zuo, Chen Zheng, and Shyue Ping Ong. Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals. Chemistry of Materials, 31 (9):3564–3572, May 2019a.
|
| 175 |
+
|
| 176 |
+
Zhengdao Chen, Lisha Li, and Joan Bruna. Supervised Community Detection with Line Graph Neural Networks. In ICLR, 2019b.
|
| 177 |
+
|
| 178 |
+
Xiuyuan Cheng, Qiang Qiu, A. Robert Calderbank, and Guillermo Sapiro. RotDCF: Decomposition of Convolutional Filters for Rotation-Equivariant Deep Networks. In ICLR, 2019.
|
| 179 |
+
|
| 180 |
+
Stefan Chmiela, Alexandre Tkatchenko, Huziel E. Sauceda, Igor Poltavsky, Kristof T. Schütt, and Klaus-Robert Müller. Machine learning of accurate energy-conserving molecular force fields. Science Advances, 3(5):e1603015, May 2017.
|
| 181 |
+
|
| 182 |
+
Stefan Chmiela, Huziel E. Sauceda, Klaus-Robert Müller, and Alexandre Tkatchenko. Towards exact molecular dynamics simulations with machine-learned force fields. Nature Communications, 9(1): 1–10, September 2018.
|
| 183 |
+
|
| 184 |
+
Taco Cohen and Max Welling. Group Equivariant Convolutional Networks. In ICML, 2016.
|
| 185 |
+
|
| 186 |
+
Taco Cohen, Maurice Weiler, Berkay Kicanaoglu, and Max Welling. Gauge Equivariant Convolutional Networks and the Icosahedral CNN. In ICML, 2019.
|
| 187 |
+
|
| 188 |
+
Taco S. Cohen and Max Welling. Steerable CNNs. In ICLR, 2017.
|
| 189 |
+
|
| 190 |
+
Taco S. Cohen, Mario Geiger, Jonas Köhler, and Max Welling. Spherical CNNs. In ICLR, 2018.
|
| 191 |
+
|
| 192 |
+
David K. Duvenaud, Dougal Maclaurin, Jorge Aguilera-Iparraguirre, Rafael Gómez-Bombarelli, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P. Adams. Convolutional Networks on Graphs for Learning Molecular Fingerprints. In NIPS, 2015.
|
| 193 |
+
|
| 194 |
+
Felix A. Faber, Luke Hutchison, Bing Huang, Justin Gilmer, Samuel S. Schoenholz, George E. Dahl, Oriol Vinyals, Steven Kearnes, Patrick F. Riley, and O. Anatole von Lilienfeld. Machine learning prediction errors better than DFT accuracy. CoRR, 1702.05532, February 2017.
|
| 195 |
+
|
| 196 |
+
Johannes Gasteiger, Aleksandar Bojchevski, and Stephan Günnemann. Predict then Propagate: Graph Neural Networks Meet Personalized PageRank. In ICLR, 2019.
|
| 197 |
+
|
| 198 |
+
Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural Message Passing for Quantum Chemistry. In ICML, 2017.
|
| 199 |
+
|
| 200 |
+
M. Gori, G. Monfardini, and F. Scarselli. A new model for learning in graph domains. In IEEE International Joint Conference on Neural Networks, July 2005.
|
| 201 |
+
|
| 202 |
+
David J. Griffiths and Darrell F. Schroeter. Introduction to Quantum Mechanics. 3 edition, August 2018.
|
| 203 |
+
|
| 204 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016.
|
| 205 |
+
|
| 206 |
+
Truong Son Hy, Shubhendu Trivedi, Horace Pan, Brandon M. Anderson, and Risi Kondor. Predicting molecular properties with covariant compositional networks. The Journal of Chemical Physics, 148(24):241745, June 2018.
|
| 207 |
+
|
| 208 |
+
John Ingraham, Vikas K. Garg, Regina Barzilay, and Tommi S. Jaakkola. Generative Models for Graph-Based Protein Design. In ICLR workshop, 2019.
|
| 209 |
+
|
| 210 |
+
Peter Bjørn Jørgensen, Karsten Wedel Jacobsen, and Mikkel N. Schmidt. Neural Message Passing with Edge Updates for Predicting Properties of Molecules and Materials. CoRR, 1806.03146, 2018.
|
| 211 |
+
|
| 212 |
+
Thomas N. Kipf and Max Welling. Semi-Supervised Classification with Graph Convolutional Networks. In ICLR, 2017.
|
| 213 |
+
|
| 214 |
+
Risi Kondor, Zhen Lin, and Shubhendu Trivedi. Clebsch-Gordan Nets: a Fully Fourier Space Spherical Convolutional Neural Network. In NeurIPS, 2018.
|
| 215 |
+
|
| 216 |
+
Andrew R. Leach. Molecular Modelling: Principles and Applications. 2001.
|
| 217 |
+
|
| 218 |
+
Haggai Maron, Heli Ben-Hamu, Hadar Serviansky, and Yaron Lipman. Provably Powerful Graph Networks. In NeurIPS, 2019.
|
| 219 |
+
|
| 220 |
+
Christopher Morris, Martin Ritzert, Matthias Fey, William L. Hamilton, Jan Eric Lenssen, Gaurav Rattan, and Martin Grohe. Weisfeiler and Leman Go Neural: Higher-Order Graph Neural Networks. In AAAI, 2019.
|
| 221 |
+
|
| 222 |
+
Emmy Noether. Invariante Variationsprobleme. Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, Mathematisch-Physikalische Klasse, 1918:235–257, 1918.
|
| 223 |
+
|
| 224 |
+
A. Pukrittayakamee, M. Malshe, M. Hagan, L. M. Raff, R. Narulkar, S. Bukkapatnum, and R. Komanduri. Simultaneous fitting of a potential-energy surface and its corresponding force fields using feedforward neural networks. The Journal of Chemical Physics, 130(13):134101, April 2009.
|
| 225 |
+
|
| 226 |
+
Prajit Ramachandran, Barret Zoph, and Quoc V. Le. Searching for Activation Functions. In ICLR workshop, 2018.
|
| 227 |
+
|
| 228 |
+
Raghunathan Ramakrishnan, Pavlo O. Dral, Matthias Rupp, and O. Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1(1):1–7, August 2014.
|
| 229 |
+
|
| 230 |
+
Siamak Ravanbakhsh, Jeff G. Schneider, and Barnabás Póczos. Equivariance Through ParameterSharing. In ICML, 2017.
|
| 231 |
+
|
| 232 |
+
Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. On the Convergence of Adam and Beyond. In ICLR, 2018.
|
| 233 |
+
|
| 234 |
+
F. Scarselli, M. Gori, Ah Chung Tsoi, M. Hagenbuchner, and G. Monfardini. The Graph Neural Network Model. IEEE Transactions on Neural Networks, 20(1):61–80, January 2009.
|
| 235 |
+
|
| 236 |
+
Kristof Schütt, Pieter-Jan Kindermans, Huziel Enoc Sauceda Felix, Stefan Chmiela, Alexandre Tkatchenko, and Klaus-Robert Müller. SchNet: A continuous-filter convolutional neural network for modeling quantum interactions. In NIPS, 2017.
|
| 237 |
+
|
| 238 |
+
A. Sperduti and A. Starita. Supervised neural networks for the classification of structures. IEEE Transactions on Neural Networks, 8(3):714–735, May 1997.
|
| 239 |
+
|
| 240 |
+
Nathaniel Thomas, Tess Smidt, Steven M. Kearnes, Lusann Yang, Li Li, Kai Kohlhoff, and Patrick Riley. Tensor Field Networks: Rotation- and Translation-Equivariant Neural Networks for 3D Point Clouds. CoRR, 1802.08219, 2018.
|
| 241 |
+
|
| 242 |
+
Oliver T. Unke and Markus Meuwly. PhysNet: A Neural Network for Predicting Energies, Forces, Dipole Moments, and Partial Charges. Journal of Chemical Theory and Computation, 15(6): 3678–3693, June 2019.
|
| 243 |
+
|
| 244 |
+
Maurice Weiler, Mario Geiger, Max Welling, Wouter Boomsma, and Taco Cohen. 3D Steerable CNNs: Learning Rotationally Equivariant Features in Volumetric Data. In NeurIPS, 2018.
|
| 245 |
+
|
| 246 |
+
Zhenqin Wu, Bharath Ramsundar, Evan N. Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S. Pappu, Karl Leswing, and Vijay Pande. MoleculeNet: a benchmark for molecular machine learning. Chemical Science, 9(2):513–530, 2018.
|
| 247 |
+
|
| 248 |
+
Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How Powerful are Graph Neural Networks? In ICLR, 2019.
|
| 249 |
+
|
| 250 |
+
Jonathan S Yedidia, William T Freeman, and Yair Weiss. Understanding belief propagation and its generalizations. In Exploring artificial intelligence in the new millennium, volume 8, pp. 236–239. 2003.
|
| 251 |
+
|
| 252 |
+
Vinícius Flores Zambaldi, David Raposo, Adam Santoro, Victor Bapst, Yujia Li, Igor Babuschkin, Karl Tuyls, David P. Reichert, Timothy P. Lillicrap, Edward Lockhart, Murray Shanahan, Victoria Langston, Razvan Pascanu, Matthew Botvinick, Oriol Vinyals, and Peter W. Battaglia. Deep reinforcement learning with relational inductive biases. In ICLR, 2019.
|
| 253 |
+
|
| 254 |
+
# A INDISTINGUISHABLE MOLECULES
|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
Figure 6: A standard non-directional GNN cannot distinguish between a hexagonal (left) and two triangular molecules (right) with the same bond lengths, since the neighborhood of each atom is exactly the same. An example of this would be Cyclohexane and two Cyclopropane molecules with slightly stretched bonds, when the GNN either uses the molecular graph or a cutoff distance of $c \leq 2 . 5 \mathring \mathrm { A }$ . Directional message passing solves this problem by considering the direction of each bond.
|
| 258 |
+
|
| 259 |
+
# B EXPERIMENTAL SETUP
|
| 260 |
+
|
| 261 |
+
The model architecture and hyperparameters were optimized using the QM9 validation set. We use 6 stacked interaction blocks and embeddings of size $F = 1 2 8$ throughout the model. For the basis functions we choose $N _ { \mathrm { S H B F } } = 7$ and $N _ { \mathrm { S R B F } } = N _ { \mathrm { R B F } } = 6$ . For the weight tensor in the interaction block we use $N _ { \mathrm { b i l i n e a r } } = 8$ . We did not find the model to be very sensitive to these values as long as they were large enough (i.e. at least 4).
|
| 262 |
+
|
| 263 |
+
We found the cutoff $c = 5 \mathring \mathrm { A }$ and the learning rate $1 \times 1 0 ^ { - 3 }$ to be rather important hyperparameters. We optimized the model using AMSGrad (Reddi et al., 2018) with 32 molecules per mini-batch. We use a linear learning rate warm-up over 3000 steps and an exponential decay with ratio 0.1 every $2 0 0 0 0 0 0$ steps. The model weights for validation and test were obtained using an exponential moving average (EMA) with decay rate 0.999. For MD17 we use the loss function from Eq. 2 with force weight $\rho = 1 0 0$ , like previous models Schütt et al. (2017). Note that $\rho$ presents a trade-off between energy and force accuracy. It should be chosen rather high since the forces determine the dynamics of the chemical system (Unke & Meuwly, 2019). We use early stopping on the validation loss. On QM9 we train for at most 3 000 000 and on MD17 for at most 100 000 steps.
|
| 264 |
+
|
| 265 |
+
# C SUMMARY STATISTICS
|
| 266 |
+
|
| 267 |
+
We summarize the results across different targets using the mean standardized MAE
|
| 268 |
+
|
| 269 |
+
$$
|
| 270 |
+
\mathrm { s t d . } \mathrm { M A E } = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { | f _ { \theta } ^ { ( m ) } ( \mathbf { X } _ { i } , z _ { i } ) - \hat { t } _ { i } ^ { ( m ) } | } { \sigma _ { m } } \right) ,
|
| 271 |
+
$$
|
| 272 |
+
|
| 273 |
+
and the mean standardized logMAE
|
| 274 |
+
|
| 275 |
+
$$
|
| 276 |
+
\log \mathrm { M A E } = \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \log \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \frac { | f _ { \theta } ^ { ( m ) } ( X _ { i } , z _ { i } ) - \hat { t } _ { i } ^ { ( m ) } | } { \sigma _ { m } } \right) ,
|
| 277 |
+
$$
|
| 278 |
+
|
| 279 |
+
with target index $m$ , number of targets $M = 1 2$ , dataset size $N$ , ground truth values $\hat { \pmb { t } } ^ { ( m ) }$ , model $f _ { \theta } ^ { ( m ) }$ , inputs $X _ { i }$ and $z _ { i }$ , and standard deviation $\sigma _ { m }$ of $\hat { \pmb { t } } ^ { ( m ) }$ . Std. MAE reflects the average error compared to the standard deviation of each target. Since this error is dominated by a few difficult targets (e.g. HOMO) we also report logMAE, which reflects every relative improvement equally but is sensitive to outliers, such as SchNet’s result on $\left. R ^ { 2 } \right.$ .
|
| 280 |
+
|
| 281 |
+
# D DIMENET FILTERS
|
| 282 |
+
|
| 283 |
+
To illustrate the filters learned by DimeNet we separate the spatial dependency in the interaction function $f _ { \mathrm { i n t } }$ via
|
| 284 |
+
|
| 285 |
+
$$
|
| 286 |
+
f _ { \mathrm { i n t } } ( \boldsymbol { m } , d _ { j i } , d _ { k j } , \alpha _ { ( k j , j i ) } ) = \sum _ { n } \left[ \sigma ( \boldsymbol { W } \boldsymbol { m } + b ) \right] _ { n } f _ { \mathrm { f l l t e r } 1 , n } ( d _ { j i } ) f _ { \mathrm { f l l t e r } 2 , n } ( d _ { k j } , \alpha _ { ( k j , j i ) } ) .
|
| 287 |
+
$$
|
| 288 |
+
|
| 289 |
+
The filters $f _ { \mathrm { f l l t e r } 1 , n } : \mathbb { R } ^ { + } \mathbb { R }$ and $f _ { \mathrm { f l l t e r } 2 , n } : \mathbb { R } ^ { + } \times [ 0 , 2 \pi ] \to \mathbb { R } ^ { F }$ are given by
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
\begin{array} { r } { f _ { \mathrm { f l l t e r } 1 , n } ( d ) = ( W _ { \mathrm { R B F } } e _ { \mathrm { R B F } } ( d ) ) _ { n } , } \\ { f _ { \mathrm { f l l t e r } 2 , n } ( d , \alpha ) = ( W _ { \mathrm { S B F } } \pmb { a } _ { \mathrm { S B F } } ( d , \alpha ) ) ^ { T } \pmb { \mathbb { W } } _ { n } , } \end{array}
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
where $W _ { \mathrm { R B F } }$ , $W _ { \mathrm { S B F } }$ , and $\boldsymbol { \mathsf { W } }$ are learned weight matrices/tensors, $e _ { \mathrm { R B F } } ( d )$ is the radial basis representation, and $\pmb { a } _ { \mathrm { S B F } } ( d , \alpha )$ is the 2D spherical Fourier-Bessel representation. Fig. 5 shows how the first 15 elements of $f _ { \mathrm { f i l t e r } 2 , n } ( d , \alpha )$ vary with $d$ and $\alpha$ when choosing the tensor slice $n = 1$ (with $\alpha = 0$ at the top of the figure).
|
| 296 |
+
|
| 297 |
+
# E MULTI-TARGET RESULTS
|
| 298 |
+
|
| 299 |
+
Table 4: MAE on QM9 with multi-target learning. Single-target learning significantly improves performance on all targets. Using a separate output block per target slightly reduces this difference with little impact on training time.
|
| 300 |
+
|
| 301 |
+
<table><tr><td>Target</td><td>Unit</td><td>Multi-target</td><td>Sep. output blocks</td><td>Single-target</td></tr><tr><td>μ</td><td>D</td><td>0.0775</td><td>0.0815</td><td>0.0286</td></tr><tr><td>α</td><td></td><td>0.0649</td><td>0.0616</td><td>0.0469</td></tr><tr><td>EHOMO</td><td>meV</td><td>45.1</td><td>45.5</td><td>27.8</td></tr><tr><td>ELUMO</td><td>meV</td><td>41.1</td><td>33.9</td><td>19.7</td></tr><tr><td>△ε</td><td>meV</td><td>59.2</td><td>63.6</td><td>34.8</td></tr><tr><td>(R²)</td><td>a0²</td><td>0.345</td><td>0.348</td><td>0.331</td></tr><tr><td>ZPVE</td><td>meV</td><td>2.87</td><td>1.44</td><td>1.29</td></tr><tr><td>Uo</td><td>meV</td><td>12.9</td><td>10.6</td><td>8.02</td></tr><tr><td>U</td><td>meV</td><td>13.0</td><td>10.5</td><td>7.89</td></tr><tr><td>H</td><td>meV</td><td>13.0</td><td>10.4</td><td>8.11</td></tr><tr><td>G</td><td>meV</td><td>13.8</td><td>10.8</td><td>8.98</td></tr><tr><td>Cv</td><td>cal molK</td><td>0.0309</td><td>0.0283</td><td>0.0249</td></tr><tr><td>std. MAE logMAE</td><td>%</td><td>1.92 -5.07</td><td>1.90 -5.21</td><td>1.05</td></tr></table>
|
md/train/B1eXygBFPH/B1eXygBFPH.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ATTACKING GRAPH CONVOLUTIONAL NETWORKS VIA REWIRING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Graph Neural Networks (GNNs) have boosted the performance of many graph related tasks such as node classification and graph classification. Recent researches show that graph neural networks are vulnerable to adversarial attacks, which deliberately add carefully created unnoticeable perturbation to the graph structure. The perturbation is usually created by adding/deleting a few edges, which might be noticeable even when the number of edges modified is small. In this paper, we propose a graph rewiring operation which affects the graph in a less noticeable way compared to existing operators. We then use reinforcement learning to learn the attack strategy based on the proposed rewiring operation. Experiments on real world graphs demonstrate the effectiveness of the proposed framework. To understand the proposed framework, we further analyze how its generated perturbation to the graph structure affects the output of the target model and the advantages of the rewiring operation.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Graph structured data are ubiquitous in many real world applications. Various data from different domains, such as social networks, molecular graphs and transportation networks can all be modeled as graphs. Recently, increasing effort has been devoted towards developing deep neural networks on graph structured data. This stream of works, which is known as Graph Neural Networks (GNN) has shown to enhance the performance in many graph related tasks such as node classification (Kipf & Welling, 2016; Hamilton et al., 2017) and graph classification (Bruna et al., 2013; Defferrard et al., 2016; Ying et al., 2018; Zhang et al., 2018).
|
| 12 |
+
|
| 13 |
+
Recent researches have shown that deep neural networks are highly vulnerable to adversarial attacks (Szegedy et al., 2013; Goodfellow et al., 2014; Kurakin et al., 2016; Carlini & Wagner, 2017). In computer vision, performing an adversarial attack is to add deliberately created, but unnoticeable, perturbation to a given image such that the deep model misclassifies the perturbed image. Unlike image data, which can be represented in the continuous space, graph structured data is discrete. Few efforts have been made to investigate the robustness of graph neural networks against adversarial attacks. Only recently, such researches about adversarial attacks on graph structured data started to emerge. A greedy algorithm is proposed to attack the semi-supervised node classification task (Zugner et al., 2018). The method deliberately tries to modify the graph structure and node ¨ features such that the label of a targeted node can be changed. A reinforcement learning based algorithm is proposed to attack both node classification and graph classification task by only modifying the graph structure(Dai et al., 2018). A meta-learning based attack method is designed to impair the overall performance of the node classification task(Zugner & G ¨ unnemann, 2019). For the majority ¨ of existing works, the graph structure is modified by adding or deleting edges.
|
| 14 |
+
|
| 15 |
+
To ensure that the difference between the attacked graph and the original graph is “unnoticeable”, the number of actions (adding/deleting edges) that can be taken by the attacking algorithms is usually constrained by a budget. However, even when this budget is small, adding or deleting edges can still make “noticeable” changes to the graph structure (Miller et al., 2019). For example, it is evident that many important graph properties are based on eigenvalues and eigenvectors of the Laplacian matrix of the graph (Chan & Akoglu, 2016); while adding or deleting an edge can make remarkable changes on the eigenvalues/eigenvectors of the graph Laplacian (Ghosh & Boyd, 2006). Thus, in this work, we propose a new operation based on graph rewiring. A single rewiring operation involves three nodes $( v _ { f i r } , v _ { s e c } , v _ { t h i } )$ , where we remove the existing edge between $v _ { f i r }$ and $v _ { s e c }$ and add edge between $v _ { f i r }$ and $v _ { t h i }$ . Note that $v _ { t h i }$ is constraint to be the 2-hop neighbor of $v _ { f i r }$ in our setting. It is obvious that the proposed rewiring operation preserves some basic properties of the graph such as number of nodes and edges, total degrees of the graph and etc, while operations like adding and deleting edges cannot. Furthermore, the proposed rewiring operation affects some of the important measures based on graph Laplacian such as algebraic connectivity in a smaller way than adding/deleting edges, which is theoretically demonstrated in Section 4.1. In addition, the rewiring operation is a more natural way to modify the graph. For example, in biology, the evolution of DNA and amino acid sequences can lead to pervasive rewiring of protein–protein interactions (Zitnik et al., 2019).
|
| 16 |
+
|
| 17 |
+
In this paper, we aim to construct adversarial examples by performing rewiring operations for the task of graph classification. More specifically, we treat the process of applying a series of rewiring operations to a given graph as a discrete Markov decision process (MDP) and use reinforcement learning to learn how to make these decisions. We demonstrate the effectiveness of the proposed algorithm on real-world graphs. Then we further analyze how the adversarial changes in the graph structure affect both the graph embedding learned by the graph neural network model and the output label and illustrate the advantages of the rewiring operation.
|
| 18 |
+
|
| 19 |
+
# 2 BACKGROUND
|
| 20 |
+
|
| 21 |
+
In this section, we introduce notations and the target graph convolutional model we seek to attack. We denote a graph as $G = \{ \nu , \mathcal { E } \}$ , where $\mathcal { V } = \{ v _ { 1 } , \ldots , v _ { | \mathcal { V } | } \}$ and $\mathcal { E } = \{ e _ { 1 } , \ldots , e _ { | \mathcal { E } | } \}$ are the sets of nodes and edges, respectively. The edges describe the relations between nodes, which can be described by an adjacency matrix $\mathbf { A } \in \{ \bar { 0 } , 1 \} ^ { | \mathcal { V } | \times | \mathcal { V } | }$ . $\mathbf { A } _ { i j } = 1$ means $v _ { i }$ and $v _ { j }$ are connected, 0 otherwise. Each node in the graph has some features that are associated with it. These features are represented as a matrix $\mathbf { X } \in \mathbb { R } ^ { | \bar { \nu } | \times d }$ , where the $i$ -th row of $\mathbf { X }$ denotes the node features of node $v _ { i }$ and $d$ is the dimension of features. Thus, an attributed graph can be represented as $G = \{ \mathbf { A } , \mathbf { X } \}$ .
|
| 22 |
+
|
| 23 |
+
# 2.1 GRAPH CLASSIFICATION
|
| 24 |
+
|
| 25 |
+
In the setting of graph classification, we are given a set of graphs $\mathcal { G } = \{ G _ { i } \}$ . Each of these graphs $G _ { i }$ is associated with a label $y _ { i }$ . The task is to build a good classifier using the given set of graphs such that it can make correct predictions when new unseen graphs are fed into it. A graph classifier parameterized by $\theta$ can be represented as $f ( G | \theta ) = y ^ { o }$ , where $y ^ { o }$ denotes the label of a graph $G \in { \mathcal { G } }$ predicted by the classifier. The parameters $\theta$ in the classifier $f ( \cdot | \theta )$ can be learned by solving the following optimization problem $\begin{array} { r } { \operatorname* { m i n } _ { \theta } \sum _ { i } L ( f ( G _ { i } | \theta ) , y _ { i } ) } \end{array}$ , where $L ( \cdot , \cdot )$ is used to measure the difference between the predicted and ground truth labels. Cross entropy is a commonly adopted measurement for $L ( \cdot , \cdot )$ .
|
| 26 |
+
|
| 27 |
+
# 2.2 GRAPH CONVOLUTION NETWORKS
|
| 28 |
+
|
| 29 |
+
Recently, Graph Neural Networks have been shown to be effective in graph representation learning. These models usually learn node representations by iteratively aggregating, transforming and propagating node information. In this work, we adopt the graph convolutional networks (GCN) (Kipf & Welling, 2016). A graph convolutional layer in the GCN framework can be represented as
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\mathbf { F } ^ { j } = R e L U ( \mathbf { D } ^ { - \frac { 1 } { 2 } } \mathbf { A } \mathbf { D } ^ { - \frac { 1 } { 2 } } \mathbf { F } ^ { j - 1 } \mathbf { W } ^ { j } )
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
where $\mathbf { F } ^ { j } \in \mathbb { R } ^ { N \times d _ { j } }$ is the output of the $j$ -th layer and $\mathbf { W } ^ { j }$ represents the parameters of this layer. A GCN model usually consists of $J$ graph convolutional layers, with $\mathbf { F } ^ { 0 } \equiv \mathbf { X }$ . The output of the GCN model is $\mathbf { F } ^ { J }$ , which is denote as $\mathbf { F }$ for convenience. To obtain a graph level embedding $\mathbf { u } _ { G }$ for graph $G$ to perform graph classification, we apply a global pooling over the node embeddings.
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\mathbf { u } _ { G } = p o o l ( \mathbf { F } )
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
Different global pooling functions can be used, and we adopt the max pooling in this work. A multilayer perceptron (MLP) and softmax layer are then sequentially applied on the graph embedding to predict the label of the graph
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
y ^ { o } = \mathrm { a r g m a x } ~ s o f t m a x ( M L P ( \mathbf { u } _ { G } | \mathbf { W } _ { M L P } ) )
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $M L P ( \cdot | \mathbf { W } _ { M L P } )$ denotes the multilayer perceptron with parameters as ${ \bf W } _ { M L P }$ . A GCNbased classifier for graph classification can be described using eq. equation 1, equation 2 and equation 3 as introduced above. For simplicity, we summarize it as $y ^ { \bar { o } } = \bar { f } _ { G C N } ( G | \bar { \theta _ { G C N } } )$ , where $\theta _ { G C N }$ includes all the parameters in the model.
|
| 48 |
+
|
| 49 |
+
# 3 PROBLEM FORMULATION
|
| 50 |
+
|
| 51 |
+
In this work, we aim to build an attacker $\tau$ that takes a graph as input and modify the structure of the graph to fool a GCN classifier. Modifying a graph structure is equivalent to modify its adjacency matrix. The function of the attacker can be represented as $\tilde { G } = \bar { \mathcal { T } } ( G ) = \{ \mathcal { T } ( \mathbf { A } ) , \dot { \mathbf { X } } \} = \{ \tilde { \mathbf { A } } , \mathbf { X } \}$ . Given a classifier $f ( \cdot )$ , the goal of the attacker is to modify the graph structure so that the classifier outputs a different label from what it originally predicted. Note here, we neglect the $\theta$ inside $f ( \cdot )$ , as the classifier is already trained and fixed. Mathematically, the goal of the attacker can be represented as: $f ( { \mathcal { T } } ( G ) ) \neq f ( G )$ .
|
| 52 |
+
|
| 53 |
+
As described above, the attacker $\tau$ is specifically designed for a given classifier $f ( \cdot )$ . To reflect this in the notation, we now denote the attacker for the classifier $f ( \cdot )$ as $\mathcal { T } _ { f }$ . In our work, the attacker $\mathcal { T } _ { f }$ has limited knowledge of the classifier. The only information the attacker can get from the classifier is the label of (modified) graphs. In other words, the classifier $f ( \cdot )$ is treated as a black-box model for the attacker $\mathcal { T } _ { f }$ .
|
| 54 |
+
|
| 55 |
+
An important constraint to the attacker $\mathcal { T } _ { f }$ is that it is only allowed to make “unnoticeble” changes to the graph structure. To account for this, we propose the rewiring operation, which is supposed to make more subtle changes than adding or deleting edges. We will show that the rewiring operation can better preserve a lot of important properties of the graph compared to adding or deleting edges in Section 4.1. We also empirically compare the rewiring operation with the deleting/adding edges in Appendix C. The definition of the proposed rewiring is given below:
|
| 56 |
+
|
| 57 |
+
Definition 1. $A$ rewiring operation a involves three nodes and it can be denoted as ${ \bf a } \_ =$ $\{ v _ { f i r } , v _ { s e c } , v _ { t h i } \}$ , where $\breve { v } _ { s e c } \in N ^ { 1 } ( v _ { f i r } )$ and $v _ { t h i } \in N ^ { 2 } ( v _ { f i r } ) / N ^ { 1 } ( v _ { f i r } )$ . $N ^ { k } ( v _ { f i r } )$ denotes the $k$ -th hop neighbors of $v _ { f i r }$ and the sign / stands for exclusion. The rewiring operation deletes the existing edge between nodes $v _ { f i r }$ and $v _ { s e c } ,$ , while adding an edge to connect nodes $v _ { f i r }$ and $v _ { t h i }$ .
|
| 58 |
+
|
| 59 |
+
The attacker $\mathcal { T } _ { f }$ is given a budget of $K$ proposed rewiring operations to modify the graph structure. A straightforward way to set $K$ is choosing a small fix number. However, it is likely that graphs in a given data set have various graph sizes. The same number of rewiring operations can affect the graphs of different size in various magnitude. Hence, a more suitable way is to allow flexible number of rewiring operations according to the graph size. Thus, we propose to use $K = p \cdot | { \mathcal { E } } |$ for a given graph $G$ , where $p \in ( 0 , 1 )$ is a ratio.
|
| 60 |
+
|
| 61 |
+
The process of the attacker on a graph $G$ can be now denoted as $\mathcal { T } _ { f } ( G ) ( a _ { 1 } , a _ { 2 } , \dotsc , a _ { M } ) [ G ] .$ , where the right hand part means to sequentially apply the rewiring operations $a _ { 1 } , \dots , a _ { M }$ to the graph $G$ , and $M$ is the number of rewiring operations taken with $M \leq K$ .
|
| 62 |
+
|
| 63 |
+
# 4 REWIRING-BASED ATTACK TO GRAPH CONVOLUTIONAL NETWORKS
|
| 64 |
+
|
| 65 |
+
Next, we first discuss the properties of the proposed rewiring operation to show its advantages. We then introduce the proposed attacking framework ReWatt based on reinforcement learning and rewiring.
|
| 66 |
+
|
| 67 |
+
# 4.1 PROPERTIES OF THE PROPOSED REWIRING OPERATION
|
| 68 |
+
|
| 69 |
+
The proposed rewiring operation has several advantages compared to simply adding or deleting edges. More empirical discussions can be found in Appendix C. One obvious advantage of the proposed rewiring operation is that it does not change the number of nodes, the number of edges and the total degree of a graph. However, operations like “adding” or “deleting” edges may change those properties.
|
| 70 |
+
|
| 71 |
+
Many important graph properties are based on the eigenvalues of the Laplacian matrix of a graph (Chan & Akoglu, 2016) such as Algebraic Connectivity Fiedler (1973) and Effective Graph
|
| 72 |
+
|
| 73 |
+
Resistance Ellens et al. (2011). A detailed description of Algebraic Connectivity and Effective Graph Resistance are given in Appendix A. Next, we demonstrate that the proposed rewiring operation is likely to make smaller changes to eigenvalues, which result in unnoticeable changes under graph Laplacian based measures. For a graph $G$ with $\mathbf { A }$ as its adjacency matrix, its Laplacian matrix $\mathbf { L }$ is defined as $\mathbf { L } = \mathbf { D } - \mathbf { A }$ , where $\mathbf { D }$ is the diagonal degree matrix (Mohar et al., 1991). Let $\lambda _ { 1 } , \ldots , \lambda _ { | \nu | }$ denote the eigenvalues of the Laplacian matrix arranged in the increasing order with $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { | \mathcal { V } | }$ being the corresponding eigenvectors. We show how a single proposed rewiring operation affects the eigenvalues. Our analysis is based on the following lemma:
|
| 74 |
+
|
| 75 |
+
Lemma 1. (Stewart, 1990) Let $\left( \alpha _ { i } , \mathbf { h } _ { i } \right)$ be the eigen-pairs of a symmetric matrix $\mathbf { M } \in \mathbb { R } ^ { N \times N }$ Given a perturbation $\Delta \mathbf { M }$ to matrix M, its eigenvalues can be updated by $\Delta \alpha _ { i } = \mathbf { h } _ { i } ^ { T } \Delta \mathbf { M } \mathbf { h } _ { i }$ .
|
| 76 |
+
|
| 77 |
+
The proof can be found in (Stewart, 1990). Using this lemma, we have the following corollary Corollary 1. For a given graph $G$ with Laplacian matrix $\mathbf { L }$ , one proposed rewiring operation $( v _ { f i r } , v _ { s e c } , v _ { t h i } )$ affects the eigen-value $\lambda _ { i }$ by $\Delta \lambda _ { i } ,$ , for $i = 1 , \ldots , | \nu |$ , where
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\Delta { \lambda } _ { i } = ( 2 { \bf { x } } _ { i } [ f i r ] - { \bf { x } } _ { i } [ t h i ] - { \bf { x } } _ { i } [ s e c ] ) ( { \bf { x } } _ { i } [ s e c ] - { \bf { x } } _ { i } [ t h i ] )
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\mathbf { x } _ { i } [ i n d e x ]$ denotes the index-th value of the eigenvector $\mathbf { x } _ { i }$
|
| 84 |
+
|
| 85 |
+
The proof can be found in Appendix B.
|
| 86 |
+
|
| 87 |
+
Furthermore, each eigenvalue $\lambda _ { i }$ of the Laplacian matrix measures the “smoothness” of its corresponding eigenvector $\mathbf { x } _ { i }$ (Shuman et al., 2012; Sandryhaila & Moura, 2014). The “smoothness” of an eigenvector measures how different its elements are from their neighboring nodes. Thus, the first few eigenvectors with relatively small eigenvalues are rather “smooth”. Note that in the proposed rewiring operation, $v _ { s e c }$ is the direct neighbor of $v _ { f i r }$ and $v _ { t h i }$ is the 2-hop neighbor of $v _ { f i r }$ . Thus, the difference ${ \bf x } _ { i } [ f i r ] - { \bf x } _ { i } [ t h i ]$ is expected to be smaller than the difference ${ \bf x } _ { i } [ f i r ] - { \bf x } _ { i } [ c \dot { a } n ]$ , where $\mathbf { x } _ { i } [ c a n ]$ can be any other node that is further away. This means that the proposed rewiring operation (to 2-hop neighbors) is likely to make smaller changes to the first few eigenvalues than rewiring to any further away nodes or adding an edge between two nodes that are far away from each other.
|
| 88 |
+
|
| 89 |
+
# 4.2 GRAPH ADVERSARIAL ATTACK WITH REINFORCEMENT LEARNING
|
| 90 |
+
|
| 91 |
+
Given a graph $G$ , the process of the attacker $\tau$ is a general decision making process $M \ =$ $( \boldsymbol { S } , \mathcal { A } , \boldsymbol { P } , \boldsymbol { R } )$ , where $\mathcal { A } \stackrel { \bf { \bar { \Delta } } } { = } \{ a _ { t } \}$ is the set of actions, which consists of all valid rewiring operations, ${ \cal { S } } = \{ s _ { t } \}$ is the set of states that consists of all possible intermediate and final graphs after rewiring, $P$ is the transition dynamics that describes how a rewiring action $a _ { t }$ changes the graph structure $p ( s _ { t + 1 } | , s _ { t } , \ldots , s _ { 1 } , \bar { a _ { t } } )$ . $R$ is the reward function, which gives the reward for the action taken at a given state. Thus, the procedure of attacking a graph can be described by a trajectory $( s _ { 1 } , a _ { 1 } , r _ { 1 } , \ldots , s _ { M } , a _ { M } , r _ { M } )$ , where $s _ { 1 } ~ = ~ G$ . The key point for the attacker is to learn how to make the decision of picking a suitable rewiring action when at the state $s _ { t }$ . This can be done by learning a policy network to get the probability $p ( a _ { t } | s _ { t } , \ldots , s _ { 1 } )$ and sample the rewiring operation correspondingly. Modelling in this way, the decision making at a state $s _ { t }$ is dependant on all its previous states, which could be difficult to model due to the long-term dependency. It is easy to notice that the intermediate states $s _ { t }$ are all predicted to have the same label as the original graph. Thus, we can treat each of the states as a brand new graph to be attacked regardless of what leads to it. That is to say, the decision making at the state $s _ { t }$ can be solely dependant on the current state, $p ( a _ { t } | s _ { t } , \ldots , s _ { 1 } ) = p ( a _ { t } | s _ { t } )$ . Thus, we model the process of attack as a Markov Decision Process (MDP) Sutton & Barto (2018). Hence, we adopt reinforcement learning to learn how to make effective decisions. We name the proposed framework as ReWatt. The key elements of the environment for the reinforcement learning are defined as follows:
|
| 92 |
+
|
| 93 |
+
State Space The state space of the environment consists of all the intermediate graphs generated after the possible rewiring operations.
|
| 94 |
+
|
| 95 |
+
Action Space The action space consists of the valid rewiring operations as defined in Definition 1.
|
| 96 |
+
|
| 97 |
+
State Transition Dynamics Given an action (rewiring operation) $a _ { t } = \{ v _ { f i r } , v _ { s e c } , v _ { t h i } \}$ at state $s _ { t }$ The next state $s _ { t + 1 }$ is achieved by deleting the edge between $v _ { f i r }$ and $v _ { s e c }$ in the current state $s _ { t }$ and adding an edge to connect $v _ { f i r }$ with $v _ { t h i }$ .
|
| 98 |
+
|
| 99 |
+
Reward Design The main goal of the attacker is to make the classifier $f ( \cdot )$ predict a different label than originally predicted. We also encourage the attacker to take as few actions as possible so that the modification to the graph structure is minimal. Thus, we assign a positive reward when the attack is successful and assign a negative reward for each action step taken. The reward $R ( s _ { t } , a _ { t } )$ is given as
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
R ( s _ { t } , a _ { t } ) = { \left\{ \begin{array} { l l } { ~ 1 ~ } & { { \mathrm { i f } } ~ f ( s _ { t } ) \neq f ( s _ { 1 } ) ; } \\ { n _ { r } ~ } & { { \mathrm { i f } } ~ f ( s _ { t } ) = f ( s _ { 1 } ) . } \end{array} \right. }
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $n _ { r }$ is the negative reward to penalize each step taken. Similar to how we set a flexible rewiring budget $K$ , here we propose to use $\begin{array} { r } { \dot { n } _ { r } = - \frac { 1 } { K } = - \frac { 1 } { p \cdot | \mathcal { E } | } } \end{array}$ − 1p·|E| , which depends on the size of the graph.
|
| 106 |
+
|
| 107 |
+
Termination The attack process will stop either when the number of actions reaches the budget $K$ or the attacker successfully “changed” the label of the slightly modified graph.
|
| 108 |
+
|
| 109 |
+
# 4.3 POLICY NETWORK
|
| 110 |
+
|
| 111 |
+
In this subsection, we introduce the policy network to learn the policy $p ( a _ { t } | s _ { t } )$ on top of the graph representations learned by GCN. However, this GCN is different from the target classifier one, since it has 2 convectional layers. To choose a valid proposed rewiring action, we decompose the rewiring action to 3 steps: 1) choosing an edge $e _ { t } = ( v _ { e _ { 1 } } , v _ { e _ { 2 } } )$ from the set of edges of the intermediate graph $s _ { t } ; 2 )$ determining $v _ { e _ { t 1 } }$ or $v _ { e _ { t 2 } }$ to be ${ \boldsymbol { v } } _ { f i r _ { t } }$ and the other to be $v _ { s e c _ { t } }$ ; and 3) choosing the third node $v _ { t h i _ { t } }$ from $N _ { s _ { t } } ^ { 2 } ( v _ { f i r _ { t } } ) / N _ { s _ { t } } ^ { 1 } ( v _ { f i r _ { t } } )$ . Correspondingly, we decompose $p ( a _ { t } | s _ { t } )$ as follows
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
p ( a _ { t } | s _ { t } ) = p _ { e d g e } ( e _ { t } | s _ { t } ) \cdot p _ { f i r } ( v _ { f i r _ { t } } | e _ { t } , s _ { t } ) \cdot p _ { t h i } ( v _ { t h i _ { t } } | v _ { f i r _ { t } } , e _ { t } , s _ { t } )
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
We design three policy networks based on GCN to estimate the three distributions in the right hand of the equation equation 5, which will be introduced next. To select an edge from the edge set $\mathcal { E } _ { s _ { t } }$ , we generate the edge representation from the node representations $\mathbf { F } _ { s _ { t } } \in \mathbb { R } ^ { | \mathcal { V } _ { s _ { t } } | \times d _ { F } }$ learned by GCN. For an edge $\boldsymbol { e } ~ = ~ \left( v _ { e _ { 1 } } , v _ { e _ { 2 } } \right)$ , the edge representation can be represented as $\textbf { e } = \ c o n c a t ( \mathbf { u } _ { s _ { t } } , h ( \mathbf { F } _ { s _ { t } } [ e _ { 1 } , : ] , \mathbf { F } _ { s _ { t } } [ e _ { 2 } , : ] ) )$ , where $\mathbf { u } _ { s _ { t } }$ is the graph representation of the state $s _ { t }$ , $h ( \cdot , \cdot )$ is a function to combine the two node representations and $c o n c a t ( \cdot , \cdot )$ denotes the concatenation operation. We include $\mathbf { u } _ { s t }$ in the representation of the edge to incorporate the graph information when making the decision. The representation of all the edges in $\mathcal { E } _ { s _ { t } }$ can be represented as a matrix $\mathbf { E } _ { s _ { t } } \in \mathbb { R } ^ { | \mathcal { E } _ { s _ { t } } | \times 2 d _ { F } }$ , where each row represents an edge. The probability distribution over all the edges can be represented as
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
p _ { e d g e } ( \cdot | s _ { t } ) = s o f t m a x ( M L P ( \mathbf { E } _ { s _ { t } } | \theta _ { e d g e } ) ) ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where we use $M L P ( \cdot | \theta _ { e d g e } )$ to denote a Multilayer Perceptron that maps $\mathbf { E } _ { s _ { t } } \in \mathbb { R } ^ { | \mathcal { E } _ { s _ { t } } | \times 2 d _ { F } }$ to a vector in $\mathbb { R } ^ { | \mathcal { E } _ { s _ { t } } | }$ , which, after going through the softmax layer, represents the probability of choosing each edge. Let $e _ { t } = ( v _ { e _ { t 1 } } , v _ { e _ { t 2 } } )$ denote the edge sampled according to eq. equation 6. To decide which node is going to be the first node, we estimate the probability distribution over these two nodes as
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
p _ { f i r } ( \cdot | e _ { t } , s _ { t } ) = s o f t m a x ( M L P ( [ \mathbf { v } _ { e _ { t 1 } } , \mathbf { v } _ { e _ { t 2 } } ] ^ { T } | \theta _ { f i r } ) )
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $\mathbf { v } _ { e _ { t _ { i } } } = c o n c a t ( \mathbf { e } _ { t } , \mathbf { F } _ { s _ { t } } [ e _ { t { i } } , : ] ) \in \mathbb { R } ^ { 3 d _ { F } }$ for $i = 1 , 2$ . The first node can be sampled from the two nodes $v _ { e _ { t 1 } } , v _ { e _ { t 2 } }$ according to eq. equation 7. We then proceed to estimate the probability distribution $p ( \cdot | v _ { f i r _ { t } } , e _ { t } , s _ { t } )$ . For any node $v _ { c } ~ \in ~ { \cal N } ^ { 2 } ( v _ { f i r _ { t } } ) / { \cal N } ^ { 1 } ( v _ { f i r _ { t } } )$ , we use $\begin{array} { r l } { \hat { \mathbf { v } } _ { c } } & { { } = } \end{array}$ $c o n c a t ( \mathbf { v } _ { e _ { t 1 } } , \mathbf { F } _ { s _ { t } } [ c , : ] )$ to represent it. The representations for all the nodes in $N ^ { 2 } \dot { ( } v _ { f i r _ { t } } ) / N ^ { 1 } ( v _ { f i r _ { t } } )$ can be represented by a matrix $\hat { \bf V } _ { s _ { t } } \in \mathbb { R } ^ { | N ^ { 2 } ( v _ { f i r _ { t } } ) / N ^ { 1 } ( v _ { f i r _ { t } } ) | \times 4 d _ { F } }$ with each row representing a node. The probability distribution of choosing the third node over all the candidate nodes can be modeled as:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
p _ { t h i } ( \cdot | v _ { f i r _ { t } } , e _ { t } , s _ { t } ) = s o f t m a x ( M L P ( \hat { \mathbf { V } } _ { s _ { t } } | \theta _ { t h i } ) )
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
The third node $v _ { t h i _ { t } }$ can be sampled from the set of candidate nodes $N ^ { 2 } ( v _ { f i r _ { t } } ) / N ^ { 1 } ( v _ { f i r _ { t } } )$ according to the probability distribution in eq equation 8. An action $a _ { t }$ can be generated by sequentially estimating and sampling from the probability distributions in eq. equation 6, equation 7 and equation 8.
|
| 136 |
+
|
| 137 |
+
# 4.4 PROPOSED FRAMEWORK - REWATT
|
| 138 |
+
|
| 139 |
+
With the rewiring and the policy network defined above, our overall framework can be summarized as follows. With State $s _ { t }$ , the Attacker uses GCN to learn node and edge embeddings, which are used as input to Policy Networks to make decision about the next action. Once the new action is sampled from the policy network, rewiring is performed on $s _ { t }$ and we arrive in the new state $s _ { t + 1 }$ . We query the black-box classifier to get the prediction $f ( S _ { t + 1 } )$ , which is compared with $f ( s _ { 1 } )$ to get reward. Policy gradient (Sutton & Barto, 2018) is adopted to learn the policies by maximizing the rewards.
|
| 140 |
+
|
| 141 |
+
# 5 EXPERIMENT
|
| 142 |
+
|
| 143 |
+
In this section, we conduct experiments to evaluate the performance of the proposed framework ReWatt. We also carry out a study to analyze how the trained attacker works. Some empirical investigation on the advancements of the rewiring operation can be found in Appendix C.
|
| 144 |
+
|
| 145 |
+
# 5.1 ATTACK PERFORMANCE
|
| 146 |
+
|
| 147 |
+
To demonstrate the effectiveness of ReWatt, we conduct experiments on three widely used social network data sets (Kersting et al., 2016) for graph classification, i.e., REDDIT-MULTI-12K, REDDITMULTI-5K and IMDB-MULTI (Yanardag & Vishwanathan, 2015). The statistics can be found in Appendix D. Note that the re-wiring operation (as well as the other operations) may lead to abnormal structure of some kinds of graphs, which can make the graphs invalid, especially for chemical molecules. So in this paper, We avoid chemical related datasets but only use social networks datasets. In the social domain, if the changes are subtle, it is most likely that we will not we will not introduce abnormal structures. Meanwhile, it is straightforward to extend our framework to datsets from the other domains if we have expertise in them. For example, if we know what structures are abnormal, we can use such knowledge to constraint the the state space of the RL framework. We leave it as one future work.
|
| 148 |
+
|
| 149 |
+
In this work, the classifier we target to attack is the GCN-based classifier as introduced in Section 2. We set the number of layers to 3. We need to train the classifier using a fraction of the data and then treat the classifier as a black box to be attacked. We then use part of the remaining data to train the attacker and use the rest of the data to test the performance of the attacker. Thus, for each data set, we split it into three parts with the ratio of $a \% : b \% : c \%$ , where $a \%$ of the data set is used to train the classifier, $b \%$ of the data set is used to train the attacker and the remaining $c \%$ of the data set is used to test the performance of the attacker. For the REDDIT-MULTI-12K and REDDIT-MULTI5K data sets, we set $a = 9 0$ , $b = 8$ and $c = 2$ . As the size of the IMDB-MULTI data set is quite small, to have enough data for testing, we set $a = 5 0$ , $b = 3 0$ and $c = 2 0$ .
|
| 150 |
+
|
| 151 |
+
We compare the attacking performance of the proposed framework with the RL-S2V proposed in (Dai et al., 2018), random selection method and some variants of our proposed framework. We briefly describe these baselines: 1) RL-S2V is a reinforcement learning based attack framework (Dai et al., 2018), which allows adding and deleting edges to the graph with a fixed budget for all the graphs; 2) Random denotes an attacker that performs the proposed rewiring operations randomly; 3) Random-s is also based on random rewiring. Note that ReWatt can terminate before using all the budget. We record the actual number of rewiring actions made in our method and only allow the Random-s to take exactly the same number of rewiring actions as ReWatt; 4) ReWatt-n denotes a variant of the ReWatt, where the negative reward is fixed to $- 0 . 5$ for all the graphs in the testing set; and 5) ReWatt-a is a variant of ReWatt, where we allow any nodes in the graph to be the third node $v _ { t h i _ { t } }$ instead of only 2-hop neighbors.
|
| 152 |
+
|
| 153 |
+
As RL-S2V only allows a fixed budget for the all the graphs, when comparing to it, for ReWatt, we also fix the number of proposed rewiring operations to a fixed number $K$ for all the graphs. Note that a single proposed rewiring operation involves two edges, thus, for a fair comparison, we allow the RL-S2V to take $2 K$ actions (adding/deleting edges). We set $K = 1 , 2 , 3$ in the experiments. To compare with the random selection method and the variants of ReWatt, we use flexible budget, more specially, we allow at most $\boldsymbol { p } \cdot \left| \mathcal { E } _ { i } \right|$ proposed rewiring operations for graph $G _ { i }$ . Here, $p$ is a fixed percentage and we set it to $p = 1 \%$ , $2 \%$ , $3 \%$ in our experiments. We use the success rate as measure to evaluate the performance of the attacker. A graph is said to be successfully attacked if its label is changed when it is modified within the given budget.
|
| 154 |
+
|
| 155 |
+
The results are shown in Table 1. From the table, we can make the following observations: 1) Compared to RL-S2V, ReWatt can perform more effective attacks. Especially, in the IMDB-MULTI data set, where ReWatt outperforms the RL-S2V with a large margin; 2) ReWatt outperforms the Random method as expected. Especially, ReWatt is much more effective than Random-s which performs exactly the same number of proposed rewiring operations ReWatt. This also indicates that the Random method uses more rewiring operations for successful attacking than ReWatt; 3) The variant ReWatt-a outperforms ReWatt, which means if we do not constraint the rewiring operation to 2-hop neighbors, the performance of ReWatt can be further improved. However, as we discussed in earlier sections, this may lead to more “noticeable” changes of the graph structure; and 4) ReWattn performs worse than our ReWatt, which shows the advancement of using a flexible reward design.
|
| 156 |
+
|
| 157 |
+
<table><tr><td></td><td colspan="3">REDDIT-MULTI-12K</td><td colspan="3">REDDIT-MULTI-5K</td><td colspan="3">IMDB-MULTI</td></tr><tr><td>K</td><td>1</td><td>2</td><td>3</td><td>1</td><td>2</td><td>3</td><td>1</td><td>2</td><td>3</td></tr><tr><td>ReWatt</td><td>14.4%</td><td>21.6%</td><td>23.4%</td><td>8.99%</td><td>16.9%</td><td>18.0%</td><td>23.0%</td><td>23.3%</td><td>23.3%</td></tr><tr><td>RL-S2V</td><td>9.46%</td><td>18.5%</td><td>21.1%</td><td>4.49%</td><td>16.9%</td><td>18.0%</td><td>2.00%</td><td>6.00%</td><td>3.33%</td></tr><tr><td>P</td><td>1%</td><td>2%</td><td>3%</td><td>1%</td><td>2%</td><td>3%</td><td>1%</td><td>2%</td><td>3%</td></tr><tr><td>ReWatt</td><td>25.2%</td><td>32.9%</td><td>38.7%</td><td>11.2%</td><td>20.2%</td><td>27.0%</td><td>23.0%</td><td>23.0%</td><td>23.3%</td></tr><tr><td>ReWatt-a</td><td>26.1%</td><td>35.1%</td><td>42.8%</td><td>5.60%</td><td>21.3%</td><td>30.3%</td><td>24.3%</td><td>25.0%</td><td>25.6%</td></tr><tr><td>ReWatt-n</td><td>17.6%</td><td>25.7%</td><td>31.1%</td><td>5.60%</td><td>14.6%</td><td>19.1%</td><td>21.3%</td><td>21.3%</td><td>21.6%</td></tr><tr><td>random</td><td>10.3%</td><td>15.7%</td><td>21.6%</td><td>3.30%</td><td>12.4%</td><td>16.9%</td><td>1.33%</td><td>1.33%</td><td>1.66%</td></tr><tr><td>random-s</td><td>6.30%</td><td>6.70%</td><td>9.45%</td><td>5.60%</td><td>6.74%</td><td>11.0%</td><td>1.00%</td><td>1.33%</td><td>1.66%</td></tr></table>
|
| 158 |
+
|
| 159 |
+
Table 1: Performance comparison in terms of success rate
|
| 160 |
+
|
| 161 |
+
# 5.2 ATTACKER ANALYSIS
|
| 162 |
+
|
| 163 |
+
In this subsection, we carry out experiments to analyze how ReWatt’s change in graph structure affects the graph representation u calculated by eq. equation 2 and the logits $\mathbf { P }$ (the output immediately after the softmax layer of the classifier). For convenience, we denote the original graph as $G ^ { o }$ and the attacked graph as $G ^ { a }$ in this section. Correspondingly, the graph representation and logits for the original (attacked) graph are denoted as $\mathbf { u } ^ { o }$ $( \mathbf { u } ^ { a } )$ and $\mathbf { P } ^ { o }$ $( \mathbf { P } ^ { a } )$ , respectively. To measure the difference in graph representation, we used the relative difference in terms of 2-norm defined as $\begin{array} { r } { R C ( \mathbf { u } ^ { o } , \mathbf { u } ^ { a } ) = \frac { \| \mathbf { \bar { u } } ^ { a } - \mathbf { \bar { u } } ^ { o } \| _ { 2 } } { \| \mathbf { u } ^ { o } \| _ { 2 } } } \end{array}$ kua−uok2kuok . The logits denote the probability distribution that the given graph belongs to each of the classes. Thus, we use the KL-divergence Kullback (1997) to measure the difference between the logits of the original and attacked graphs $K L ( \mathbf { P } ^ { o } , \mathbf { P } ^ { a } ) = \sum _ { i = 1 } ^ { C } \mathbf { P } ^ { o } [ i ] \log \left( \frac { \mathbf { P } ^ { o } [ i ] } { \mathbf { P } ^ { a } [ i ] } \right)$ , where $C$ is the number of classes in the data set and $\mathbf { P } [ i ]$ denotes the logit for the $i$ -th class.
|
| 164 |
+
|
| 165 |
+
We perform the experiments on the REDDIT-MULTI-12K data set under the setting of allowing at most $3 \% \cdot | \mathcal { E } |$ proposed rewiring operations. The results for the graph representation and logits are shown in Figure 1 and Figure 2, respectively. The graphs in the testing set are separated in two groups, one group contains all the graphs successfully attacked by ReWatt (shown in Figure 1a and Figure 2a), and the other one contains those survived from ReWatt’s attack (shown in Figure 1b and Figure 2b). Note that, for comparison, we also include the results of Random-s on these two groups of graphs. In these figures, a single point represents a testing graph, the $\mathbf { X }$ -axis is the ratio $\frac { M } { | { \mathcal { E } } | }$ , where $M$ is the number of rewiring operations ReWatt used before the attacking process terminating. Note that $M$ can be smaller than the budget as the process terminates once the attack successes.
|
| 166 |
+
|
| 167 |
+
As we can observe from the figures, compared with the Random-s, ReWatt can make more changes to both the graph representation and logits, using exactly the same number of proposed rewiring operations. Comparing Figure 1a with Figure 1b, we find that the perturbation generated by ReWatt affects the graph representation a lot even when it fails to attack the graph. This means our attack is perturbing the graph structure in a right way to fool the classifier, although it fails potentially due to the limited budget. Similar observation can be made when we compare Figure 2a with Figure 2b.
|
| 168 |
+
|
| 169 |
+
# 6 RELATED WORK
|
| 170 |
+
|
| 171 |
+
In recent years, adversarial attacks on deep learning models have attracted increasing attention in the area of computer vision. Many deep models are found to be easily fooled by adversarial samples, which are generated by adding deliberately designed unnoticeable perturbation to normal images (Szegedy et al., 2013; Goodfellow et al., 2014). More algorithms with different level access to the target classifier have been proposed, including white-box attack models, which have access to the gradients (Moosavi-Dezfooli et al., 2016; Kurakin et al., 2016; Carlini & Wagner, 2017) and black-box attack model, which have limited access to the target classifier (Chen et al., 2017; Cheng et al., 2018; Ilyas et al., 2018).
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 1: The change of graph representation after attack
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 2: The change of logits after attack
|
| 178 |
+
|
| 179 |
+
Most of the aforementioned works are focusing in the computer vision domain, where the data sample can be represented in the continues space. Few attention has been payed into the discrete data structure such as graphs. Graph Neural Networks have been shown to bring impressive advancements to many different graph related tasks such as node classification and graph classification. Recent researches show that the graph neural networks are also venerable to adversarial attacks. (Zugner et al., 2018) proposed a greedy algorithm to perform adversarial attack to node classifi-¨ cation task. Their algorithm tries to change the label of a target node by modifying both the graph structure and node features. (Dai et al., 2018) proposed a deep reinforcement learning based attacker to attack both the node classification and the graph classification task. (Zugner & G ¨ unnemann, ¨ 2019) designed an algorithm to impair the overall performance of node classification based on meta learning. All the three mentioned methods modify the graph structure by adding or deleting edges. A more recent work Wang et al. (2018) on attacking node classifications proposed to modify the graph structure by adding fake nodes. In this work, we propose to modify the graph structure using rewiring, which is shown to make less noticeable changes to the graph structure.
|
| 180 |
+
|
| 181 |
+
# 7 CONCLUSION
|
| 182 |
+
|
| 183 |
+
In this paper, we proposed a graph rewiring operation, which affect the graph structure in a less noticeable way than adding/deleting edges. The rewiring operation preserves some basic graph properties such as number of nodes and number of edges. We then designed an attacker ReWatt based on the rewiring operations using reinforcement learning. Experiments in 3 real world data sets show the effectiveness of the proposed framework. Analysis on how the graph representation and logits change while the graph being attacked provide us with some insights of the attacker.
|
| 184 |
+
|
| 185 |
+
# REFERENCES
|
| 186 |
+
|
| 187 |
+
Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013.
|
| 188 |
+
|
| 189 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy $( S P )$ , pp. 39–57. IEEE, 2017.
|
| 190 |
+
|
| 191 |
+
Hau Chan and Leman Akoglu. Optimizing network robustness by edge rewiring: a general framework. Data Mining and Knowledge Discovery, 30(5):1395–1425, 2016.
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
Minhao Cheng, Thong Le, Pin-Yu Chen, Jinfeng Yi, Huan Zhang, and Cho-Jui Hsieh. Queryefficient hard-label black-box attack: An optimization-based approach. arXiv preprint arXiv:1807.04457, 2018.
|
| 196 |
+
|
| 197 |
+
Hanjun Dai, Hui Li, Tian Tian, Xin Huang, Lin Wang, Jun Zhu, and Le Song. Adversarial attack on graph structured data. In International Conference on Machine Learning, pp. 1123–1132, 2018.
|
| 198 |
+
|
| 199 |
+
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.
|
| 200 |
+
|
| 201 |
+
Wendy Ellens, FM Spieksma, P Van Mieghem, A Jamakovic, and RE Kooij. Effective graph resistance. Linear algebra and its applications, 435(10):2491–2506, 2011.
|
| 202 |
+
|
| 203 |
+
Miroslav Fiedler. Algebraic connectivity of graphs. Czechoslovak mathematical journal, 23(2): 298–305, 1973.
|
| 204 |
+
|
| 205 |
+
Arpita Ghosh and Stephen Boyd. Growing well-connected graphs. In Proceedings of the 45th IEEE Conference on Decision and Control, pp. 6605–6611. IEEE, 2006.
|
| 206 |
+
|
| 207 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014.
|
| 208 |
+
|
| 209 |
+
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024–1034, 2017.
|
| 210 |
+
|
| 211 |
+
Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. arXiv preprint arXiv:1804.08598, 2018.
|
| 212 |
+
|
| 213 |
+
Kristian Kersting, Nils M. Kriege, Christopher Morris, Petra Mutzel, and Marion Neumann. Benchmark data sets for graph kernels, 2016. URL http://graphkernels.cs.tu-dortmund. de.
|
| 214 |
+
|
| 215 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 216 |
+
|
| 217 |
+
Solomon Kullback. Information theory and statistics. Courier Corporation, 1997.
|
| 218 |
+
|
| 219 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. arXiv preprint arXiv:1607.02533, 2016.
|
| 220 |
+
|
| 221 |
+
Benjamin A Miller, Mustafa C¸ amurcu, Alexander J Gomez, Kevin Chan, and Tina Eliassi-Rad. Improving robustness to attacks against vertex classification. 2019.
|
| 222 |
+
|
| 223 |
+
Bojan Mohar, Y Alavi, G Chartrand, and OR Oellermann. The laplacian spectrum of graphs. Graph theory, combinatorics, and applications, 2(871-898):12, 1991.
|
| 224 |
+
|
| 225 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2574–2582, 2016.
|
| 226 |
+
|
| 227 |
+
Aliaksei Sandryhaila and Jose MF Moura. Discrete signal processing on graphs: Frequency analysis. IEEE Transactions on Signal Processing, 62(12):3042–3054, 2014.
|
| 228 |
+
|
| 229 |
+
David I Shuman, Sunil K Narang, Pascal Frossard, Antonio Ortega, and Pierre Vandergheynst. The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains. arXiv preprint arXiv:1211.0053, 2012.
|
| 230 |
+
|
| 231 |
+
Gilbert W Stewart. Matrix perturbation theory. 1990.
|
| 232 |
+
|
| 233 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 234 |
+
|
| 235 |
+
Ali Sydney, Caterina Scoglio, and Don Gruenbacher. Optimizing algebraic connectivity by edge rewiring. Applied Mathematics and computation, 219(10):5465–5479, 2013.
|
| 236 |
+
|
| 237 |
+
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.
|
| 238 |
+
|
| 239 |
+
Xiaoyun Wang, Joe Eaton, Cho-Jui Hsieh, and Felix Wu. Attack graph convolutional networks by adding fake nodes. arXiv preprint arXiv:1810.10751, 2018.
|
| 240 |
+
|
| 241 |
+
Pinar Yanardag and SVN Vishwanathan. Deep graph kernels. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1365–1374. ACM, 2015.
|
| 242 |
+
|
| 243 |
+
Rex Ying, Jiaxuan You, Christopher Morris, Xiang Ren, William L Hamilton, and Jure Leskovec. Hierarchical graph representation learning withdifferentiable pooling. arXiv preprint arXiv:1806.08804, 2018.
|
| 244 |
+
|
| 245 |
+
Muhan Zhang, Zhicheng Cui, Marion Neumann, and Yixin Chen. An end-to-end deep learning architecture for graph classification. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 246 |
+
|
| 247 |
+
Marinka Zitnik, Rok Sosic, Marcus W. Feldman, and Jure Leskovec. Evolution of resilience in ˇ protein interactomes across the tree of life. Proceedings of the National Academy of Sciences, 116(10):4426–4433, 2019. ISSN 0027-8424. doi: 10.1073/pnas.1818013116. URL https: //www.pnas.org/content/116/10/4426.
|
| 248 |
+
|
| 249 |
+
Daniel Zugner, Amir Akbarnejad, and Stephan G ¨ unnemann. Adversarial attacks on neural networks ¨ for graph data. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2847–2856. ACM, 2018.
|
| 250 |
+
|
| 251 |
+
Daniel Zugner and Stephan G ¨ unnemann. Adversarial attacks on graph neural networks via meta ¨ learning. In International Conference on Learning Representations, 2019. URL https:// openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ Bylnx209YX.
|
| 252 |
+
|
| 253 |
+
# A GRAPH LAPLACIAN BASED MEASURES
|
| 254 |
+
|
| 255 |
+
Many important graph properties are based on the eigenvalues of the Laplacian matrix of a graph (Chan & Akoglu, 2016). Here we list few:
|
| 256 |
+
|
| 257 |
+
• Algebraic Connectivity The algebraic connectivity of a graph $G$ is the second-smallest eigenvalue of its Laplacian matrix (Fiedler, 1973). Note that we only consider connected graphs in this work, so it is always larger than 0. The larger the algebraic connectivity is, the more difficult it is to separate the graph into components (i.e., more edges need to be removed). The algebraic connectivity has previously been applied to measure network robustness Sydney et al. (2013).
|
| 258 |
+
|
| 259 |
+
• Effective Graph Resistance The effective graph resistance is a graph measure derived from the field of electric circuit analysis, where it is defined as the summation of effective resistance over all node pairs (Ellens et al., 2011). The effective graph resistance can be represented using the eigenvalues of Laplacian matrix as follows (Ellens et al., 2011)
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
R _ { e } = | \mathcal { V } | \cdot \sum _ { i = 2 } ^ { | \mathcal { V } | } \lambda _ { i } .
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
By Corollary 2, we can represent the change of the algebraic connectivity $\lambda _ { 2 }$ as:
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
\Delta \lambda _ { 2 } = ( 2 { \bf x } _ { 2 } [ f i r ] - { \bf x } _ { 2 } [ t h i ] - { \bf x } _ { 2 } [ s e c ] ) ( { \bf x } _ { 2 } [ s e c ] - { \bf x } _ { 2 } [ t h i ] )
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
According to the above discussion, $\Delta \lambda _ { 2 }$ is expected to be smaller for the operation of rewiring to 2-hop neighbor. Thus, the rewiring to 2-hop neighbor operation is expected to perturb the algebraic connectivity less compared with adding an edge between two nodes that are far away from each other. A similar argument can be built for effective graph resistance.
|
| 272 |
+
|
| 273 |
+
# B PROOF OF COLLARY 1
|
| 274 |
+
|
| 275 |
+
Corollary 2. For a given graph $G$ with Laplacian matrix $\mathbf { L }$ , one proposed rewiring operation $( v _ { f i r } , v _ { s e c } , v _ { t h i } )$ affects the eigen-value $\lambda _ { i }$ by $\Delta \lambda _ { i }$ , for $i = 1 , \ldots , | \nu |$ , where
|
| 276 |
+
|
| 277 |
+
$$
|
| 278 |
+
\Delta { \lambda } _ { i } = ( 2 { \bf { x } } _ { i } [ f i r ] - { \bf { x } } _ { i } [ t h i ] - { \bf { x } } _ { i } [ s e c ] ) ( { \bf { x } } _ { i } [ s e c ] - { \bf { x } } _ { i } [ t h i ] )
|
| 279 |
+
$$
|
| 280 |
+
|
| 281 |
+
where $\mathbf { x } _ { i } [ i n d e x ]$ denotes the index-th value of the eigenvector $\mathbf { x } _ { i }$
|
| 282 |
+
|
| 283 |
+
Proof. Let $\Delta \mathbf { L }$ denotes the change in the Laplacian matrix after applying the rewiring operation $( v _ { f i r } , v _ { s e c } , v _ { t h i } )$ to graph $G$ . Then we have $\Delta { \bf L } [ f i r , s e c ] = \Delta { \bf L } [ s e c , f i r ] = 1$ , $\Delta \mathbf { L } [ f i r , t h i ] =$ $\Delta { \bf L } [ t h i , f i r ] = - 1$ , $\Delta \mathbf { L } [ s e c , s e c ] = - 1$ , $\Delta \mathbf { L } [ t h i , t h i ] = 1$ and 0 elsewhere. Thus
|
| 284 |
+
|
| 285 |
+
$$
|
| 286 |
+
\begin{array} { r l } & { \Delta \lambda _ { i } = \mathbf { x } _ { i } ^ { T } \Delta \mathbf { L } \mathbf { x } _ { i } } \\ & { \quad \quad = 2 \mathbf { x } _ { i } [ f i r ] \mathbf { x } _ { i } [ s e c ] - \mathbf { x } _ { i } [ s e c ] ^ { 2 } + \mathbf { x } _ { i } [ t h i ] ^ { 2 } - 2 \mathbf { x } _ { i } [ f i r ] \mathbf { x } _ { i } [ t h i ] } \\ & { \quad = \mathbf { x } _ { i } [ t h i ] ^ { 2 } - \mathbf { x } _ { i } [ s e c ] ^ { 2 } + 2 \mathbf { x } _ { i } [ f i r ] ( \mathbf { x } _ { i } [ s e c ] - \mathbf { x } _ { i } [ t h i ] ) } \\ & { \quad = ( 2 \mathbf { x } _ { i } [ f i r ] - \mathbf { x } _ { i } [ t h i ] - \mathbf { x } _ { i } [ s e c ] ) ( \mathbf { x } _ { i } [ s e c ] - \mathbf { x } _ { i } [ t h i ] ) } \end{array}
|
| 287 |
+
$$
|
| 288 |
+
|
| 289 |
+
which completes the proof.
|
| 290 |
+
|
| 291 |
+
# C EMPIRICAL INVESTIGATION OF THE REWIRING OPERATION
|
| 292 |
+
|
| 293 |
+
In this section, we conduct experiments to empirically show the advancements of the proposed rewiring operator compared with the adding/deleting edge operator. We compare them from two perspectives: 1) connectivity after the attack and 2) change in eigenvalues after the attack. The experiments are carried out on the REDDIT-MULTI-12K dataset. On each of the graph successfully attacked by ReWatt, we perform exactly the same number of deleting/adding edge operator on it. For connectivity, the average number of components in the clean graphs is 2.6, this number becomes 3.02 after the rewiring attack while it becomes 5.2 after the deleting/adding edges attack. On the other hand, only $2 0 \%$ of the graphs get more disconnected (having more components) after ReWattattack than the original ones, while $8 7 \%$ of the graphs get more disconnected after the adding/deleting edges attack. Clearly, the rewiring operator is less likely to disconnect the graph. The comparison of the change in eigenvalues is shown in Figure 3, where we compare the change in different eigenvalues of the graphs after these two attacks. Specifically, we first compute the average relative change in the $i$ -th eigenvalue after both attacks as follows:
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
r _ { \lambda _ { i } } = \frac { | \lambda _ { i } ^ { o r i } - \lambda _ { i } ^ { a t t a c k } | } { \lambda _ { i } ^ { o r i } } ,
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
where $\lambda _ { i } ^ { o r i }$ denotes the $i$ -th eigenvalue of the clean graph while $\lambda _ { i } ^ { a t t a c k }$ denotes the $i$ -th eigenvalue of the attacked graph. We then take the average of the above value over all the succeeded graphs, which we denoted as $\bar { r } _ { \lambda _ { i } }$ . Specially, we use $\bar { r } _ { \lambda _ { i } } ^ { r e }$ to denote the average change ratio after $R e W a t t$ while using r¯d/λ to denote the average change ratio after deleting/adding edge attack. To compare the these two attacks, we calculate r¯d/aλ / $\bar { r } _ { \lambda _ { i } } ^ { d / a } / \bar { r } _ { \lambda _ { i } } ^ { r e }$ and the results are shown in Figure 3. The results show that in most of the cases, the deleting/adding edges attack makes much more changes to the eigenvalues as the value r¯d/aλi / $\bar { r } _ { \lambda _ { i } } ^ { d / a } / \bar { r } _ { \lambda _ { i } } ^ { r e }$ is way larger than 1.
|
| 300 |
+
|
| 301 |
+
By conducting these two experiments, we empirically conclude that the proposed re-wiring operator makes more subtle changes to graphs than existing methods.
|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
Figure 3: Comparison in the change of eigenvalues
|
| 305 |
+
|
| 306 |
+
# D STATISTICS OF THE DATASETS
|
| 307 |
+
|
| 308 |
+
The statistics of the datasets are given in Table 2. In this table, #nodes denotes the average number of nodes over all graphs and #edges denotes the average number of edges over all graphs. ACC denotes the mean of Average Clustering Coefficient (ACC) over all graphs. GCC denotes the mean of Global Clustering Coefficient (GCC) over all graphs.
|
| 309 |
+
|
| 310 |
+
Table 2: Statistics of the data sets
|
| 311 |
+
|
| 312 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>#graphs</td><td rowspan=1 colspan=1>#labels</td><td rowspan=1 colspan=1>#nodes</td><td rowspan=1 colspan=1>#edges</td><td rowspan=1 colspan=1>ACC</td><td rowspan=1 colspan=1>GCC</td></tr><tr><td rowspan=1 colspan=1>REDDIT-MULTI-12K</td><td rowspan=1 colspan=1>11,929</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>391.41</td><td rowspan=1 colspan=1>456.89</td><td rowspan=1 colspan=1>0.0331</td><td rowspan=1 colspan=1>0.0087</td></tr><tr><td rowspan=1 colspan=1>REDDIT-MULTI-5K</td><td rowspan=1 colspan=1>4,999</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>508.52</td><td rowspan=1 colspan=1>594.87</td><td rowspan=1 colspan=1>0.0268</td><td rowspan=1 colspan=1>0.0038</td></tr><tr><td rowspan=1 colspan=1>IMDB-MULTI</td><td rowspan=1 colspan=1>1,500</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>13</td><td rowspan=1 colspan=1>65.94</td><td rowspan=1 colspan=1>0.968</td><td rowspan=1 colspan=1>0.8955</td></tr></table>
|
md/train/B1exrnCcF7/B1exrnCcF7.md
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DISJOINT MAPPING NETWORK FOR CROSS-MODAL MATCHING OF VOICES AND FACES
|
| 2 |
+
|
| 3 |
+
Yandong Wen†, Mahmoud Al Ismail†, Weiyang $\mathbf { L i u ^ { \ S } }$ , Bhiksha Raj†, Rita Singh† †Carnegie Mellon University §Georgia Institute of Technology yandongw@andrew.cmu.edu, mahmoudi@andrew.cmu.edu, wyliu@gatech.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We propose a novel framework, called Disjoint Mapping Network (DIMNet), for cross-modal biometric matching, in particular of voices and faces. Different from the existing methods, DIMNet does not explicitly learn the joint relationship between the modalities. Instead, DIMNet learns a shared representation for different modalities by mapping them individually to their common covariates. These shared representations can then be used to find the correspondences between the modalities. We show empirically that DIMNet is able to achieve better performance than the current state-of-the-art methods, with the additional benefits of being conceptually simpler and less data-intensive. The code is made available at https://github.com/ydwen/DIMNet.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
A person’s face is predictive of their voice. Biologically, the genetic, physical and environmental influences that affect the face also affect the voice. Humans have been shown to be able to associate voices of unknown individuals to pictures of their faces (Kamachi et al., 2003). Humans also show improved ability to memorize and recall voices when previously exposed to pictures of the speaker’s face, but not imposter faces (McAllister et al., 1993; Schweinberger et al., 2007; 2011). Cognitively, studies indicate that neuro-cognitive pathways for voices and faces share common structure (Ellis, 1989), possibly following parallel pathways within a common recognition framework (Belin et al., 2004; 2011). The above studies lend credence to the hypothesis that it may be possible to find associations between voices and faces algorithmically as well. With this in perspective, this paper focuses on the task of devising computational mechanisms for cross-modal matching of voice recordings and images of the speakers’ faces.
|
| 12 |
+
|
| 13 |
+
The specific problem we look at is the one wherein we have an existing database of samples of people’s voices and images of their faces, and we aim to automatically and accurately determine which voices match to which faces. This problem has seen significant research interest, in particular since the recent introduction of the VoxCeleb corpus (Nagrani et al., 2017), which comprises collections of video and audio recordings of a large number of celebrities. The existing approaches (Nagrani et al., 2018b;a; Kim et al., 2018) have generally attempted to directly relate subjects’ voice recordings and their face images, in order to find the correspondences between the two. Nagrani et al. (2018b) formulates the mapping as a binary selection task: given a voice recording, one must successfully select the speaker’s face from a pair of face images (or the reverse – given a face image, one must correctly select the subject’s voice from a pair of voice recordings). They model the mapping as a neural network that is trained through joint presentation of voices and faces to determine if they belong to the same person. In Kim et al. (2018); Nagrani et al. (2018a), the authors attempt to learn common embeddings (i.e., vector representations) for voices and faces that can be compared to one another to identify associations. The networks that compute the embeddings are also trained through joint presentation of voices and faces, to maximize the similarity of embeddings derived from them if they belong to the same speaker. In all cases, the voice and face are implicitly assumed to directly inform about one another.
|
| 14 |
+
|
| 15 |
+
In reality, though, it is unclear how much these models capture the direct influence of the voice and face on one another, and how much is explained through implicit capture of higher-level variables such as gender, age, ethnicity etc., which individually predict the two. These higher-level variables, which we will refer to as covariates1 can, in fact, explain much of our ability to match voices to faces (and vice versa) under the previously mentioned “select-from-a-pair” test (where a voice must be used to distinguish the speaker’s face from a randomly-chosen imposter). For instance, simply matching the gender of the voice and the face can result in an apparent accuracy of match of up to $7 5 \%$ in a gender-balanced testing setting. Even in a seemingly less constrained “verification” test, where one must only verify if a given voice matches a given face, matching them based on gender alone can result in an equal error rate of $33 \%$ (Appendix B). Even matching the voice and the face by age (e.g.matching older-looking faces to older-sounding voices) could result in match accuracy that’s significantly better than random.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Overview of the proposed DIMNet and its comparison to the existing approaches. (a) Seeing faces and hearing voices from Nagrani et al. (2018b). (b) Learnable PINs from Nagrani et al. (2018a). (c) Learning face-voice association from Kim et al. (2018). (d) Our proposed DIMNets. DIMNets present a joint voice-face embedding framework via multi-task classification and require no pair construction (i.e., both voices and faces can be input sequentially without forming pairs).
|
| 19 |
+
|
| 20 |
+
Previous studies (Nagrani et al., 2018b; Kim et al., 2018) attempt to disambiguate the effect of multiple covariates through stratified tests that separate the data by covariate value. The results show that at least some of the learned associations are explained by the covariate, indicating that their learning approaches do utilize the covariate information, albeit only implicitly.
|
| 21 |
+
|
| 22 |
+
In this paper, we propose a novel framework to learn mappings between voices and faces that do not consider any direct dependence between the two, but instead explicitly exploit their individual dependence on the covariates. We define covariate as the identity-sensitive factors that can simultaneously affect voice and face, e.g. nationality, gender, identity (ID), etc. We do not require the value these factors take to be the same between the training and test set, since what we are learning is the nature of the covariation with the variable in general, not merely the covariation with the specific values the variable takes in the training set. In contrast to existing methods where supervision is provided through the correspondence of voices and faces, our learning framework, Disjoint Mapping Network (DIMNet), obtains supervision from common covariates, applied separately to voices and faces, to learn common embeddings for the two. The comparison between the existing approaches and DIMNets are illustrated in Fig. 1.
|
| 23 |
+
|
| 24 |
+
DIMNet comprises individual feature learning modules which learn identically-dimensioned features for data from each modality, and a unified input-modality-agnostic classifier that attempts to predict covariates from the learned feature. Data from each modality are presented separately during learning; however the unified classifier forces the feature representations learned from the individual modalities to be comparable. Once trained, the classifier can be removed and the learned feature representations are used to compare data across modalities.
|
| 25 |
+
|
| 26 |
+
The proposed approach greatly simplifies the learning process and, by considering the modalities individually rather than as coupled pairs, makes much more effective use of the data. Moreover, if multiple covariates are known, they can be simultaneously used for the training through multi-task learning in our framework (see Fig. 2).
|
| 27 |
+
|
| 28 |
+
Compared to current methods (Nagrani et al., 2018b;a; Kim et al., 2018), DIMNets achieve consistently better performance, indicating that direct supervision through covariates is more effective in these settings. We find that of all the covariates, ID provides the strongest supervision. The results obtained from supervision through other covariates also match what may be expected.
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 2: Our DIMNet framework. The input training data can be either voice or face, and there is no need for voices and faces to form pairs. Modality switch is to control which embedding network (voice or face) to process the data. While the embeddings are obtained, a multi-task classification network is applied to supervise the learning.
|
| 32 |
+
|
| 33 |
+
Our contributions are summarized as follows:
|
| 34 |
+
|
| 35 |
+
• We propose DIMNets, a framework that formulates the problem of cross-modal matching of voices and faces as learning common embeddings for the two through individual supervision from one or more covariates, in contrast to current approaches that attempt to map voices to faces directly. An overview of our framework is given in Fig. 2.
|
| 36 |
+
• In this framework, we can make full use of multiple kinds of label information (provided by covariates) with a multi-task objective function.
|
| 37 |
+
• We achieve the state-of-the-art results on multiple tasks. We are also able to isolate and analyze the effect of the individual covariate on the performance.
|
| 38 |
+
|
| 39 |
+
Moreover, we note that the proposed framework is applicable in any setting where matching of different types of data which have common covariates is required.
|
| 40 |
+
|
| 41 |
+
# 2 THE PROPOSED FRAMEWORK
|
| 42 |
+
|
| 43 |
+
Our goal is to learn common vector representations for both voices and faces, that permit them to be compared to one another. In the following sections we first describe how we learn them from their relationship to common covariates. Subsequently, we describe how we will use them for comparison of voices to faces.
|
| 44 |
+
|
| 45 |
+
# 2.1 LEVERAGING COVARIATES TO LEARN EMBEDDINGS
|
| 46 |
+
|
| 47 |
+
The relationship between voices and faces is largely predicted by covariates – factors that individually relate to both the voice and the face. To cite a trivial example, a person’s gender relates their voice to their face: male subjects will have male voices and faces, while female subjects will have female voices and faces. More generally, many covariates may be found that relate to both voice and face (Lippert et al., 2017).
|
| 48 |
+
|
| 49 |
+
Our model attempts to find common representations for both face images and voice recordings by leveraging their relationship to these covariates (rather than to each other). We will do so by attempting to predict covariates from voice and face data in a common embedding space, such that the derived embeddings from the two types of data can be compared to one another.
|
| 50 |
+
|
| 51 |
+
Let $\nu$ represent a set of voice recordings, and $\mathcal { F }$ represent a set of face images. Let $\mathcal { C }$ be the set of covariates we consider. For the purpose of this paper, we assume that all covariates are discrete valued (although this is not necessary). Every voice recording in $\nu$ and every face in $\mathcal { F }$ can be related to each of the covariates in $\mathcal { C }$ . For every covariate $C \in { \mathcal { C } }$ we represent the value of that covariate for any voice recording $v$ as $C ( v )$ , and similarly the value of the covariate for any face $f$ as $C ( f )$ . For example, $C$ could be ID, gender, or nationality. When $C$ is ID, $C ( v )$ and $C ( f )$ are the $\mathrm { I D }$ of voice $v$ and face $f$ , respectively.
|
| 52 |
+
|
| 53 |
+
Let $F _ { v } ( v ; \theta _ { v } ) : v \mapsto \mathbb R ^ { d }$ be a voice embedding function with parameters $\theta _ { v }$ that maps any voice recording $v$ into a $d$ -dimensional vector. Similarly, let $F _ { f } ( f ; \theta _ { f } )$ be a face embedding function that maps any face $f$ into a $d$ -dimensional vector. We aim to learn $\theta _ { v }$ and $\theta _ { f }$ such that the embeddings of the voice and face for any person are comparable.
|
| 54 |
+
|
| 55 |
+
For each covariate $C \in { \mathcal { C } }$ we define a classifier $H _ { C } ( x ; \phi _ { C } )$ with parameter $\phi _ { C }$ , which assigns any input $x \in \mathbb { R } ^ { d }$ to one of the values taken by $C$ . The classifier $H _ { C } ( \cdot )$ is agnostic to which modality its input $x$ was derived from; thus, given an input voice $v$ , it operates on features $F _ { v } ( v ; \theta _ { v } )$ derived from the voice, whereas given a face $f$ , it operates on $F _ { f } ( f ; \theta _ { f } )$ .
|
| 56 |
+
|
| 57 |
+
For each $v$ (or $f$ ) and each covariate $C$ , we define a loss $L ( H _ { C } ( F _ { v } ( v ; \theta _ { v } ) ; \phi _ { C } ) , C ( v ) )$ between the covariate predicted by $H _ { C } ( . )$ and the true value of the covariate for $v$ , $C ( v )$ . We can now define a total loss $\mathcal { L }$ over the set of all voices $\nu$ and the set of all faces $\mathcal { F }$ , over all covariates as
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r l } { \mathcal { L } ( \theta _ { v } , \theta _ { f } , \{ \phi _ { C } \} ) } & { = \displaystyle \sum _ { C \in \mathcal { C } } \lambda _ { C } \bigg ( \sum _ { v \in \mathcal { V } } L ( H _ { C } ( F _ { v } ( v ; \theta _ { v } ) ; \phi _ { C } ) , C ( v ) ) } \\ & { \quad \quad \quad + \displaystyle \sum _ { f \in \mathcal { F } } L ( H _ { C } ( F _ { f } ( f ; \theta _ { f } ) ; \phi _ { C } ) , C ( f ) ) \bigg ) } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
In order to learn the parameters of the embedding functions, $\theta _ { f }$ and $\theta _ { v }$ , we perform the following optimization.
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\theta _ { v } ^ { * } , \theta _ { f } ^ { * } = \arg \operatorname* { m i n } _ { \theta _ { v } , \theta _ { f } } \operatorname* { m i n } _ { \left\{ \phi _ { C } \right\} } \mathcal { L } ( \theta _ { v } , \theta _ { f } , \left\{ \phi _ { C } \right\} )
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
# 2.2 DISJOINT MAPPING NETWORKS
|
| 70 |
+
|
| 71 |
+
In DIMNet, we instantiate $F _ { v } ( v ; \theta _ { v } )$ , $F _ { f } ( f ; \theta _ { f } )$ and $H _ { C } ( x ; \phi _ { C } )$ as neural networks. Fig. 2 shows the network architecture we use to train our embeddings. It comprises three components. The first, labelled Voice Network in the figure, represents $F _ { v } ( v ; \theta _ { v } )$ and is a neural network that extracts $d$ - dimensional embeddings of the voice recordings. The second, labelled Face Network in the figure, represents $F _ { f } ( f ; \theta _ { f } )$ and is a network that extracts $d$ -dimensional embeddings of face recordings. The third component, labelled Classification Networks in the figure, is a bank of one or more classification networks, one per covariate considered. Each of the classification networks operates on the $d$ -dimensional features output by the embedding networks to classify one covariate, e.g.gender.
|
| 72 |
+
|
| 73 |
+
The training data comprise voice recordings and face images. Voice recordings are sent to the voiceembedding network, while face images are sent to the face-embedding network. This switching operation is illustrated by the switch at the input in Fig.2. In either case, the output of the embedding network is sent to the covariate classifiers.
|
| 74 |
+
|
| 75 |
+
As can be seen, at any time the system either operates on a voice, or on a face, i.e.the operations on voices and faces are disjoint. During the learning phase too, the updates of the two networks are disjoint – loss gradients computed when the input is voice only update the voice network, while loss gradients derived from face inputs update the face network, while both contribute to updates of the classification networks.
|
| 76 |
+
|
| 77 |
+
In our implementation, specifically, $F _ { v } ( \cdot )$ is a convolutional neural network that operates on MelSpectrographic representations of the speech signal. The output of the final layer is pooled over time to obtain a final $d$ -dimensional representation. $F _ { f } ( \cdot )$ is also a convolutional network with a pooled output at the final layer that produces a $d$ -dimensional representation of input images. The classifiers $H _ { C } ( \cdot )$ are all simple multi-class logistic-regression classifiers comprising a single softmax layer.
|
| 78 |
+
|
| 79 |
+
Finally, in keeping with the standard paradigms for training neural network systems, we use the cross-entropy loss to optimize the networks. Also, instead of the optimization in Eq. 2, the actual optimization performed is the one below. The difference is inconsequential.
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\theta _ { v } ^ { * } , \theta _ { f } ^ { * } , \{ \phi _ { C } ^ { * } \} = \operatorname * { a r g m i n } _ { \theta _ { v } , \theta _ { f } , \{ \phi _ { C } \} } \mathcal { L } ( \theta _ { v } , \theta _ { f } , \{ \phi _ { C } \} )
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
# 2.3 TRAINING THE DIMNET
|
| 86 |
+
|
| 87 |
+
All parameters of the network are trained through backpropagation, using stochastic gradient descent. During training, we construct the minibatches with a mixture of speech segments and face images, as the network learns more robust cross-modal features with mixed inputs. Taking voice as an example, we compute the voice embeddings using $F _ { v } ( v ; \theta _ { v } )$ , and obtain the losses using classifiers $H _ { C } { \bar { ( } } \cdot { \bar { ) } }$ for all the covariates. We back-propagate the loss gradient to update the voice network as well as the covariate classifiers. The same procedure is also applied to face data: the backpropagated loss gradients are used to update the face network and the covariate classifiers. Thus, the embedding functions are learned using the data from their modalities individually, while the classifiers are learned using data from all modalities.
|
| 88 |
+
|
| 89 |
+
# 2.4 USING THE EMBEDDINGS
|
| 90 |
+
|
| 91 |
+
Once trained, the embedding networks $F _ { v } ( v ; \theta _ { v } )$ and $F _ { f } ( f ; \theta _ { f } )$ can be used to extract embeddings from any voice recording or face image. Given a voice recording $v$ and a face image $f$ , we can now compute a similarity between the two through the cosine similarity $\begin{array} { r } { S ( v , f ) = \frac { \boldsymbol { F } _ { v } ^ { \top } \boldsymbol { F } _ { f } } { \Vert \boldsymbol { F } _ { v } \Vert _ { 2 } \Vert \boldsymbol { F } _ { f } \Vert _ { 2 } } } \end{array}$ . We can employ this similarity to evaluate the match of any face image to any voice recording. This enables us, for instance, to attempt to rank a collection of faces $f _ { 1 } , \cdots , f _ { K }$ in order of estimated match to a given voice recording $v$ , according to $S ( v , f _ { i } )$ , or conversely, to rank a collection of voices $v _ { 1 } , \cdots , v _ { K }$ according to their match to a face $f$ , on order of decreasing $S ( v _ { i } , f )$ .
|
| 92 |
+
|
| 93 |
+
# 3 EXPERIMENTS
|
| 94 |
+
|
| 95 |
+
We ran experiments on matching voices to faces, to evaluate the embeddings derived by DIMNets.
|
| 96 |
+
The details of the experiments are given below and Appendix A.
|
| 97 |
+
|
| 98 |
+
Datasets. Our experiments were conducted on the Voxceleb (Nagrani et al., 2017) and VGGFace (Parkhi et al., 2015) datasets, which are specified in appendix A.1. We use the intersection of the two datasets, i.e.subjects who figure in both corpora, for our final corpus, which thus includes 1,225 IDs with 667 males and 558 females from 36 nationalities. The data are split into train/validation/test sets, following the settings in Nagrani et al. (2018b). Details can be found in Appendix A.1. We use ID, gender and nationality as our covariates, all of which are provided by the datasets. Separated data preprocessing pipelines are employed to audio segments and face images (see Appendix A.2).
|
| 99 |
+
|
| 100 |
+
Training. The detailed network configurations are elaborated in appendix A.3. Note that the classification networks are single-layer softmax units with as many outputs as the number of unique values the class can take (2 for gender, 32 for nationalities, and 924 for IDs in our case). The networks are trained to minimize the cross entropy loss, following the typical settings of stochastic gradient descent (SGD) in appendix A.3
|
| 101 |
+
|
| 102 |
+
Testing. We use the following protocols for evaluation:
|
| 103 |
+
|
| 104 |
+
• 1:2 Matching. Here, we are given a probe input from one modality (voice or face), and a gallery of two inputs from the other modality (face or voice), including one that belongs to the same subject as the probe, and another of an “imposter” that does not match the probe. The task is to identify which entry in the gallery matches the probe. We report performance in terms of matching accuracy – namely what fraction of the time we correctly identify the right instance in the gallery.
|
| 105 |
+
|
| 106 |
+
To minimize the influence of random selection, we construct as many testing instances as possible through exhaustive enumeration all positive matched pairs (of voice and face). To each pair, we include a randomly drawn imposter in the gallery. We thus have a total of 4,678,897 trials in the validation set, and 6,780,750 trials in the test set.
|
| 107 |
+
|
| 108 |
+
• 1:N Matching. This is the same as the 1:2 matching, except that the gallery now includes $N - 1$ imposters. Thus, we must now identify which of the $N$ entries in the gallery matches the probe. Here too results are reported in terms of matching accuracy. We use the same validation and test sets as the 1:2 case, by augmenting each trial with $N - 2$ additional imposters. So the number of trials in validation and test sets is the same as earlier.
|
| 109 |
+
|
| 110 |
+
• Verification. We are given two inputs, one a face, and another a voice. The task is to determine if they are matched, i.e.both belong to the same subject. In this problem setting the similarity between the two is compared to a threshold to decide a match. The threshold can be adjusted to trade off false rejections $( F _ { R } )$ , i.e.wrongly rejecting true matches, with false alarms $( F _ { A } )$ , i.e.wrongly accepting mismatches. We report results in terms of equal error rate, i.e.when $F _ { R } =$ $F _ { A }$ . We construct our validation and test sets from those used for the 1:2 matching tests, by separating each trial into two, one comprising a matched pair, and the other a mismatched pair. Thus, our validation and test sets are exactly twice as large as those for the 1:2 test.
|
| 111 |
+
|
| 112 |
+
• Retrieval. The gallery comprises a large number of instances, one or more of which might match the probe. The task is to order the gallery such that the entries in the gallery that match the probe lie at the top of the ordering. Here, we report performance in terms of Mean Average Precision (MAP) (Manning et al., 2008). Here we use the entire collection of 58,420 test faces as the gallery for each of our 21,799 test voices, when retrieving faces from voices. For the reverse (retrieving voices from faces), the numbers are reversed.
|
| 113 |
+
|
| 114 |
+
Each result is obtained by averaging the performances of 5 models, which are individually trained.
|
| 115 |
+
|
| 116 |
+
Covariates in Training and Testing. We use the three covariates provided in the dataset, namely identity (I), gender (G), and nationality (N) for our experiments. The treatment of covariates differs for training and test.
|
| 117 |
+
|
| 118 |
+
• Training. For training, supervision may be provided by any set of (one two or three) covariates. We consider all combinations of covariates, I, G, N, (I,G), (I,N), (G,N) and (I,G,N). Increasing the number of covariates effectively increases the supervision provided to training. All chosen covariates were assigned a weight of 1.0. • Testing. As explained in Appendix B, simply recognizing a covariate such as gender can result in seemingly significant matching performance. For instance, just recognizing the subjects’ gender from their voice and images can result in a $33 \%$ EER for verification, and $2 5 \%$ error in matching for the $1 : 2$ tests. In order to isolate the effect of covariates on performance hence we also stratify our test data by them. Thus we construct 4 testing groups based on the covariates, including the unstratified (U) group, stratified by gender (G), stratified by nationality $( \mathrm { N } )$ , and stratified by gender and nationality (G, N). In each group the test set itself is separated into multiple strata, such that for all instances within any stratum the covariate values are the same.
|
| 119 |
+
|
| 120 |
+
# 3.1 CROSS-MODAL MATCHING
|
| 121 |
+
|
| 122 |
+
In this section we report results on the 1:2 and $1 { : } N$ matching tests. In order to ensure that the embedding networks do indeed leverage on accurate modelling of covariates, we first evaluate the classification accuracy of the classification networks for the covariates themselves. Table 1 shows the results.
|
| 123 |
+
|
| 124 |
+
<table><tr><td rowspan="2">method</td><td colspan="2">gender classification</td><td colspan="2">nationalityclassification</td></tr><tr><td>voice</td><td>face</td><td>voice</td><td>face</td></tr><tr><td>DIMNet-I</td><td>-</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DIMNet-G</td><td>97.48</td><td>99.22</td><td>-</td><td>-</td></tr><tr><td>DIMNet-N</td><td>=</td><td>=</td><td>74.86</td><td>60.13</td></tr><tr><td>DIMNet-IG</td><td>97.70</td><td>99.42</td><td>-</td><td>-</td></tr><tr><td>DIMNet-IN</td><td>=</td><td>=</td><td>74.17</td><td>60.27</td></tr><tr><td>DIMNet-GN</td><td>97.59</td><td>99.06</td><td>74.62</td><td>60.50</td></tr><tr><td>DIMNet-IGN</td><td>97.69</td><td>99.15</td><td>74.37</td><td>59.88</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 1: Acc. $( \%$ ) of covariate prediction.
|
| 127 |
+
|
| 128 |
+
The rows of the table show the covariates used to supervise the learning. Thus, for instance, the row labelled “DIMNet-I” shows results obtained when the networks have been trained using ID alone as covariate, the row labelled “DIMNet-G” shows results when supervision is provided by gender, “DIMNetIG” has been trained using ID and gender, etc.
|
| 129 |
+
|
| 130 |
+
The columns of the table show the specific covariate being evaluated. Since the identities of subjects in the training and test set do not overlap, we are unable to evaluate the accuracy of ID classification. Note that we can only test the accuracy of the classification network for a covariate if it has been used in the training. Thus, classification accuracy for gender can be evaluated for DIMNet-G, DIMNetGN and DIMNet-IGN, while that for nationality can be evaluated for DIMNet-N, DIMNet-GN and DIMNet-IGN.
|
| 131 |
+
|
| 132 |
+
The results in Table 1 show that gender is learned very well, and in all cases gender recognition accuracy is quite high. Nationality, on the other hand, is not a well-learned classifier, presumably because the distribution of nationalities in the data set is highly skewed (Nagrani et al., 2018b), with nearly $65 \%$ of all subjects belonging to the USA. It is to be expected therefore that nationality as a covariate will not provide sufficient supervision to learn good embeddings.
|
| 133 |
+
|
| 134 |
+
1:2 matching. Table 2 shows the results for the 1:2 matching tests. In the table, the row labelled “SVHF-Net” gives results obtained with the model of Nagrani et al. (2018b).
|
| 135 |
+
|
| 136 |
+
The columns are segregated into two groups, one labelled “voice face” and the other labelled “face voice”. In the former, the probe is a voice recording, while the gallery comprises faces. In the later the modalities are reversed. Within each group the columns represent the stratification of the test set. “U” represents test sets that are not stratified, and include the various covariates in the same proportion that they occur in the overall test set. The columns labelled “G” and “N” have been stratified by gender and nationality, respectively, while the column $\mathbf { \ddot { G } }$ , N” represents data that have been stratified by both gender and nationality. In the stratified tests, we have ensured that all data within a test instance have the same value for the chosen covariate. Thus, for instance, in a test instance for voice face in the “G” column, the voice and both faces belong to the same gender. This does not reduce the overall number of test instances, since it only requires ensuring that the gender of the imposter matches that of the probe instance.
|
| 137 |
+
|
| 138 |
+
<table><tr><td rowspan="2">method</td><td colspan="4">voice→face (ACC%)</td><td colspan="4">face→voice (ACC %)</td></tr><tr><td>U</td><td>G</td><td>N</td><td>G,N</td><td>U</td><td>G</td><td>N</td><td>G,N</td></tr><tr><td>SVHF-Net</td><td>81.00</td><td>63.90</td><td>-</td><td>-</td><td>79.50</td><td>63.40</td><td>-</td><td>=</td></tr><tr><td>DIMNet-I</td><td>83.45±0.42</td><td>70.91±0.56</td><td>81.97±0.51</td><td>69.89±0.78</td><td>83.52±0.45</td><td>71.78±0.55</td><td>82.41±0.48</td><td>70.90±0.81</td></tr><tr><td>DIMNet-G</td><td>72.90±0.55</td><td>50.32±0.70</td><td>71.92±0.51</td><td>50.21±0.65</td><td>72.47±0.54</td><td>50.48±0.71</td><td>72.15±0.54</td><td>50.61±0.68</td></tr><tr><td>DIMNet-N</td><td>57.53±0.45</td><td>55.33±0.67</td><td>53.04±0.43</td><td>51.96±0.59</td><td>56.20±0.43</td><td>54.34±0.61</td><td>53.90±0.44</td><td>51.97±0.57</td></tr><tr><td>DIMNet-IG</td><td>84.12±0.44</td><td>71.32±0.60</td><td>82.65±0.57</td><td>70.39±0.80</td><td>84.03±0.39</td><td>71.65±0.60</td><td>82.96±0.49</td><td>70.78±0.47</td></tr><tr><td>DIMNet-IN</td><td>82.95±0.40</td><td>70.04±0.67</td><td>81.04±0.55</td><td>68.59±0.76</td><td>82.86±0.35</td><td>70.91±0.59</td><td>81.91±0.52</td><td>70.22±0.77</td></tr><tr><td>DIMNet-GN</td><td>75.92±0.42</td><td>56.66±0.55</td><td>72.94±0.48</td><td>53.48±0.73</td><td>73.78±0.69</td><td>54.90±0.54</td><td>72.63±0.48</td><td>53.45±0.85</td></tr><tr><td>DIMNet-IGN</td><td>83.73±0.53</td><td>70.76±0.34</td><td>81.75±0.48</td><td>69.17±0.71</td><td>83.63±0.66</td><td>71.42±0.49</td><td>82.50±0.43</td><td>70.46±0.62</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Table 2: Performance comparison of 1:2 matching for models trained using different sets of covariates.
|
| 141 |
+
|
| 142 |
+
We make several observations. First, DIMNet-I performs better than SVHF-Net, improving the accuracies by $2 . 4 5 \% - 4 . 0 2 \%$ for the U group, and $7 . 0 1 \% 8 - 8 . 3 8 \%$ for the G group. It shows that mapping voices and faces to their common covariates is an effective strategy to learn representations for cross-modal matching.
|
| 143 |
+
|
| 144 |
+
Second, DIMNet-I produces significantly better embeddings that DIMNet-G and DIMNet-N, highlighting the rather unsurprising fact that ID provides the more useful information than the other two covariates. In particular, DIMNet-G respectively achieves $7 2 . 9 0 \%$ and $7 2 . 4 7 \%$ for voice to face and face to voice matching using only gender as a covariate. This verifies our hypothesis that we can achieve almost $7 5 \%$ matching accuracy by only using the gender. These numbers also agree with the performance expected from the numbers in Table 1 and the analysis in Appendix B. As expected, nationality as a covariate does not provide as good supervision as gender. DIMNet-IG is marginally better than DIMNet-I, indicating that gender supervision provides additional support over ID alone.
|
| 145 |
+
|
| 146 |
+
Third, we note that while DIMNet-I is able to achieve good performance on the dataset stratified by gender, DIMNet-G only achieves random performance. The performance achieved by DIMNet-G on the U dataset is hence completely explained by gender matching. Once again, the numbers match our expectations (Appendix B).
|
| 147 |
+
|
| 148 |
+
1:N matching. We also experiment for $N > 2$ . Unlike SVHF-Net (Nagrani et al., 2018b) that needs to train different models for different $N$ in this setting, we use the same model for different $N$ . The results in Fig. 3 shows accuracy as a function of $N$ for various models.
|
| 149 |
+
|
| 150 |
+
All the results in Fig. 3 are consistent with Table 2. As expected, the performance of all methods degrades with increasing $N$ . In general, DIMNets that use ID as supervision outperform SVHF-Net by a considerable margin, showing that DIMNets are able to make best use of the ID information. We obtain the best results when both ID and gender are used as supervision covariates. However, The results obtained using only gender information as covariate is much worse, which is also consistent with our analysis in Appendix B.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 3: Performance of $1 { : } N$ matching
|
| 154 |
+
|
| 155 |
+
# 3.2 CROSS-MODAL VERIFICATION
|
| 156 |
+
|
| 157 |
+
For verification, we need to determine whether an audio segment and a face image are from the same ID or not. We report the equal error rate (EER) for verification in Table 3.
|
| 158 |
+
|
| 159 |
+
In general, DIMNets that use ID as a covariate achieve an EER of about $2 5 \%$ , which is considerably lower than the $33 \%$ expected if the verification were based on gender matching alone. The results in Table 3 show that using both gender and ID information as covariates can further improve the performance over using ID alone, well validating the superiority of our multi-task learning framework. Using proper combination of covariates is crucial to the performance. ID is arguably the most effective covariate supervision. More interestingly, nationality is seen to be an ineffective covariate, while gender alone as a covariate produces results that well matches our expectation.
|
| 160 |
+
|
| 161 |
+
Table 3: Verification results.
|
| 162 |
+
|
| 163 |
+
<table><tr><td rowspan="2">method</td><td colspan="4">verification (EER %)</td></tr><tr><td>U</td><td>G</td><td>N</td><td>G,N</td></tr><tr><td>DIMNet-I</td><td>24.95±0.20</td><td>34.95±0.45</td><td>25.92±0.68</td><td>35.74±0.87</td></tr><tr><td>DIMNet-G</td><td>34.86±0.11</td><td>49.69±0.24</td><td>35.13±0.36</td><td>49.67±0.51</td></tr><tr><td>DIMNet-N</td><td>45.89±0.39</td><td>46.97±0.55</td><td>47.89±0.82</td><td>48.87±1.14</td></tr><tr><td>DIMNet-IG</td><td>24.56±0.23</td><td>34.84±0.41</td><td>25.54±0.65</td><td>35.73±0.79</td></tr><tr><td>DIMNet-IN</td><td>25.54±0.18</td><td>36.22±0.40</td><td>27.25±0.72</td><td>37.39±0.79</td></tr><tr><td>DIMNet-GN</td><td>33.28±0.52</td><td>46.65±0.16</td><td>34.77±0.26</td><td>48.08±0.52</td></tr><tr><td>DIMNet-IGN</td><td>25.00±0.19</td><td>35.76±0.36</td><td>26.80±0.69</td><td>37.30±0.74</td></tr></table>
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 4: Visualization of voice and face embeddings using multi-dimensional scaling Wickelmaier (2003) . The left panel shows subjects from the training set, while the right panel is from the test set.
|
| 167 |
+
|
| 168 |
+
# 3.3 CROSS-MODAL RETRIEVAL
|
| 169 |
+
|
| 170 |
+
We also perform retrieval experiments using voice or face as query. Table 4 lists the mean average precision (mAP) of the retrieval for various models.
|
| 171 |
+
|
| 172 |
+
The columns in the table represent the covariate being retrieved. Thus, for example, in the “ID” column, the objective is to retrieve
|
| 173 |
+
|
| 174 |
+
Table 4: Retrieval performance (mAP).
|
| 175 |
+
|
| 176 |
+
<table><tr><td rowspan="2">method</td><td colspan="3">voice →face(mAP%)</td><td colspan="3">face→voice (mAP %)</td></tr><tr><td>ID</td><td>gender</td><td>nationality</td><td>ID</td><td>gender</td><td>nationality</td></tr><tr><td>Random</td><td>0.58</td><td>52.61</td><td>40.70</td><td>0.55</td><td>52.60</td><td>40.69</td></tr><tr><td>DIMNet-I</td><td>4.25±0.11</td><td>89.57±0.35</td><td>43.26±0.16</td><td>4.17±0.10</td><td>88.50±0.37</td><td>43.68±0.20</td></tr><tr><td>DIMNet-G</td><td>1.07±0.07</td><td>97.84±0.58</td><td>41.56±0.23</td><td>1.15±0.12</td><td>97.15±0.62</td><td>41.97±0.20</td></tr><tr><td>DIMNet-N</td><td>1.24±0.13</td><td>56.99±0.32</td><td>45.69±0.65</td><td>1.03±0.10</td><td>56.90±0.34</td><td>49.30±0.57</td></tr><tr><td>DIMNet-IG</td><td>4.42±0.12</td><td>93.10±0.45</td><td>43.22±0.14</td><td>4.23±0.09</td><td>92.16±0.42</td><td>43.86±0.17</td></tr><tr><td>DIMNet-IN</td><td>3.94±0.11</td><td>89.72±0.39</td><td>43.95±0.69</td><td>3.99±0.14</td><td>88.39±0.39</td><td>45.93±0.66</td></tr><tr><td>DIMNet-GN</td><td>1.89±0.11</td><td>95.89±0.44</td><td>45.20±0.63</td><td>1.64±0.11</td><td>93.95±0.43</td><td>48.39±0.54</td></tr><tr><td>DIMNet-IGN</td><td>4.07±0.09</td><td>92.30±0.57</td><td>44.10±0.62</td><td>4.05±0.09</td><td>91.31±0.61</td><td>45.82±0.59</td></tr></table>
|
| 177 |
+
|
| 178 |
+
gallery items with the same ID as the query, whereas in the “gender” column the objective is to retrieve the same gender.
|
| 179 |
+
|
| 180 |
+
We note that ID-based DIMNets produce the best features for retrieval, with the best performance obtained with DIMNet-IG. Also, as may be expected, the covariates used in training result in the best retrieval of that covariate. Thus, DIMNet-G achieves an mAP of nearly $98 \%$ on gender, though on retrieval of ID it is very poor. As in other experiments, nationality remains a poor covariate in general. Compared to gender (2 classes) and nationality (unbalanced 28 classes), retrieving ID is a challenging problem given the large amount of identities (182 classes). The significant and consistent improvements over chance-level results show that the DIMNet models do learn some useful associations between voices and faces.
|
| 181 |
+
|
| 182 |
+
3.4 COMPARISONS TO THE CURRENT STATE-OF-THE-ART
|
| 183 |
+
Table 5: AUCs $( \% )$ of DIMNets under different testing groups.
|
| 184 |
+
|
| 185 |
+
<table><tr><td></td><td colspan="5">Seen-Heard</td><td colspan="5">Unseen-Unheard</td></tr><tr><td></td><td>U</td><td>G</td><td>N</td><td>A</td><td>G,N,A</td><td>U</td><td>G</td><td>N</td><td>A</td><td>G,N,A</td></tr><tr><td>Nagrani et al. (2018a)</td><td>87.0</td><td>74.2</td><td>85.9</td><td>86.6</td><td>74.0</td><td>78.5</td><td>61.1</td><td>77.2</td><td>74.9</td><td>58.8</td></tr><tr><td>DIMNet-I</td><td></td><td></td><td></td><td>95.1±0.23 90.8±0.25 93.4±0.15 95.2±0.11 88.9±0.21</td><td></td><td>82.5±0.12 71.0±0.33 81.1±0.10 77.7±0.14 62.8±0.36</td><td></td><td></td><td></td><td></td></tr><tr><td>DIMNet-IG</td><td></td><td></td><td>94.7±0.23 89.8±0.22 93.2±0.13 94.8±0.12 87.8±0.18</td><td></td><td></td><td>83.2±0.11 71.2±0.37 81.9±0.18 78.0±0.13 62.8±0.39</td><td></td><td></td><td></td><td></td></tr></table>
|
| 186 |
+
|
| 187 |
+
We compare DIMNet with the state of the art (Nagrani et al., 2018a). The results are reported in Table 5. Note that it is fair comparison because the DIMNet models in this section are trained with and evaluated on the same released datasets in Nagrani et al. (2018a). Detailed statistics and splits of the dataset can be found in Appendix A.1. There are two evaluation protocols, including SeenHeard and Unseen-Unheard scenarios. The identities of the training and testing set have overlaps in Seen-Heard scenario (closed-set), while they are fully disjoint in Unseen-Unheard scenario (openset). For each scenario, there are 5 testing groups based on the covariates, including the unstratified group (U), group, stratified by gender (G), stratified by nationality (N), stratified by age (A), and stratified by (G, N, A). We compute the area under the curve (AUC) for different testing groups.
|
| 188 |
+
|
| 189 |
+
It is clear that DIMNets produce better embeddings than Nagrani et al. (2018a) for pair-wise verification on both seen-heard and unseen-unheard scenarios. Specifically, DIMNets achieve $8 \% - 1 5 \%$ absolute and $3 \%$ - $10 \%$ absolute improvements on seen-heard and unseen-unheard test set, respectively.
|
| 190 |
+
|
| 191 |
+
Compared to DIMNet-IG, DIMNet-I performs better on the seen-heard test set while DIMNet-IG is better on the unseen-unheard test set. It implies that introducing useful covariates improves the generalization capability of DIMNet.
|
| 192 |
+
|
| 193 |
+
# 4 DISCUSSIONS AND CONCLUDING REMARKS
|
| 194 |
+
|
| 195 |
+
We have proposed that it is possible to learn common embeddings for multi-modal inputs, particularly voices and faces, by mapping them individually to common covariates. In particular, the proposed DIMNet architecture is able to extract embeddings for both modalities that achieves consistently better performance than the methods that directly map faces to voices.
|
| 196 |
+
|
| 197 |
+
The approach also provides us the ability to tease out the influence of each of the covariates of voice and face data, in determining their relation. The results show that the strongest covariate, not unexpectedly, is ID. The results also indicate that prior results by other researchers who have attempted to directly match voices to faces may perhaps not be learning any direct relation between the two, but implicitly learning about the common covariates, such as ID, gender, etc.
|
| 198 |
+
|
| 199 |
+
Our experiments also show that although we have achieved possibly the best reported performance on this task, thus far, the performance is not anywhere close to prime-time. In the $1 : N$ matching task, performance degrades rapidly with increasing $N$ , indicating a rather poor degree of true match.
|
| 200 |
+
|
| 201 |
+
To better understand the problem, we have visualized the learned embeddings from DIMNet-I in Fig. 4 to provide more insights. The visualization method we used is multi-dimensional scaling (MDS) (Wickelmaier, 2003), rather than the currently more popular t-SNE (van der Maaten & Hinton, 2008). This is because MDS tends to preserve distances and global structure, while t-SNE attempts to retain statistical properties and highlights clusters, but does not preserve distances.
|
| 202 |
+
|
| 203 |
+
From Fig. 4, we immediately notice that the voice and face data for a subject are only weakly proximate. While voice and face embeddings for a speaker are generally relatively close to each other, they are often closer to other subjects. Interestingly, the genders separate (even though gender has not been used as a covariate for this particular network), showing that at least some of the natural structure of the data is learned. Fig. 4 shows embeddings obtained from both training and test data. We can observe similar behaviors in both, showing that the the general characteristics observed are not just the outcome of overfitting to training data. The visualization in Fig. 4 also shows that there is still significant room for improvement. For example, it may be possible to force compactness of the distributions of voice and face embeddings through modified loss functions such as the center loss (Wen et al., 2016) or angular softmax loss (Liu et al., 2016; 2017a;b), or through an appropriately designed loss function that is specific to this task.
|
| 204 |
+
|
| 205 |
+
# REFERENCES
|
| 206 |
+
|
| 207 |
+
P. Belin, P.E.G. Bestelmeyer, M. Latinus, and R. Watson. Understanding voice perception. British Journal of Psychology, 108:711–725, 2011. 1
|
| 208 |
+
Pascal Belin, Shirley Fecteau, and Catherine Bedard. Thinking the voice: neural correlates of voice perception. Trends in cognitive sciences, 8(3):129–135, 2004. 1
|
| 209 |
+
Joon Son Chung and Andrew Zisserman. Out of time: automated lip sync in the wild. In Asian Conference on Computer Vision, pp. 251–263. Springer, 2016. 11
|
| 210 |
+
Andrew W Ellis. Neuro-cognitive processing of faces and voices. In Handbook of research on face processing, pp. 207–215. Elsevier, 1989. 1
|
| 211 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 11
|
| 212 |
+
Miyuki Kamachi, Harold Hill, Karen Lander, and Eric Vatikiotis-Bateson. Putting the face to the voice’: Matching identity across modality. Current Biology, 13(19):1709–1714, 2003. 1
|
| 213 |
+
Changil Kim, Hijung Valentina Shin, Tae-Hyun Oh, Kaspar Alexandre, Mohamed Elgharib, and Wojciech Matusik. On learning associations of faces and voices. arXiv preprint arXiv:1805.05553, 2018. 1, 2
|
| 214 |
+
|
| 215 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. 11
|
| 216 |
+
|
| 217 |
+
Christoph Lippert, Riccardo Sabatini, M Cyrus Maher, Eun Yong Kang, Seunghak Lee, Okan Arikan, Alena Harley, Axel Bernal, Peter Garst, Victor Lavrenko, et al. Identification of individuals by trait prediction using whole-genome sequencing data. Proceedings of the National Academy of Sciences, 114(38):10166–10171, 2017. 3
|
| 218 |
+
|
| 219 |
+
Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. 9
|
| 220 |
+
|
| 221 |
+
Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Sphereface: Deep hypersphere embedding for face recognition. In CVPR, 2017a. 9
|
| 222 |
+
|
| 223 |
+
Weiyang Liu, Yan-Ming Zhang, Xingguo Li, Zhiding Yu, Bo Dai, Tuo Zhao, and Le Song. Deep hyperspherical learning. In NIPS, 2017b. 9
|
| 224 |
+
|
| 225 |
+
Christopher D. Manning, Prabhakar Raghavan, and Hinrich Schutze. Evaluation in information ¨ retrieval. In Introduction to Information Retrieval, chapter 8, pp. 159–160. Cambridge University Press, 2008. 6
|
| 226 |
+
|
| 227 |
+
Hunter A McAllister, Robert HI Dale, Norman J Bregman, Allyssa McCabe, and C Randy Cotton. When eyewitnesses are also earwitnesses: Effects on visual and voice identifications. Basic and Applied Social Psychology, 14(2):161–170, 1993. 1
|
| 228 |
+
|
| 229 |
+
A. Nagrani, J. S. Chung, and A. Zisserman. Voxceleb: a large-scale speaker identification dataset. In INTERSPEECH, 2017. 1, 5
|
| 230 |
+
|
| 231 |
+
Arsha Nagrani, Samuel Albanie, and Andrew Zisserman. Learnable pins: Cross-modal embeddings for person identity. arXiv preprint arXiv:1805.00833, 2018a. 1, 2, 8, 11
|
| 232 |
+
|
| 233 |
+
Arsha Nagrani, Samuel Albanie, and Andrew Zisserman. Seeing voices and hearing faces: Crossmodal biometric matching. arXiv preprint arXiv:1804.00326, 2018b. 1, 2, 5, 6, 7, 11
|
| 234 |
+
|
| 235 |
+
Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, et al. Deep face recognition. In BMVC, 2015. 5
|
| 236 |
+
|
| 237 |
+
Daniel Povey, Arnab Ghoshal, Gilles Boulianne, Lukas Burget, Ondrej Glembek, Nagendra Goel, Mirko Hannemann, Petr Motlicek, Yanmin Qian, Petr Schwarz, et al. The kaldi speech recognition toolkit. In IEEE 2011 workshop on automatic speech recognition and understanding. IEEE Signal Processing Society, 2011. 11
|
| 238 |
+
|
| 239 |
+
Stefan R Schweinberger, David Robertson, and Jurgen M Kaufmann. Hearing facial identities. ¨ Quarterly Journal of Experimental Psychology, 60(10):1446–1456, 2007. 1
|
| 240 |
+
|
| 241 |
+
Stefan R Schweinberger, Nadine Kloth, and David MC Robertson. Hearing facial identities: Brain correlates of face–voice integration in person identification. Cortex, 47(9):1026–1037, 2011. 1
|
| 242 |
+
|
| 243 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579–2605, 2008. 9
|
| 244 |
+
|
| 245 |
+
Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, 2016. 9
|
| 246 |
+
|
| 247 |
+
Yandong Wen, Mahmoud Al Ismail, Bhiksha Raj, and Rita Singh. Optimal strategies for matching and retrieval problems by comparing covariates. arXiv preprint arXiv:1807.04834, 2018. 12
|
| 248 |
+
|
| 249 |
+
Florian Wickelmaier. An introduction to mds. Sound Quality Research Unit, Aalborg University, Denmark, 46(5), 2003. 8, 9
|
| 250 |
+
|
| 251 |
+
Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, and Yu Qiao. Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23(10):1499–1503, 2016. 11
|
| 252 |
+
|
| 253 |
+
# APPENDIX A EXPERIMENTAL DETAILS
|
| 254 |
+
|
| 255 |
+
# A.1 DATASET
|
| 256 |
+
|
| 257 |
+
The Voxceleb dataset consists of 153,516 audio segments from 1,251 speakers. Each audio segment is taken from an online video clip with an average duration of 8.2 seconds. For the face dataset, we used a manually filtered version of VGGFace. After face detection, there remain 759,643 images from 2,554 subjects. The data are split into train/validation/test sets, following the settings in Nagrani et al. (2018b). Details are shown in Table 6
|
| 258 |
+
|
| 259 |
+
<table><tr><td># of samples</td><td>train</td><td>validation</td><td>test</td><td>total</td></tr><tr><td>speech segments</td><td>112,697</td><td>14,160</td><td>21,799</td><td>148,656</td></tr><tr><td>face images</td><td>313,593</td><td>36,716</td><td>58.420</td><td>408,729</td></tr><tr><td>IDs</td><td>924</td><td>112</td><td>189</td><td>1,225</td></tr><tr><td>genders</td><td>2</td><td>2</td><td>2</td><td>2</td></tr><tr><td>nationalities</td><td>32</td><td>11</td><td>18</td><td>36</td></tr><tr><td>testing instances</td><td>1</td><td>4,678,897</td><td>6,780,750</td><td>11,459,647</td></tr></table>
|
| 260 |
+
|
| 261 |
+
Table 6: Statistics for the data appearing in VoxCeleb and VGGFace.
|
| 262 |
+
|
| 263 |
+
The visual data used in Section 3.4 is densely extracted from the video in VoxCeleb dataset at 25/6 fps. It contains 100,000 segmented speaking face-tracks obtained by SyncNet (Chung & Zisserman, 2016), leading to 1,218,575 frames (images). For fair comparison, we follow the train/val/test split strategy from Nagrani et al. (2018a) in our experiments. The evaluations are performed based on the provided lists (Nagrani et al., 2018a), which specify the testing pairs of voices and faces.
|
| 264 |
+
|
| 265 |
+
# A.2 PREPROCESSING
|
| 266 |
+
|
| 267 |
+
We employ separated data preprocessing pipelines for audio segments and face images. For audio segments, we use an energy-based voice activity detector (Povey et al., 2011) to isolate speechbearing regions of the recordings. Subsequently, 64-dimensional log mel-spectrograms are generated, using an analysis window of $2 5 \mathrm { m s }$ , with hop of 10ms between frames. We perform mean and variance normalization of each mel-frequency bin.
|
| 268 |
+
|
| 269 |
+
For training, we randomly crop out regions of varying lengths of 300 to 800 frames (so the size of the input spectrogram ranges from $3 0 0 \times 6 4$ to $8 0 0 \times 6 4$ for each mini-batch, around 3 to 8 seconds). For the face data, facial landmarks in all images are detected using MTCNN (Zhang et al., 2016). The cropped RGB face images of size $1 2 8 \times 1 2 8 \times 3$ are obtained by similarity transformation. Each pixel in the RGB images is normalized by subtracting 127.5 and then dividing by 127.5. We perform data augmentation by horizontally flipping the images with $5 0 \%$ probability in minibatches (effectively doubling the number of face images).
|
| 270 |
+
|
| 271 |
+
# A.3 TRAINING
|
| 272 |
+
|
| 273 |
+
The details of network architectures are shown in Table 7. For the voice network, we use 1D convolutional layers, where the convolution is performed along the axis that corresponds to time. The face network employs 2D convolutional layers. For both, the convolutional layers are followed by batch normalization (BN) (Ioffe & Szegedy, 2015) and rectified linear unit activations (ReLU) (Krizhevsky et al., 2012). The final face embedding is obtained by averaging the feature maps from the final layer, i.e.through average pooling. The final voice embedding is obtained by averaging the feature maps at the final convolutional layer along the time axis alone.
|
| 274 |
+
|
| 275 |
+
We follow the typical settings of SGD for optimization. Minibatch size is 256. The momentum and weight decay values are 0.9 and 0.001 respectively. To learn the networks from scratch, the learning rate is initialized at 0.1 and divided by 10 after 16K iterations and again after 24K iterations. The training is completed at 28K iterations.
|
| 276 |
+
|
| 277 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>voice</td><td rowspan=1 colspan=1>face</td></tr><tr><td rowspan=6 colspan=1>embeddingnetwork</td><td rowspan=5 colspan=1>Conv</td><td rowspan=1 colspan=1>(3,256)/2,1[(3,256)/1,1][(3,256)/1,1]</td><td rowspan=1 colspan=1>(3× 3,64)/2,1[(3 × 3,64)/1,1][(3 × 3,64)/1,1]</td></tr><tr><td rowspan=1 colspan=1>(3,384)/2,1[(3,384)/1,1][(3,384)/1,1]</td><td rowspan=1 colspan=1>(3×3,128)/2,1[(3 × 3,128)/1,1][(3 × 3,128)/1,1]</td></tr><tr><td rowspan=1 colspan=1>(3,576)/2,1[(3,576)/1,1][(3,576)/1.1]</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>(3,864)/2,1[(3,864)/1,1][(3,864)/1,1]</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>(3,64)/2,1</td><td rowspan=1 colspan=1>(3× 3,64)/2,1</td></tr><tr><td rowspan=1 colspan=1>AvgPool</td><td rowspan=1 colspan=1>t×1</td><td rowspan=1 colspan=1>h×w×1</td></tr><tr><td rowspan=1 colspan=1>classificationnetwork</td><td rowspan=1 colspan=1>FC</td><td rowspan=1 colspan=2>64×924,64×2,64×32</td></tr></table>
|
| 278 |
+
|
| 279 |
+
Table 7: The detailed CNNs architectures. The numbers within the parentheses represent the size and number of filters, while the subscripts represent the stride and padding. So, for example, $( 3 , 6 4 ) _ { / 2 , 1 }$ denotes a 1D convolutional layer with 64 filters of size 3, where the stride and padding are 2 and 1 respectively, while $( 3 \times 3 , 6 4 ) _ { / 2 , 1 }$ represents a 2-D convolutional layer of $6 4 3 \times 3$ filters, with stride 2 and padding 1 in both directions. Note that 924, 2, and 32 are the number of unique values taken by the ID, gender, and nationality covariates, respectively.
|
| 280 |
+
|
| 281 |
+
# A.4 EXPERIMENTS ON THE EMBEDDING DIMENSION
|
| 282 |
+
|
| 283 |
+
To investigate the affect of embedding dimension to the performance, we train DIMNet-I models with various embedding dimensions of 32, 64, 128, 256, and 512. Table 8 shows the results on 1:2 matching experiment (voice face).
|
| 284 |
+
|
| 285 |
+
Table 8: The accuracies of DIMNet-I with different embedding dimensions on 1:2 matching experiments
|
| 286 |
+
|
| 287 |
+
<table><tr><td rowspan=1 colspan=1>embedding dimension</td><td rowspan=1 colspan=1>32</td><td rowspan=1 colspan=1>64</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>256</td><td rowspan=1 colspan=1>512</td></tr><tr><td rowspan=1 colspan=1>DIMNet-I</td><td rowspan=1 colspan=1>82.20</td><td rowspan=1 colspan=1>83.45</td><td rowspan=1 colspan=1>83.87</td><td rowspan=1 colspan=1>83.43</td><td rowspan=1 colspan=1>83.16</td></tr></table>
|
| 288 |
+
|
| 289 |
+
It could be observed that the performance of cross-modal matching is very stable within a wide range of embedding dimension, showing that the accuracy is not sensitive to the embedding dimension.
|
| 290 |
+
|
| 291 |
+
# APPENDIX B EXPECTED PERFORMANCE BASED ON GENDER MATCHING
|
| 292 |
+
|
| 293 |
+
In this appendix we discuss the performance to be expected in the matching and verification tests, when the matching is done based purely on gender.
|
| 294 |
+
|
| 295 |
+
We assume below that in any distribution of human-subject data, the division of subjects between male and female genders to be half and half.
|
| 296 |
+
|
| 297 |
+
It is to be noted that gender is merely an illustrative example here; the analysis can be extended to other covariates. For a more detailed analysis of covariates with more values and unbalanced distributions, please refer to Wen et al. (2018).
|
| 298 |
+
|
| 299 |
+
# B.1 ACCURACY OF 1:2 MATCHING BASED ON GENDER
|
| 300 |
+
|
| 301 |
+
We show that the equal-error-rate for 1:2 matching can be as high as $2 5 \%$ , through gender matching alone.
|
| 302 |
+
|
| 303 |
+
The problem is as follows: a probe input (voice or face), and a gallery consisting of two inputs (face or voice), one of which is from the same subject as the probe. We must identify which of the two is the true match.
|
| 304 |
+
|
| 305 |
+
# B.1.1 PERFECT GENDER IDENTIFICATION
|
| 306 |
+
|
| 307 |
+
Consider the situation where we are able to identify the gender of the subject of the data (face or voice) perfectly.
|
| 308 |
+
|
| 309 |
+
There are two possibilities: (a) both probe instances are the same gender, and (b) they are different genders. Each of the two possibilities occurs with a probability of 0.5
|
| 310 |
+
|
| 311 |
+
We employ the following simple strategy: If the two gallery instances are different genders, then we select the instance whose gender matches the probe. In this case, clearly, the probability of error is 0. If the two instances are the same gender, we select one of them randomly with a probability of 0.5. The probability of error here is 0.5.
|
| 312 |
+
|
| 313 |
+
Thus, the overall probability of error is
|
| 314 |
+
|
| 315 |
+
$$
|
| 316 |
+
P r o b ( e r r o r ) = 0 . 5 \times 0 + 0 . 5 \times 0 . 5 = 0 . 2 5 .
|
| 317 |
+
$$
|
| 318 |
+
|
| 319 |
+
# B.1.2 IMPERFECT GENDER IDENTIFICATION
|
| 320 |
+
|
| 321 |
+
Now let us consider the situation where gender identification itself is imperfect, and we have error rates $e _ { f }$ and $e _ { v }$ in identifying the gender of faces and voices, respectively. Assume the error rates are known. We will assume below that gallery entries are faces, and probe entries are voices. (The equations are trivially flipped to handle the converse case).
|
| 322 |
+
|
| 323 |
+
Since we are aware that we sometimes make mistakes in identifying gender, we modify our strategy as follows: when the two gallery items are found to have different genders, we select the entry with the same gender as the probe $P$ of the time (so that if the gender classification was correct, we would have a match error rate of $\left( 1 - P \right)$ ). When both gallery items are found to be the same gender, we choose randomly.
|
| 324 |
+
|
| 325 |
+
The actual error can now be computed as follows. The gallery items are both of the same gender in 0.5 of the trials, and of mismatched gender in the remaining 0.5 of the trials.
|
| 326 |
+
|
| 327 |
+
When both gallery items have the same gender, regardless of the strategy chosen, the probability of error is 0.5 (by symmetry).
|
| 328 |
+
|
| 329 |
+
When both gallery items are of mismatched gender, we have 8 combinations of correctness of gender-classification. Table 9 lists all eight, along with the probability of matching error (in the final column). Taking type 1 as an example, we have probability $( 1 - e _ { v } ) ( 1 - e _ { f } ) ^ { 2 }$ that the gender of both probe and galleries are correctly classified. In this case, our strategy gives us an error of $( 1 - P )$ . For type 2, the gender of probe and one of the gallery items is correctly classified, while the other gallery item is misclassified, we have an error of 0.5. If we go through all the cases, the total error $P r o b ( e r r o r )$ can be computed as
|
| 330 |
+
|
| 331 |
+
Table 9: the possible error types with probabilities.
|
| 332 |
+
|
| 333 |
+
<table><tr><td rowspan=1 colspan=1>type</td><td rowspan=1 colspan=1>probe</td><td rowspan=1 colspan=1>gallery1</td><td rowspan=1 colspan=1>gallery2</td><td rowspan=1 colspan=1>Prob(error,type)</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=8 colspan=1>(1-ev)(1-ef)²:(1-P)(1-ev)ef(1-ef)·0.5(1-ev)(i-ef)ef : 0.5(1-ev)(ef)²:Pe(1-ef)².Peuef(1-ef) ·0.5eu(i-ef)ef :0.5ev(ef)²:(1-P)</td></tr><tr><td rowspan=1 colspan=1>2</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>3</td><td rowspan=1 colspan=1>丁</td><td rowspan=1 colspan=1>√</td><td rowspan=2 colspan=1>××</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>5</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>6</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>7</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>8</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr></table>
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
\begin{array} { r } { P r o b ( e r r o r ) = 0 . 2 5 + 0 . 5 \sum _ { t y p e = 1 } ^ { 8 } P r o b ( e r r o r , t y p e ) } \\ { = 0 . 2 5 + 0 . 5 ( 2 e _ { f } e _ { v } - e _ { v } - e _ { f } + 1 } \\ { + P ( 2 e _ { f } + 2 e _ { v } - 4 e _ { f } e _ { v } - 1 ) ) } \end{array}
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
Our objective is to minimize $P r o b ( e r r o r )$ , so we must choose $P$ to minimize the above term. I.e. we must solve
|
| 340 |
+
|
| 341 |
+
$$
|
| 342 |
+
\arg \operatorname* { m i n } _ { P } \ 2 e _ { f } e _ { v } - e _ { v } - e _ { f } + 1 + P ( 2 e _ { f } + 2 e _ { v } - 4 e _ { f } e _ { v } - 1 )
|
| 343 |
+
$$
|
| 344 |
+
|
| 345 |
+
Its easy to see that the solution for $P$ is 1.0 if its multiplicative factor is negative in the above equation, and 0 otherwise, i.e.
|
| 346 |
+
|
| 347 |
+
$$
|
| 348 |
+
P = \{ _ { 0 , } ^ { 1 , } \mathrm { i f } e _ { f } + e _ { v } < 2 e _ { f } e _ { v } + 0 . 5
|
| 349 |
+
$$
|
| 350 |
+
|
| 351 |
+
The corresponding match error rates are $P r o b ( e r r o r ) = 0 . 2 5 + 0 . 5 ( e _ { f } + e _ { v } - 2 e _ { v } e _ { f } )$ and $0 . 7 5 +$ $e _ { f } e _ { f } - 0 . { \bar { 5 } } ( e _ { v } + \bar { e } _ { f } )$ respectively.
|
| 352 |
+
|
| 353 |
+
Although complicated looking, the solution is, in fact, quite intuitive. When gender classification is either better than random for both modalities $( i . e . e _ { f } , e _ { v } > 0 . 5 )$ or worse than random for both $( e _ { f } , e _ { v } < 0 . 5 )$ , the best strategy is to select the gallery item that matches the gender of the probe. If either of these is random (i.e.either $e _ { f }$ or $e _ { v }$ is 0.5) , the choice of $P$ does not matter, and the error is 0.5. If one of the two is correct more than half the time, and the other is wrong more than half the time $( e . g . e _ { f } < 0 . 5$ , $e _ { v } > 0 . 5 )$ , the optimal choice is to select the gallery item that is classified as mismatched in gender with the probe.
|
| 354 |
+
|
| 355 |
+
# B.2 ACCURACY OF 1:N MATCHING BASED ON GENDER
|
| 356 |
+
|
| 357 |
+
We now consider the best achievable performance on $1 { : } N$ matching, when the only information known is the gender of the voices and faces.
|
| 358 |
+
|
| 359 |
+
# B.2.1 PERFECT GENDER IDENTIFICATION
|
| 360 |
+
|
| 361 |
+
Consider the situation where the gender of the faces and voices in each test trial is perfectly known.
|
| 362 |
+
|
| 363 |
+
We employ the following strategy: we randomly select one of the gallery instances that have the same gender as the probe instance. If there are $K$ imposter gallery instances of the same gender as the probe instance, the expected accuracy is $\frac { 1 } { K + 1 }$ . The probability of randomly having $K$ of $N - 1$ imposters of the same gender as the probe is given by
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
P r o b ( K ; N - 1 ) = { \binom { N - 1 } { K } } 0 . 5 ^ { N - 1 }
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
The overall accuracy is given by:
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
\begin{array} { l } { { P r o b ( c o r r e c t ) = \displaystyle \sum _ { K = 0 } ^ { N - 1 } \frac { P r o b ( K , N - 1 ) } { K + 1 } } } \\ { { = 0 . 5 ^ { N - 1 } \displaystyle \sum _ { K = 0 } ^ { N - 1 } \left( { ^ { N - 1 } \atop K = 0 } \right) \displaystyle \frac { 1 } { K + 1 } } } \\ { { = \displaystyle \frac { 0 . 5 ^ { N - 1 } } { N } \displaystyle \sum _ { k = 1 } ^ { N } \left( { ^ { N } \atop K } \right) } } \\ { { = \displaystyle \frac { 0 . 5 ^ { N - 1 } ( 2 ^ { N } - 1 ) } { N } } } \\ { { = \displaystyle \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } , } } \end{array}
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
giving us the error
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
P ( e r r o r ) = 1 - \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } .
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
# B.2.2 IMPERFECT GENDER IDENTIFICATION
|
| 382 |
+
|
| 383 |
+
Consider now that the gender recognition is erroneous for voices with probability $e _ { v }$ and for faces with probability $e _ { f }$ . Note that regardless of the error in gender recognition, the probability of any noisy gallery entry having any gender remains 0.5.
|
| 384 |
+
|
| 385 |
+
To account for the possible error in gender classification, we consider the following stochastic policy: with probability $P$ we select one of the gallery entries with the same gender assigned to probe (by the gender classifier), and with probability $1 - P$ we choose one of the entries with the opposite gender assigned to the probe.
|
| 386 |
+
|
| 387 |
+
Let $\alpha$ represent the probability that the genders assigned to probe and the corresponding gallery entry by their respective classifiers are identical.
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
\alpha = e _ { v } e _ { f } + ( 1 - e _ { v } ) ( 1 - e _ { f } ) .
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
The equation above considers both possibilities: that both the probe and its matching gallery entry are correctly classified, and that both of them are misclassified. It follows that the probability and its matching gallery entries are assigned different genders is $1 - \alpha$ .
|
| 394 |
+
|
| 395 |
+
Given that we have selected the correct gender for retrieval from the the gallery (i.e.that the gender we have selected is the same as that assigned to the gallery entry matching the probe by the face classifier), using the same analysis as in Section B.2.1, we obtain the following probability of being correct:
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
P ( c o r r e c t | c o r r e c t g e n d e r ) = \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N }
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
The probability of selecting the correct gender is given by
|
| 402 |
+
|
| 403 |
+
$$
|
| 404 |
+
P ( c o r r e c t g e n d e r ) = P \alpha + ( 1 - P ) ( 1 - \alpha )
|
| 405 |
+
$$
|
| 406 |
+
|
| 407 |
+
Since the probability of being correct when we choose the wrong gender is $_ 0$ , the overall probability of being correct is
|
| 408 |
+
|
| 409 |
+
$$
|
| 410 |
+
\begin{array} { r } { P ( c o r r e c t ) = ( P \alpha + ( 1 - P ) ( 1 - \alpha ) ) \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } } \\ { = ( P ( 2 \alpha - 1 ) + 1 - \alpha ) \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } } \end{array}
|
| 411 |
+
$$
|
| 412 |
+
|
| 413 |
+
Maximizing the probability requires us to solve
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\arg \operatorname* { m a x } _ { P } P ( 2 \alpha - 1 ) + 1 - \alpha , \ \mathrm { s } . t . \ 1 \geq P \geq 0
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
which gives us the optimal $P$ as
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
P = { \left\{ \begin{array} { l l } { 1 { \mathrm { ~ i f ~ } } \alpha > 0 . 5 } \\ { 0 { \mathrm { ~ o t h e r w i s e } } } \end{array} \right. }
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
and the optimal error as
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
\begin{array} { r } { P ( e r r o r ) = \left\{ \begin{array} { l l } { 1 - \alpha \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } , \mathrm { ~ i f ~ } \alpha > 0 . 5 } \\ { 1 - ( 1 - \alpha ) \frac { ( 2 - 0 . 5 ^ { N - 1 } ) } { N } \mathrm { ~ o t h e r w i s e } . } \end{array} \right. } \end{array}
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
# B.3 EER OF VERIFICATION BASED ON GENDER
|
| 432 |
+
|
| 433 |
+
Here we show that the equal-error-rate for verification (determining if the the subjects in two recordings are the same) can be as high as $33 \%$ , through gender matching alone.
|
| 434 |
+
|
| 435 |
+
The problem is as follows: we are given a pair of inputs, one (features extracted from) a face, and the other a voice. We must determine whether they are both from the same speaker.
|
| 436 |
+
|
| 437 |
+
The test set include some number of “positives”, where both do belong to the same subject, and some “negatives”, where both do not. If a positive is falsely detected as a negative, we have an instance of false rejection. If a negative is wrongly detected as a positive, we have an instance of false acceptance.
|
| 438 |
+
|
| 439 |
+
Let $F _ { R }$ represent the ‘false rejection rate”, i.e.the fraction of all positives that are wrongly rejected. Let $F _ { A }$ represent the “false acceptance rate”, i.e.the fraction of negatives that are wrongly accepted. Any classifier can generally be optimized to trade off $F _ { R }$ against $F _ { A }$ . The “Equal Error Rate” (EER) is achieved when $F _ { R } = F _ { A }$ .
|
| 440 |
+
|
| 441 |
+
Among the “positive” test pairs, both voice and face in each pair have the same gender. We assume the “negative” test instances are drawn randomly, i.e., 0.5 of all negative pairs have the same gender, while the remaining 0.5 do not.
|
| 442 |
+
|
| 443 |
+
# B.3.1 PERFECT GENDER IDENTIFICATION
|
| 444 |
+
|
| 445 |
+
Consider the situation where we know the subject’s gender for both the voices and faces (or, alternately, are able to identify the gender from the voice or face perfectly).
|
| 446 |
+
|
| 447 |
+
We employ the following strategy: if the gender of the voice and face are different, we declare it as a negative $100 \%$ of the time. If the two are from the same gender, we randomly call it a positive $P$ of the time, where $0 \leq P \leq 1 . 0$ .
|
| 448 |
+
|
| 449 |
+
Using this strategy, the false acceptance rate is:
|
| 450 |
+
|
| 451 |
+
$$
|
| 452 |
+
F _ { A } = 0 . 5 \times 0 + 0 . 5 \times P = 0 . 5 P .
|
| 453 |
+
$$
|
| 454 |
+
|
| 455 |
+
Here we’re considering that using our strategy we never make a mistake on the $50 \%$ of negative pairs that have mismatched genders, but are wrong $P$ of the time on the negative pairs with matched genders.
|
| 456 |
+
|
| 457 |
+
Among the positives, where all pairs are gender matched, our strategy of accepting only a fraction $P$ of them as positives will give us a false rejection rate $F _ { R } = 1 - P$ .
|
| 458 |
+
|
| 459 |
+
The equal error rate is achieved when $F _ { R } = F _ { A }$ , i.e.
|
| 460 |
+
|
| 461 |
+
$$
|
| 462 |
+
0 . 5 P = 1 - P ,
|
| 463 |
+
$$
|
| 464 |
+
|
| 465 |
+
giving us $\textstyle P = { \frac { 2 } { 3 } }$ , i.e.the best EER is achieved when we accept gender-matched pairs two-thirds of the time.
|
| 466 |
+
|
| 467 |
+
The EER itself is $\begin{array} { r } { 0 . 5 P = \frac { 1 } { 3 } } \end{array}$
|
| 468 |
+
|
| 469 |
+
Thus, merely by being able to identify the gender of the subject accurately, we are able to verification EER of 0.33.
|
| 470 |
+
|
| 471 |
+
# B.3.2 IMPERFECT GENDER IDENTIFICATION
|
| 472 |
+
|
| 473 |
+
Now let us consider the situation where gender identification itself is imperfect, and we have error rates $e _ { f }$ and $e _ { v }$ in identifying the gender of the face and the voice, respectively. Assume these error rates are known.
|
| 474 |
+
|
| 475 |
+
To account for this, we modify our strategy: when we find the genders of the voice and face to match, we accept the pair as positive $P$ of the time, but when they are mismatched we still accept them as positive $Q$ of the time.
|
| 476 |
+
|
| 477 |
+
Let $\alpha$ represent the probability that we will correctly call the polarity of the gender match between the voice and the face. I.e. $\alpha$ is the probability that if the two have the same gender, we will correctly state that they have the same gender, or if they are of opposite gender, we will correctly state they are of opposite gender.
|
| 478 |
+
|
| 479 |
+
$$
|
| 480 |
+
\alpha = ( 1 - e _ { f } ) ( 1 - e _ { v } ) + e _ { f } e _ { v } .
|
| 481 |
+
$$
|
| 482 |
+
|
| 483 |
+
This combines two terms: that we call the genders of both the voice and face correctly, and that we call them both wrongly (which also results in finding the right polarity of the relationship). Its easy to see that $0 \leq \alpha \leq 1$ , and to verify that when gender identification is perfect, $\alpha = 1 . 0$ . The probability of calling the polarity of the gender relationship wrongly is $1 - \alpha$ .
|
| 484 |
+
|
| 485 |
+
Among the positive test pairs, all pairs are gender matched. We will correctly call $\alpha$ of these as gender matched. Using our strategy, our error on these instances is $( 1 - P )$ . We will incorrectly call
|
| 486 |
+
|
| 487 |
+
$1 - \alpha$ of these as gender mismatched, and the error on these instances is $( 1 - Q )$ . So the overall false rejection rate is given by
|
| 488 |
+
|
| 489 |
+
$$
|
| 490 |
+
F _ { R } = \alpha ( 1 - P ) + ( 1 - \alpha ) ( 1 - Q ) = 1 - \alpha P - ( 1 - \alpha ) Q
|
| 491 |
+
$$
|
| 492 |
+
|
| 493 |
+
Among the negative pairs, half are gender matched, and half are gender mismatched. Using the same logic as above, the error on the gender-matched negative pairs is $\alpha P + ( 1 - \alpha ) Q$ . Among the gender mismatched pairs the error is $\alpha Q + ( 1 - \alpha ) P$ . The overall false acceptance rate is given by
|
| 494 |
+
|
| 495 |
+
$$
|
| 496 |
+
F _ { A } = 0 . 5 ( \alpha P + ( 1 - \alpha ) Q ) + 0 . 5 ( \alpha Q + ( 1 - \alpha ) P ) = 0 . 5 ( P + Q ) .
|
| 497 |
+
$$
|
| 498 |
+
|
| 499 |
+
Equating $F _ { A }$ and $F _ { R }$ as the condition for EER, we obtain
|
| 500 |
+
|
| 501 |
+
$$
|
| 502 |
+
\begin{array} { l l } { { } } & { { 1 - \alpha P - ( 1 - \alpha ) Q = 0 . 5 ( P + Q ) } } \\ { { \implies } } & { { ( 3 - 2 \alpha ) Q + ( 1 + 2 \alpha ) P = 2 . } } \end{array}
|
| 503 |
+
$$
|
| 504 |
+
|
| 505 |
+
Since at EER, the EER equals $F _ { A }$ , and we would like to minimize it, we obtain the following solution to determine the optimal $P$ and $Q$ :
|
| 506 |
+
|
| 507 |
+
$$
|
| 508 |
+
\begin{array} { l } { \arg \underset { P , Q } { \operatorname* { m i n } } P + Q } \\ { \mathrm { s . } t . 1 \geq P , Q \geq 0 , ( 3 - 2 \alpha ) Q + ( 1 + 2 \alpha ) P = 2 . } \end{array}
|
| 509 |
+
$$
|
| 510 |
+
|
| 511 |
+
For $\alpha > 0 . 5$ it is easy to see that the solution to this is obtained at
|
| 512 |
+
|
| 513 |
+
$$
|
| 514 |
+
\begin{array} { l } { \displaystyle Q = 0 } \\ { \displaystyle P = \frac { 2 } { 1 + 2 \alpha } . } \end{array}
|
| 515 |
+
$$
|
| 516 |
+
|
| 517 |
+
For $\alpha < 0 . 5$ the optimal solution is at
|
| 518 |
+
|
| 519 |
+
$$
|
| 520 |
+
\begin{array} { l } { \displaystyle P = 0 } \\ { \displaystyle Q = \frac { 2 } { 3 - 2 \alpha } . } \end{array}
|
| 521 |
+
$$
|
| 522 |
+
|
| 523 |
+
That is, when the probe and gallery classifiers are likely to make the same error more than half the time, the optimal solution is to always reject pairs detected as having mismatched genders, and to accept matched-gender pairs $\frac { 2 } { 1 + 2 \alpha }$ of the time. The optimal EER is $\frac { \mathbf { \bar { \alpha } } _ { 1 } } { 1 + 2 \alpha }$ .
|
| 524 |
+
|
| 525 |
+
When they are more likely to make different errors, the optimal solution is to always reject pairs detected as having matched genders, and to accept mismatched-gender pairs $\frac { 2 } { 3 - 2 \alpha }$ of the time. The optimal EER now is $\frac { 1 } { 3 - 2 \alpha }$ .
|
| 526 |
+
|
| 527 |
+
Note that if an operating point other than EER were chosen to quantify performance $( e . g . F _ { A } = \beta F _ { R }$ for $\beta \neq 1$ , or for some fixed $F _ { A }$ or $F _ { R }$ ), the above analysis can be modified to accommodate it, provided a feasible solution exists.
|
md/train/B1gqipNYwH/B1gqipNYwH.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# OPTION DISCOVERY USING DEEP SKILL CHAINING
|
| 2 |
+
|
| 3 |
+
# Akhil Bagaria
|
| 4 |
+
|
| 5 |
+
# George Konidaris
|
| 6 |
+
|
| 7 |
+
Department of Computer Science Brown University
|
| 8 |
+
Providence, RI, USA
|
| 9 |
+
akhil bagaria@brown.edu
|
| 10 |
+
Department of Computer Science
|
| 11 |
+
Brown University
|
| 12 |
+
Providence, RI, USA
|
| 13 |
+
gdk@brown.edu
|
| 14 |
+
|
| 15 |
+
# ABSTRACT
|
| 16 |
+
|
| 17 |
+
Autonomously discovering temporally extended actions, or skills, is a longstanding goal of hierarchical reinforcement learning. We propose a new algorithm that combines skill chaining with deep neural networks to autonomously discover skills in high-dimensional, continuous domains. The resulting algorithm, deep skill chaining, constructs skills with the property that executing one enables the agent to execute another. We demonstrate that deep skill chaining significantly outperforms both non-hierarchical agents and other state-of-the-art skill discovery techniques in challenging continuous control tasks.1 2
|
| 18 |
+
|
| 19 |
+
# 1 INTRODUCTION
|
| 20 |
+
|
| 21 |
+
Hierarchical reinforcement learning (Barto & Mahadevan, 2003) is a promising approach for solving long-horizon sequential decision making problems. Hierarchical methods lower the decision making burden on the agent through the use of problem specific action abstractions (Konidaris, 2019). While the use of temporally extended actions, or options (Sutton et al., 1999), has been shown to accelerate learning (McGovern & Sutton, 1998), there remains the question of skill discovery: how can agents autonomously construct useful skills via interaction with the environment? While a large body of work has sought to answer this question in small discrete domains, skill discovery in high-dimensional continuous spaces remains an open problem.
|
| 22 |
+
|
| 23 |
+
An early approach to skill discovery in continuous-state environments was skill chaining (Konidaris & Barto, 2009b), where an agent constructs a sequence of options that target a salient event in the MDP (for example, the goal state). The skills are constructed so that successful execution of each option in the chain allows the agent to execute another option, which brings it closer still to its eventual goal. While skill chaining was capable of discovering skills in continuous state spaces, it could only be applied to relatively low-dimensional state-spaces with discrete actions.
|
| 24 |
+
|
| 25 |
+
We introduce a new algorithm that combines the core insights of skill chaining with recent advances in using non-linear function approximation in reinforcement learning. The new algorithm, deep skill chaining, scales to high-dimensional problems with continuous state and action spaces. Through a series of experiments on five challenging domains in the MuJoCo physics simulator (Todorov et al., 2012), we show that deep skill chaining can solve tasks that otherwise cannot be solved by nonhierarchical agents in a reasonable amount of time. Furthermore, the new algorithm outperforms state-of-the-art deep skill discovery algorithms (Bacon et al., 2017; Levy et al., 2019) in these tasks.
|
| 26 |
+
|
| 27 |
+
# 2 BACKGROUND AND RELATED WORK
|
| 28 |
+
|
| 29 |
+
Sequential decision making problems can be formalized as Markov Decision Processes (MDPs). We consider goal-oriented episodic MDPs, where $S$ denotes the state space, $A$ is the action space, $R$ is the reward function, $\tau$ is the transition function, $\gamma$ is the discount factor and $g \in S$ is the terminating goal state (Sutton & Barto, 2018). Unlike goal-conditioned algorithms (Sutton et al., 2011; Schaul et al., 2015), we do not require that $g$ be known; instead we assume access to an indicator function $\mathbb { 1 } _ { g } : s \in S \{ 0 , 1 \}$ which the agent can query to determine if it has reached the MDP’s goal.
|
| 30 |
+
|
| 31 |
+
One way to learn a policy in an MDP is to first learn an action-value function. The action-value function $Q ^ { \pi } ( s _ { t } , a _ { t } )$ is defined as the expected sum of discounted future rewards if the agent takes action $a _ { t }$ from $s _ { t }$ and then follows policy $\pi$ thereafter: $\begin{array} { r } { Q ^ { \pi } ( s _ { t } , a _ { t } ) = \mathbb { E } _ { \pi } [ r _ { t } + \gamma \operatorname* { m a x } _ { a _ { t + 1 } } \bar { Q } ^ { \pi } ( s _ { t + 1 } , a _ { t + 1 } ) ] } \end{array}$ .
|
| 32 |
+
|
| 33 |
+
Q-learning (Watkins & Dayan, 1992) is a commonly used off-policy algorithm that uses the actionvalue function for control through a greedy policy $\pi ( s _ { t } ) = \arg \operatorname* { m a x } _ { a _ { t } } Q ( s _ { t } , a _ { t } )$ . Inspired by recent success in scaling Q-learning to high-dimensional spaces (Mnih et al., 2015; Van Hasselt et al., 2016; Lillicrap et al., 2015; Tesauro, 1994), we learn the action-value function $Q _ { \phi } ^ { \pi } ( s _ { t } , a _ { t } )$ using non-linear function approximators parameterized by $\phi$ , by minimizing the loss $L ( \phi ) = \mathbb { E } _ { \pi } [ ( Q _ { \phi } ( s _ { t } , a _ { t } ) - y _ { t } ) ^ { 2 } ]$ where the Q-learning target $y _ { t }$ is given by the following equation (Van Hasselt et al., 2016):
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
y _ { t } = r _ { t } + \gamma Q _ { \phi ^ { \prime } } \bigl ( s _ { t + 1 } , \underset { a _ { t + 1 } } { \arg \operatorname* { m a x } } Q _ { \phi } \bigl ( s _ { t + 1 } , a _ { t + 1 } \bigr ) \bigr ) .
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
Deep Q-Learning (DQN) (Mnih et al., 2015) casts minimizing $L ( \phi )$ as a standard regression problem by using target networks (parameterized by $\phi ^ { \prime }$ ) and experience replay (Lin, 1993).
|
| 40 |
+
|
| 41 |
+
# 2.1 THE OPTIONS FRAMEWORK
|
| 42 |
+
|
| 43 |
+
The options framework (Sutton et al., 1999) models skills as options. An option $o$ consists of three components: (a) its initiation condition, $\mathcal { T } _ { o } ( s )$ , which determines whether $o$ can be executed in state $s$ , (b) its termination condition, $\beta _ { o } ( s )$ , which determines whether option execution must terminate in state $s$ and (c) its closed-loop control policy, $\pi _ { o } ( s )$ , which maps state $s$ to a low level action $a \in A$ . Augmenting the set of available actions with options results in a Semi-Markov Decision Process (SMDP) (Sutton et al., 1999) where the next state depends on the current state, action and time.
|
| 44 |
+
|
| 45 |
+
# 2.2 SKILL DISCOVERY ALGORITHMS
|
| 46 |
+
|
| 47 |
+
Skill discovery has been studied extensively in small discrete domains (McGovern & Sutton, 1998; S¸ ims¸ek & Barto, 2004; S¸ ims¸ek et al., 2005; Bakker & Schmidhuber, 2004; Schmidhuber, 1991; Pickett & Barto, 2002; Dietterich, 2000). Recently however, there has been a significant body of work aimed at discovering skills in continuous spaces.
|
| 48 |
+
|
| 49 |
+
Option-critic methods: Option-Critic (Bacon et al., 2017) uses an end-to-end gradient based algorithm to learn options in high-dimensional continuous spaces. Option-Critic was a substantial step forward in skill discovery and led to a family of related methods (Klissarov et al., 2017; Tiwari & Thomas, 2019; Riemer et al., 2018; Liu et al., 2017; Jain et al., 2018). Proximal Policy Option Critic (PPOC) (Klissarov et al., 2017) extends Option-Critic to continuous action spaces and is the version of Option-Critic that we compare against in this paper. Our method bypasses two fundamental shortcomings of the Option-Critic framework: (a) unlike Option-Critic, we explicitly learn initiation sets of options and thus do not assume that all options are executable from everywhere, and (b) we do not treat the number of skills required to solve a task as a fixed and costly hyperparameter. Instead, our algorithm flexibly discovers as many skills as it needs to solve the given problem.
|
| 50 |
+
|
| 51 |
+
Feudal methods: An alternative to the options framework is Feudal RL (Dayan & Hinton, 1993), which creates a hierarchy in which managers learn to assign subgoals to workers; workers take a subgoal state as input and learn to reach it. Feudal Networks (FuN) (Vezhnevets et al., 2017) used neural networks to scale the Feudal-RL framework to high-dimensional continuous spaces; it was extended and outperformed by HIRO (Nachum et al., 2018) in a series of control tasks in the MuJoCo simulator. More recently, Hierarchical Actor-Critic (HAC) (Levy et al., 2019) outperformed HIRO in a similar suite of continuous control problems. While HIRO relies on having a dense “distanceto-goal” based reward function to train both levels of their feudal hierarchy, HAC’s use of Hindsight Experience Replay (HER) (Andrychowicz et al., 2017) allows it to work in the more general sparsereward setting. Given its strong performance in continuous control problems and its ability to learn effectively in sparse-reward settings, we compare against HAC as a representative feudal method.
|
| 52 |
+
|
| 53 |
+
Learning backward from the goal: The idea of sequencing locally applicable controllers is well established in robotics and control theory in the form of pre-image backchaining (Kaelbling & LozanoPerez, 2017) and LQR-Trees (Tedrake, 2009). Such methods either require individually engineered ´ control loops or a model of the system dynamics. Our work fits in the model-free RL setting and thus requires neither. More recently, reverse curriculum learning (Florensa et al., 2017) also learns backward from the goal. However, they define a curriculum of start states to learn a single policy, rather than learning skills. Relay Networks (Kumar et al., 2018) segment the value function backward from the goal using a thresholding scheme, which makes their method reliant on the accurate estimation of the value function. By contrast, our algorithm is agnostic to errors in value estimation, which are unavoidable when using function approximation in high-dimensional spaces.
|
| 54 |
+
|
| 55 |
+
Planning with learned skills: Options have been shown to empirically speed up planning in several domains (Silver & Ciosek, 2012; Jinnai et al., 2019; James et al., 2018; Francis & Ram, 1993; Konidaris, 2016; Sharma et al., 2019). However, Konidaris et al. (2018) show that for resulting plans to be provably feasible, skills must be executable sequentially. While they assume that such skills are given, we show that they can be autonomously discovered in high-dimensional spaces.
|
| 56 |
+
|
| 57 |
+
# 3 DEEP SKILL CHAINING
|
| 58 |
+
|
| 59 |
+
Deep skill chaining (DSC) is based on the intuition that it is easier to solve a long-horizon task from states in the local neighborhood of the goal. This intuition informs the first step of the algorithm: create an option that initiates near the goal and reliably takes the agent to the goal. Once such an option is learned, we create another option whose goal is to take the agent to a state from which it can successfully execute the first option. Skills are chained backward in this fashion until the start state of the MDP lies inside the initiation set of some option. The inductive bias of creating sequentially executable skills guarantees that as long as the agent successfully executes each skill in its chain, it will solve the original task. More formally, skill chaining amounts to learning options such that the termination condition $\beta _ { o _ { i } } ( s _ { t } )$ of an option $o _ { i }$ is the initiation condition $\mathcal { T } _ { o _ { i - 1 } } ( s _ { t } )$ of the option that precedes it in its chain.
|
| 60 |
+
|
| 61 |
+
Our algorithm proceeds as follows: at time $t$ , the policy over options $\pi _ { \mathcal { O } } : s _ { t } \in S o \in \mathcal { O }$ determines which option to execute (Section 3.2). Control is then handed over to the selected option $o _ { i }$ ’s internal policy $\pi _ { o _ { i } } : s \in S \to a _ { t } \in \mathbb { R } ^ { | A | }$ . $\pi _ { o _ { i } }$ outputs joint torques until it either reaches its goal $( \beta _ { o _ { i } } : = \mathbb { Z } _ { o _ { i - 1 } }$ ) or times out at its predetermined budget $T$ (Section 3.1). At this point, $\pi _ { \mathcal { O } }$ chooses another option to execute. If at any point the agent reaches the goal state of the MDP or the initiation condition of a previously learned option, it creates a new option to target such a salient event. The machinery for learning the initiation condition of this new option is described in Section 3.3. We now detail the components of our architecture and how they are learned. Readers may also refer to Figures $4 \& 7$ and the pseudo-code in Appendix A.5 to gain greater intuition about our algorithm.
|
| 62 |
+
|
| 63 |
+
# 3.1 INTRA-OPTION POLICY
|
| 64 |
+
|
| 65 |
+
Each option $o$ maintains its own policy $\pi _ { o } : s \to a _ { t } \in \mathbb { R } ^ { | A | }$ , which is parameterized by its own neural networks $\theta _ { o }$ . To train $\pi _ { o } ( s ; \theta _ { o } )$ , we must define $o$ ’s internal reward function. In sparse reward problems, $o$ is given a subgoal reward when it triggers $\beta _ { o }$ ; otherwise it is given a step penalty. In the dense reward setting, we can compute the distance to the parent option’s initiation set classifier and use that to define $o$ ’s internal reward function. We can now treat learning the intra-option policy $( \pi _ { o } )$ as a standard RL problem and use an off-the-shelf algorithm to learn this policy. Since in this work we solve tasks with continuous action spaces, we use Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015) to learn option policies over real-valued actions.
|
| 66 |
+
|
| 67 |
+
# 3.2 POLICY OVER OPTIONS
|
| 68 |
+
|
| 69 |
+
Initially, the policy over options $\left( \pi _ { \mathcal { O } } \right)$ only possesses one option that operates over a single time step $T = 1$ ). We call this option the global option $( o _ { G } )$ since its initiation condition is true everywhere in the state space and its termination condition is true only at the goal state of the MDP (i.e, $\mathcal { T } _ { o _ { G } } ( s ) =$ $1 \forall s$ and $\beta _ { o _ { G } } = 1 _ { g }$ ). Using $o _ { G } , \pi _ { \mathcal { O } }$ can select primitive actions. At first the agent continually calls upon $o _ { G }$ , which uses its internal option policy $\pi _ { o _ { G } }$ to output exactly one primitive action. Once $o _ { G }$ triggers the MDP’s goal state $N$ times, DSC creates its first temporally extended option, the goal option $( o _ { g } )$ , whose termination condition is also set to be the goal state of the MDP, i.e, $\beta _ { o _ { g } } = \mathbb { 1 } _ { g }$ .
|
| 70 |
+
|
| 71 |
+
As the agent discovers new skills, it adds them to its option repertoire and relies on $\pi _ { \mathcal { O } }$ to determine which option (including $o _ { G }$ ) it must execute at each state. Unlike $o _ { G }$ , learned options will be temporally extended, i.e, they will operate over $T > 1$ time steps. If in state $s _ { t }$ the agent chooses to execute option $o _ { i }$ , then $o _ { i }$ will execute its own closed-loop control policy (for $\tau$ steps) until its termination condition is met $( \tau < T )$ ) or it has timed out at $\tau = T$ time steps. At this point, control is handed back to $\pi _ { \mathcal { O } }$ , which must now choose a new option at state $s _ { t + \tau }$ .
|
| 72 |
+
|
| 73 |
+
Option selection: To select an option in state $s _ { t } , \pi _ { \mathcal { O } }$ first constructs a set of admissible options given by Equation 2. $\pi _ { \mathcal { O } }$ then chooses the admissible option that maximizes its option-value function, as shown in Equation 3. Since the agent must choose from a discrete set of options at any time, we learn its option-value function using Deep Q-learning (DQN) (Mnih et al., 2015).
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\begin{array} { c } { { \mathcal { O } ^ { \prime } ( s _ { t } ) = \{ o _ { i } | \mathcal { Z } _ { o _ { i } } ( s _ { t } ) = 1 \cap \beta _ { o _ { i } } ( s _ { t } ) = 0 , \forall o _ { i } \in \mathcal { O } \} } } \\ { { o _ { t } = \arg \operatorname* { m a x } Q _ { \phi } ( s _ { t } , o _ { i } ) . } } \\ { { o _ { i } \epsilon \mathcal { O } ^ { \prime } ( s _ { t } ) } } \end{array}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
Learning the option-value function: Given an SMDP transition $( s _ { t } , o _ { t } , r _ { t : t + \tau } , s _ { t + \tau } )$ , we update the value of taking option $o _ { t }$ in state $s _ { t }$ according to SMDP Q-learning update (Bradtke $\&$ Duff, 1995). Since the agent learns Q-values for different state-option pairs, it may choose to ignore learned options in favor of primitive actions in certain parts of the state-space (in the interest of maximizing its expected future sum of discounted rewards). The Q-value target for learning the weights $\phi$ of the DQN is given by:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
y _ { t } = \sum _ { t ^ { \prime } = t } ^ { \tau } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } + \gamma ^ { \tau - t } Q _ { \phi ^ { \prime } } \big ( s _ { t + \tau } , \ \underset { o ^ { \prime } \epsilon \mathcal O ^ { \prime } ( s _ { t + \tau } ) } { \arg \operatorname* { m a x } } \ Q _ { \phi } \big ( s _ { t + \tau } , o ^ { \prime } \big ) \big ) .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
Adding new options to the policy over options: Equations 2, 3 and 4 show how we can learn the option-value function and use it for selecting options. However, we must still incrementally add new skills to the network during the agent’s lifetime. After the agent has learned a new option $o$ ’s initiation set classifier $\mathcal { T } _ { o }$ (we will discuss how this happens in Section 3.3), it performs the following steps before it can add $o$ to its option repertoire:
|
| 86 |
+
|
| 87 |
+
• To initialize $o$ ’s internal policy $\pi _ { o }$ , the parameters of its DDPG $\left( \theta _ { o } \right)$ are set to the parameters of the global agent’s DDPG $( \theta _ { o _ { G } } )$ . Subsequently, their neural networks are trained independently. This provides a good starting point for optimizing $\pi _ { o }$ , while allowing it to learn sub-problem specific abstractions.
|
| 88 |
+
• To begin predicting Q-values for $o$ , we add a new output node to final layer of the DQN parameterizing $\pi _ { \mathcal { O } }$ .
|
| 89 |
+
• We must assign appropriate initial values to $Q _ { \phi } ( s , o )$ . We follow Konidaris & Barto (2009b) and collect all the transitions that triggered $\beta _ { o }$ and use the max over these Q-values to optimistically initialize the new output node of our DQN.3 This is done by setting the bias of this new node, which ensures that the $\mathrm { Q }$ -value predictions corresponding to the other options remain unchanged.
|
| 90 |
+
|
| 91 |
+
# 3.3 INITIATION SET CLASSIFIER
|
| 92 |
+
|
| 93 |
+
Central to the idea of learning skills is the ability to learn the set of states from which they can be executed. First, we must learn the initiation set classifier for $o _ { g }$ , the option used to trigger the MDP’s goal state. While acting in the environment, the agent’s global DDPG will trigger the goal state $N$ times (also referred to as the gestation period of the option by Konidaris & Barto (2009b) and Niekum & Barto (2011)). We collect these $N$ successful trajectories, segment the last $K$ states from each trajectory and learn a one-class classifier around the segmented states. Once initialized, it may be necessary to refine the option’s initiation set based on its policy. We do so by executing the option and collecting data to train a two-class classifier. States from which option execution was successful are labeled as positive examples. States from which option execution timed out are labeled as negative examples. We continue this process of refining the option’s initiation set classifier for a fixed number of episodes, which we call the initiation period of the option.
|
| 94 |
+
|
| 95 |
+
At the end of the initiation period, we fix the option’s initiation set classifier and add it to the list of salient events in the MDP. We then construct a new option whose termination condition is the initiation classifier of the option we just learned. We continue adding to our chain of options in this fashion until a learned initiation set classifier contains the start state of the MDP.
|
| 96 |
+
|
| 97 |
+
# 3.4 GENERALIZING TO SKILL TREES
|
| 98 |
+
|
| 99 |
+
Our discussion so far has been focused on learning skill chains that extend from the goal to the start state of the MDP. However, such a chain is not sufficient if the agent has multiple start states or if we want the agent to learn multiple ways of solving the same problem. To permit such behavior, our algorithm can be used to learn skills that organize more generally in the form of trees (Konidaris & Barto, 2009b; Konidaris et al., 2012). This generalization requires some additional care while learning initiation set classifiers, the details of which can be found in Section A.1 of the Appendix. To demonstrate our ability to construct such skill trees (and their usefulness), we consider a maze navigation task, E-Maze, with distinct start states in Section 4.
|
| 100 |
+
|
| 101 |
+
# 3.5 OPTIMALITY OF DISCOVERED SOLUTIONS
|
| 102 |
+
|
| 103 |
+
Each option $o$ ’s internal policy $\pi _ { o }$ is is given a subgoal reward only when it triggers its termination condition $\beta _ { o }$ . As a result, $\pi _ { o }$ is trained to find the optimal trajectory for entering its own goal region. Naively executing learned skills would thus yield a recursively optimal solution to the MDP (Barto & Mahadevan, 2003). However, since the policy over options $\pi _ { \mathcal { O } }$ does not see subgoal rewards and is trained using extrinsic rewards only, it can combine learned skills and primitive actions to discover a flat optimal solution $\pi ^ { * }$ to the MDP (Barto & Mahadevan, 2003). Indeed, our algorithm allows $\pi _ { \mathcal { O } }$ to employ discovered skills to quickly and reliably find feasible paths to the goal, which over time can be refined into optimal solutions. It is worth noting that our ability to recover $\pi ^ { * }$ in the limit is in contrast to feudal methods such as HAC (Levy et al., 2019) in which higher levels of the hierarchy are rewarded for choosing feasible subgoals, not optimal ones.
|
| 104 |
+
|
| 105 |
+
To summarize, our algorithm proceeds as follows: (1) Collect trajectories that trigger new option $O _ { k }$ ’s termination condition $\beta _ { o _ { k } }$ . (2) Train $o _ { k }$ ’s option policy $\pi _ { o _ { k } }$ . (3) Learn $o _ { k }$ ’s initiation set classifier $\mathcal { T } _ { o _ { k } }$ . (4) Add $o _ { k }$ to the agent’s option repertoire. (5) Create a new option $O k { + 1 }$ such that $\beta _ { o _ { k + 1 } } = \mathcal { T } _ { o _ { k } }$ . (6) Train policy over options $\pi _ { \mathcal { O } }$ . Steps 1, 3, 4 and 5 continue until the MDP’s start state is inside some option’s initiation set. Continue steps 2 and 6 indefinitely.
|
| 106 |
+
|
| 107 |
+
# 4 EXPERIMENTS
|
| 108 |
+
|
| 109 |
+
We test our algorithm in five tasks that exhibit a strong hierarchical structure: (1) Point-Maze (Duan et al., 2016), (2) Four Rooms with Lock and Key, (3) Reacher (Brockman et al., 2016), (4) Point E-Maze and (5) Ant-Maze (Duan et al., 2016; Brockman et al., 2016). Since tasks 1, 3 and 5 appear frequently in the literature, details of their setup can be found in Appendix A.3.
|
| 110 |
+
|
| 111 |
+
Four Rooms with Lock and Key: In this task, a point agent (Duan et al., 2016) is placed in the Four Rooms environment (Sutton et al., 1999). It must pick up the key (blue sphere in the top-right room in Figure 1(c), row 2) and then navigate to the lock (red sphere in the top-left room). The agent’s state space consists of its position, orientation, linear velocity, rotational velocity and a has key indicator variable. If it reaches the lock with the key in its possession, its episode terminates with a sparse reward of 0; otherwise it gets a step penalty of $- 1$ . If we wish to autonomously discover the importance of the key, (i.e, without any corresponding extrinsic rewards) a distance-based dense reward such as that used in related work (Nachum et al., 2018) would be infeasible.
|
| 112 |
+
|
| 113 |
+
Point E-Maze: This task extends the benchmark U-shaped Point-Maze task (Duan et al., 2016) so that the agent has two possible start locations - on the top and bottom rungs of the E-shaped maze respectively. We include this task to demonstrate our algorithm’s ability to construct skill trees.
|
| 114 |
+
|
| 115 |
+
# 4.1 COMPARATIVE ANALYSES
|
| 116 |
+
|
| 117 |
+
We compared the performance of our algorithm to DDPG, Option-Critic and Hierarchical ActorCritic (HAC), in the conditions most similar to those in which they were originally evaluated. For instance, in the Ant-Maze task we compare against Option-Critic under a dense-reward formulation of the problem while comparing to HAC under a sparse-reward version of the same task. As a result, we show the learning curves comparing against them on different plots (columns (a) and (b) in Figure 1 respectively) to emphasize the difference between the algorithms, the settings in which they are applicable, and the way they are evaluated.
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 1: (a) Learning curves comparing deep skill chaining (DSC), a flat agent (DDPG) and OptionCritic. (b) Comparison with Hierarchical Actor Critic (HAC). (c) the continuous control tasks corresponding to the learning curves in (a) and (b). Solid lines represent median reward per episode, with error bands denoting one standard deviation. Our algorithm remains the same between (a) and (b). All curves are averaged over 20 runs, except for Ant Maze which was averaged over 5 runs.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 2: Initiation sets of options learned in the Lock and Key task. Blue sphere in top-right room represents the key, red sphere in top-left room represents the lock. Red regions represent states inside the initiation classifier of learned skills, whereas blue/gray regions represent states outside of it. Each column represents an option - the top row corresponding to the initiation set when has key is false and the bottom row corresponding to the initiation set when has key is true.
|
| 124 |
+
|
| 125 |
+
Comparison with DDPG and Option-Critic: Figure 1(a) shows the results of comparing our proposed algorithm (DSC) with a flat RL agent (DDPG) and the version of Option-Critic designed for continuous action spaces (PPOC).4 Deep skill chaining comfortably outperforms both baselines. Both DSC and DDPG use the same exploration strategy in which $a _ { t } \doteq \pi _ { \theta } ( s _ { t } ) + \eta _ { t }$ where $\eta _ { t } \sim N ( 0 , \epsilon _ { t } )$ . Option-Critic, on the other hand, learns a stochastic policy $\pi _ { \boldsymbol { \theta } } \big ( a _ { t } | \boldsymbol { s } _ { t } \big )$ and thus has baked-in exploration (Sutton & Barto, 2018, Ch. 13), precluding the need for additive noise during action selection. We hypothesize that this difference in exploration strategies is the reason OptionCritic initially performs better than both DDPG and DSC in the Reacher and Point E-Maze tasks.
|
| 126 |
+
|
| 127 |
+
Comparison with Hierarchical Actor-Critic: We compare our algorithm to Hierarchical ActorCritic (HAC) (Levy et al., 2019), which has recently outperformed other hierarchical reinforcement learning methods (Nachum et al., 2018; Vezhnevets et al., 2017) on a wide variety of tasks. $^ { 5 } \mathrm { ~ \bf ~ A ~ }$ noteworthy property of the HAC agent is that it may prematurely terminate its training episodes to prevent flooding its replay buffer with uninformative transitions. The length of each training episode in DSC however, is fixed and determined by the test environment. Unless the agent reaches the goal state, its episode lasts for the entirety of its episodic budget (e.g, this would be 1000 timesteps in the Point-Maze environment). Thus, to compare the two algorithms, we perform periodic test rollouts wherein all networks are frozen and both algorithms have the same time budget to solve the given task. Furthermore, since both DSC and HAC learn deterministic policies, we set $\epsilon _ { t } = 0$ during these test rollouts. When comparing to HAC, we perform 1 test rollout after each training episode in all tasks except for Ant-Maze, where we average performance over 5 test rollouts every 10 episodes.
|
| 128 |
+
|
| 129 |
+
Figure 1(b) shows that DSC outperforms HAC in all environments except for Four Rooms with a Lock and Key, where their performance is similar, even though DSC does not use Hindsight Experience Replay (Andrychowicz et al., 2017) to deal with the sparse reward nature of this task.
|
| 130 |
+
|
| 131 |
+
# 4.2 INTERPRETING LEARNED SKILLS
|
| 132 |
+
|
| 133 |
+
Figure 2 visualizes the initiation set classifiers of options discovered by DSC in Four Rooms with a Lock and Key. Despite not getting any extrinsic reward for picking up the key, DSC discovers the following skill chain: the options shown in Figure 2 columns (c) and (d) bring the agent to the room with the key. The option shown in column (b) then picks up the key (top row) and then takes the agent to the room with the lock (bottom row). Finally, the option in column (a) solves the overall problem by navigating to the lock with the key. Similar visualizations of learned initiation set classifiers in the E-Maze task can be found in the Figure 6 in the Appendix.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: Solution trajectories found by deep skill chaining. Sub-figure (d) shows two trajectories corresponding to the two possible initial locations in this task. Black points denote states in which $\pi _ { \mathcal { O } }$ chose primitive actions, other colors denote temporally extended option executions.
|
| 137 |
+
|
| 138 |
+
Figure 3 shows that DSC is able to learn options that induce simple, efficient policies along different segments of the state-space. Furthermore, it illustrates that in some states, the policy over options prefers primitive actions (shown in black) over learned skills. This suggests that DSC is robust to situations in which it constructs poor options or is unable to learn a good option policy in certain portions of the state-space. In particular, Figure 3 (d) shows how DSC constructs a skill tree to solve a problem with two distinct start states. It learns a common option near the goal (shown in blue), which then branches off into two different chains leading to its two different start states respectively.
|
| 139 |
+
|
| 140 |
+
# 5 DISCUSSION AND CONCLUSION
|
| 141 |
+
|
| 142 |
+
Deep skill chaining breaks complex long-horizon problems into a series of sub-problems and learns policies that solve those sub-problems. By doing so, it provides a significant performance boost when compared to a flat learning agent in all of the tasks considered in Section 4.
|
| 143 |
+
|
| 144 |
+
We show superior performance when compared to Option-Critic, the leading framework for option discovery in continuous domains. A significant drawback of Option-Critic is that it assumes that all options are executable from everywhere in the state-space. By contrast, deep skill chaining explicitly learns initiation set classifiers. As a result, learned skills specialize in different regions of the statespace and do not have to bear the burden of learning representations for states that lie far outside of their initiation region. Furthermore, each option in the Option-Critic architecture leverages the same state-abstraction to learn option-specific value functions and policies, while deep skill chaining permits each skill to construct its own skill-specific state-abstraction (Konidaris & Barto, 2009a). An advantage of using Option-Critic over DSC is that it is not confined to goal-oriented tasks and can work in tasks which require continually maximizing non-sparse rewards.
|
| 145 |
+
|
| 146 |
+
Section 4 also shows that deep skill chaining outperforms HAC in four out of five domains, while achieving comparable performance in one. We note that even though HAC was designed to work in the multi-goal setting, we test it here in the more constrained single-goal setting. Consequently, we argue that in problems which permit a stationary set of target events (like the ones considered here), deep skill chaining provides a favorable alternative to HAC. Furthermore, HAC depends on Hindsight Experience Replay (HER) to train the different layers of their hierarchy. Deep skill chaining shows the benefits of using hierarchies even in the absence of such data augmentation techniques but including them should yield additional performance benefits in sparse-reward tasks.
|
| 147 |
+
|
| 148 |
+
A drawback of deep skill chaining is that, because it builds skills backward from the goal, its performance in large state-spaces is dependent on a good exploration algorithm. We used the naive exploration strategy of adding Gaussian noise to chosen actions (Lillicrap et al., 2015; Fujimoto et al., 2018) since the exploration question is orthogonal to the ideas presented here. The lack of a sophisticated exploration algorithm also explains the higher variance in performance in the PointMaze task in Figure 1. Combining effective exploration (Machado et al., 2018; Jinnai et al., 2020) with DSC’s high reliability of triggering target events is a promising avenue for future work.
|
| 149 |
+
|
| 150 |
+
We presented a new skill discovery algorithm that can solve high-dimensional goal-oriented tasks far more reliably than flat RL agents and other popular hierarchical methods. To our knowledge,
|
| 151 |
+
|
| 152 |
+
DSC is the first deep option discovery algorithm that does not treat the number of options as a fixed and costly hyperparameter. Furthermore, where other deep option discovery techniques have struggled to show consistent improvements over baseline flat agents in the single task setting (Zhang & Whiteson, 2019; Smith et al., 2018; Harb et al., 2018; Klissarov et al., 2017), we unequivocally show the necessity for hierarchies for solving challenging problems.
|
| 153 |
+
|
| 154 |
+
# 6 ACKNOWLEDGEMENTS
|
| 155 |
+
|
| 156 |
+
We thank Andrew Levy, Nakul Gopalan, Sam Lobel, Theresa Barton and other members of the Brown bigAI group for their inputs. This research was supported in part by DARPA under agreement number W911NF1820268, AFOSR Young Investigator Grant agreement number FA9550-17- 1-0124 and the ONR under the PERISCOPE MURI Contract N00014-17-1-2699. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The content is solely the responsibility of the authors and does not necessarily represent the official views of DARPA, the ONR, or the AFOSR.
|
| 157 |
+
|
| 158 |
+
# REFERENCES
|
| 159 |
+
|
| 160 |
+
Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, OpenAI Pieter Abbeel, and Wojciech Zaremba. Hindsight experience replay. In Advances in Neural Information Processing Systems, pp. 5048–5058, 2017.
|
| 161 |
+
Pierre-Luc Bacon, Jean Harb, and Doina Precup. The option-critic architecture. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
|
| 162 |
+
Bram Bakker and Jurgen Schmidhuber. Hierarchical reinforcement learning with subpolicies spe- ¨ cializing for learned subgoals. In Neural Networks and Computational Intelligence, pp. 125–130. Citeseer, 2004.
|
| 163 |
+
Andrew G Barto and Sridhar Mahadevan. Recent advances in hierarchical reinforcement learning. Discrete event dynamic systems, 13(1-2):41–77, 2003.
|
| 164 |
+
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, pp. 1471–1479, 2016.
|
| 165 |
+
Steven J Bradtke and Michael O Duff. Reinforcement learning methods for continuous-time markov decision problems. In Advances in neural information processing systems, pp. 393–400, 1995.
|
| 166 |
+
Ronen I Brafman and Moshe Tennenholtz. R-Max - a general polynomial time algorithm for nearoptimal reinforcement learning. Journal of Machine Learning Research, 3(Oct):213–231, 2002.
|
| 167 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 168 |
+
Yuri Burda, Harrison Edwards, Amos Storkey, and Oleg Klimov. Exploration by random network distillation. In International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id ${ . } = { }$ H1lJJnR5Ym.
|
| 169 |
+
Peter Dayan and Geoffrey E Hinton. Feudal reinforcement learning. In Advances in neural information processing systems, pp. 271–278, 1993.
|
| 170 |
+
Thomas G Dietterich. Hierarchical reinforcement learning with the maxq value function decomposition. Journal of Artificial Intelligence Research, 13:227–303, 2000.
|
| 171 |
+
Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, pp. 1329–1338, 2016.
|
| 172 |
+
Carlos Florensa, David Held, Markus Wulfmeier, Michael Zhang, and Pieter Abbeel. Reverse curriculum generation for reinforcement learning. In Conference on Robot Learning, pp. 482–495, 2017.
|
| 173 |
+
|
| 174 |
+
Anthony G Francis and Ashwin Ram. The utility problem in case-based reasoning. In Case-Based Reasoning: Papers from the 1993 Workshop, pp. 160–161, 1993.
|
| 175 |
+
|
| 176 |
+
Scott Fujimoto, Herke Hoof, and David Meger. Addressing function approximation error in actorcritic methods. In International Conference on Machine Learning, pp. 1582–1591, 2018.
|
| 177 |
+
|
| 178 |
+
Jean Harb, Pierre-Luc Bacon, Martin Klissarov, and Doina Precup. When waiting is not an option: Learning options with a deliberation cost. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 179 |
+
|
| 180 |
+
Arushi Jain, Khimya Khetarpal, and Doina Precup. Safe option-critic: Learning safety in the optioncritic architecture. CoRR, abs/1807.08060, 2018. URL http://arxiv.org/abs/1807. 08060.
|
| 181 |
+
|
| 182 |
+
Steven James, Benjamin Rosman, and George Konidaris. Learning to plan with portable symbols. the ICML/IJCAI/AAMAS 2018 Workshop on Planning and Learning, 2018.
|
| 183 |
+
|
| 184 |
+
Yuu Jinnai, David Abel, David Hershkowitz, Michael Littman, and George Konidaris. Finding options that minimize planning time. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 3120–3129, Long Beach, California, USA, 09–15 Jun 2019. PMLR. URL http://proceedings.mlr.press/v97/jinnai19a.html.
|
| 185 |
+
|
| 186 |
+
Yuu Jinnai, Jee Won Park, Marlos C. Machado, and George Konidaris. Exploration in reinforcement learning with deep covering options. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id ${ . } = { }$ SkeIyaVtwB.
|
| 187 |
+
|
| 188 |
+
Leslie Pack Kaelbling and Tomas Lozano-P ´ erez. Pre-image backchaining in belief space for mobile ´ manipulation. In Robotics Research, pp. 383–400. Springer, 2017.
|
| 189 |
+
|
| 190 |
+
Martin Klissarov, Pierre-Luc Bacon, Jean Harb, and Doina Precup. Learnings options end-to-end for continuous action tasks. Hierarchical Reinforcement Learning Workshop (NeurIPS), 2017.
|
| 191 |
+
|
| 192 |
+
George Konidaris. Constructing abstraction hierarchies using a skill-symbol loop. In IJCAI: proceedings of the conference, volume 2016, pp. 1648. NIH Public Access, 2016.
|
| 193 |
+
|
| 194 |
+
George Konidaris. On the necessity of abstraction. Current Opinion in Behavioral Sciences, 29: 1–7, 2019.
|
| 195 |
+
|
| 196 |
+
George Konidaris and Andrew Barto. Efficient skill learning using abstraction selection. In TwentyFirst International Joint Conference on Artificial Intelligence, 2009a.
|
| 197 |
+
|
| 198 |
+
George Konidaris and Andrew Barto. Skill discovery in continuous reinforcement learning domains using skill chaining. In Advances in Neural Information Processing Systems, pp. 1015–1023, 2009b.
|
| 199 |
+
|
| 200 |
+
George Konidaris, Scott Kuindersma, Roderic Grupen, and Andrew Barto. Robot learning from demonstration by constructing skill trees. The International Journal of Robotics Research, 31(3): 360–375, 2012.
|
| 201 |
+
|
| 202 |
+
George Konidaris, Leslie Pack Kaelbling, and Tomas Lozano-Perez. From skills to symbols: Learning symbolic representations for abstract high-level planning. Journal of Artificial Intelligence Research, 61:215–289, 2018.
|
| 203 |
+
|
| 204 |
+
Visak CV Kumar, Sehoon Ha, and C Karen Liu. Expanding motor skills using relay networks. In Conference on Robot Learning, pp. 744–756, 2018.
|
| 205 |
+
|
| 206 |
+
Andrew Levy, Robert Platt, and Kate Saenko. Hierarchical reinforcement learning with hindsight. In International Conference on Learning Representations, 2019. URL https://openreview. net/forum?id ${ . } = { }$ ryzECoAcY7.
|
| 207 |
+
|
| 208 |
+
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.
|
| 209 |
+
|
| 210 |
+
Long-Ji Lin. Reinforcement learning for robots using neural networks. Technical report, CarnegieMellon Univ Pittsburgh PA School of Computer Science, 1993.
|
| 211 |
+
|
| 212 |
+
Miao Liu, Marlos C Machado, Gerald Tesauro, and Murray Campbell. The eigenoption-critic framework. arXiv preprint arXiv:1712.04065, 2017.
|
| 213 |
+
|
| 214 |
+
Marlos C. Machado, Clemens Rosenbaum, Xiaoxiao Guo, Miao Liu, Gerald Tesauro, and Murray Campbell. Eigenoption discovery through the deep successor representation. In International Conference on Learning Representations, 2018. URL https://openreview.net/forum? id $=$ Bk8ZcAxR-.
|
| 215 |
+
|
| 216 |
+
Amy McGovern and Richard S Sutton. Macro-actions in reinforcement learning: An empirical analysis. Computer Science Department Faculty Publication Series, pp. 15, 1998.
|
| 217 |
+
|
| 218 |
+
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.
|
| 219 |
+
|
| 220 |
+
Ofir Nachum, Shixiang Shane Gu, Honglak Lee, and Sergey Levine. Data-efficient hierarchical reinforcement learning. In Advances in Neural Information Processing Systems, pp. 3303–3313, 2018.
|
| 221 |
+
|
| 222 |
+
Scott Niekum and Andrew G. Barto. Clustering via dirichlet process mixture models for portable skill discovery. In J. Shawe-Taylor, R. S. Zemel, P. L. Bartlett, F. Pereira, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 24, pp. 1818–1826. Curran Associates, Inc., 2011.
|
| 223 |
+
|
| 224 |
+
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
|
| 225 |
+
|
| 226 |
+
Marc Pickett and Andrew G Barto. Policyblocks: An algorithm for creating useful macro-actions in reinforcement learning. In ICML, volume 19, pp. 506–513, 2002.
|
| 227 |
+
|
| 228 |
+
Matthew Riemer, Miao Liu, and Gerald Tesauro. Learning abstract options. In Advances in Neural Information Processing Systems, pp. 10424–10434, 2018.
|
| 229 |
+
|
| 230 |
+
Tom Schaul, Daniel Horgan, Karol Gregor, and David Silver. Universal value function approximators. In International conference on machine learning, pp. 1312–1320, 2015.
|
| 231 |
+
|
| 232 |
+
Jurgen Schmidhuber. Learning to generate sub-goals for action sequences. In ¨ Artificial neural networks, pp. 967–972, 1991.
|
| 233 |
+
|
| 234 |
+
Archit Sharma, Shixiang Gu, Sergey Levine, Vikash Kumar, and Karol Hausman. Dynamics-aware unsupervised discovery of skills. arXiv preprint arXiv:1907.01657, 2019.
|
| 235 |
+
|
| 236 |
+
David Silver and Kamil Ciosek. Compositional planning using optimal option models. In ICML, 2012.
|
| 237 |
+
|
| 238 |
+
Ozg ¨ ur S¸ ims¸ek and Andrew G Barto. Using relative novelty to identify useful temporal abstractions ¨ in reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 95. ACM, 2004.
|
| 239 |
+
|
| 240 |
+
Ozg ¨ ur S¸ ims¸ek, Alicia P Wolfe, and Andrew G Barto. Identifying useful subgoals in reinforcement ¨ learning by local graph partitioning. In Proceedings of the 22nd international conference on Machine learning, pp. 816–823. ACM, 2005.
|
| 241 |
+
|
| 242 |
+
Matthew Smith, Herke van Hoof, and Joelle Pineau. An inference-based policy gradient method for learning options. 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. 4703–4712, Stockholmsmassan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL ¨ http: //proceedings.mlr.press/v80/smith18a.html.
|
| 243 |
+
|
| 244 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 245 |
+
|
| 246 |
+
Richard S Sutton, Doina Precup, and Satinder P Singh. Intra-option learning about temporally abstract actions. In ICML, volume 98, pp. 556–564, 1998.
|
| 247 |
+
|
| 248 |
+
Richard S Sutton, Joseph Modayil, Michael Delp, Thomas Degris, Patrick M Pilarski, Adam White, and Doina Precup. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems-Volume 2, pp. 761–768. International Foundation for Autonomous Agents and Multiagent Systems, 2011.
|
| 249 |
+
|
| 250 |
+
R.S. Sutton, , D. Precup, and S. Singh. Between MDPs and semi-MDPs: A framework for temporal abstraction in reinforcement learning. Artificial Intelligence, 112(1):181–211, 1999.
|
| 251 |
+
|
| 252 |
+
Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, OpenAI Xi Chen, Yan Duan, John Schulman, Filip DeTurck, and Pieter Abbeel. # exploration: A study of count-based exploration for deep reinforcement learning. In Advances in neural information processing systems, pp. 2753– 2762, 2017.
|
| 253 |
+
|
| 254 |
+
Russ Tedrake. LQR-trees: Feedback motion planning on sparse randomized trees. 2009.
|
| 255 |
+
|
| 256 |
+
Gerald Tesauro. TD-Gammon, a self-teaching backgammon program, achieves master-level play. Neural computation, 6(2):215–219, 1994.
|
| 257 |
+
|
| 258 |
+
Saket Tiwari and Philip S Thomas. Natural option critic. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 5175–5182, 2019.
|
| 259 |
+
|
| 260 |
+
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.
|
| 261 |
+
|
| 262 |
+
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Qlearning. In Thirtieth AAAI Conference on Artificial Intelligence, 2016.
|
| 263 |
+
|
| 264 |
+
Alexander Sasha Vezhnevets, Simon Osindero, Tom Schaul, Nicolas Heess, Max Jaderberg, David Silver, and Koray Kavukcuoglu. Feudal networks for hierarchical reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3540– 3549. JMLR. org, 2017.
|
| 265 |
+
|
| 266 |
+
Christopher JCH Watkins and Peter Dayan. Q-learning. Machine learning, 8(3-4):279–292, 1992.
|
| 267 |
+
|
| 268 |
+
Shangtong Zhang and Shimon Whiteson. DAC: The double actor-critic architecture for learning options. In Advances in neural information processing systems, pp. To appear, 2019. URL https://arxiv.org/abs/1904.12691.
|
| 269 |
+
|
| 270 |
+

|
| 271 |
+
Figure 4: An illustration of the deep skill chaining algorithm. $\star$ represents the goal state, $\times$ represents the two start states. (a) Before the agent has discovered its first skill/option, it acts according to its global DDPG policy. Having encountered the goal state $N$ times, the agent creates an option to trigger the goal from its local neighborhood. (b) Now, when the agent enters the initiation set of the first option, it begins to learn another option to trigger the first option. (c) Because the agent has two different start states, it learns two qualitatively different options to trigger the option learned in (b). (d) Finally, the agent has learned a skill tree which it can follow to consistently reach the goal.
|
| 272 |
+
|
| 273 |
+
# A APPENDIX
|
| 274 |
+
|
| 275 |
+
# A.1 CREATING SKILL TREES
|
| 276 |
+
|
| 277 |
+
In Section 3.4, we introduced the idea of generalizing skill chains to skill trees to incorporate qualitatively different solution trajectories. In this section, we provide some of the implementation details required to learn initiation set classifiers that organize in the form of trees.
|
| 278 |
+
|
| 279 |
+
When creating skill chains, the goal of each option is to trigger the initiation condition of the option that precedes it in its chain (i.e, its parent option). When creating a skill tree of branching factor $B$ , we allow at most $B$ options to target each salient event in the MDP (i.e, the goal state and the initiation set classifiers of preexisting options). To further control the branching factor of the skill tree, we impose two more conditions on option creation:
|
| 280 |
+
|
| 281 |
+
1. Consider an option $o _ { 1 }$ which already has one child option $o _ { 2 }$ targeting it. Now suppose that we want to learn another option $o _ { 3 }$ that also targets $o _ { 1 }$ . We only consider state $s _ { t }$ to be a positive example for training $\mathcal { T } _ { o _ { 3 } }$ if $\mathcal { T } _ { o _ { 2 } } ( s _ { t } ) = 0$ . 2. To prevent significant overlap between options that target the same event, we treat the positive examples used to train the initiation set classifier of one as negative training examples of all its sibling options. This allows for multiple options that trigger the same target event, while encouraging them to specialize in different parts of the state-space.
|
| 282 |
+
|
| 283 |
+
In the Point E-Maze task considered in Section 4, we learn a skill tree with $B = 2$
|
| 284 |
+
|
| 285 |
+
# A.2 INTRA-OPTION Q-LEARNING
|
| 286 |
+
|
| 287 |
+
In principle, the methodology outlined in Section 3.2 is sufficient to learn an effective policy over options $\pi _ { \mathcal { O } }$ . However, when $\mathcal { O }$ is a set of Markov options (Sutton et al., 1999), which is the setting considered in this paper, we can use intra-option Q-learning (Sutton et al., 1998) to improve the sample efficiency associated with learning $\pi _ { \mathcal { O } }$ .
|
| 288 |
+
|
| 289 |
+
More specifically, given a transition $( s _ { t } , o , r _ { t : t + \tau } , s _ { t + \tau } )$ , SMDP Q-learning treats option $o$ as a black box and uses Equation 4 to determine the Q-value target $y _ { t }$ for updating $\pi _ { \mathcal { O } }$ . Intra-option Q-learning leverages the fact that option $o$ is Markov to point out that all the transitions experienced during the execution of $o$ are also valid experiences for training $\pi _ { \mathcal { O } }$ . As long as a state $s _ { t + i } , \forall i \in [ 0 , \tau ]$ is inside the initiation set of the option $o$ , we can pretend that option execution really began in state $s _ { t + i }$ and add the transition $( s _ { t + i } , o , r _ { t + i : t + \tau } , s _ { t + \tau } )$ to the $\pi _ { \mathcal { O } }$ ’s replay buffer.
|
| 290 |
+
|
| 291 |
+
Furthermore, intra-option Q-learning also provides a way to improve the sample efficiency associated with learning option policies $\pi _ { o } , \forall o \in { \mathcal { O } }$ . This can be done by making off-policy updates to each option’s internal policy. In other words, regardless of which option is actually executed in the MDP, as long as a state experienced during execution is inside the initiation set of some other option, we can add the associated experience tuple to that (un-executed) option’s replay buffer. Note that this is possible because we use an off-policy learning algorithm (DDPG) to learn intra-option policies.
|
| 292 |
+
|
| 293 |
+
# A.3 TEST ENVIRONMENTS
|
| 294 |
+
|
| 295 |
+
A description of the Four Rooms and the Point E-Maze tasks was provided in Section 4. Here we describe the remaining tasks considered in this paper:
|
| 296 |
+
|
| 297 |
+
Point Maze: In this task, the same point agent as in the four rooms task must navigate around a U-shaped maze to reach its goal. The agent receives a reward of $- 1$ for every step it lives, and a sparse terminating reward of 0 when it reaches its goal location. This is an interesting task for hierarchical agents because in order to reach the goal, the agent must first move away from it. It is clear that a dense distance-based reward formulation of this problem would only serve to deceive non-hierarchical agents such as DDPG.
|
| 298 |
+
|
| 299 |
+
Ant Maze: The ant (Duan et al., 2016) is a challenging agent to control due to its non-linear and highly unstable dynamics. In this task, the ant must now navigate around the same U-shaped maze as in the Point Maze task. Getting the ant to cover significant distances along the $x , y$ plane without falling over, is a benchmark control task itself (Brockman et al., 2016). As a result, constructing options backward from the goal could require prohibitively large training episodes or the use of a sophisticated exploration algorithms (Burda et al., 2019; Bellemare et al., 2016; Tang et al., 2017). To avoid conflating our results with the orthogonal investigation of effective exploration in RL, we follow the experimental design of other state-of-the-art hierarchical reinforcement learning algorithms (Levy et al., 2019; Nachum et al., 2018) and sample the initial state of the ant uniformly across the maze for the first 30 episodes. For fair comparison, all baseline algorithms use this exploration strategy.
|
| 300 |
+
|
| 301 |
+
Fixed Reacher: We use the Reacher task (Brockman et al., 2016) with two modifications. First, rather than randomly sampling a new goal at the start of each episode, we fix the target across all episodes. We do this because if the goal moves, following a learned skill chain will no longer solve the MDP. Note that the same modification was made in the DDPG paper (Lillicrap et al., 2015). Second, to increase the difficulty of the resulting task, we use a sparse reward function rather than the dense distance-based one used in the original formulation.
|
| 302 |
+
|
| 303 |
+
Table 1: Maximum number of time steps per episode in each of the experimental domains
|
| 304 |
+
|
| 305 |
+
<table><tr><td>Task</td><td>Number of steps per episode</td></tr><tr><td>Point-Maze</td><td>1000</td></tr><tr><td>Four Rooms with Lock and Key</td><td>5000</td></tr><tr><td>Point E-Maze</td><td>1500</td></tr><tr><td>Reacher</td><td>500</td></tr><tr><td>Ant-Maze</td><td>2000</td></tr></table>
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 5: Analysis of performance (as measured by mean cumulative reward) of DSC agent as it is allowed to learn more skills in (a) Point-Maze, (b) Four Rooms with Lock and Key, (c) E-Maze and (d) Ant-Maze. Note that in general, DSC discovers as many skills as it needs to solve the given problem. For this experiment alone, we restrict the number of skills that the DSC agent can learn. All experiments averaged over 5 runs. Error bars denote 1 standard deviation. Higher is better.
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
Figure 6: Initiation set classifiers learned in the Point E-Maze domain. Discovered skills organize in the form of a tree with a branching factor of 2. The option on the extreme left initiates in the proximity of the goal. Options learned after the goal option branch off into two separate skill chains. The chain on top extends backward to the start state in the top rung of the E-Maze. The chain shown in the bottom row extends backward to the start state in the bottom rung of the E-Maze.
|
| 312 |
+
|
| 313 |
+
A.4 ABLATION STUDY
|
| 314 |
+
|
| 315 |
+
A.4.1 PERFORMANCE AS A FUNCTION OF NUMBER OF SKILLS
|
| 316 |
+
|
| 317 |
+
Deep skill chaining generally discovers and learns as many skills as it needs to solve a given problem. In this experiment however, we restrict the number of skills DSC can learn to examine its impact on overall agent performance (as measured by cumulative reward during training). Figure 5 shows that the performance of the agent increases monotonically (with diminishing marginal improvements) as it is allowed to learn more skills.
|
| 318 |
+
|
| 319 |
+
A.4.2 NUMBER OF SKILLS OVER TIME
|
| 320 |
+
|
| 321 |
+
Figures 7 (a) and 7 (b) illustrate how deep skill chaining incrementally discovers options and adds it to the agent’s option repertoire. Figure 7(c) shows how the number of skills empirically increases over time, plateaus and has low variance between runs. Since the agent has to learn the importance of the key in the Four Rooms task, learning initiation set classifiers takes longer than in the Point-Maze task.
|
| 322 |
+
|
| 323 |
+
# A.4.3 HYPERPARAMETER SENSITIVITY
|
| 324 |
+
|
| 325 |
+
In this section, we analyze DSC’s sensitivity to some of the hyperparameters specific to the algorithm. In Figure 8, we show that even under a fairly large range of values for the buffer length $K$ and the gestation period $N$ , DSC is able to retain its strong performance.
|
| 326 |
+
|
| 327 |
+

|
| 328 |
+
Figure 7: (a) Initially, the policy over options $\pi _ { \mathcal { O } }$ can only choose the global option $o _ { G }$ as a proxy for selecting primitive actions. (b) Over time, the agent learns temporally extended skills and adds output nodes to the final layer of the DQN parameterizing $\pi _ { \mathcal { O } }$ . This continues until the start state $s _ { 0 }$ lies inside the initiation set of a learned option. (c) Empirical evaluation of how the number of skills in the agent’s option repertoire changes over time in Point-Maze and Four-Rooms with a Lock and Key.
|
| 329 |
+
|
| 330 |
+

|
| 331 |
+
Figure 8: Variation in DSC performance (as measured by mean cumulative reward) as a function of two hyperparameters: (left) the buffer length $K$ and (right) the gestation period $N$ of the option. For a qualitative description of both hyperparameters, refer to Section 3.3. This experiment shows that DSC is fairly robust to most reasonable choices of these parameters. All experiments averaged over 5 runs. Error bars denote 1 standard deviation. Higher is better.
|
| 332 |
+
|
| 333 |
+
#
|
| 334 |
+
|
| 335 |
+
A.5 ALGORITHM PSEUDO-CODE
|
| 336 |
+
|
| 337 |
+
<table><tr><td>Algorithm1: Deep Skill Chaining So is the start state of the MDP</td></tr><tr><td>1g(s) := 1 if s is a target state in the MDP, O otherwise</td></tr><tr><td>Given hyperparameter To, the time budget for discovered, temporally extended options Global option: 0G = (Iog,Tog,βoG = 1g,T=1) Goaloption:0g=(Igβog=1g,T=T)</td></tr><tr><td>Agent's option repertoire: O={0G}</td></tr><tr><td>Untrained Option: ou = og //option whose initiation classifier is yet unlearned</td></tr><tr><td></td></tr><tr><td>Policy over options: πo: St → 0t</td></tr><tr><td>St = S0</td></tr><tr><td>while not st.is_terminal() do</td></tr><tr><td>1. Pick new option and execute in environment</td></tr><tr><td>Choose Ot according to πo(st) using Equations 2 and 3</td></tr><tr><td>rt:t,St+r = execute_option(Ot)</td></tr><tr><td>TO.update(St, Ot, rt:t+r, St+r) using Equation 4</td></tr><tr><td>2.Learn initiation set of new option</td></tr><tr><td>// Collect trajectories that trigger Ou's termination region unless we have finished chaining</td></tr><tr><td>if βou(st+r)&(soeI∀oi ∈O) then ou.learn_initiation_classifier() using procedure described in Section 3.3</td></tr><tr><td>if ou.initiation_classifier_is_trained() then</td></tr><tr><td>T.add(ou) using procedure described in Section 3.2</td></tr><tr><td>O.append(ou)</td></tr><tr><td>Ou = create_child_option(ou)</td></tr><tr><td>end</td></tr><tr><td>end</td></tr><tr><td>end</td></tr><tr><td>Function create_child_option (o) : " Create a new option whose β is the parent's I.</td></tr><tr><td>0* = Option() // Create a new option</td></tr><tr><td>Lo* =None</td></tr><tr><td>β*=I</td></tr><tr><td>return 0*</td></tr><tr><td>Function execute_option (ot) :</td></tr><tr><td>""” Option control loop. ;””</td></tr><tr><td>to=t</td></tr><tr><td>Tis the option's episodic time budget</td></tr><tr><td>Tot is the option's internal policy</td></tr><tr><td></td></tr><tr><td>while not βot(st)&t<Tdo</td></tr><tr><td>at= Tot(St;0ot)</td></tr><tr><td>Tt, St+1 = env.step(at)</td></tr><tr><td></td></tr><tr><td>St=St+1</td></tr><tr><td>t=t+1</td></tr><tr><td></td></tr><tr><td></td></tr><tr><td>end</td></tr><tr><td></td></tr><tr><td>T=t// duration ofoption execution</td></tr></table>
|
| 338 |
+
|
| 339 |
+
# A.6 MORE DETAILS ON IMPLEMENTING OPTION REWARD FUNCTIONS
|
| 340 |
+
|
| 341 |
+
Section 3.1 explains that to learn an option’s intra-option policy, we must define its internal reward function. While most of our experiments are conducted in the sparse-reward setting, deep skill chaining can be used without much modification in dense reward tasks as well. All that remains is a clear description of how each option’s internal reward function would be defined in such a setting.
|
| 342 |
+
|
| 343 |
+
Consider an option $o _ { i }$ with parent option $o _ { i - 1 }$ such that $\beta _ { o _ { i } } = \mathcal { T } _ { o _ { i - 1 } }$ . In the dense reward setting, we use the negative distance from the state to the parent option’s initiation classifier as the reward function. Since initiation classifiers are represented using parametric classifiers, computing the distance to the classifier’s decision boundary is straightforward and can be done using most popular machine learning frameworks. For instance, when using scikit-learn (Pedregosa et al., 2011), this is implemented as follows:
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
R _ { o } ( s , a , s ^ { \prime } ) = \left\{ \begin{array} { l l } { 0 , } & { \mathrm { i f ~ } \beta _ { o } ( s ^ { \prime } ) = 1 } \\ { - \mathscr { T } _ { o _ { i - 1 } . \mathrm { d e c i s i o n . f u n c t i o n } ( s ^ { \prime } ) , } } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
Where in Equation 5, decision function $( x )$ returns the distance in feature space between point $\boldsymbol { x } \in \mathbb { R } ^ { \dot { N } }$ and the decision boundary learned by the classifier $\mathcal { T } _ { o _ { i - 1 } }$ .
|
| 350 |
+
|
| 351 |
+
# A.7 LEARNING INITIATION SET CLASSIFIERS
|
| 352 |
+
|
| 353 |
+
To learn initiation set classifiers as described in Section 3.3, we used scikit-learn’s One-Class SVM and Two-Class SVM packages (Pedregosa et al., 2011). Initiation set classifiers were learned on a subset of the state variables available in the domain. For instance, in the Lock and Key domain, the initiation set classifier was learned over the $x , y$ position and the has key indicator variable. This is similar to other methods like HAC (Levy et al., 2019) which require the user to specify the dimensions of the state variable necessary to achieve the overall goal of the MDP. Incorporating the entire state variable to learn initiation set classifiers or using neural networks for automatic feature extraction should be straightforward and is left as future work.
|
| 354 |
+
|
| 355 |
+
# A.8 HYPERPARAMETER SETTINGS
|
| 356 |
+
|
| 357 |
+
We divide the full set of hyperparameters that our algorithm depends on into two groups: those that are common to all algorithms that use DDPG (Table 2), and those that are specific to skill chaining (Table 3). We did not try to optimize over the space of DDPG hyperparameters, and used the ones used in previous work (Lillicrap et al., 2015; Fujimoto et al., 2018). Table 3 shows the hyperparameters that we chose on the different tasks considered in this paper. Most of them are concerned with learning initiation set classifiers, the difficulty of which varies based on domain. To determine the correct setting of these parameters, we usually visualized the learned initiation set classifiers during the course of training (like Figures 2 and 6), and made adjustments accordingly.
|
| 358 |
+
|
| 359 |
+
Table 2: DDPG Hyperparameters
|
| 360 |
+
|
| 361 |
+
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Replay buffer size</td><td>1e6</td></tr><tr><td>Batch size</td><td>64</td></tr><tr><td>Y</td><td>0.99</td></tr><tr><td>T</td><td>0.01</td></tr><tr><td>Number of hidden layers</td><td>2</td></tr><tr><td>Hidden size 1</td><td>400</td></tr><tr><td>Hidden size 2</td><td>300</td></tr><tr><td>Critic learning rate</td><td>1e-3</td></tr><tr><td>Actor learning rate</td><td>le-4</td></tr></table>
|
| 362 |
+
|
| 363 |
+
Table 3: Deep Skill Chaining Hyperparameters
|
| 364 |
+
|
| 365 |
+
<table><tr><td>Parameter</td><td> Point Maze</td><td>Four Rooms</td><td>Reacher</td><td> Ant Maze</td><td>E-Maze</td></tr><tr><td>Gestation Period (N)</td><td>5</td><td>10</td><td>5</td><td>1</td><td>5</td></tr><tr><td>Initiation Period</td><td>1</td><td>10</td><td>3</td><td>0</td><td>1</td></tr><tr><td>Buffer Length (K)</td><td>20</td><td>20</td><td>20</td><td>750</td><td>20</td></tr><tr><td>Option Max Time Steps (T)</td><td>100</td><td>150</td><td>150</td><td>100</td><td>100</td></tr></table>
|
| 366 |
+
|
| 367 |
+
# A.9 COMPUTE INFRASTRUCTURE
|
| 368 |
+
|
| 369 |
+
We used 1 NVIDIA GeForce 2080 Ti, 2 NVIDIA GeForce $2 0 7 0 \mathrm { T i }$ and 2 Tesla K80s on the Google Cloud compute infrastructure to perform all experiments reported in this paper.
|
| 370 |
+
|
| 371 |
+
# A.10 NOTE ON COMPUTATION TIME
|
| 372 |
+
|
| 373 |
+
Each option is parameterized by its own neural networks, which are only updated when the agent is inside that option’s initiation set. For a given transition, this leads to at most two or three updates. In Point-Maze, updating all options on a transition took $0 . 0 0 4 \pm 0 . 0 0 0 3$ s more than just updating the global DDPG agent (averaged over 300 episodes using 1 NVIDIA 2080 Ti GPU) - a trivial amount of extra computation time.
|
md/train/B1l8BtlCb/B1l8BtlCb.md
ADDED
|
@@ -0,0 +1,318 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NON-AUTOREGRESSIVE NEURAL MACHINE TRANSLATION
|
| 2 |
+
|
| 3 |
+
Jiatao $\mathbf { G u } ^ { \dagger }$ ∗, James Bradbury‡, Caiming Xiong‡, Victor O.K. Li†& Richard Socher‡
|
| 4 |
+
|
| 5 |
+
‡Salesforce Research
|
| 6 |
+
{james.bradbury,cxiong,rsocher}@salesforce.com
|
| 7 |
+
†The University of Hong Kong
|
| 8 |
+
{jiataogu, vli}@eee.hku.hk
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Existing approaches to neural machine translation condition each output word on previously generated outputs. We introduce a model that avoids this autoregressive property and produces its outputs in parallel, allowing an order of magnitude lower latency during inference. Through knowledge distillation, the use of input token fertilities as a latent variable, and policy gradient fine-tuning, we achieve this at a cost of as little as 2.0 BLEU points relative to the autoregressive Transformer network used as a teacher. We demonstrate substantial cumulative improvements associated with each of the three aspects of our training strategy, and validate our approach on IWSLT 2016 English–German and two WMT language pairs. By sampling fertilities in parallel at inference time, our non-autoregressive model achieves near-state-of-the-art performance of 29.8 BLEU on WMT 2016 English– Romanian.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
Neural network based models outperform traditional statistical models for machine translation (MT) (Bahdanau et al., 2015; Luong et al., 2015). However, state-of-the-art neural models are much slower than statistical MT approaches at inference time (Wu et al., 2016). Both model families use autoregressive decoders that operate one step at a time: they generate each token conditioned on the sequence of tokens previously generated. This process is not parallelizable, and, in the case of neural MT models, it is particularly slow because a computationally intensive neural network is used to generate each token.
|
| 17 |
+
|
| 18 |
+
While several recently proposed models avoid recurrence at train time by leveraging convolutions (Kalchbrenner et al., 2016; Gehring et al., 2017; Kaiser et al., 2017) or self-attention (Vaswani et al., 2017) as more-parallelizable alternatives to recurrent neural networks (RNNs), use of autoregressive decoding makes it impossible to take full advantage of parallelism during inference.
|
| 19 |
+
|
| 20 |
+
We introduce a non-autoregressive translation model based on the Transformer network (Vaswani et al., 2017). We modify the encoder of the original Transformer network by adding a module that predicts fertilities, sequences of numbers that form an important component of many traditional machine translation models (Brown et al., 1993). These fertilities are supervised during training and provide the decoder at inference time with a globally consistent plan on which to condition its simultaneously computed outputs.
|
| 21 |
+
|
| 22 |
+
# 2 BACKGROUND
|
| 23 |
+
|
| 24 |
+
# 2.1 AUTOREGRESSIVE NEURAL MACHINE TRANSLATION
|
| 25 |
+
|
| 26 |
+
Given a source sentence $X = \{ x _ { 1 } , . . . , x _ { T ^ { \prime } } \}$ , a neural machine translation model factors the distribution over possible output sentences $Y = \{ y _ { 1 } , . . . , y _ { T } \}$ into a chain of conditional probabilities with a
|
| 27 |
+
|
| 28 |
+
left-to-right causal structure:
|
| 29 |
+
|
| 30 |
+
$$
|
| 31 |
+
p _ { \mathcal { A } \mathcal { R } } ( \boldsymbol { Y } | \boldsymbol { X } ; \theta ) = \prod _ { t = 1 } ^ { T + 1 } p ( y _ { t } | y _ { 0 : t - 1 } , x _ { 1 : T ^ { \prime } } ; \theta ) ,
|
| 32 |
+
$$
|
| 33 |
+
|
| 34 |
+
where the special tokens $y _ { 0 }$ (e.g. $\left. \mathrm { b o s } \right.$ ) and $y _ { T + 1 }$ (e.g. $\langle \cos \rangle$ ) are used to represent the beginning and end of all target sentences. These conditional probabilities are parameterized using a neural network. Typically, an encoder-decoder architecture (Sutskever et al., 2014) with a unidirectional RNN-based decoder is used to capture the causal structure of the output distribution.
|
| 35 |
+
|
| 36 |
+
Maximum Likelihood training Choosing to factorize the machine translation output distribution autoregressively enables straightforward maximum likelihood training with a cross-entropy loss applied at each decoding step:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\mathcal { L } _ { \mathrm { M L } } = \log p _ { \mathcal { A R } } ( Y | X ; \theta ) = \sum _ { t = 1 } ^ { T + 1 } \log p ( y _ { t } | y _ { 0 : t - 1 } , x _ { 1 : T ^ { \prime } } ; \theta ) .
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
This loss provides direct supervision for each conditional probability prediction.
|
| 43 |
+
|
| 44 |
+
Autoregressive NMT without RNNs Since the entire target translation is known at training time, the calculation of later conditional probabilities (and their corresponding losses) does not depend on the output words chosen during earlier decoding steps. Even though decoding must remain entirely sequential during inference, models can take advantage of this parallelism during training. One such approach replaces recurrent layers in the decoder with masked convolution layers (Kalchbrenner et al., 2016; Gehring et al., 2017) that provide the causal structure required by the autoregressive factorization.
|
| 45 |
+
|
| 46 |
+
A recently introduced option which reduces sequential computation still further is to construct the decoder layers out of self-attention computations that have been causally masked in an analogous way. The state-of-the-art Transformer network takes this approach, which allows information to flow in the decoder across arbitrarily long distances in a constant number of operations, asymptotically fewer than required by convolutional architectures (Vaswani et al., 2017).
|
| 47 |
+
|
| 48 |
+
# 2.2 NON-AUTOREGRESSIVE DECODING
|
| 49 |
+
|
| 50 |
+
Pros and cons of autoregressive decoding The autoregressive factorization used by conventional NMT models has several benefits. It corresponds to the word-by-word nature of human language production and effectively captures the distribution of real translations. Autoregressive models achieve state-of-the-art performance on large-scale corpora and are easy to train, while beam search provides an effective local search method for finding approximately-optimal output translations.
|
| 51 |
+
|
| 52 |
+
But there are also drawbacks. As the individual steps of the decoder must be run sequentially rather than in parallel, autoregressive decoding prevents architectures like the Transformer from fully realizing their train-time performance advantage during inference. Meanwhile, beam search suffers from diminishing returns with respect to beam size (Koehn & Knowles, 2017) and exhibits limited search parallelism because it introduces computational dependence between beams.
|
| 53 |
+
|
| 54 |
+
Towards non-autoregressive decoding A na¨ıve solution is to remove the autoregressive connection directly from an existing encoder-decoder model. Assuming that the target sequence length $T$ can be modeled with a separate conditional distribution $p _ { L }$ , this becomes
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
Figure 1: Translating “A B C” to $^ { 6 6 } \mathrm { X }$ Y” using autoregressive and non-autoregressive neural MT architectures. The latter generates all output tokens in parallel.
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
p _ { \mathcal N A } ( Y | X ; \theta ) = p _ { L } ( T | x _ { 1 : T ^ { \prime } } ; \theta ) \cdot \prod _ { t = 1 } ^ { T } p ( y _ { t } | x _ { 1 : T ^ { \prime } } ; \theta ) .
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
This model still has an explicit likelihood function, and it can still be trained using independent cross-entropy losses on each output distribution. Now, however, these distributions can be computed in parallel at inference time.
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 2: The architecture of the NAT, where the black solid arrows represent differentiable connections and the purple dashed arrows are non-differentiable operations. Each sublayer inside the encoder and decoder stacks also includes layer normalization and a residual connection.
|
| 67 |
+
|
| 68 |
+
# 2.3 THE MULTIMODALITY PROBLEM
|
| 69 |
+
|
| 70 |
+
However, this na¨ıve approach does not yield good results, because such a model exhibits complete conditional independence. Each token’s distribution $p ( y _ { t } )$ depends only on the source sentence $X$ . This makes it a poor approximation to the true target distribution, which exhibits strong correlation across time. Intuitively, such a decoder is akin to a panel of human translators each asked to provide a single word of a translation independently of the words their colleagues choose.
|
| 71 |
+
|
| 72 |
+
In particular, consider an English source sentence like “Thank you.” This can be accurately translated into German as any one of “Danke.”, “Danke schon.”, or “Vielen Dank.”, all of which may ¨ occur in a given training corpus. This target distribution cannot be represented as a product of independent probability distributions for each of the first, second, and third words, because a conditionally independent distribution cannot allow “Danke schon.” and “Vielen Dank.” without also ¨ licensing “Danke Dank.” and “Vielen schon.”¨
|
| 73 |
+
|
| 74 |
+
The conditional independence assumption prevents a model from properly capturing the highly multimodal distribution of target translations. We call this the “multimodality problem” and introduce both a modified model and new training techniques to tackle this issue.
|
| 75 |
+
|
| 76 |
+
# 3 THE NON-AUTOREGRESSIVE TRANSFORMER (NAT)
|
| 77 |
+
|
| 78 |
+
We introduce a novel NMT model—the Non-Autoregressive Transformer (NAT)—that can produce an entire output translation in parallel. As shown in Fig. 2, the model is composed of the following four modules: an encoder stack, a decoder stack, a newly added fertility predictor (details in 3.3), and a translation predictor for token decoding.
|
| 79 |
+
|
| 80 |
+
# 3.1 ENCODER STACK
|
| 81 |
+
|
| 82 |
+
Similar to the autoregressive Transformer, both the encoder and decoder stacks are composed entirely of feed-forward networks (MLPs) and multi-head attention modules. Since no RNNs are used, there is no inherent requirement for sequential execution, making non-autoregressive decoding possible. For our proposed NAT, the encoder stays unchanged from the original Transformer network.
|
| 83 |
+
|
| 84 |
+
# 3.2 DECODER STACK
|
| 85 |
+
|
| 86 |
+
In order to translate non-autoregressively and parallelize the decoding process, we modify the decoder stack as follows.
|
| 87 |
+
|
| 88 |
+
Decoder Inputs Before decoding starts, the NAT needs to know how long the target sentence will be in order to generate all words in parallel. More crucially, we cannot use time-shifted target outputs (during training) or previously predicted outputs (during inference) as the inputs to the first decoder layer. Omitting inputs to the first decoder layer entirely, or using only positional embeddings, resulted in very poor performance. Instead, we initialize the decoding process using copied source inputs from the encoder side. As the source and target sentences are often of different lengths, we propose two methods:
|
| 89 |
+
|
| 90 |
+
• Copy source inputs uniformly: Each decoder input $t$ is a copy of the Round $( T ^ { \prime } t / T )$ -th encoder input. This is equivalent to “scanning” source inputs from left to right with a constant “speed,” and results in a decoding process that is deterministic given a (predicted) target length. • Copy source inputs using fertilities: A more powerful way, depicted in Fig. 2 and discussed in more detail below, is to copy each encoder input as a decoder input zero or more times, with the number of times each input is copied referred to as that input word’s “fertility.” In this case the source inputs are scanned from left to right at a “speed” that varies inversely with the fertility of each input; the decoding process is now conditioned on the sequence of fertilities, while the resulting output length is determined by the sum of all fertility values.
|
| 91 |
+
|
| 92 |
+
Non-causal self-attention Without the constraint of an autoregressive factorization of the output distribution, we no longer need to prevent earlier decoding steps from accessing information from later steps. Thus we can avoid the causal mask used in the self-attention module of the conventional Transformer’s decoder. Instead, we mask out each query position only from attending to itself, which we found to improve decoder performance relative to unmasked self-attention.
|
| 93 |
+
|
| 94 |
+
Positional attention We also include an additional positional attention module in each decoder layer, which is a multi-head attention module with the same general attention mechanism used in other parts of the Transformer network, i.e.
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
{ \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 _ { \mathrm { m o d e l } } } } } \right) \cdot V ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $d _ { \mathrm { m o d e l } }$ is the model hidden size, but with the positional encoding1 as both query and key and the decoder states as the value. This incorporates positional information directly into the attention process and provides a stronger positional signal than the embedding layer alone. We also hypothesize that this additional information improves the decoder’s ability to perform local reordering.
|
| 101 |
+
|
| 102 |
+
# 3.3 MODELING FERTILITY TO TACKLE THE MULTIMODALITY PROBLEM
|
| 103 |
+
|
| 104 |
+
The multimodality problem can be attacked by introducing a latent variable $z$ to directly model the nondeterminism in the translation process: we first sample $z$ from a prior distribution and then condition on $z$ to non-autoregressively generate a translation.
|
| 105 |
+
|
| 106 |
+
One way to interpret this latent variable is as a sentence-level “plan” akin to those discussed in the language production literature (Martin et al., 2010). There are several desirable properties for this latent variable:
|
| 107 |
+
|
| 108 |
+
• It should be simple to infer a value for the latent variable given a particular input-output pair, as this is needed to train the model end-to-end. • Adding $z$ to the conditioning context should account as much as possible for the correlations across time between different outputs, so that the remaining marginal probabilities at each output location are as close as possible to satisfying conditional independence. • It should not account for the variation in output translations so directly that $p ( y | x , z )$ becomes trivial to learn, since that is the function our decoder neural network will approximate.
|
| 109 |
+
|
| 110 |
+
The factorization by length introduced in Eq. 3 provides a very weak example of a latent variable model, satisfying the first and third property but not the first. We propose the use of fertilities instead. These are integers for each word in the source sentence that correspond to the number of words in the target sentence that can be aligned to that source word using a hard alignment algorithm like IBM Model 2 (Brown et al., 1993).
|
| 111 |
+
|
| 112 |
+
One of the most important properties of the proposed NAT is that it naturally introduces an informative latent variable when we choose to copy the encoder inputs based on predicted fertilities. More precisely, given a source sentence $X$ , the conditional probability of a target translation $Y$ is:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
p _ { \mathcal N \mathcal M } ( Y | X ; \theta ) = \sum _ { f _ { 1 } , . . . , f _ { T ^ { \prime } } \in \mathcal F } \left( \prod _ { t ^ { \prime } = 1 } ^ { T ^ { \prime } } p _ { F } ( f _ { t ^ { \prime } } | x _ { 1 : T ^ { \prime } } ; \theta ) \cdot \prod _ { t = 1 } ^ { T } p ( y _ { t } | x _ { 1 } \{ f _ { 1 } \} , . . , x _ { T ^ { \prime } } \{ f _ { T ^ { \prime } } \} ; \theta ) \right)
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where value $\begin{array} { r } { \mathcal { F } = \{ f _ { 1 } , . . . , f _ { T ^ { \prime } } | \sum _ { t ^ { \prime } = 1 } ^ { T ^ { \prime } } f _ { t ^ { \prime } } = T , f _ { t ^ { \prime } } \in \mathbb { Z } ^ { * } \} } \end{array}$ is thand of all fertility sequdenotes the token ces—onerepeated ertilitytimes. $Y$ $x \{ f \}$ $x$ $f$
|
| 119 |
+
|
| 120 |
+
Fertility prediction As shown in Fig. 2, we model the fertility $p _ { F } \big ( f _ { t ^ { \prime } } | x _ { 1 : T ^ { \prime } } \big )$ at each position independently using a one-layer neural network with a softmax classifier $L = 5 0$ in our experiments) on top of the output of the last encoder layer. This models the way that fertility values are a property of each input word but depend on information and context from the entire sentence.
|
| 121 |
+
|
| 122 |
+
Benefits of fertility Fertilities possess all three of the properties listed earlier as desired of a latent variable for non-autoregressive machine translation:
|
| 123 |
+
|
| 124 |
+
• An external aligner provides a simple and fast approximate inference model that effectively reduces the unsupervised training problem to two supervised ones.
|
| 125 |
+
• Using fertilities as a latent variable makes significant progress towards solving the multimodality problem by providing a natural factorization of the output space. Given a source sentence, restricting the output distribution to those target sentences consistent with a particular fertility sequence dramatically reduces the mode space. Furthermore, the global choice of mode is factored into a set of local mode choices: namely, how to translate each input word. These local mode choices can be effectively supervised because the fertilities provide a fixed “scaffold.”
|
| 126 |
+
Including both fertilities and reordering in the latent variable would provide complete alignment statistics. This would make the decoding function trivially easy to approximate given the latent variable and force all of the modeling complexity into the encoder. Using fertilities alone allows the decoder to take some of this burden off of the encoder.
|
| 127 |
+
|
| 128 |
+
Our use of fertilities as a latent variable also means that there is no need to have a separate means of explicitly modeling the length of the translation, which is simply the sum of fertilities. And fertilities provide a powerful way to condition the decoding process, allowing the model to generate diverse translations by sampling over the fertility space.
|
| 129 |
+
|
| 130 |
+
# 3.4 TRANSLATION PREDICTOR AND THE DECODING PROCESS
|
| 131 |
+
|
| 132 |
+
At inference time, the model can identify the translation with the highest conditional probability (see Eq. 5) by marginalizing over all possible latent fertility sequences. Given a fertility sequence, however, identifying the optimal translation only requires independently maximizing the local probability for each output position. We define $Y \overset { \cdot } { = } G ( x _ { 1 : T ^ { \prime } } , f _ { 1 : T ^ { \prime } } ; \theta )$ to represent the optimal translation given a source sentence and a sequence of fertility values.
|
| 133 |
+
|
| 134 |
+
But searching and marginalizing over the whole fertility space is still intractable. We propose three heuristic decoding algorithms to reduce the search space of the NAT model:
|
| 135 |
+
|
| 136 |
+
Argmax decoding Since the fertility sequence is also modeled with a conditionally independent factorization, we can simply estimate the best translation by choosing the highest-probability fertility for each input word:
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\hat { Y } _ { \mathrm { a r g m a x } } = G ( x _ { 1 : T ^ { \prime } } , \hat { f } _ { 1 : T ^ { \prime } } ; \theta ) , \mathrm { w h e r e \ } \hat { f } _ { t ^ { \prime } } = \underset { f } { \operatorname { a r g m a x } } p _ { F } ( f _ { t ^ { \prime } } | x _ { 1 : T ^ { \prime } } ; \theta )
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
Average decoding We can also estimate each fertility as the expectation of its corresponding softmax distribution:
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\hat { Y } _ { \mathrm { a v e r a g e } } = G ( x _ { 1 : T ^ { \prime } } , \hat { f } _ { 1 : T ^ { \prime } } ; \theta ) , \mathrm { w h e r e } \hat { f } _ { t ^ { \prime } } = \mathrm { R o u n d } \left( \sum _ { f _ { t ^ { \prime } } = 1 } ^ { L } p _ { F } \big ( f _ { t ^ { \prime } } | x _ { 1 : T ^ { \prime } } ; \theta \big ) f _ { t ^ { \prime } } \right)
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
Noisy parallel decoding (NPD) A more accurate approximation of the true optimum of the target distribution, inspired by Cho (2016), is to draw samples from the fertility space and compute the best translation for each fertility sequence. We can then use the autoregressive teacher to identify the best overall translation:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\hat { Y } _ { \mathrm { N P D } } = G ( x _ { 1 : T ^ { \prime } } , \underset { f _ { t ^ { \prime } } \sim p _ { F } } { \mathrm { a r g m a x } } p _ { \mathcal { A R } } ( G ( x _ { 1 : T ^ { \prime } } , f _ { 1 : T ^ { \prime } } ; \theta ) | X ; \theta ) ; \theta )
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
Note that, when using an autoregressive model as a scoring function for a set of decoded translations, it can run as fast as it does at train time because it can be provided with all decoder inputs in parallel.
|
| 155 |
+
|
| 156 |
+
NPD is a stochastic search method, and it also increases the computational resources required linearly by the sample size. However, because all the search samples can be computed and scored entirely independently, the process only doubles the latency compared to computing a single translation if sufficient parallelism is available.
|
| 157 |
+
|
| 158 |
+
# 4 TRAINING
|
| 159 |
+
|
| 160 |
+
The proposed NAT contains a discrete sequential latent variable $f _ { 1 : T ^ { \prime } }$ , whose conditional posterior distribution $p ( f _ { 1 : T ^ { \prime } } | x _ { 1 : T ^ { \prime } } , y _ { 1 : T } ; \theta )$ we can approximate using a proposal distribution $q ( f _ { 1 : T ^ { \prime } } | x _ { 1 : T ^ { \prime } } , y _ { 1 : T } )$ . This provides a variational bound for the overall maximum likelihood loss:
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\begin{array} { r l } & { \mathcal { L } _ { \mathrm { M L } } = \log p _ { \mathcal { N A } } ( Y | X ; \theta ) = \log \displaystyle \sum _ { f _ { 1 : T ^ { \prime } } \in \mathcal { F } } p _ { F } ( f _ { 1 : T ^ { \prime } } | x _ { 1 : T ^ { \prime } } ; \theta ) \cdot p ( y _ { 1 : T } | x _ { 1 : T ^ { \prime } } , f _ { 1 : T ^ { \prime } } ; \theta ) } \\ & { \geq \displaystyle \sum _ { f _ { 1 : T ^ { \prime } \sim \mathcal { I } } } \left( \underbrace { T } _ { \mathrm { t - 1 } } \log p ( y _ { t } | x _ { 1 } \{ f _ { 1 } \} , . . . , x _ { T ^ { \prime } } \{ f _ { T ^ { \prime } } \} ; \theta ) \right)} _ { \mathrm { T r a n s l a t i o n ~ L o s s } } + \underbrace { \sum _ { t ^ { \prime } = 1 } ^ { T ^ { \prime } } \log p _ { F } ( f _ { t ^ { \prime } } | x _ { 1 : T ^ { \prime } } ; \theta ) } _ { \mathrm { F e r t i l i t y ~ L o s s } } + \mathcal { H } ( q ) \end{array}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
We choose a proposal distribution $q$ defined by a separate, fixed fertility model. Possible options include the output of an external aligner, which produces a deterministic sequence of integer fertilities for each (source, target) pair in a training corpus, or fertilities computed from the attention weights used in our fixed autoregressive teacher model. This simplifies the inference process considerably, as the expectation over $q$ is deterministic.
|
| 167 |
+
|
| 168 |
+
The resulting loss function, consisting of the two bracketed terms in Eq. 9, allows us to train the entire model in a supervised fashion, using the inferred fertilities to simultaneously train the translation model $p$ and supervise the fertility neural network model $p _ { F }$ .
|
| 169 |
+
|
| 170 |
+
# 4.1 SEQUENCE-LEVEL KNOWLEDGE DISTILLATION
|
| 171 |
+
|
| 172 |
+
While the latent fertility model substantially improves the ability of the non-autoregressive output distribution to approximate the multimodal target distribution, it does not completely solve the problem of nondeterminism in the training data. In many cases, there are multiple correct translations consistent with a single sequence of fertilities—for instance, both “Danke schon.” and “Vielen ¨ dank.” are consistent with the English input “Thank you.” and the fertility sequence [2, 0, 1], because “you” is not directly translated in either German sentence.
|
| 173 |
+
|
| 174 |
+
Thus we additionally apply sequence-level knowledge distillation (Kim & Rush, 2016) to construct a new corpus by training an autoregressive machine translation model, known as the teacher, on an existing training corpus, then using that model’s greedy outputs as the targets for training the nonautoregressive student. The resulting targets are less noisy and more deterministic, as the trained model will consistently translate a sentence like “Thank you.” into the same German translation every time; on the other hand, they are also lower in quality than the original dataset.
|
| 175 |
+
|
| 176 |
+
# 4.2 FINE-TUNING
|
| 177 |
+
|
| 178 |
+
Our supervised fertility model enables a decomposition of the overall maximum likelihood loss into translation and fertility terms, but it has some drawbacks compared to variational training. In particular, it heavily relies on the deterministic, approximate inference model provided by the external alignment system, while it would be desirable to train the entire model, including the fertility predictor, end to end.
|
| 179 |
+
|
| 180 |
+
Thus we propose a fine-tuning step after training the NAT to convergence. We introduce an additional loss term consisting of the reverse K-L divergence with the teacher output distribution, a form of word-level knowledge distillation:
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\mathcal { L } _ { \mathrm { R K L } } \left( f _ { 1 : T ^ { \prime } } ; \theta \right) = \sum _ { t = 1 } ^ { T } \sum _ { y _ { t } } \left[ \log p _ { \mathcal { A R } } \left( y _ { t } | \hat { y } _ { 1 : t - 1 } , x _ { 1 : T ^ { \prime } } \right) \cdot p _ { \mathcal { N A } } \left( y _ { t } | x _ { 1 : T ^ { \prime } } , f _ { 1 : T ^ { \prime } } ; \theta \right) \right] ,
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
where $\hat { y } _ { 1 : T } = G ( x _ { 1 : T ^ { \prime } } , f _ { 1 : T ^ { \prime } } ; \theta )$ . Such a loss is more favorable towards highly peaked student output distributions than a standard cross-entropy error would be.
|
| 187 |
+
|
| 188 |
+
Then we train the whole model jointly with a weighted sum of the original distillation loss and two such terms, one an expectation over the predicted fertility distribution, normalized with a baseline, and the other based on the external fertility inference model:
|
| 189 |
+
|
| 190 |
+
$$
|
| 191 |
+
\mathcal { L } _ { \mathrm { F T } } = \lambda \left( \underbrace { \mathbb { E } } _ { \int _ { \mathrm { I : T : } } r \sim p _ { F } } \left( \mathcal { L } _ { \mathrm { R K L } } \left( f _ { 1 : T ^ { \prime } } \right) - \mathcal { L } _ { \mathrm { R K L } } \left( \bar { f } _ { 1 : T ^ { \prime } } \right) \right) + \underbrace { \mathbb { E } } _ { f _ { 1 : T ^ { \prime } \sim q } } \left( \mathcal { L } _ { \mathrm { R K L } } \left( f _ { 1 : T ^ { \prime } } \right) \right) _ { \mathcal { L } _ { \mathrm { R P } } } \right) + ( 1 - \lambda ) \mathcal { L } _ { \mathrm { K D } } ,
|
| 192 |
+
$$
|
| 193 |
+
|
| 194 |
+
where ${ \bar { f } } _ { 1 : T ^ { \prime } }$ is the average fertility computed by Eq. 7. The gradient with respect to the nondifferentiable ${ \mathcal { L } } _ { \mathrm { R L } }$ term can be estimated with REINFORCE (Williams, 1992), while the $\mathcal { L } _ { \mathrm { B P } }$ term can be trained using ordinary backpropagation.
|
| 195 |
+
|
| 196 |
+
# 5 EXPERIMENTS
|
| 197 |
+
|
| 198 |
+
# 5.1 EXPERIMENTAL SETTINGS
|
| 199 |
+
|
| 200 |
+
Dataset We evaluate the proposed NAT on three widely used public machine translation corpora: IWSLT16 En–De2, WMT14 En–De,3 and WMT16 En–Ro4. We use IWSLT—which is smaller than the other two datasets—as the development dataset for ablation experiments, and additionally train and test our primary models on both directions of both WMT datasets. All the data are tokenized and segmented into subword symbols using byte-pair encoding (BPE) (Sennrich et al., 2015) to restrict the size of the vocabulary. For both WMT datasets, we use shared BPE vocabulary and additionally share encoder and decoder word embeddings; for IWSLT, we use separate English and German vocabulary and embeddings.
|
| 201 |
+
|
| 202 |
+
Teacher Sequence-level knowledge distillation is applied to alleviate multimodality in the training dataset, using autoregressive models as the teachers. The same teacher model used for distillation is also used as a scoring function for fine-tuning and noisy parallel decoding.
|
| 203 |
+
|
| 204 |
+
To enable a fair comparison, and benefit from its high translation quality, we implemented the autoregressive teachers using the state-of-the-art Transformer architecture. In addition, we use the same sizes and hyperparameters for each student and its respective teacher, with the exception of the newly added positional self-attention and fertility prediction modules.
|
| 205 |
+
|
| 206 |
+
<table><tr><td rowspan="2">Models</td><td colspan="2">WMT14</td><td colspan="2">WMT16</td><td colspan="2">IWSLT16</td><td></td></tr><tr><td>En→De</td><td>De→En</td><td>En→Ro</td><td>Ro→En</td><td>En→De</td><td>Latency / Speedup</td><td></td></tr><tr><td>NAT</td><td>17.35</td><td>20.62</td><td>26.22</td><td>27.83</td><td>25.20</td><td>39 ms</td><td>15.6×</td></tr><tr><td>NAT (+FT)</td><td>17.69</td><td>21.47</td><td>27.29</td><td>29.06</td><td>26.52</td><td>39 ms</td><td>15.6×</td></tr><tr><td>NAT (+FT + NPD s = 10)</td><td>18.66</td><td>22.41</td><td>29.02</td><td>30.76</td><td>27.44</td><td>79 ms</td><td>7.68×</td></tr><tr><td>NAT (+FT + NPD s = 100)</td><td>19.17</td><td>23.20</td><td>29.79</td><td>31.44</td><td>28.16</td><td>257 ms</td><td>2.36×</td></tr><tr><td>Autoregressive (b = 1)</td><td>22.71</td><td>26.39</td><td>31.35</td><td>31.03</td><td>28.89</td><td>408 ms</td><td>1.49×</td></tr><tr><td>Autoregressive (b = 4)</td><td>23.45</td><td>27.02</td><td>31.91</td><td>31.76</td><td>29.70</td><td>607ms</td><td>1.00×</td></tr></table>
|
| 207 |
+
|
| 208 |
+
Table 1: BLEU scores on official test sets (newstest2014 for WMT En-De and newstest2016 for WMT En-Ro) or the development set for IWSLT. NAT models without NPD use argmax decoding. Latency is computed as the time to decode a single sentence without minibatching, averaged over the whole test set; decoding is implemented in PyTorch on a single NVIDIA Tesla P100.
|
| 209 |
+
|
| 210 |
+
Preparation for knowledge distillation We first train all teacher models using maximum likelihood, then freeze their parameters. To avoid the redundancy of running fixed teacher models repeatedly on the same data, we decode the entire training set once using each teacher to create a new training dataset for its respective student.
|
| 211 |
+
|
| 212 |
+
Encoder initialization We find it helpful to initialize the weights in the NAT student’s encoder with the encoder weights from its teacher, as the autoregressive and non-autoregressive models share the same encoder input and architecture.
|
| 213 |
+
|
| 214 |
+
Fertility supervision during training As described above, we supervise the fertility predictions at train time by using a fixed aligner as a fertility inference function. We use the fast align5 implementation of IBM Model 2 for this purpose, with default parameters (Dyer et al., 2013).
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 3: BLEU scores on IWSLT development set as a function of sample size for noisy parallel decoding. NPD matches the performance of the other two decoding strategies after two samples, and exceeds the performance of the autoregressive teacher with around 1000.
|
| 218 |
+
|
| 219 |
+
Hyperparameters For experiments on WMT datasets, we use the hyperparameter settings of the base Transformer model described in Vaswani et al. (2017), though without label smoothing. As IWSLT is a smaller corpus, and to reduce training time, we use a set of smaller hyperparameters $( d _ { \mathrm { m o d e l } } = 2 8 7 , d _ { \mathrm { h i d d e n } } = 5 0 7 , n _ { \mathrm { l a y e r } } = 5 , n _ { \mathrm { h e a d } } = \mathrm { \Omega } ^ { \ast }$ , and $t _ { \mathrm { w a r m u p } } = 7 4 6 )$ for all experiments on that dataset. For fine-tuning we use $\lambda = 0 . 2 5$ .
|
| 220 |
+
|
| 221 |
+
Evaluation metrics We evaluate using tokenized and cased BLEU scores (Papineni et al., 2002).
|
| 222 |
+
|
| 223 |
+
Implementation We have open-sourced our PyTorch implementation of the $\mathrm { N A T ^ { 6 } }$ .
|
| 224 |
+
|
| 225 |
+
# 5.2 RESULTS
|
| 226 |
+
|
| 227 |
+
Across the three datasets we used, the NAT performs between 2-5 BLEU points worse than its autoregressive teacher, with part or all of this gap addressed by the use of noisy parallel decoding. In the case of WMT16 English–Romanian, NPD improves the performance of our non-autoregressive model to within 0.2 BLEU points of the previous overall state of the art (Gehring et al., 2017).
|
| 228 |
+
|
| 229 |
+
Comparing latencies on the development model shows a speedup of more than a factor of 10 over greedy autoregressive decoding, or a factor of 15 over beam search. Latencies for decoding with NPD, regardless of sample size, could be reduced to about $8 0 \mathrm { m s }$ by parallelizing across multiple GPUs because each sample can be generated, then scored, independently from the others.
|
| 230 |
+
|
| 231 |
+
# 5.3 ABLATION STUDY
|
| 232 |
+
|
| 233 |
+
We also conduct an extensive ablation study with the proposed NAT on the IWSLT dataset. First, we note that the model fails to train when provided with only positional embeddings as input to the decoder. Second, we see that training on the distillation corpus rather than the ground truth provides a fairly consistent improvement of around 5 BLEU points. Third, switching from uniform copying of source inputs to fertility-based copying improves performance by four BLEU points when using ground-truth training or two when using distillation.
|
| 234 |
+
|
| 235 |
+
<table><tr><td>Distillation b=1 b=4</td><td>Decoder Inputs +uniform</td><td>+fertility</td><td>+PosAtt</td><td>Fine-tuning +LKD +LBP</td><td>BLEU +CRL</td><td>BLEU (T)</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>~2</td><td></td></tr><tr><td></td><td>√</td><td></td><td></td><td></td><td>16.51</td><td></td></tr><tr><td></td><td></td><td></td><td>√</td><td></td><td>18.87</td><td></td></tr><tr><td>√</td><td>√</td><td></td><td>√</td><td></td><td>20.72</td><td></td></tr><tr><td></td><td>√</td><td></td><td>√</td><td></td><td>21.12</td><td></td></tr><tr><td><</td><td></td><td></td><td>√</td><td></td><td>24.02</td><td>43.91</td></tr><tr><td></td><td></td><td></td><td>√</td><td></td><td>25.20</td><td>45.41</td></tr><tr><td></td><td>√</td><td></td><td></td><td>√</td><td>22.44 厂</td><td></td></tr><tr><td>兴 √</td><td></td><td>√</td><td></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>√</td><td></td><td>√</td><td>√</td><td>√</td><td>25.76</td><td>46.11</td></tr><tr><td>√</td><td></td><td>√</td><td>√</td><td>√</td><td>26.52</td><td>47.38</td></tr></table>
|
| 236 |
+
|
| 237 |
+
Table 2: Ablation performance on the IWSLT development set. BLEU (T) refers to the BLEU score on a version of the development set that has been translated by the teacher model. An $\times$ indicates that fine-tuning caused that model to get worse. When uniform copying is used as the decoder inputs, the ground-truth target lengths are provided. All models use argmax decoding.
|
| 238 |
+
|
| 239 |
+
Fine-tuning does not converge with reinforcement learning alone, or with the $\mathcal { L } _ { \mathrm { B P } }$ term alone, but use of all three fine-tuning terms together leads to an improvement of around 1.5 BLEU points. Training the student model from a distillation corpus produced using beam search is similar to training from the greedily-distilled corpus.
|
| 240 |
+
|
| 241 |
+
Figure 4: Two examples comparing translations produced by an autoregressive (AR) and nonautoregressive Transformer as well as the result of noisy parallel decoding with sample size 100. Repeated words are highlighted in gray.
|
| 242 |
+
|
| 243 |
+
<table><tr><td>Source:</td><td>politicians try to pick wordsand use words to shape realityand control reality,butin fact,reality changes words</td></tr><tr><td></td><td>far more than words can ever change reality.</td></tr><tr><td rowspan="3">Target: AR:</td><td>Politiker versuchen Worte zu benutzen,um die Realitat zu formen und die Realitat zu kontrolieren,aber</td></tr><tr><td>tatsächlich verandert die Realitat Worte viel mehr,als Worte die Realitat jemals verändern konnten.</td></tr><tr><td>Politikerversuchen Worter zu wahlen und Worter zur Realitat zu gestalten und Realitätzu steuern,aber in</td></tr><tr><td rowspan="2">NAT:</td><td>Wirklichkeit verändert sich die Realitat viel mehrals Worte,die die Realität verändern konnen.</td></tr><tr><td>Politikerversuchen,Worter wahlen und zu verwenden,um Realitatzu formen und Realitatzu formen,aber</td></tr><tr><td rowspan="2">NAT+NPD:</td><td>tatsächlich ändert Realitat Realitat viel mehrals Wortedie Realität Realitat verändern.</td></tr><tr><td>Politikerversuchen,Worter wahlenund zu verwenden,um Realitat Realitat formenund die Realitatzu formen, aber tatsächlich ändert die Realität Worte viel mehrals Worte jemals die Realität verändern konnen.</td></tr><tr><td>Source:</td><td>Isee wheelchairs bought and sold like used cars.</td></tr><tr><td>Target:</td><td>ich erlebe,dass Rollstuhle gekauft und verkauft werden wie Gebrauchtwagen</td></tr><tr><td>AR: NAT:</td><td>ich sehe Rollstuhlen,die wie Autos verkauft und verkauft werden.</td></tr><tr><td>NAT+NPD:</td><td>ich sehe,dass Stuhle Stuhle und verkauftwie Autos verkauft.</td></tr><tr><td></td><td>ich sehe Rollühle kauften und verkaufte wie Autos.</td></tr></table>
|
| 244 |
+
|
| 245 |
+
We include two examples of translations from the IWSLT development set in Fig. 4. Instances of repeated words or phrases, highlighted in gray, are most prevalent in the non-autoregressive output for the relatively complex first example sentence. Two pairs of repeated words in the first example, as
|
| 246 |
+
|
| 247 |
+
se lucreaza la soluti de genul acesta .
|
| 248 |
+
|
| 249 |
+
se la solutii de genul acesta .
|
| 250 |
+
se lucreaza la solutii de acesta .
|
| 251 |
+
se lucreaza solutii de genul acesta .
|
| 252 |
+
se se lucreaza la solutii de acesta .
|
| 253 |
+
se lucreaza lucreaza la solutii de acesta .
|
| 254 |
+
se se lucreaza lucreaza la solutii de acesta .
|
| 255 |
+
se se lucreaza lucreaza la solutii de de acesta .
|
| 256 |
+
se se lucreaza lucreaza la solutii de genul acesta . solutions on this kind are done.
|
| 257 |
+
work done on solutions like this .
|
| 258 |
+
solutions on this kind is done .
|
| 259 |
+
work is done on solutions like this .
|
| 260 |
+
work is done on solutions like this .
|
| 261 |
+
work is being done on solutions like this .
|
| 262 |
+
work is being done on solutions such as this.
|
| 263 |
+
work is being done on solutions such this kind .
|
| 264 |
+
|
| 265 |
+
Figure 5: A Romanian–English example translated with noisy parallel decoding. At left are eight sampled fertility sequences from the encoder, represented with their corresponding decoder input sequences. Each of these values for the latent variable leads to a different possible output translation, shown at right. The autoregressive Transformer then picks the best translation, shown in red, a process which is much faster than directly using it to generate output.
|
| 266 |
+
|
| 267 |
+
well as a pair in the second, are not present in the versions with noisy parallel decoding, suggesting that NPD scoring using the teacher model can filter out such mistakes. The translations produced by the NAT with NPD, while of a similar quality to those produced by the autoregressive model, are also noticeably more literal.
|
| 268 |
+
|
| 269 |
+
We also show an example of the noisy parallel decoding process in Fig. 5, demonstrating the diversity of translations that can be found by sampling from the fertility space.
|
| 270 |
+
|
| 271 |
+
# 6 CONCLUSION
|
| 272 |
+
|
| 273 |
+
We introduce a latent variable model for non-autoregressive machine translation that enables a decoder based on Vaswani et al. (2017) to take full advantage of its exceptional degree of internal parallelism even at inference time. As a result, we measure translation latencies of one-tenth that of an equal-sized autoregressive model, while maintaining competitive BLEU scores.
|
| 274 |
+
|
| 275 |
+
# REFERENCES
|
| 276 |
+
|
| 277 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In ICLR, 2015.
|
| 278 |
+
|
| 279 |
+
Peter Brown, Vincent della Pietra, Stephen della Pietra, and Robert Mercer. The mathematics of statistical machine translation: Parameter estimation. Computational Linguistics, 19(2):263–311, 1993.
|
| 280 |
+
|
| 281 |
+
Kyunghyun Cho. Noisy parallel approximate decoding for conditional recurrent language model. arXiv preprint arXiv:1605.03835, 2016.
|
| 282 |
+
|
| 283 |
+
Chris Dyer, Victor Chahuneau, and Noah Smith. A simple, fast, and effective reparameterization of IBM Model 2. In NAACL, 2013.
|
| 284 |
+
|
| 285 |
+
Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann Dauphin. Convolutional sequence to sequence learning. arXiv preprint arXiv:1705.03122, 2017.
|
| 286 |
+
|
| 287 |
+
Łukasz Kaiser, Aidan Gomez, and Franc¸ois Chollet. Depthwise separable convolutions for neural machine translation. arXiv preprint arXiv:1706.03059, 2017.
|
| 288 |
+
|
| 289 |
+
Nal Kalchbrenner, Lasse Espeholt, Karen Simonyan, Aaron van den Oord, Alex Graves, and Koray Kavukc¸uoglu. Neural machine translation in linear time. ˇ arXiv preprint arXiv:1610.10099, 2016.
|
| 290 |
+
|
| 291 |
+
Yoon Kim and Alexander Rush. Sequence-level knowledge distillation. In EMNLP, 2016.
|
| 292 |
+
|
| 293 |
+
Philipp Koehn and Rebecca Knowles. Six challenges for neural machine translation. arXiv preprint arXiv:1706.03872, 2017.
|
| 294 |
+
|
| 295 |
+
Minh-Thang Luong, Hieu Pham, and Christopher D Manning. Effective approaches to attentionbased neural machine translation. In EMNLP, 2015.
|
| 296 |
+
|
| 297 |
+
Randi Martin, Jason Crowther, Meredith Knight, Franklin Tamborello, and Chin-Lung Yang. Planning in sentence production: Evidence for the phrase as a default planning scope. Cognition, 116 (2):177–192, 2010.
|
| 298 |
+
|
| 299 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. BLEU: A method for automatic evaluation of machine translation. In ACL, pp. 311–318, 2002.
|
| 300 |
+
|
| 301 |
+
Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909, 2015.
|
| 302 |
+
|
| 303 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc L ˆ e. Sequence to sequence learning with neural networks. ˆ In NIPS, 2014.
|
| 304 |
+
|
| 305 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017.
|
| 306 |
+
|
| 307 |
+
Ronald Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3-4):229–256, 1992.
|
| 308 |
+
|
| 309 |
+
Y. Wu, M. Schuster, Z. Chen, Q. V. Le, M. Norouzi, W. Macherey, M. Krikun, Y. Cao, Q. Gao, K. Macherey, J. Klingner, A. Shah, M. Johnson, X. Liu, Ł. Kaiser, S. Gouws, Y. Kato, T. Kudo, H. Kazawa, K. Stevens, G. Kurian, N. Patil, W. Wang, C. Young, J. Smith, J. Riesa, A. Rudnick, O. Vinyals, G. Corrado, M. Hughes, and J. Dean. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 310 |
+
|
| 311 |
+

|
| 312 |
+
Figure 6: The schematic structure of training and inference for the NAT. The “distilled data” contains target sentences decoded by the autoregressive model and ground-truth source sentences.
|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
Figure 7: The translation latency, computed as the time to decode a single sentence without minibatching, for each sentence in the IWSLT development set as a function of its length. The autoregressive model has latency linear in the decoding length, while the latency of the NAT is nearly constant for typical lengths, even with NPD with sample size 10. When using NPD with sample size 100, the level of parallelism is enough to more than saturate the GPU, leading again to linear latencies.
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
Figure 8: Learning curves for training and fine-tuning of the NAT on IWSLT. BLEU scores are on the development set.
|
md/train/B1lxH20qtX/B1lxH20qtX.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING TO CONTROL SELF-ASSEMBLING MORPHOLOGIES: A STUDY OF GENERALIZATION VIA MODULARITY
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Much of contemporary sensorimotor learning assumes that one is already given a complex agent (e.g., a robotic arm) and the goal is to learn to control it. In contrast, this paper investigates a modular co-evolution strategy: a collection of primitive agents learns to self-assemble into increasingly complex collectives in order to solve control tasks. Each primitive agent consists of a limb and a neural controller. Limbs may choose to link up to form collectives, with linking being treated as a dynamic action. When two limbs link, a joint is added between them, actuated by the ‘parent’ limb’s controller. This forms a new ‘single’ agent, which may further link with other agents. In this way, complex morphologies can emerge, controlled by a policy whose architecture is in explicit correspondence with the morphology. In experiments, we demonstrate that agents with these modular and dynamic topologies generalize better to test-time environments compared to static and monolithic baselines. Project videos are available at https:// doubleblindICLR19.github.io/self-assembly/.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Only a tiny fraction of the Earth’s biomass is composed of higher-level organisms capable of complex sensorimotor actions of the kind popular in contemporary robotics research (navigation, pick and place, etc). A large portion is primitive single-celled organisms, such as bacteria (Bar-On et al., 2018). Possibly the single most pivotal event in the history of evolution was the point when single-celled organisms switched from always competing with each other for resources to sometimes cooperating, first by forming colonies, and later by merging into multicellular organisms (Alberts et al., 1994). These modular self-assemblies were successful because they combined the high adaptability of single-celled organisms while making it possible for vastly more complex behaviours to emerge. Like many researchers before us (Murata & Kurokawa, 2007; Sims, 1994; Tu & Terzopoulos, 1994; Yim et al., 2000; 2007), we are inspired by the biology of multicellular evolution as a model for emergent complexity in artificial agents. Unlike most previous work however, we are primarily focused on modularity as a way of improving generalization to novel environmental conditions.
|
| 12 |
+
|
| 13 |
+
In this paper, we present a study of modular self-assemblies of primitive agents — “limbs” which can link up to solve a shared task. The limbs have the option to bind together by adding a joint that connects their morphologies (Figure 1a), and when they do so, they pass messages and share rewards. Each limb comes with a simple neural net that controls the torque applied to its joints. Linking and unlinking is treated as a dynamic action, so that the limb assembly can change shape during a single episode of the simulation. This setup has previously been explored in robotics as “self-reconfiguring modular robots” (Stoy et al., 2010). However, unlike prior work on such robots, where the control policies are hand-defined, we show how to learn the policies and study the generalization properties that emerge.
|
| 14 |
+
|
| 15 |
+
To make this problem computationally tractable, we do not allow the limb assemblies to form cycles in morphology. Limbs pass messages to their neighbors in this graph in order to coordinate behavior. All limbs share a common policy function, parametrized by a neural network, which takes the messages from adjacent limbs as input and outputs a torque to rotate the limb in addition to the linking/un-linking action. We call the aggregate neural network a Dynamic Graph Network (DGN)
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: We study the modular co-evolution of control and morphology where a collection of primitive agents self-assemble to form complex collectives to perform given tasks. (a) Each primitive agent is a limb containing a cylindrical body and a configurable motor. These limbs can connect with each other using the attached motor as a joint. (b) We illustrate our dynamic agents in four environments / tasks: standing up, locomotion, manipulation (pushing), and sumo wrestling. See project videos at https://doubleblindICLR19.github.io/self-assembly/.
|
| 19 |
+
|
| 20 |
+
since it is a graph neural network (Scarselli et al., 2009) that can dynamically change topology as a function of its own outputs.
|
| 21 |
+
|
| 22 |
+
We test our limb assemblies on four tasks: standing, locomotion, pushing and wrestling, shown in Figure 1b. We find that DGNs enable a single modular policy to control multiple possible morphologies, even those unseen during training. For example, a 6-limb policy, trained to build a 6-limb tower, can be applied at test time on 12 limbs, and results in a 12-limb tower. Not only are the policies robust to changes in number of limbs, they also generalize well to novel test-time environmental conditions, such as added wind, or new landscapes. These results together demonstrate that our modular and dynamic self-assembling agents have advantages toward generalization to new environments and tasks. Our main contributions are:
|
| 23 |
+
|
| 24 |
+
• Training primitive agents that self-assemble into complex morphologies to jointly solve control tasks.
|
| 25 |
+
Formulating morphological search as a reinforcement learning problem, where linking and unlinking are treated as actions.
|
| 26 |
+
• Representing policy via a graph whose topology matches the agent’s physical structure.
|
| 27 |
+
• Demonstrating that these self-assembling agents both train and generalize better than fixedmorphology baselines.
|
| 28 |
+
|
| 29 |
+
# 2 ENVIRONMENT AND AGENTS
|
| 30 |
+
|
| 31 |
+
Investigating the co-evolution of control (i.e., software) and morphology (i.e., hardware) is not supported within standard benchmark environments typically used for sensorimotor control, requiring us to create our own. We opted for a minimalist design for our agents, the environment, and the reward structure, which is crucial to ensuring that the emergence of limb assemblies with complex morphologies is not forced, but happens naturally.
|
| 32 |
+
|
| 33 |
+
Environment Structure Our environment contains an arena where a collection of primitive agent limbs can self-assemble to perform control tasks. This arena is a ground surface equipped with gravity and friction. The arena can be procedurally changed to generate a variety of novel terrains by changing the height of each tile on the ground (see Figure 1b). To evaluate the generalization properties of our agents, we generate a series of novels terrains. This include generating bumpy terrain by randomizing the height of nearby tiles, stairs terrain by incrementally increasing height of each row of tiles, hurdles terrain by changing height of each row of tiles, gaps terrain by removing alternate row of tiles, etc. Some variations also include putting the arena ‘under water’ which basically amounts to increased drag (i.e. buoyancy). We start our environment with a set of six primitive limb agents on the ground which can assemble to form collectives to perform complex tasks.
|
| 34 |
+
|
| 35 |
+
Agent Structure All our primitive limb agents share the same simple structure: a cylindrical body with a configurable motor on one end. One end of the cylinder is free and the other end contains a configurable motor. The free-end of the limb can link up with the motor-end of the other limb, and then the motor acts as a joint between two limbs with three degrees of rotation. Hence, one can refer to the motor-end of the cylindrical limb as a parent-end and the free end as a child-end. Multiple limbs can attach their child-end to the parent-end of another limb, as shown in Figure 1(a), to allow for complex graph morphologies to emerge. The limb of the parent-end controls the torques of joint. The un-linking action can be easily implemented by detaching two limbs, but the linking action has to deal with the ambiguity of which limb to connect to (if at all). To resolve these modeling issues, we implement the linking action by attaching the closest limb within a small radius around the parent-node. If no other limb is present within the threshold range, the linking action has no effect.
|
| 36 |
+
|
| 37 |
+
The primitive limb agents are dropped in an environment to jointly solve a given control task. One key component of the self-assembling agent setup that makes it different from typical multi-agent scenarios (Wooldridge, 2009) is that if some agents assemble to form a collective, the resulting morphology becomes a new single agent and all limbs within the morphology maximize a joint reward function. The output action space of each primitive agent contains the continuous torque values that are to be applied to the motor connected to the agent, and are denoted by $\{ \tau _ { \alpha } , \tau _ { \beta } , \tau _ { \gamma } \}$ for three degrees of rotation. In addition to the torque controls, each limb can decide to attach another link at its parent-end, or decide to unlink its child-end if already connected to other limb. The linking and unlinking decisions are binary. This complementary role assignment of child and parent ends, i.e., parent can only link and child can only unlink, makes it possible to decentralize the control across limbs in a self-assembly.
|
| 38 |
+
|
| 39 |
+
In our self-assembling setup, each agent limb only has access to its local sensory information and does not know about other limbs. The sensory input of each agent includes its own dynamics, i.e., the location of the limb in 3-D euclidean coordinates, its velocity, angular rotation and angular velocity. Each end of the limb also has a trinary touch sensor to detect whether the end of the cylinder is touching 1) the floor, 2) another limb, or 3) nothing. Additionally, we also provide our limbs with a very simple point depth sensor that captures the surface height on a $9 \times 9$ grid around the projection of center of limb on the surface. One essential requirement to operationalize this setup is an efficient simulator to allow simultaneous simulation of several of these primitive limb agents. We implement our environments in the Unity ML (Juliani et al., 2018) framework, which is one of the dominant platforms for designing realistic games. For computational reasons, we do not allow the emergence of cycles in the self-assembling agents by not allowing the limbs to link up with already attached limbs within the same morphology. However, our setup is trivially extensible to general graphs.
|
| 40 |
+
|
| 41 |
+
# 3 LEARNING TO CONTROL SELF-ASSEMBLING MORPHOLOGIES
|
| 42 |
+
|
| 43 |
+
Consider a set of primitive limbs indexed by $i$ in $\{ 1 , 2 , \ldots , n \}$ , which are dropped in the environment arena $\mathcal { E }$ to perform a given continuous control task. If needed, these limbs can assemble to form complex collectives in order to improve their performance on the task. The task is represented by a reward function $r _ { t }$ and the goal of the limbs is to maximize the discounted sum of rewards over time $t$ . If some limbs assemble to form a collective, the resulting morphology effectively becomes a single agent with a joint network to maximize the joint reward of the connected limbs. Further, the reward of an assembled morphology is a function of the whole morphology and not the individual agent limbs. For instance, in the task of learning to stand up, the reward is the height of the individual limbs if they are separate, but is the height of the whole morphology if those limbs have assembled into a collective. We now discuss our proposed formulation for learning to control these self-assembling agents.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 2: High-level visualization of our method. A set of primitive ’limbs’ learn to self-assemble into morphologies where each limb is represented by a neural network linked via graph of physical edges. The inset on right shows the message-passing diagram for each node. Project videos at https://doubleblindICLR19.github.io/self-assembly/.
|
| 47 |
+
|
| 48 |
+
# 3.1 CO-EVOLUTION: LINKING/UNLINKING AS AN ACTION
|
| 49 |
+
|
| 50 |
+
To learn a modular controller policy that could generalize to novel setups, our agents must learn the controller jointly as the morphology evolves over time. The limbs should simultaneously decide which torques to apply to their respective motors, while taking into account the connected morphology. Our hypothesis is that if a controller policy could learn in a modular fashion over iterations of increasingly sophisticated morphologies (see Figure 3b), it could learn to be robust and generalizable to diverse situations. So, how can we optimize control and morphology under a common end-to-end framework?
|
| 51 |
+
|
| 52 |
+
We propose to treat the decision of linking and unlinking as additional actions of our primitive limb agents. The total action space $a _ { t }$ at each iteration $t$ can be denoted as $\left\{ \tau _ { \alpha } , \tau _ { \beta } , \tau _ { \gamma } , \sigma _ { l i n k } , \sigma _ { u n l i n k } \right\}$ where $\tau _ { * }$ denote the raw continuous torque values to be applied at the motor and $\sigma _ { * }$ denote the binary actions whether to connect another limb at the parent-end or disconnect the child-end from the other already attached limb. This simple view of morphological evolution allows us to use ideas from learning-driven control, in particular, reinforcement learning (Sutton & Barto, 1998).
|
| 53 |
+
|
| 54 |
+
# 3.2 MODULARITY: SELF-ASSEMBLING AGENT AS A GRAPH OF LIMBS
|
| 55 |
+
|
| 56 |
+
Integration of control and morphology in a common framework is only the first step. The key question is how to model this controller policy such that it is modular and reuses information across generations of morphologies. Let $a _ { t } ^ { i }$ be the action space and $s _ { t } ^ { i }$ be the local sensory input-space of the agent $i$ . One naive approach to maximizing the reward is to simply combine the states of the limbs into the input-space output all the actions jointly using a single network. Formally, the policy is simply $\vec { a } _ { t } = \bar { [ } a _ { t } ^ { 0 } , \bar { a _ { t } ^ { 1 } } \cdot \cdot \cdot a _ { t } ^ { n } \bar { ] } = \Pi ( s _ { t } ^ { 0 } , s _ { t } ^ { 0 } \ldots , s _ { t } ^ { \bar { n } } )$ . This interprets the self-assemblies as a single monolithic agent, ignoring the graphical structure. This is the current approach to solve many control problems, e.g., Mujoco environments like humanoid (Brockman et al., 2016) where the policy $\Pi$ is trained to maximize the sum of discounted rewards using reinforcement learning.
|
| 57 |
+
|
| 58 |
+
In this work, we represent the policy of the agent via a graph neural network (Scarselli et al., 2009) in such a way that it explicitly corresponds to the morphology of the agent. Let’s consider the collection of primitive agent limbs as graph $G$ where each node is denoted by to the primitive limb agent $i$ . Two limbs being physically connected by a joint is analogous to having an edge in the graph. At a joint, the limb which connects itself via its parent-end acts as a parent-node in the corresponding edge, and the other limbs which connect to that joint via child-ends are child-nodes. The parent-node (i.e., the agent with the parent-end) controls the torque of the edge (i.e., the joint motor), as described in Section-2.
|
| 59 |
+
|
| 60 |
+
# 3.3 DYNAMIC GRAPH NETWORKS (DGN)
|
| 61 |
+
|
| 62 |
+
Each primitive limb node $i$ has a policy controller of its own, which is represented by a neural network $\pi _ { \theta } ^ { i }$ and receives a corresponding reward $r _ { t } ^ { i }$ for each time step $t$ . We represent the policy of the self-assembled agent by the aggregated neural network that is connected in the same graphical manner as the physical morphology. The edge connectivity of the graph is represented in the overall graph policy by passing messages that flow from each limb network to the other limbs physically connected to it via a joint. The parameters $\theta$ are shared across each primitive limb agent allowing the overall policy of the graph to be modular with respect to each node. However, recall that the agent morphologies are dynamic, i.e., the connectivity of the limbs changes based on policy outputs. This changes the edge connectivity of the corresponding graph network at every timestep, depending on the actions predicted by each limb controller network in the previous timestep. Hence, we call this aggregate neural net a Dynamic Graph Network (DGN) since it is a graph neural network that can dynamically change topology as a function of its own outputs in the previous iteration.
|
| 63 |
+
|
| 64 |
+
DGN Optimization A typical rollout of our self-assembling agents during an episode of training contains a sequence of torques $\tau _ { t } ^ { i }$ and the linking actions $\boldsymbol { \sigma } _ { t } ^ { i }$ for each limb at each timestep $t$ . The policy parameter $\theta$ is optimized to jointly maximize the reward for each network limb:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\operatorname* { m a x } _ { \theta } \sum _ { i = \{ 1 , 2 . . . , n \} } \mathbb { E } _ { \vec { a } ^ { i } \sim \pi _ { \theta } ^ { i } } [ \Sigma _ { t } r _ { t } ^ { i } ]
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
We optimize this objective via reinforcement learning, in particular the policy gradient method PPO (Schulman et al., 2017).
|
| 71 |
+
|
| 72 |
+
DGN Connectivity The topology is captured in the DGN by passing messages through the edges between individual network nodes. These messages allow each node to take into account its context relative to other nodes, and are supposed to convey information about the neighbouring policy network nodes in the graph. Since the parameters of these limb networks are shared across each node, these messages can be seen as context information that may inform the policy of its role in the corresponding connected component of graph. The aggregated flow through the whole graph can be encapsulated by passing these contextual messages in topological order (no cycles). One can either do a top-down pass, beginning from the root node (i.e., the node with no parents) to the leaf nodes, or do bottom-up pass, from leaves to root node. This idea is inspired from classical work on Bayesian graph networks where message passing is used for belief-propagation (Jordan, 2003). However, when the graph contains cycles, this idea can be easily extended by performing message-passing iteratively through the cycle until convergence, similar to loopy-belief-propagation in Bayesian graphs (Murphy et al., 1999). We now discuss these message-passing strategies:
|
| 73 |
+
|
| 74 |
+
(a) Top-down message passing: Instead of defining $\pi _ { \theta } ^ { i }$ to be just as a function of state, $\pi _ { \theta } ^ { i } : s _ { t } ^ { i } \to a _ { t } ^ { i }$ we pass each limb’s policy network the information about its parent node as well. Formally, one can redefine $\pi _ { \theta } ^ { i }$ as $\pi _ { \theta } ^ { i } : [ \bar { s } _ { t } ^ { i } , m _ { t } ^ { \bar { p } _ { i } } ] a _ { t } ^ { i }$ where $p _ { i }$ is the parent of node $i$ . However, this also implies that each network node should pass context information as messages to its children networks for them to take it as input. So, we need to define $m _ { t } ^ { i }$ which is the output of each node $i$ , and which is passed as the input context message to all its children. We simply append this to the output of $\pi _ { \theta } ^ { i }$ . Thus, we finally define $\pi _ { \theta } ^ { i } : [ s _ { t } ^ { i } , m _ { t } ^ { p _ { i } } ] [ a _ { t } ^ { i } , m _ { t } ^ { i } ]$ . If $i$ has no parents (i.e, root), a vector of zeros is passed in $m _ { t } ^ { p _ { i } }$ . This is computed recursively until the messages reach the leaf nodes.
|
| 75 |
+
|
| 76 |
+
$( b )$ Bottom-up message passing: In this strategy, messages are passed from leaf nodes to root, i.e., each agent gets information from its children, but not from its parent. Similar to top-down, we redefine $\pi _ { \theta } ^ { i }$ as $\pi _ { \theta } ^ { i } : [ s _ { t } ^ { i } , m _ { t } ^ { C _ { i } } ] [ a _ { t } ^ { i } , m _ { t } ^ { i } ]$ where $m _ { t } ^ { i }$ is the output message of policy that goes into the parent limb and $m _ { t } ^ { C _ { i } }$ t t t t tis the aggregated input messages from all the children nodes, i.e, $\begin{array} { r } { m _ { t } ^ { C _ { i } } = \sum _ { c \in C _ { i } } m _ { t } ^ { c } } \end{array}$ . If $i$ has no children (i.e, root), a vector of zeros is passed in $m _ { t } ^ { C _ { i } }$ . Messages are passed recursively until the root node.
|
| 77 |
+
|
| 78 |
+
(c) Bottom-up then top-down message passing: In this strategy, we pass messages both ways: bottomup, then top-down. In the absence of cycles in graph, a one-way pass (either top-down or bottom-up) is sufficient to capture the aggregated information, similar to Bayesian trees (Jordan, 2003). Even though both-way message-passing is redundant, we still explore it as an alternative since it might help in learning when the agent grows too complex. This is implemented by dividing the policy into two parts, each responsible for one direction of message passing, i.e., the parameters $\theta = [ \theta _ { 1 } , \theta _ { 2 } ]$ . First the bottom-up message passing is formulated as $\pi _ { \theta _ { 1 } } ^ { i } : [ s _ { t } ^ { i } , m _ { t } ^ { C _ { i } } ] m _ { t } ^ { i }$ where the sensory input $s _ { t } ^ { i }$ and input messages $m _ { t } ^ { C _ { i } }$ 1 are used to generate outgoing messages to the parent node. In the top-down pass, messages from the parent are used, in addition with the agent’s own message, to output its action: $\pi _ { \theta _ { 2 } } ^ { i } : [ m _ { t } ^ { i } , m _ { t } ^ { p _ { i } } ] \bar { [ a _ { t } ^ { i } , \hat { m } _ { t } ^ { i } ] }$ where $\hat { m } _ { t } ^ { i }$ are the messages passed to the children nodes.
|
| 79 |
+
|
| 80 |
+
(d) No message passing: Note that for some environments or tasks, the context from the other nodes might not be a necessary requirement for effective control.In such scenarios, passing messages might creates an extra-overhead for training a DGN. Importantly, even with no messages being passed, the DGN framework still allows for coordination between limbs. This is because the control and morphology are still learned jointly in a modular mannner through the course of an episode i.e. the morphology and control in each timestep t depends explicitly on the physical morphology and the torques at previous timestep t 1. To implement the no message passing variant of DGN, we simply zero-out the messages $\bar { m } _ { t } ^ { p _ { i } } , m _ { t } ^ { i }$ at each timestep $t$ . This is similar to a typical cooperative multi-agent setup (Wooldridge, 2009) where each limb makes its own decisions in response to the previous actions of the other agents. However, our setup differs in that our agents may physically join up, rather than just coordinate behavior.
|
| 81 |
+
|
| 82 |
+
# 4 IMPLEMENTATION DETAILS AND BASELINES
|
| 83 |
+
|
| 84 |
+
Implementation Details: We use PPO (Schulman et al., 2017) as the underlying reinforcement learning method to optimize Equation 1. Limb policies are represented by fully-connected neural network and trained with a learning rate of $3 e - 4$ , discount factor of 0.995 and entropy coefficient of 0.01. Each episode is 5000 steps long at training and 1200 steps long at testing. Across all the tasks, the number of limbs at training is kept fixed to 6. Limbs start each episode disconnected and located just above the ground plane at random locations, as shown in Figure 3b. During generalization to novel scenarios, we experiment with changing the number of limbs to 12 or 3 to test the same policy without any further finetuning. All of our tasks require the agent to output continuous raw torque control values.
|
| 85 |
+
|
| 86 |
+
Baselines We compare the role of the above four message passing strategies in DGN across a variety of tasks. Different strategies may work well in different scenarios. We further compare how well these dynamic morphologies perform in comparison to a learned monolithic policy for both dynamic and fixed morphologies. In particular, we compare to a (a) Monolithic Policy, Dynamic Graph: in this baseline, our agents are still dynamic and self-assemble to perform the task, however, their controller is represented by a single monolithic policy that takes as input the combined state of all agents and outputs actions for each of them. (b) Monolithic Policy, Fixed Graph: For each task, a hand-designed morphology is constructed from the limbs and trained using a single monolithic policy that takes as input the combined state of all agents and outputs the actions for all agents. The agents are not able to combine or separate This can be compared to a standard robotics setup in which a morphology is predefined and then a policy is learned to control it. Note that one cannot generalize Monolithic Policy baselines to scenarios where the number of limbs vary as it would change the action and state space of the policy.
|
| 87 |
+
|
| 88 |
+
For the Fixed Graph baseline, we chose the fixed morphology to be a straight line chain of 6-limbs (i.e., a linear morphology) in all the experiments including the task of standing up and locomotion. This linear-chain may be optimal for standing as tall as possible, but it is not necessarily optimal for learning to stand; the same would hold for locomotion. Further, note that, the best performing DGN variants also converges to linear-chain morphology (shown in Figure 3b and video results on the project website) to achieve the best reward in case of standing up task. Moreover, one can confirm that the locomotion task is also solvable with linear-morphology because one of the DGN ablation methods converged to a linear-morphology while doing well at locomotion (see video).
|
| 89 |
+
|
| 90 |
+
# 5 EXPERIMENTS: EMERGENT MORPHOLOGIES AND GENERALIZATION
|
| 91 |
+
|
| 92 |
+
We test the co-evolution of morphology and control across four tasks where self-assembling agents learn to: (a) stand up, (b) perform locomotion, (c) perform manipulation, and (d) fight in a sumo wrestling environment. There are two primary objectives of our investigation. The first is to determine
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 3: Training of self-assembling agents: (a) The training performance of different methods for joint training of control and morphology for the task of learning to stand up. The generalization performance of these policies across new scenarios is shown in Table 1. (b) The gradual co-evolution of controller as well as the morphology of self-assembling agents over the course of training.
|
| 96 |
+
|
| 97 |
+
<table><tr><td>Environment</td><td colspan="4">DGN</td><td colspan="2">Monolithic Policy</td></tr><tr><td></td><td>(up then down)</td><td>(top-down)</td><td>(bottom-up)</td><td>(no msgs)</td><td>(dynamic graph)</td><td>(fixed graph)</td></tr><tr><td colspan="7">Training Environment</td></tr><tr><td>Standing Up</td><td>15253</td><td>13486</td><td>17518</td><td>12470</td><td>4104</td><td>5351</td></tr><tr><td colspan="7">Zero-Shot Generalization</td></tr><tr><td>More (2x) Limbs</td><td>15006 (98%)</td><td>14429 (107%)</td><td>19796 (113%)</td><td>14084 (113%)</td><td></td><td></td></tr><tr><td>Fewer(.5x) Limbs</td><td>11730 (77%)</td><td>9842 (73%)</td><td>10839 (62%)</td><td>9070 (73%)</td><td></td><td></td></tr><tr><td>Water +2x Limbs</td><td>16642 (109%)</td><td>14192 (105%)</td><td>16871 (96%)</td><td>13360 (107%)</td><td></td><td></td></tr><tr><td>Winds</td><td>14654 (96%)</td><td>12116 (90%)</td><td>16803 (96%)</td><td>12560 (101%)</td><td>3923 (96%)</td><td>4531 (85%)</td></tr><tr><td>Strong Winds</td><td>14727 (97%)</td><td>13416 (99%)</td><td>15853 (90%)</td><td>12257 (98%)</td><td>3937 (96%)</td><td>4961 (93%)</td></tr></table>
|
| 98 |
+
|
| 99 |
+
Table 1: Testing generalization for the standing up task. We show quantitative evaluation of the generalization ability of the learned policies. For each of the methods, we first pick the best performing model from the training run and then evaluate it on each of the novel scenarios without any further finetuning, i.e., in a zero-shot manner. We report first the score attained by the self-assembling agent and then report, in parenthesis, the percentage of training performance retained upon transfer. The higher the numbers, the better it is.
|
| 100 |
+
|
| 101 |
+
if such a modular co-evolution results in the emergence of complex self-assembling agents. The second is to evaluate if the emerged modular controller generalizes to novel scenarios.
|
| 102 |
+
|
| 103 |
+
# 5.1 TASK: STANDING UP
|
| 104 |
+
|
| 105 |
+
In this task, each agent’s reward is proportional to the highest vertical point in its combined morphology, i.e., the limb assemblies should try to maximize their $Y$ -axis height. Limbs have an incentive to self-assemble since the potential reward scales with the number of agents in the body, given that the agent can learn the controller for it. The learning process begins by six-limbs falling on the ground randomly, as shown in Figure 3b. In the beginning, each agent learns independently of others but these limbs learn to self-assemble to form a complex agent after training. Figure 3a compares different methods in terms of their performance on the task of standing as high as possible. We found that our DGN policy variants perform significantly better than the monolithic policies for the standing up task. In particular, the bottom-up and up-then-down message passing strategies attain the highest reward. To verify the implementation of our monolithic policy with fixed morphology, we show its ablation with varying number of limbs in Section A.1 in the supplementary.
|
| 106 |
+
|
| 107 |
+
However, the key question is whether the learned policy generalizes to novel scenarios. We investigate it by testing the learned policies without any further finetuning, i.e. zero-shot generalization, in novel scenarios: adding two times the number of limbs, reducing the number of limbs by half, increasing drag (i.e., ‘under water’) and number of limbs at the same time, and adding varying strength of random pushes-n-pulls (i.e., ‘wind’). As the results in Table 1 show, DGN achieves similar performance as it did on the training environment, despite never having seen these scenarios before. Interestingly, the DGN variants seem to generalize better than the fixed-graph policies (last column). Monolithic
|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 4: Training self-assembling agents: We show the performance of different methods for joint training of control and morphology for three tasks: standing up in the presence of wind and random push-n-pulls (left), locomotion in bumpy terrain (center) and manipulation (pushing) of two objects (right). These policies generalize to novel scenarios as shown in respective tables.
|
| 111 |
+
|
| 112 |
+
<table><tr><td rowspan="2">Environment</td><td colspan="4">DGN</td><td colspan="2">Monolithic Policy</td></tr><tr><td>(up then down)</td><td>(top-down)</td><td>(bottom-up)</td><td>(no msgs)</td><td>(dynamic graph)</td><td>(fixed graph)</td></tr><tr><td>Training Environment</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Standing Up in Wind</td><td>16339</td><td>18423</td><td></td><td>17237</td><td>4176</td><td>4500</td></tr><tr><td>Zero-Shot Generalization</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>(S)trong Winds</td><td>15649 (96%)</td><td>17384 (94%)</td><td></td><td></td><td>4010 (96%)</td><td>4507 (100%)</td></tr><tr><td>2x Limbs +(S)Winds</td><td>16250 (99%)</td><td>15351 (83%)</td><td></td><td>15728 (91%)</td><td></td><td></td></tr><tr><td>Water+2x(L)+(S)Winds</td><td>17254 (106%)</td><td>17068 (93%)</td><td></td><td>16592 (96%)</td><td>一</td><td></td></tr></table>
|
| 113 |
+
|
| 114 |
+
Table 2: Testing generalization for the standing up task in the presence of random push-n-pulls (i.e. ‘wind’). The best performing model from the training is evaluated on each of the novel scenarios without any further finetuning. The score attained by the self-assembling agent is reported first and then, in parenthesis, the percentage of training performance retained upon transfer. The bottom-up DGN failed due to some experimental error and will be reported in the final version of paper.
|
| 115 |
+
|
| 116 |
+
policy baselines cannot be generalized to more or fewer limbs due to the fixed action and state space. A better understanding of these results may be obtained by looking at the dynamically combining morphologies in the project video.
|
| 117 |
+
|
| 118 |
+
# 5.2 TASK: STANDING UP IN THE PRESENCE OF RANDOM PUSH-N-PULLS (WIND)
|
| 119 |
+
|
| 120 |
+
The task in this case is same as the previous one of learning to stand up. However, unlike in the previous subsection, here we also trained in the presence of random push-n-pulls (i.e., ‘wind’) with hope of making the learned morphologies even more robust. The training performance in Figure 4a show the superior performance of DGN with respect to the baselines. The generalization results, in Table 2, show that the DGN both-ways messaging passing variant is the most robust. This may be because in the presence of distractors, communication both ways can be helpful since a random force on a single limb affects all other attached limbs.
|
| 121 |
+
|
| 122 |
+
# 5.3 LOCOMOTION TASK
|
| 123 |
+
|
| 124 |
+
The reward function in this environment is defined as the distance covered by the agent along an axis, in particular, the limbs are rewarded is proportional to their velocity along the $X$ -axis. The training environment is a bumpy terrain (shown in Figure 1(b)) and the training performance is shown in Figure 4b. Our DGN variants significantly outperform the monolithic baselines (see supplementary, Section A.1, for ablation). Interestingly, DGN variant with no message passing performs the best. Upon in-depth investigation, we found that it is possible to do well on this locomotion task with a large variety of morphologies, unlike the task of standing up where a tower is strongly preferrable. Here, any morphology with sufficient height and forward velocity is able to make competitive progress in locomotion (see videos), and thus reducing message-passing to an unnecessary overhead. As discussed in Section 3.3, no message passing merely implies the absence of context to the limbs, but the DGN aggregated policy is still modular and jointly learned with the morphology over the episode.
|
| 125 |
+
|
| 126 |
+
Table 3: Testing generalization for the locomotion task. The best performing model from the training is evaluated on each of the novel scenarios without any further finetuning. The score attained by the self-assembling agent is reported first and then, in parenthesis, the percentage of training performance retained upon transfer.
|
| 127 |
+
|
| 128 |
+
<table><tr><td>Environment</td><td colspan="4">DGN</td><td colspan="2">Monolithic Policy</td></tr><tr><td></td><td>(up then down)</td><td>(top-down)</td><td>(bottom-up)</td><td>(no msgs)</td><td>(dynamic graph)</td><td>(fixed graph)</td></tr><tr><td colspan="7">Training Environment 一</td></tr><tr><td>Locomotion</td><td>3.91</td><td>6.87</td><td>8.71</td><td>9.0</td><td>0.96</td><td>2.96</td></tr><tr><td colspan="7">Zero-Shot Generalization</td></tr><tr><td>More (2x) Limbs</td><td>4.01 (103%)</td><td>4.29 (63%)</td><td>5.47 (63%)</td><td>9.19 (102%)</td><td></td><td></td></tr><tr><td>Fewer (.5x)Limbs</td><td>3.52 (90%)</td><td>4.49 (65%)</td><td>6.64 (76%)</td><td>8.2 (91%)</td><td></td><td></td></tr><tr><td>Water+2xLimbs</td><td>2.64 (68%)</td><td>3.54 (52%)</td><td>6.57 (75%)</td><td>7.2 (80%)</td><td></td><td></td></tr><tr><td>Hurdles</td><td>1.84 (47%)</td><td>3.66 (53%)</td><td>6.39 (73%)</td><td>5.56 (62%)</td><td>-0.77 (-79%)</td><td>-3.12 (-104%)</td></tr><tr><td>Gaps in Terrain</td><td>1.84 (47%)</td><td>2.8 (41%)</td><td>3.25 (37%)</td><td>4.17 (46%)</td><td>-0.32 (-33%)</td><td>2.09 (71%)</td></tr><tr><td>Bi-modal Bumps</td><td>2.97 (76%)</td><td>4.55 (66%)</td><td>6.62 (76%)</td><td>6.15 (68%)</td><td>-0.56 (-57%)</td><td>-0.44 (-14%)</td></tr><tr><td>Stairs</td><td>1.0 (26%)</td><td>4.25 (62%)</td><td>6.6 (76%)</td><td>8.59 (95%)</td><td>-8.8 (-912%)</td><td>-3.65 (-122%)</td></tr><tr><td>Inside Valley</td><td>4.37 (112%)</td><td>6.55 (95%)</td><td>5.29 (61%)</td><td>6.21 (69%)</td><td>0.47 (48%)</td><td>-1.35 (-45%)</td></tr></table>
|
| 129 |
+
|
| 130 |
+
<table><tr><td>Environment</td><td colspan="4">DGN</td><td colspan="2">Monolithic Policy</td></tr><tr><td></td><td>(up then down)</td><td>(top-down)</td><td>(bottom-up)</td><td>(no msgs)</td><td>(dynamic graph)</td><td>(fixed graph)</td></tr><tr><td colspan="7">Training Environment</td></tr><tr><td>Manipulation</td><td>-7985</td><td>-7861</td><td>-8482</td><td>-9603</td><td>-8773</td><td>-7725</td></tr><tr><td colspan="7">Zero-Shot Generalization</td></tr><tr><td>More (2x) Limbs</td><td>-14319 (-179%)</td><td>-14894 (-189%)</td><td>-9969 (-118%)</td><td>-10879 (-112%)</td><td></td><td></td></tr><tr><td>Water +2x Limbs</td><td>-10724 (-134%)</td><td>-13278 (-169%)</td><td>-12368 (-146%)</td><td>-10362 (-108%)</td><td></td><td></td></tr></table>
|
| 131 |
+
|
| 132 |
+
Table 4: Testing generalization for the manipulation task. The score attained by the self-assembling agent is reported first and then, in parenthesis, the percentage of training performance retained.
|
| 133 |
+
|
| 134 |
+
We evaluate the learned policy without any further finetuning on several scenarios: more limbs, fewer limbs, more limbs under water, a terrain with hurdles of a certain height, a terrain with gaps between platforms, a bumpy terrain with a bi-modal distribution of bump heights, stairs, and an environment with a valley surrounded by walls on both sides. These environments are procedurally generated as discussed in Section 2. Across these novel environments, the modular policies learned by DGN tend to generalize better than the monolithic agent policies, as indicated in Table 3.
|
| 135 |
+
|
| 136 |
+
# 5.4 TASK: MANIPULATION OF TWO OBJECTS
|
| 137 |
+
|
| 138 |
+
The agents are dropped inside a room containing two objects and the goal is to decrease the distance between the objects, as shown in Figure 1(b). The reward for the agents is the negative distance between the objects, so as to encourage the behavior of pushing the blocks together. The training plots are shown in Figure 4c and the generalization results are shown in Table 4. This is a very hard task due to the sparse reward problem as agents only get reward if they move the block. Interestingly, the learned policies do not work well enough in this environment, and only learn to slightly move the blocks (see video). We believe this task requires more reward engineering than just the distance, and we will update the improved results in the final version.
|
| 139 |
+
|
| 140 |
+
# 5.5 TASK: SUMO WRESTLING BETWEEN TWO TEAMS
|
| 141 |
+
|
| 142 |
+
In this task, we divide the limbs into two teams of 6 limbs each and drop them into an arena to fight. Each team gets rewarded if any opponent limb falls out of the arena. The agents are trained via competitive self-play (Bansal et al., 2017; Tesauro, 1995). This is in contrast to the previous “single-team” tasks for self-assembling agents, i.e., standing, locomotion and manipulation. We present it as an additional result demonstrating the wider applicability of the method. However, it is non-trivial to measure the performance in self-play as the game is zero-sum, and rewards therefore do not increase over time. Instead, we refer the readers to the qualitative results in the video. The policies learned by the self-assembling agents demonstrate some interesting behaviors, but there is a lot of room for improvement in future research. We will release these environments upon acceptance.
|
| 143 |
+
|
| 144 |
+
# 6 RELATED WORK
|
| 145 |
+
|
| 146 |
+
Morphologenesis and self-reconfiguring modular robots The idea of modular and selfassembling agents goes back at least to Von Neumman’s Theory of Self-Reproducing Automata (Von Neumann et al., 1966). In robotics, such systems have been termed “self-reconfiguring modular robots” (Murata & Kurokawa, 2007; Stoy et al., 2010). There has been a lot of work in the modular robotics community in designing real hardware robotic modules that can be docked with each other to form complex robotic morphologies (Daudelin et al., 2018; Gilpin et al., 2008; Romanishin et al., 2013; Wright et al., 2007; Yim et al., 2000). Our main contribution is to approach this problem from a learning perspective, in particular deep RL, and study the resulting generalization properties.
|
| 147 |
+
|
| 148 |
+
A variety of alternative approaches have also been proposed to optimize agent morphologies, including genetic algorithms that search over a generative grammar (Sims, 1994), as well as directly optimizing over morphology parameters with RL (Schaff et al., 2018). One key difference between these approaches and our own is that we achieve morphogenesis via dynamic actions (linking), which agents take during their lifetimes, whereas the past approaches treat morphology as an optimization target to be updated between generations or episodes. Since the physical morphology also defines the connectivity of the policy net, our proposed algorithm can also be viewed as performing a kind of neural architecture search (Zoph & Le, 2016) in physical agents.
|
| 149 |
+
|
| 150 |
+
Graph neural networks Encoding graphical structures into neural networks has been used for a large number of applications, including quantum chemistry (Gilmer et al., 2017), semi-supervised classification (Kipf & Welling, 2016), and representation learning (Yang et al., 2018). The works most similar to ours involve learning control policies. For example, Nervenet (Wang et al., 2018) represents individual limbs and joints as nodes in a graph and demonstrates multi-limb generalization, just like our system does. However, the morphologies on which Nervenet operates are not learned jointly with the policy. hand-defined to be compositional in nature. Others (Battaglia et al., 2018; Huang et al., 2018) have shown that graph neural networks can also be applied to inference models as well as to planning. Many of these past works implement some variant of Graph Neural Networks (Scarselli et al., 2009) which operate on general graphs. Our method leverages the constraint that the morphologies can always be represented as a rooted tree in order to simplify the message passing.
|
| 151 |
+
|
| 152 |
+
# 7 DISCUSSION
|
| 153 |
+
|
| 154 |
+
Modeling intelligent agents as modular, self-assembling morphologies has long been a very appealing idea. The efforts to create practical systems to evolve artificial agents goes back at least two decades to the beautiful work of Karl Sims (Sims, 1994). In this paper, we are revisiting these ideas using the contemporary machinery of deep networks and reinforcement learning. Examining the problem in the context of machine learning, rather than optimization, we are particularly interested in modularity as a key to generalization, in terms of improving adaptability and robustness to novel environmental conditions. Poor generalization is the Achilles heel of modern robotics research, and the hope is that this could be a promising direction in addressing this key issue. We demonstrated a number of promising experimental results, suggesting that modularity does indeed improve generalization in simulated agents. While these are just the initial steps, we believe that the proposed research direction is promising and its exploration will be fruitful to the research community. To encourage follow-up work, we will release all code, models, and environments online once the paper is published.
|
| 155 |
+
|
| 156 |
+
# REFERENCES
|
| 157 |
+
|
| 158 |
+
Bruce Alberts, Dennis Bray, Julian Lewis, Martin Raff, Keith Roberts, and James D Watson. Molecular Biology of the Cell. Garland Publishing, New York, 1994. 1
|
| 159 |
+
|
| 160 |
+
Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. CoRR, 2017. 9
|
| 161 |
+
|
| 162 |
+
Yinon M Bar-On, Rob Phillips, and Ron Milo. The biomass distribution on earth. Proceedings of the National Academy of Sciences, 2018. 1
|
| 163 |
+
|
| 164 |
+
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. 10
|
| 165 |
+
|
| 166 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv:1606.01540, 2016. 4
|
| 167 |
+
|
| 168 |
+
Jonathan Daudelin, Gangyuan Jing, Tarik Tosun, Mark Yim, Hadas Kress-Gazit, and Mark Campbell. An integrated system for perception-driven autonomy with modular robots. Science Robotics, 2018. 10
|
| 169 |
+
|
| 170 |
+
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017. 10
|
| 171 |
+
|
| 172 |
+
Kyle Gilpin, Keith Kotay, Daniela Rus, and Iuliu Vasilescu. Miche: Modular shape formation by self-disassembly. IJRR, 2008. 10
|
| 173 |
+
|
| 174 |
+
De-An Huang, Suraj Nair, Danfei Xu, Yuke Zhu, Animesh Garg, Li Fei-Fei, Silvio Savarese, and Juan Carlos Niebles. Neural task graphs: Generalizing to unseen tasks from a single video demonstration. arXiv preprint arXiv:1807.03480, 2018. 10
|
| 175 |
+
|
| 176 |
+
Michael I Jordan. An introduction to probabilistic graphical models, 2003. 5
|
| 177 |
+
|
| 178 |
+
Arthur Juliani, Vincent-Pierre Berges, Esh Vckay, Yuan Gao, Hunter Henry, Marwan Mattar, and Danny Lange. Unity: A general platform for intelligent agents. arXiv preprint arXiv:1809.02627, 2018. 3
|
| 179 |
+
|
| 180 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. 10
|
| 181 |
+
|
| 182 |
+
Satoshi Murata and Haruhsa Kurokawa. Self-reconfigurable robots. IEEE Robotics & Automation Magazine, 2007. 1, 10
|
| 183 |
+
|
| 184 |
+
Kevin P Murphy, Yair Weiss, and Michael I Jordan. Loopy belief propagation for approximate inference: An empirical study. In Proceedings of the Fifteenth conference on Uncertainty in artificial intelligence, 1999. 5
|
| 185 |
+
|
| 186 |
+
John W Romanishin, Kyle Gilpin, and Daniela Rus. M-blocks: Momentum-driven, magnetic modular robots. In IROS, 2013. 10
|
| 187 |
+
|
| 188 |
+
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Network, 2009. 2, 4, 10
|
| 189 |
+
|
| 190 |
+
Charles B. Schaff, David Yunis, Ayan Chakrabarti, and Matthew R. Walter. Jointly learning to construct and control agents using deep reinforcement learning. CoRR, abs/1801.01432, 2018. URL http://arxiv.org/abs/1801.01432. 10
|
| 191 |
+
|
| 192 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. abs/1707.06347, 2017. 5, 6
|
| 193 |
+
|
| 194 |
+
Karl Sims. Evolving virtual creatures. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques, 1994. 1, 10
|
| 195 |
+
|
| 196 |
+
Kasper Stoy, David Brandt, David J Christensen, and David Brandt. Self-reconfigurable robots: an introduction. Mit Press Cambridge, 2010. 1, 10
|
| 197 |
+
|
| 198 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press Cambridge, 1998. 4
|
| 199 |
+
|
| 200 |
+
Gerald Tesauro. Temporal difference learning and td-gammon. Communications of the ACM, 1995. 9
|
| 201 |
+
|
| 202 |
+
Xiaoyuan Tu and Demetri Terzopoulos. Artificial fishes: Physics, locomotion, perception, behavior. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques, 1994. 1
|
| 203 |
+
|
| 204 |
+
John Von Neumann, Arthur W Burks, et al. Theory of self-reproducing automata. IEEE Transactions on Neural Networks, 1966. 10
|
| 205 |
+
|
| 206 |
+
Tingwu Wang, Renjie Liao, Jimmy Ba, and Sanja Fidler. Nervenet: Learning structured policy with graph neural networks. 2018. 10
|
| 207 |
+
|
| 208 |
+
Michael Wooldridge. An introduction to multiagent systems. John Wiley & Sons, 2009. 3, 6
|
| 209 |
+
|
| 210 |
+
Cornell Wright, Aaron Johnson, Aaron Peck, Zachary McCord, Allison Naaktgeboren, Philip Gianfortoni, Manuel Gonzalez-Rivero, Ross Hatton, and Howie Choset. Design of a modular snake robot. In IROS, 2007. 10
|
| 211 |
+
|
| 212 |
+
Zhilin Yang, Bhuwan Dhingra, Kaiming He, William W Cohen, Ruslan Salakhutdinov, Yann LeCun, et al. Glomo: Unsupervisedly learned relational graphs as transferable representations. arXiv preprint arXiv:1806.05662, 2018. 10
|
| 213 |
+
|
| 214 |
+
Mark Yim, David G Duff, and Kimon D Roufas. Polybot: a modular reconfigurable robot. In ICRA, 2000. 1, 10
|
| 215 |
+
|
| 216 |
+
Mark Yim, Wei-Min Shen, Behnam Salemi, Daniela Rus, Mark Moll, Hod Lipson, Eric Klavins, and Gregory S Chirikjian. Modular self-reconfigurable robot systems [grand challenges of robotics]. IEEE Robotics & Automation Magazine, 2007. 1
|
| 217 |
+
|
| 218 |
+
Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 10
|
| 219 |
+
|
| 220 |
+
# A SUPPLEMENTARY MATERIAL
|
| 221 |
+
|
| 222 |
+
# A.1 PERFORMANCE OF FIXED-GRAPH BASELINE VS. NUMBER OF LIMBS
|
| 223 |
+
|
| 224 |
+
To verify whether the training of Monolithic Policy w/ Fixed Graph is working, we ran it on standing up and locomotion tasks across varying number of limbs. We show in Figure 5 that the baseline performs well with less number of limbs which suggests that the reason for failure in 6-limbs case is indeed the morphology graph being fixed, and not the implementation of this baseline.
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
Figure 5: The performance of Monolithic Policy w/ Fixed Graph baseline as the number of limbs varies in the two tasks: standing up (left) and locomotion (right). This shows that the monolithic baseline works well with less (1-3 limbs), but fails with 6 limbs during training.
|
| 228 |
+
|
| 229 |
+
# A.2 GENERALIZATION OF LEARNED POLICIES AT DIFFERENT TRAINING INTERVALS
|
| 230 |
+
|
| 231 |
+
In this section, we show the generalization plots corresponding to the Tables 1, 2, 3, 4. To plot generalization, we pick the trained model from different training intervals and plot them across new environments without finetuning at all, in a zero-shot manner.
|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
Figure 6: Generalization for the task of Standing Up: Performance of different methods across novel scenarios without any finetuning.
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
Figure 7: Generalization for the task of Standing Up w/ Wind: Performance of different methods across novel scenarios without any finetuning.
|
| 238 |
+
|
| 239 |
+

|
| 240 |
+
Figure 8: Generalization for the task of Locomotion: Performance of different methods across novel scenarios without any finetuning.
|
| 241 |
+
|
| 242 |
+

|
| 243 |
+
Figure 9: Generalization for the task of Manipulation: Performance of different methods across novel scenarios without any finetuning.
|
md/train/B1lz-3Rct7/B1lz-3Rct7.md
ADDED
|
@@ -0,0 +1,523 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THREE MECHANISMS OFWEIGHT DECAY REGULARIZATION
|
| 2 |
+
|
| 3 |
+
Guodong Zhang, Chaoqi Wang, Bowen Xu, Roger Grosse
|
| 4 |
+
|
| 5 |
+
University of Toronto, Vector Institute {gdzhang, cqwang, bowenxu, rgrosse}@cs.toronto.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Weight decay is one of the standard tricks in the neural network toolbox, but the reasons for its regularization effect are poorly understood, and recent results have cast doubt on the traditional interpretation in terms of $L _ { 2 }$ regularization. Literal weight decay has been shown to outperform $L _ { 2 }$ regularization for optimizers for which they differ. We empirically investigate weight decay for three optimization algorithms (SGD, Adam, and K-FAC) and a variety of network architectures. We identify three distinct mechanisms by which weight decay exerts a regularization effect, depending on the particular optimization algorithm and architecture: (1) increasing the effective learning rate, (2) approximately regularizing the inputoutput Jacobian norm, and (3) reducing the effective damping coefficient for second-order optimization. Our results provide insight into how to improve the regularization of neural networks.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Weight decay has long been a standard trick to improve the generalization performance of neural networks (Krogh & Hertz, 1992; Bos & Chug, 1996) by encouraging the weights to be small in magnitude. It is widely interpreted as a form of $L _ { 2 }$ regularization because it can be derived from the gradient of the $L _ { 2 }$ norm of the weights in the gradient descent setting. However, several findings cast doubt on this interpretation:
|
| 14 |
+
|
| 15 |
+
• Weight decay has sometimes been observed to improve training accuracy, not just generalization performance (e.g. Krizhevsky et al. (2012)).
|
| 16 |
+
Loshchilov & Hutter (2017) found that when using Adam (Kingma & Ba, 2014) as the optimizer, literally applying weight decay (i.e. scaling the weights by a factor less than 1 in each iteration) enabled far better generalization than adding an $L _ { 2 }$ regularizer to the training objective.
|
| 17 |
+
• Weight decay is widely used in networks with Batch Normalization (BN) (Ioffe & Szegedy, 2015). In principle, weight decay regularization should have no effect in this case, since one can scale the weights by a small factor without changing the network’s predictions. Hence, it does not meaningfully constrain the network’s capacity.
|
| 18 |
+
|
| 19 |
+
The effect of weight decay remains poorly understood, and we lack clear guidelines for which tasks and architectures it is likely to help or hurt. A better understanding of the role of weight decay would help us design more efficient and robust neural network architectures.
|
| 20 |
+
|
| 21 |
+
In order to better understand the effect of weight decay, we experimented with both weight decay and $L _ { 2 }$ regularization applied to image classifiers using three different optimization algorithms: SGD, Adam, and Kronecker-Factored Approximate Curvature (K-FAC) (Martens & Grosse, 2015). Consistent with the observations of Loshchilov & Hutter (2017), we found that weight decay consistently outperformed $L _ { 2 }$ regularization in cases where they differ. Weight decay gave an especially strong performance boost to the K-FAC optimizer, and closed most of the generalization gaps between first- and second-order optimizers, as well as between small and large batches. We then investigated the reasons for weight decay’s performance boost. Surprisingly, we identified three distinct mechanisms by which weight decay has a regularizing effect, depending on the particular algorithm and architecture:
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: Comparison of test accuracy of the networks trained with different optimizers on both CIFAR10 and CIFAR100. We compare Weight Decay regularization to $L _ { 2 }$ regularization and the Baseline (which used neither). Here, $\mathbf { B N + A u g }$ denotes the use of BN and data augmentation. K-FAC-G and K-FAC-F denote K-FAC using Gauss-Newton and Fisher matrices as the preconditioner, respectively. The results suggest that weight decay leads to improved performance across different optimizers and settings.
|
| 25 |
+
|
| 26 |
+
1. In our experiments with first-order optimization methods (SGD and Adam) on networks with BN, we found that it acts by way of the effective learning rate. Specifically, weight decay reduces the scale of the weights, increasing the effective learning rate, thereby increasing the regularization effect of gradient noise (Neelakantan et al., 2015; Keskar et al., 2016). As evidence, we found that almost all of the regularization effect of weight decay was due to applying it to layers with BN (for which weight decay is meaningless). Furthermore, when we computed the effective learning rate for the network with weight decay, and applied the same effective learning rate to a network without weight decay, this captured the full regularization effect.
|
| 27 |
+
|
| 28 |
+
2. We show that when K-FAC is applied to a linear network using the Gauss-Newton metric (K-FAC-G), weight decay is equivalent to regularizing the squared Frobenius norm of the input-output Jacobian (which was shown by Novak et al. (2018) to improve generalization). Empirically, we found that even for (nonlinear) classification networks, the Gauss-Newton norm (which K-FAC with weight decay is implicitly regularizing) is highly correlated with the Jacobian norm, and that K-FAC with weight decay significantly reduces the Jacobian norm.
|
| 29 |
+
|
| 30 |
+
3. Because the idealized, undamped version of K-FAC is invariant to affine reparameterizations, the implicit learning rate effect described above should not apply. However, in practice the approximate curvature matrix is damped by adding a multiple of the identity matrix, and this damping is not scale-invariant. We show that without weight decay, the weights grow large, causing the effective damping term to increase. If the effective damping term grows large enough to dominate the curvature term, it effectively turns K-FAC into a first-order optimizer. Weight decay keeps the effective damping term small, enabling K-FAC to retain its second-order properties, and hence improving generalization.
|
| 31 |
+
|
| 32 |
+
Hence, we have identified three distinct mechanisms by which weight decay improves generalization, depending on the optimization algorithm and network architecture. Our results underscore the subtlety and complexity of neural network training: the final performance numbers obscure a variety of complex interactions between phenomena. While more analysis and experimentation is needed to understand how broadly each of our three mechanisms applies (and to find additional mechanisms!), our work provides a starting point for understanding practical regularization effects in neural network training.
|
| 33 |
+
|
| 34 |
+
# 2 PRELIMINARIES
|
| 35 |
+
|
| 36 |
+
Supervised learning. Given a training set $s$ consisting of training pairs $\{ \mathbf { x } , y \}$ , and a neural network $f _ { \pmb { \theta } } ( \mathbf { x } )$ with parameters $\pmb \theta$ (including weights and biases), our goal is to minimize the emprical risk expressed as an average of a loss $\ell$ over the training set: $\begin{array} { r } { \mathcal { L } ( \pmb { \theta } ) \equiv \frac { 1 } { N } \sum _ { ( \mathbf { x } , y ) \sim \mathcal { S } } \ell \left( y , f _ { \pmb { \theta } } ( \mathbf { x } ) \right) } \end{array}$ .
|
| 37 |
+
|
| 38 |
+
Stochastic Gradient Descent. To minimize the empirical risk $\mathcal { L } ( \pmb \theta )$ , stochastic gradient descent (SGD) is used extensively in deep learning community. Typically, gradient descent methods can be derived from the framework of steepest descent with respect to standard Euclidean metric in parameter space. Specifically, gradient descent minimizes the following surrogate objective in each iteration:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
h ( \pmb \theta ) = \Delta \pmb \theta ^ { \top } \nabla _ { \pmb \theta } \mathcal { L } ( \pmb \theta ) + 1 / \eta \mathrm D ( \pmb \theta , \pmb \theta + \Delta \pmb \theta ) ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
where the distance (or dissimilarity) function $\mathrm { D } ( \theta , \theta + \Delta \theta )$ is chosen as $\frac { 1 } { 2 } \lVert \Delta \theta \rVert _ { 2 } ^ { 2 }$ . In this case, solving equation 1 yields $\Delta \theta = - \dot { \eta } \nabla _ { \theta } \mathcal { L } ( \theta )$ , where $\eta$ is the learning rate.
|
| 45 |
+
|
| 46 |
+
Natural gradient. Though popular, gradient descent methods often struggle to navigate “valleys” in the loss surface with ill-conditioned curvature (Martens, 2010). Natural gradient descent, as a variant of second-order methods (Martens, 2014), is able to make more progress per iteration by taking into account the curvature information. One way to motivate natural gradient descent is to show that it can be derived by adapting steepest descent formulation, much like gradient descnet, except using an alternative local distance. The distance function which leads to natural gradient is the KL divergence on the model’s predictive distribution $\begin{array} { r } { \mathrm { D } _ { \mathrm { K L } } ( p _ { \pmb { \theta } } \| p _ { \pmb { \theta } + \Delta \pmb { \theta } } ) \approx \frac { 1 } { 2 } \Delta \pmb { \theta } ^ { \top } \mathbf { F } \bar { \Delta \pmb { \theta } } } \end{array}$ , where $\mathbf { F } ( \pmb \theta )$ is the Fisher information matrix1 (Amari, 1998):
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\mathbf { F } = \mathbb { E } \left[ \nabla _ { \pmb { \theta } } \log p ( y | \mathbf { x } , \pmb { \theta } ) \nabla _ { \pmb { \theta } } \log p ( y | \mathbf { x } , \pmb { \theta } ) ^ { \top } \right] .
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
Applying this distance function to equation 1, we have $\pmb { \theta } ^ { t + 1 } \pmb { \theta } ^ { t } - \eta \mathbf { F } ^ { - 1 } \nabla _ { \pmb { \theta } } \mathcal { L } ( \pmb { \theta } ) .$
|
| 53 |
+
|
| 54 |
+
Gauss-Newton algorithm. Another sensible distance function in equation 1 is the $L _ { 2 }$ distance on the output (logits) of the neural network, i.e. $\begin{array} { r l } { \frac { 1 } { 2 } \| f _ { \pmb { \theta } + \Delta \pmb { \theta } } - f _ { \pmb { \theta } } \| _ { 2 } ^ { 2 } } & { { } } \end{array}$ . This leads to the classical Gauss-Newton algorithm which updates the parameters by $\pmb { \theta } ^ { t + 1 } \pmb { \theta } ^ { t } - \eta \mathbf { G } ^ { - 1 } \nabla _ { \pmb { \theta } } \mathcal { L } ( \pmb { \theta } )$ , where the Gauss-Newton (GN) matrix is defined as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\mathbf { G } = \mathbb { E } \left[ \mathbf { J } _ { \theta } ^ { \top } \mathbf { J } _ { \theta } \right] ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
and $\mathbf { J } _ { \pmb { \theta } }$ is the Jacobian of $f _ { \boldsymbol { \theta } } ( \mathbf { x } )$ w.r.t $\pmb { \theta }$ . The Gauss-Newton algorithm, much like natural gradient descent, is also invariant to the specific parameterization of neural network function $f _ { \theta }$ .
|
| 61 |
+
|
| 62 |
+
Two curvature matrices. It has been shown that the GN matrix is equivalent to the Fisher matrix in the case of regression task with squared error loss (Heskes, 2000). However, they are not identical for the case of classification, where cross-entropy loss is commonly used. Nevertheless, Martens (2014) showed that the Fisher matrix is equivalent to generalized GN matrix when model prediction $p ( \boldsymbol { y } | \mathbf { x } , \boldsymbol { \theta } )$ corresponds to exponential family model with natural parameters given by $f _ { \pmb { \theta } } ( \mathbf { \bar { x } } )$ , where the generalized GN matrix is given by
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\mathbf { G } = \mathbb { E } \left[ \mathbf { J } _ { \theta } ^ { \top } \mathbf { H } _ { \ell } \mathbf { J } _ { \theta } \right] ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
and $\mathbf { H } _ { \ell }$ is the Hessian of $\ell ( y , z )$ w.r.t $z$ , evaluated at $z = f _ { \boldsymbol { \theta } } ( \mathbf { x } )$ . In regression with squared error loss, the Hessian $\mathbf { H } _ { \ell }$ happens to be identity matrix.
|
| 69 |
+
|
| 70 |
+
Preconditioned gradient descent. Given the fact that both natural gradient descent and GaussNewton algorithm precondition the gradient with an extra curvature matrix $\mathbf { C } ( \pmb { \theta } )$ (including the Fisher matrix and GN matrix), we also term them preconditioned gradient descent for convenience.
|
| 71 |
+
|
| 72 |
+
K-FAC. As modern neural networks may contain millions of parameters, computing and storing the exact curvature matrix and its inverse is impractical. Kronecker-factored approximate curvature (K-FAC) (Martens & Grosse, 2015) uses a Kronecker-factored approximation to the curvature matrix to perform efficient approximate natural gradient updates. As shown by Luk & Grosse (2018), K-FAC can be applied to general pullback metric, including Fisher metric and the Gauss-Newton metric. For more details, we refer reader to Appendix $\mathrm { F }$ or Martens & Grosse (2015).
|
| 73 |
+
|
| 74 |
+
Batch Normalization. Broadly speaking, Batch Normalization (BN) is a mechanism that aims to stabilize the distribution (over a mini-batch) of inputs to a given network layer during training. This is achieved by augmenting the network with additional layers that subtract the mean $\mu$ and divide by the standard deviation $\sigma$ . Typically, the normalized inputs are also scaled and shifted based on trainable parameters $\gamma$ and $\beta$ :
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\mathbf { B N } ( \mathbf { x } ) = \frac { \mathbf { x } - \mu } { \sigma } \cdot \boldsymbol { \gamma } + \boldsymbol { \beta } .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
For clarity, we ignore the parameters $\gamma$ and $\beta$ , which do not impact the performance in practice. This is not surprising, since with ReLU activations, only the $\gamma$ of the last layer affects network’s outputs which can be merged with the softmax layer weights (as also pointed out by van Laarhoven (2017)).
|
| 81 |
+
|
| 82 |
+
# 3 THE EFFECTIVENESS OF WEIGHT DECAY
|
| 83 |
+
|
| 84 |
+
Our goal is to understand weight decay regularization in the context of training deep neural networks. Towards this, we first discuss the relationship between $L _ { 2 }$ regularization and weight decay in different optimizers.
|
| 85 |
+
|
| 86 |
+
Table 1: Classification results on CIFAR-10 and CIFAR-100. B denotes BN while D denotes data augmentation, including horizontal flip and random crop. WD denotes weight decay regularization. Weight decay regularization improves the generalization consistently. Interestingly, we observe that weight decay gives an especially strong performance boost to the K-FAC optimizer when BN is turned off.
|
| 87 |
+
|
| 88 |
+
<table><tr><td rowspan=2 colspan=1>Dataset</td><td rowspan=2 colspan=1>Network</td><td rowspan=2 colspan=1>B D</td><td rowspan=1 colspan=10>SGD ADAM K-FAC-F K-FAC-G</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td></tr><tr><td rowspan=3 colspan=1>CIFAR-10</td><td rowspan=3 colspan=1>VGG16</td><td rowspan=3 colspan=1>√ √</td><td rowspan=3 colspan=1>83.2086.9991.71</td><td rowspan=3 colspan=1>84.8788.8593.39</td><td rowspan=1 colspan=1>83.16</td><td rowspan=2 colspan=1>84.1288.72</td><td rowspan=2 colspan=1>85.5887.97</td><td rowspan=2 colspan=3>89.6089.02</td><td rowspan=2 colspan=1>83.8588.17</td><td rowspan=1 colspan=1>89.81</td></tr><tr><td rowspan=1 colspan=1>88.45</td><td rowspan=1 colspan=1>89.77</td></tr><tr><td rowspan=1 colspan=1>92.89</td><td rowspan=1 colspan=1>93.62</td><td rowspan=1 colspan=1>93.12</td><td rowspan=1 colspan=2>93.90</td><td rowspan=1 colspan=2>93.90</td><td rowspan=1 colspan=1>93.19</td><td rowspan=1 colspan=1>93.80</td></tr><tr><td rowspan=7 colspan=1>CIFAR-10</td><td rowspan=7 colspan=1>ResNet32</td><td rowspan=7 colspan=1>√√ √</td><td rowspan=7 colspan=1>85.4786.1392.95</td><td rowspan=7 colspan=1>86.6390.6595.14</td><td rowspan=3 colspan=1>84.43</td><td rowspan=3 colspan=1>87.54</td><td rowspan=3 colspan=1>86.82</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=2 colspan=3>90.2291.24</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>85.24</td><td rowspan=1 colspan=1>90.64</td></tr><tr><td rowspan=4 colspan=1>89.4693.63</td><td rowspan=4 colspan=1>90.6194.66</td><td rowspan=1 colspan=1>89.78</td><td rowspan=1 colspan=2>91.24</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>89.94</td><td rowspan=1 colspan=1>90.91</td></tr><tr><td rowspan=3 colspan=1>93.80</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan=2 colspan=3>95.35</td><td></td><td></td></tr><tr><td rowspan=1 colspan=1>93.44</td><td rowspan=1 colspan=1>95.04</td></tr><tr><td rowspan=1 colspan=1>CIFAR-100</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>√ √</td><td rowspan=1 colspan=1>68.42</td><td rowspan=1 colspan=1>73.31</td><td rowspan=1 colspan=1>69.88</td><td rowspan=1 colspan=1>74.22</td><td rowspan=1 colspan=1>71.05</td><td rowspan=1 colspan=3>73.36</td><td rowspan=1 colspan=1>67.46</td><td rowspan=1 colspan=1>73.57</td></tr><tr><td rowspan=1 colspan=1>CIFAR-100</td><td rowspan=1 colspan=1>ResNet32</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>73.61</td><td rowspan=1 colspan=1>77.73</td><td rowspan=1 colspan=1>73.60</td><td rowspan=1 colspan=1>77.40</td><td rowspan=1 colspan=1>74.49</td><td rowspan=1 colspan=3>78.01</td><td rowspan=1 colspan=1>73.70</td><td rowspan=1 colspan=1>78.02</td></tr></table>
|
| 89 |
+
|
| 90 |
+
Gradient descent with weight decay is defined by the following update rule: $\pmb { \theta } ^ { t + 1 } ( 1 - \eta \beta ) \pmb { \theta } ^ { t } -$ $\eta \nabla \mathcal { L } ( \pmb \theta ^ { t } )$ , where $\beta$ defines the rate of the weight decay per step and $\eta$ is the learning rate. In this case, weight decay is equivalent to $L _ { 2 }$ regularization. However, the two differ when the gradient update is preconditioned by a matrix $\mathbf { C } ^ { - 1 }$ , as in Adam or K-FAC. The preconditioned gradient descent update with $L _ { 2 }$ regularization is given by
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\mathbf { \boldsymbol { \theta } } ^ { t + 1 } \gets ( \mathbf { I } - \eta \beta \mathbf { C } ^ { - 1 } ) \mathbf { \boldsymbol { \theta } } ^ { t } - \eta \mathbf { C } ^ { - 1 } \nabla \_ { \theta } \mathbf { \boldsymbol { \mathcal { L } } } ( \mathbf { \boldsymbol { \theta } } ^ { t } ) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
whereas the weight decay update is given by
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathbf { \theta } \mathbf { \theta } ^ { t + 1 } \gets ( 1 - \eta \beta ) \mathbf { \theta } \mathbf { \theta } ^ { t } - \eta \mathbf { C } ^ { - 1 } \nabla _ { \mathbf { \theta } } \mathcal { L } ( \mathbf { \theta } ^ { t } ) .
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
The difference between these updates is whether the preconditioner is applied to $\pmb { \theta } ^ { t }$ . The latter update can be interpreted as the preconditioned gradient descent update on a regularized objective where the regularizer is the squared $\mathbf { C }$ -norm $\| \pmb { \theta } \| _ { \mathbf { C } } ^ { 2 } = \pmb { \theta } ^ { \top } \mathbf { C } \pmb { \theta }$ . If $\mathbf { C }$ is adapted based on statistics collected during training, as in Adam or K-FAC, this interpretation holds only approximately because gradient descent on $\| \pmb \theta \| _ { \mathbf { C } } ^ { 2 }$ would require differentiating through $\mathbf { C }$ . However, this approximate regularization term can still yield insight into the behavior of weight decay. (As we discuss later, this observation informs some, but not all, of the empirical phenomena we have observed.) Though the difference between the two updates may appear subtle, we find that it makes a substantial difference in terms of generalization performance.
|
| 103 |
+
|
| 104 |
+
Initial Experiments. We now present some empirical findings about the effectiveness of weight decay which the rest of the paper is devoted to explaining. Our experiments were carried out on two different datasets: CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009) with varied batch sizes. We test VGG16 (Simonyan & Zisserman, 2014) and ResNet32 (He et al., 2016) on both CIFAR-10 and CIFAR-100 (for more details, see Appendix A). In particular, we investigate three different optimization algorithms: SGD, Adam and K-FAC. We consider two versions of K-FAC, which use the Gauss-Newton matrix (K-FAC-G) and Fisher information matrix (K-FAC-F).
|
| 105 |
+
|
| 106 |
+
Figure 1 shows the comparison between weight decay, $L _ { 2 }$ regularization and the baseline. We also compare weight decay to the baseline on more settings and report the final test accuracies in Table 1. Finally, the results for large-batch training are summarized in Table 3. Based on these results, we make the following observations regarding weight decay:
|
| 107 |
+
|
| 108 |
+
1. In all experiments, weight decay regularization consistently improved the performance and was more effective than $L _ { 2 }$ regularization in cases where they differ (See Figure 1).
|
| 109 |
+
2. Weight decay closed most of the generalization gaps between first- and second-order optimizers, as well as between small and large batches (See Table 1 and Table 3).
|
| 110 |
+
3. Weight decay significantly improved performance even for BN networks (See Table 1), where it does not meaningfully constrain the networks’ capacity.
|
| 111 |
+
4. Finally, we notice that weight decay gave an especially strong performance boost to the K-FAC optimizer when BN was disabled (see the first and fourth rows in Table 1).
|
| 112 |
+
|
| 113 |
+
In the following section, we seek to explain these phenomena. With further testing, we find that weight decay can work in unexpected ways, especially in the presence of BN.
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 2: Test accuracy as a function of training epoch for SGD and Adam on CIFAR-100 with different weight decay regularization schemes. baseline is the model without weight decay; wd-conv is the model with weight decay applied to all convolutional layers; wd-all is the model with weight decay applied to all layers; wd-fc is the model with weight decay applied to the last layer (fc). Most of the generalization effect of weight decay is due to applying it to layers with BN.
|
| 117 |
+
|
| 118 |
+
# 4 THREE MECHANISMS OF WEIGHT DECAY REGULARIZATION
|
| 119 |
+
|
| 120 |
+
# 4.1 MECHANISM I: HIGHER EFFECTIVE LEARNING RATE
|
| 121 |
+
|
| 122 |
+
As discussed in Section 3, when SGD is used as the optimizer, weight decay can be interpreted as penalizing the $L _ { 2 }$ norm of the weights. Classically, this was believed to constrain the model by penalizing explanations with large weight norm. However, for a network with Batch Normalization (BN), an $L _ { 2 }$ penalty does not meaningfully constrain the reprsentation, because the network’s predictions are invariant to rescaling of the weights and biases. More precisely, if $\mathbf { B N } ( \mathbf { x } ; \pmb { \theta } _ { l } )$ denotes the output of a layer with parameters $\theta _ { l }$ in which BN is applied before the activation function, then
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
{ \bf B N } ( { \bf x } ; \alpha \pmb { \theta } _ { l } ) = { \bf B N } ( { \bf x } ; \pmb { \theta } _ { l } ) ,
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
for any $\alpha > 0$ . By choosing small $\alpha$ , one can make the $L _ { 2 }$ norm arbitrarily small without changing the function computed by the network. Hence, in principle, adding weight decay to layers with BN should have no effect on the optimal solution. But empirically, weight decay appears to significantly improve generalization for BN networks (e.g. see Figure 1).
|
| 129 |
+
|
| 130 |
+
van Laarhoven (2017) observed that $L _ { 2 }$ regularization has an influence on the effective learning rate in (stochastic) gradient descent. In this work, we extend this result to first-order optimizers (including SGD and Adam) that weight decay increases the effective learning rate by reducing the scale of the weights. Since higher learning rates lead to larger gradient noise, which has been shown to act as a stochastic regularizer (Neelakantan et al., 2015; Keskar et al., 2016; Jastrz˛ebski et al., 2017; Hoffer et al., 2017), this means weight decay can indirectly exert a regularizing effect through the effective learning rate. In this section, we provide additional evidence supporting the hypothesis of van Laarhoven (2017). For simplicity, this section focuses on SGD, but we’ve observed similar behavior when Adam is used as the optimizer.
|
| 131 |
+
|
| 132 |
+
Due to its invariance to the scaling of the weights, the key property of the weight vector is its direction. As shown by Hoffer et al. (2018), the weight direction $\hat { \pmb { \theta } } _ { l } = \pmb { \theta } _ { l } / \lVert \pmb { \theta } _ { l } \rVert _ { 2 }$ is updated according to
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 3: Effective learning rate of the first layer of ResNet32 trained with SGD on CIFAR-100. Without weight decay regularization, the effective learning rate decreases quickly in the beginning.
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\begin{array} { r } { \hat { \pmb { \theta } } _ { l } ^ { t + 1 } \hat { \pmb { \theta } } _ { l } ^ { t } - \eta \| \pmb { \theta } _ { l } ^ { t } \| _ { 2 } ^ { - 2 } ( \mathbf { I } - \hat { \pmb { \theta } } _ { l } ^ { t } \hat { \pmb { \theta } } _ { l } ^ { t ^ { \top } } ) \nabla _ { \pmb { \theta } _ { l } } \mathcal { L } ( \hat { \pmb { \theta } } ^ { t } ) + O ( \eta ^ { 2 } ) . } \end{array}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
Therefore, the effective learning rate is approximately proportional to $\eta / \lVert \pmb { \theta } _ { l } \rVert _ { 2 } ^ { 2 }$ . Which means that by decreasing the scale of the weights, weight decay regularization increases the effective learning rate.
|
| 142 |
+
|
| 143 |
+
Figure 3 shows the effective learning rate over time for two BN networks trained with SGD (the results for Adam are similar), one with weight decay and one without it. Each network is trained with a typical learning rate decay schedule, including 3 factor-of-10 reductions in the learning rate parameter, spaced 60 epochs apart. Without weight decay, the normalization effects cause an additional effective learning rate decay (due to the increase of weight norm), which reduces the effective learning rate by a factor of 10 over the first 50 epochs. By contrast, when weight decay is applied, the effective learning rate remains more or less constant in each stage.
|
| 144 |
+
|
| 145 |
+
We now show that the effective learning rate schedule explains nearly the entire generalization effect of weight decay. First, we independently varied whether weight decay was applied to the top layer of the network, and to the remaining layers. Since all layers except the top one used BN, it’s only in the top layer that weight decay would constrain the model. Training curves for SGD and Adam under all four conditions are shown in Figure 2. In all cases, we observe that whether weight decay was applied to the top (fully connected) layer did not have a significant impact; whether it was applied to the reamining (convolution) layers explained most of the generalization effect. This supports the effective learning rate hypothesis.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 4: The curves of test accuracies of ResNet32 on CIFAR-100. To be noted, we use wd and wn to denote weight decay and weight normalization respectively.
|
| 149 |
+
|
| 150 |
+
We further tested this hypothesis using a simple experimental manipulation. Specifically, we trained a BN network without weight decay, but after each epoch, rescaled the weights in each layer to match that layer’s norm from the corresponding epoch for the network with weight decay. This rescaling does not affect the network’s predictions, and is equivalent to setting the effective learning rate to match the second network. As shown in Figure 4, this effective learning rate transfer scheme (wn-conv) eliminates almost the entire generalization gap; it is fully closed by also adding weight decay to the top layer (wd-fc+wn-conv). Hence, we conclude that for BN networks trained with SGD or Adam, weight decay achieves its regularization effect primarily through the effective learning rate.
|
| 151 |
+
|
| 152 |
+
# 4.2 MECHANISM II: APPROXIMATE JACOBIAN REGULARIZATION
|
| 153 |
+
|
| 154 |
+
In Section 3, we observed that when BN is disabled, weight decay has the strongest regularization effect when K-FAC is used as the optimizer. Hence, in this section we analyze the effect of weight decay for K-FAC with networks without BN. First, we show that in a certain idealized setting, K-FAC with weight decay regularizes the input-output Jacobian of the network. We then empirically investigate whether it behaves similarly for practical networks.
|
| 155 |
+
|
| 156 |
+
As discussed in Section 3, when the gradient updates are preconditioned by a matrix $\mathbf { C }$ , weight decay can be viewed as approximate preconditioned gradient descent on the norm $\| \pmb { \theta } \| _ { \mathbf { C } } ^ { 2 } = \pmb { \theta } ^ { \top } \mathbf { \bar { C } } \pmb { \theta }$ . This interpretation is only approximate because the exact gradient update requires differentiating through C.2 When $\mathbf { C }$ is taken to be the (exact) Gauss-Newton (GN) matrix $\mathbf { G }$ , we obtain the Gauss-Newton norm $\| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = \pmb \theta ^ { \top } \mathbf { G } ( \pmb \theta ) \pmb \theta$ . Similarly, when $\mathbf { C }$ is taken to be the K-FAC approximation to $\mathbf { G }$ , we obtain what we term the $K \cdot$ -FAC Gauss-Newton norm.
|
| 157 |
+
|
| 158 |
+
These norms are interesting from a regularization perspective. First, under certain conditions, they are proportional to the average $L _ { 2 }$ norm of the network’s outputs. Hence, the regularizer ought to make the network’s predictions less extreme. This is summarized by the following results:
|
| 159 |
+
|
| 160 |
+
Lemma 1 (Gradient structure). For a feed-forward neural network of depth $L$ with ReLU activation function and no biases, the network’s outputs are related to the input-output Jacobian and parameteroutput Jacobian as follows:
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\begin{array} { l } { f _ { \theta } ( \mathbf { x } ) = \nabla _ { \mathbf { x } } f _ { \theta } ( \mathbf { x } ) ^ { \top } \mathbf { x } = \mathbf { J } _ { \mathbf { x } } \mathbf { x } } \\ { \quad = \displaystyle \frac { 1 } { L + 1 } \nabla _ { \theta } f _ { \theta } ( \mathbf { x } ) ^ { \top } \pmb \theta = \frac { 1 } { L + 1 } \mathbf { J } _ { \theta } \pmb \theta . } \end{array}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
Lemma 2 (Gauss-Newton Norm). Under the same assumptions of Lemma $^ { l }$ , we observe:
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\begin{array} { r } { \| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \| f _ { \pmb \theta } ( \mathbf { x } ) \| ^ { 2 } \right] . } \end{array}
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
If we further restrict the network to be a deep linear neural network, we have $K$ -FAC Gauss-Newton norm as follows:
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\begin{array} { r } { \| \pmb { \theta } \| _ { \mathrm { \mathbf { G } _ { K - \mathrm { F A C } } } } ^ { 2 } = ( L + 1 ) \mathbb { E } \left[ \| f _ { \pmb { \theta } } ( \mathbf { x } ) \| ^ { 2 } \right] . } \end{array}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
2We show in Appendix E that this interpretation holds exactly in the case of Gauss-Newton norm.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 5: Relationship between K-FAC GN norm and Jacobian norm for practical deep neural networks. Each point corresponds to a network trained to $1 0 0 \%$ training accuracy. Even for (nonlinear) classification networks, the K-FAC GN norm is highly correlated with both the squared Frobenius norm of the input-output Jacobian and the generalization gap.
|
| 182 |
+
|
| 183 |
+
Using these results, we show that for linear networks3 with whitened inputs, the (K-FAC) GaussNewton norm is proportional to the squared Frobenius norm of the input-output Jacobian. This is interesting from a regularization perspective, since Novak et al. (2018) found the norm of the input-output Jacobian to be consistently coupled to generalization performance.
|
| 184 |
+
|
| 185 |
+
Theorem 1 (Approximate Jacobian norm). For a deep linear network of depth L without biases, if we further assume that $\mathbb { E } [ \mathbf { x } ] = \mathbf { 0 }$ and $\mathrm { C o v } ( \mathbf { x } ) = \mathbf { I } ,$ , then:
|
| 186 |
+
|
| 187 |
+
$$
|
| 188 |
+
\| \pmb { \theta } \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \| \mathbf { J } _ { \mathbf { x } } \| _ { \mathrm { F r o b } } ^ { 2 }
|
| 189 |
+
$$
|
| 190 |
+
|
| 191 |
+
and
|
| 192 |
+
|
| 193 |
+
$$
|
| 194 |
+
\begin{array} { r } { \Vert \pmb { \theta } \Vert _ { \mathbf { G } _ { \mathrm { K - F A C } } } ^ { 2 } = ( L + 1 ) \Vert \mathbf { J } _ { \mathbf { x } } \Vert _ { \mathrm { F r o b } } ^ { 2 } . } \end{array}
|
| 195 |
+
$$
|
| 196 |
+
|
| 197 |
+
Proof. It follows from Lemma 2 that $\| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \| f _ { \pmb \theta } ( \mathbf { x } ) \| ^ { 2 } \right]$ . By Lemma 1, we have
|
| 198 |
+
|
| 199 |
+
$$
|
| 200 |
+
\begin{array} { r } { \mathbb { E } \left[ \| f _ { \pmb { \theta } } ( \mathbf { x } ) \| ^ { 2 } \right] = \mathbb { E } \left[ \mathbf { x } ^ { \top } \mathbf { J } _ { \mathbf { x } } ^ { \top } \mathbf { J } _ { \mathbf { x } } \mathbf { x } \right] = \mathbb { E } \left[ \operatorname { t r } \mathbf { J } _ { \mathbf { x } } ^ { \top } \mathbf { J } _ { \mathbf { x } } \mathbf { x } \mathbf { x } ^ { \top } \right] . } \end{array}
|
| 201 |
+
$$
|
| 202 |
+
|
| 203 |
+
When the network is linear, the input-output Jacobian $\mathbf { J } _ { \mathbf { x } }$ is independent of the input $\mathbf { x }$ . Then we use the assumption of whitened inputs:
|
| 204 |
+
|
| 205 |
+
$$
|
| 206 |
+
\begin{array} { r } { \| \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \mathrm { t r } { \mathbf { J } _ { \mathbf { x } } ^ { \top } } { \mathbf { J } _ { \mathbf { x } } } \mathbf { x } \mathbf { x } ^ { \top } \right] = ( L + 1 ) ^ { 2 } \mathrm { t r } { \mathbf { J } _ { \mathbf { x } } ^ { \top } } \mathbf { J } _ { \mathbf { x } } \mathbb { E } [ \mathbf { x } \mathbf { x } ^ { \top } ] = ( L + 1 ) ^ { 2 } \| \mathbf { J } _ { \mathbf { x } } \| _ { \mathrm { F r o b } } ^ { 2 } . } \end{array}
|
| 207 |
+
$$
|
| 208 |
+
|
| 209 |
+
The proof for K-FAC Gauss-Newton norm follows immediately with equation 12.
|
| 210 |
+
|
| 211 |
+
While the equivalence between the (K-FAC) GN norm and the Jacobian norm holds only for linear networks, we note that linear networks have been useful for understanding the dynamics of neural net training more broadly (e.g. Saxe et al. (2013)). Hence, Jacobian regularization may help inform our understanding of weight decay in practical (nonlinear) networks.
|
| 212 |
+
|
| 213 |
+
To test whether the K-FAC GN norm correlates with the Jacobian norm for practical networks, we trained feed-forward networks with a variety optimizers on both MNIST (LeCun et al., 1998) and CIFAR-10. For MNIST, we used simple fully-connected networks with different depth and width. For CIFAR-10, we adopted the VGG family (From VGG11 to VGG19). We defined the generalization gap to be the difference between training and test loss. Figure 5 shows the relationship of the Jacobian norm to the K-FAC GN norm and to generalization gap for these networks. We observe that the Jacobian norm correlates strongly with the generalization gap (consistent with Novak et al. (2018)) and also with the K-FAC GN norm. Hence, Theorem 1 can inform the regularization of nonlinear networks.
|
| 214 |
+
|
| 215 |
+
Table 2: Squared Frobenius norm of the input-output Jacobian matrix. K-FAC-G with weight decay significantly reduces the Jacobian norm.
|
| 216 |
+
|
| 217 |
+
<table><tr><td rowspan=2 colspan=1>Optimizer</td><td rowspan=1 colspan=2>VGG16</td><td rowspan=1 colspan=2>ResNet32</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td></tr><tr><td rowspan=1 colspan=1>SGD</td><td rowspan=1 colspan=1>564</td><td rowspan=1 colspan=1>142</td><td rowspan=1 colspan=1>2765</td><td rowspan=1 colspan=1>1074</td></tr><tr><td rowspan=1 colspan=1>K-FAC-G</td><td rowspan=1 colspan=1>498</td><td rowspan=1 colspan=1>51.44</td><td rowspan=1 colspan=1>2115</td><td rowspan=1 colspan=1>64.16</td></tr></table>
|
| 218 |
+
|
| 219 |
+
To test if K-FAC with weight decay reduces the Jacobian norm, we compared the Jacobian norms at the end of training for networks with and without weight decay. As shown in Table 2, weight decay reduced the Jacboian norm by a much larger factor when K-FAC was used as the optimizer than when SGD was used as the optimizer.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 6: Test accuracy as a function of training epoch for K-FAC on CIFAR-100 with different weight decay regularization schemes. baseline is the model without weight decay regularization; wd-conv is the model with weight decay applied to all convolutional layers; wd-all is the model with weight decay applied to all layers; wd-fc is the model with weight decay applied to the last layer (fc). Consistent with the Jacobian regularization hypothesis, applying weight decay to the non-BN layers have the largest regularization effect. However, applying weight decay to the BN layers also lead to noticeable gains.
|
| 223 |
+
|
| 224 |
+
Our discussion so far as focused on the GN version of K-FAC. Recall that, in many cases, the Fisher information matrix differs from the GN matrix only in that it accounts for the output layer Hessian. Hence, this analysis may help inform the behavior of K-FAC-F as well. We also note that $\| \pmb \theta \| _ { \mathbf { F } } ^ { 2 }$ , the Fisher-Rao norm, has been proposed as a complexity measure for neural networks (Liang et al., 2017). Hence, unlike in the case of SGD and Adam for BN networks, we interpret K-FAC with weight decay as constraining the capacity of the network.
|
| 225 |
+
|
| 226 |
+
# 4.3 MECHANISM III: SMALLER EFFECTIVE DAMPING PARAMETER
|
| 227 |
+
|
| 228 |
+
We now return our attention to the setting of architectures with BN. The Jacobian regularization mechanism from Section 4.2 does not apply in this case, since rescaling the weights results in an equivalent network, and therefore does not affect the input-output Jacobian. Similarly, if the network is trained with K-FAC, then the effective learning rate mechanism from Section 4.1 also does not apply because the K-FAC update is invariant to affine reparameterization (Luk & Grosse, 2018) and therefore not affected by the scaling of the weights. More precisely, for a layer with BN, the curvature matrix $\mathbf { C }$ (either the Fisher matrix or the GN matrix) has the following property:
|
| 229 |
+
|
| 230 |
+
$$
|
| 231 |
+
\mathbf { C } ( \pmb { \theta } _ { l } ) = \frac { 1 } { \| \pmb { \theta } _ { l } \| _ { 2 } ^ { 2 } } \mathbf { C } ( \hat { \pmb { \theta } } _ { l } ) ,
|
| 232 |
+
$$
|
| 233 |
+
|
| 234 |
+
where $\hat { \pmb { \theta } } _ { l } = \pmb { \theta } _ { l } / \lVert \pmb { \theta } _ { l } \rVert _ { 2 }$ as in Section 4.1. Hence, the $\| \pmb { \theta } _ { l } \| _ { 2 } ^ { 2 }$ factor in the preconditioner counteracts the $\lVert \pmb { \theta } _ { l } \rVert _ { 2 } ^ { - 2 }$ factor in the effective learning rate, resulting in an equivlaent effective learning rate regardless of the norm of the weights.
|
| 235 |
+
|
| 236 |
+
These observations raise the question of whether it is still useful to apply weight decay to BN layers when using K-FAC. To answer this question, we repeated the experiments in Figure 2 (applying weight decay to subsets of the layers), but with K-FAC as the optimizer. The results are summarized in Figure 6. Applying it to the non-BN layers had the largest effect, consistent with the Jacobian regularization hypothesis. However, applying weight decay to the BN layers also led to significant gains, especially for K-FAC-F.
|
| 237 |
+
|
| 238 |
+
The reason this does not contradict the K-FAC invariance property is that practical K-FAC implementations dampen the updates (like many second-order optimziers) by adding a multiple of the identity matrix to the curvature before inversion. According to equation 15, as the norm of the weights gets larger, $\mathbf { C }$ gets smaller, and hence the damping term comes to dominate the preconditioner. Mathematically, we can understand this effect by deriving the following update rule for the normalized weights $\hat { \pmb { \theta } }$ (see Appendix D for proof):
|
| 239 |
+
|
| 240 |
+
$$
|
| 241 |
+
\begin{array} { r } { \hat { \theta } _ { l } ^ { t + 1 } \gets \hat { \theta } _ { l } ^ { t } - \eta ( \mathbf { I } - \hat { \theta } _ { l } ^ { t } \hat { \theta } _ { l } ^ { t ^ { \top } } ) ( \mathbf { C } ( \hat { \theta } _ { l } ^ { t } ) + \lVert \theta _ { l } ^ { t } \rVert _ { 2 } ^ { 2 } \lambda \mathbf { I } ) ^ { - 1 } \nabla _ { \theta _ { l } } \mathcal { L } ( \hat { \theta } ^ { t } ) + O ( \eta ^ { 2 } ) , } \end{array}
|
| 242 |
+
$$
|
| 243 |
+
|
| 244 |
+
where $\lambda$ is the damping parameter. Hence, for large $\mathbf { C } ( \hat { \pmb { \theta } } _ { l } )$ or small $\lVert \pmb { \theta } _ { l } \rVert$ , the update is close to the idealized second-order update, while for small enough $\mathbf { C } ( \hat { \pmb { \theta } } _ { l } )$ or large enough $\| \pmb \theta _ { l } \|$ , K-FAC effectively becomes a first-order optimizer. Hence, by keeping the weights small, weight decay helps K-FAC to retain its second-order properties.
|
| 245 |
+
|
| 246 |
+
Most implementations of K-FAC keep the damping parameter $\lambda$ fixed throughout training. Therefore, it would be convenient if $\bar { \bf C } ( \hat { \pmb { \theta } } _ { l } )$ and $\| \pmb \theta _ { l } \|$ do not change too much during training, so that a single value of $\lambda$ can work well throughout training. Interestingly, the norm of the GN matrix appears to be much more stable than the norm of the Fisher matrix. Figure 7 shows the norms of the Fisher matrix $\mathbf { F } ( \hat { \pmb { \theta } } _ { l } )$ and GN matrix $\mathbf { G } ( \hat { \theta } _ { l } )$ of the normalized weights for the first layer of a CIFAR-10 network throughout training. While the norm of $\mathbf { F } ( \hat { \pmb { \theta } } _ { l } )$ decays by 4 orders of magnitude over the first 50 epochs, the norm of $\mathbf { G } ( \hat { \pmb { \theta } } _ { l } )$ increases by only a factor of 2.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
Figure 7: Trace norm of Fisher matrix and GaussNewton matrix of the first layer (Normalized) of ResNet32. The model was trained on CIFAR-10 with K-FAC-F and BN.
|
| 250 |
+
|
| 251 |
+
The explanation for this is as follows: in a classification task with cross-entropy loss, the Fisher matrix is equivalent to the generalized GN matrix $\mathbb { E } [ \mathbf { J } _ { \theta } ^ { \top } \mathbf { H } _ { \ell } \mathbf { J } _ { \theta } ]$ (see Section 2). This differs from the GN matrix $\mathbb { E } [ \mathbf { J } _ { \pmb { \theta } } ^ { \top } \mathbf { J } _ { \pmb { \theta } } ]$ only in that it incudes the output layer Hessian $\mathbf { H } _ { \ell } = \mathrm { d i a g } ( \mathbf { p } ) - \mathbf { p } \mathbf { p } ^ { \top }$ , where $\mathbf { p }$ is the vector of estimated class probabilities. It is easy to see that $\mathbf { H } _ { \ell }$ goes to zero as p collapses to one class, as is the case for tasks such as CIFAR-10 and CIFAR-100 where networks typically achieve perfect training accuracy. Hence, we would expect $\mathbf { F }$ to get much smaller over the course of training, consistent with Figure 7.
|
| 252 |
+
|
| 253 |
+
To summarize, when K-FAC is applied to BN networks, it can be advantageous to apply weight decay even to layers with BN, even though this appears unnecessary based on invariance considerations. The reason is that weight decay reduces the effective damping, helping K-FAC to retain its second-order properties. This effect is stronger for K-FAC-F than for K-FAC-G because the Fisher matrix shrinks dramatically over the course of training.
|
| 254 |
+
|
| 255 |
+
# 5 DISCUSSION
|
| 256 |
+
|
| 257 |
+
Despite its long history, weight decay regularization remains poorly understood. We’ve identified three distinct mechanisms by which weight decay improves generalization, depending on the architecture and optimization algorithm: increasing the effective learning rate, reducing the Jacobian norm, and reducing the effective damping parameter. We would not be surprised if there remain additional mechanisms we have not found.
|
| 258 |
+
|
| 259 |
+
The dynamics of neural net training is incredibly complex, and it can be tempting to simply do what works and not look into why. But we think it is important to at least sometimes dig deeper to determine exactly why an algorithm has the effect that it does. Some of our analysis may seem mundane, or even tedious, as the interactions between different hyperparameters are not commonly seen as a topic worthy of detailed scientific study. But our experiments highlight that the dynamics of the norms of weights and curvature matrices, and their interaction with optimization hyperparameters, can have a substantial impact on generalization. We believe these effects deserve more attention, and would not be surprised if they can help explain the apparent success or failure of other neural net design choices. We also believe our results highlight the need for automatic adaptation of optimization hyperparameters, to eliminate potential experimental confounds and to allow researchers and practitioners to focus on higher level design issues.
|
| 260 |
+
|
| 261 |
+
# 6 ACKNOWLEDGEMENT
|
| 262 |
+
|
| 263 |
+
We thank Jimmy Ba, David Duvenaud, Kevin Luk, Maxime Gazeau, and Behnam Neyshabur for helpful discussions, and Tianqi Chen and Shengyang Sun for their feedback on early drafts. GZ was funded by an MRIS Early Researcher Award.
|
| 264 |
+
|
| 265 |
+
# REFERENCES
|
| 266 |
+
|
| 267 |
+
Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural computation, 10(2):251–276, 1998.
|
| 268 |
+
|
| 269 |
+
Jimmy Ba, Roger Grosse, and James Martens. Distributed second-order optimization using kroneckerfactored approximations. 2016.
|
| 270 |
+
|
| 271 |
+
Alberto Bernacchia, Máté Lengyel, and Guillaume Hennequin. Exact natural gradient in deep linear networks and application to the nonlinear case. 2018.
|
| 272 |
+
|
| 273 |
+
Siegfried Bos and E Chug. Using weight decay to optimize the generalization ability of a perceptron. In Neural Networks, 1996., IEEE International Conference on, volume 1, pp. 241–246. IEEE, 1996.
|
| 274 |
+
|
| 275 |
+
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.
|
| 276 |
+
|
| 277 |
+
Tom Heskes. On “natural” learning and pruning in multilayered perceptrons. Neural Computation, 12(4):881–901, 2000.
|
| 278 |
+
|
| 279 |
+
Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. In Advances in Neural Information Processing Systems, pp. 1731–1741, 2017.
|
| 280 |
+
|
| 281 |
+
Elad Hoffer, Ron Banner, Itay Golan, and Daniel Soudry. Norm matters: efficient and accurate normalization schemes in deep networks. arXiv preprint arXiv:1803.01814, 2018.
|
| 282 |
+
|
| 283 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 284 |
+
|
| 285 |
+
Stanisław Jastrz˛ebski, Zachary Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Yoshua Bengio, and Amos Storkey. Three factors influencing minima in sgd. arXiv preprint arXiv:1711.04623, 2017.
|
| 286 |
+
|
| 287 |
+
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. arXiv preprint arXiv:1609.04836, 2016.
|
| 288 |
+
|
| 289 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 290 |
+
|
| 291 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 292 |
+
|
| 293 |
+
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.
|
| 294 |
+
|
| 295 |
+
Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in neural information processing systems, pp. 950–957, 1992.
|
| 296 |
+
|
| 297 |
+
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.
|
| 298 |
+
|
| 299 |
+
Tengyuan Liang, Tomaso Poggio, Alexander Rakhlin, and James Stokes. Fisher-rao metric, geometry, and complexity of neural networks. arXiv preprint arXiv:1711.01530, 2017.
|
| 300 |
+
|
| 301 |
+
Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in adam. arXiv preprint arXiv:1711.05101, 2017.
|
| 302 |
+
|
| 303 |
+
Kevin Luk and Roger Grosse. A coordinate-free construction of scalable natural gradient. arXiv preprint arXiv:1808.10340, 2018.
|
| 304 |
+
|
| 305 |
+
James Martens. Deep learning via hessian-free optimization. 2010.
|
| 306 |
+
|
| 307 |
+
James Martens. New insights and perspectives on the natural gradient method. arXiv preprint arXiv:1412.1193, 2014.
|
| 308 |
+
|
| 309 |
+
James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In International conference on machine learning, pp. 2408–2417, 2015.
|
| 310 |
+
|
| 311 |
+
Arvind Neelakantan, Luke Vilnis, Quoc V Le, Ilya Sutskever, Lukasz Kaiser, Karol Kurach, and James Martens. Adding gradient noise improves learning for very deep networks. arXiv preprint arXiv:1511.06807, 2015.
|
| 312 |
+
|
| 313 |
+
Roman Novak, Yasaman Bahri, Daniel A Abolafia, Jeffrey Pennington, and Jascha SohlDickstein. Sensitivity and generalization in neural networks: an empirical study. arXiv preprint arXiv:1802.08760, 2018.
|
| 314 |
+
|
| 315 |
+
Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
|
| 316 |
+
|
| 317 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 318 |
+
|
| 319 |
+
Twan van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017.
|
| 320 |
+
|
| 321 |
+
Yuhuai Wu, Elman Mansimov, Roger B Grosse, Shun Liao, and Jimmy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. In Advances in neural information processing systems, pp. 5279–5288, 2017.
|
| 322 |
+
|
| 323 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 324 |
+
|
| 325 |
+
Guodong Zhang, Shengyang Sun, David Duvenaud, and Roger Grosse. Noisy natural gradient as variational inference. arXiv preprint arXiv:1712.02390, 2017.
|
| 326 |
+
|
| 327 |
+
# A EXPERIMENTS DETAILS
|
| 328 |
+
|
| 329 |
+
Throughout the paper, we perform experiments on image classification with three different datasets, MNIST (LeCun et al., 1998), CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009). For MNIST, we use simple fully-connected networks with different depth and width. For CIFAR-10 and CIFAR100, we use VGG16 (Simonyan & Zisserman, 2014) and ResNet32 (He et al., 2016). To make the network more flexible, we widen all convolutional layers in ResNet32 by a factor of 4, according to Zagoruyko & Komodakis (2016).
|
| 330 |
+
|
| 331 |
+
We investigate three different optimization methods, including Stochastic Gradient Descent (SGD), Adam (Kingma & Ba, 2014) and K-FAC (Martens & Grosse, 2015). In K-FAC, two different curvature matrices are studied, including Fisher information matrix and Gauss-Newton matrix.
|
| 332 |
+
|
| 333 |
+
In default, batch size 128 is used unless stated otherwise. In SGD and Adam, we train the networks with a budge of 200 epochs and decay the learning rate by a factor of 10 every 60 epochs for batch sizes of 128 and 640, and every 80 epochs for the batch size of 2K. Whereas we train the networks only with 100 epochs and decay the learning rate every 40 epochs in K-FAC. Additionally, the curvature matrix is updated by running average with re-estimation every 10 iterations and the inverse operator is amortized to 100 iterations. For K-FAC, we use fixed damping term $1 e ^ { - 3 }$ unless state otherwise. For each algorithm, best hyperparameters (learning rate and regularization factor) are selected using grid search on held-out $5 \mathrm { k }$ validation set. For the large batch setting, we adopt the same strategies in Hoffer et al. (2017) for adjusting the search range of hyperparameters. Finally, we retrain the model with both training data and validation data.
|
| 334 |
+
|
| 335 |
+
# B GRADIENT STRUCTURE IN NEURAL NETWORKS (LEMMA 1)
|
| 336 |
+
|
| 337 |
+
Claim. For a feed-forward neural network of depth $L$ with ReLU activation function and no biases, one has the following property:
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\begin{array} { l } { f _ { \theta } ( \mathbf { x } ) = \nabla _ { \mathbf { x } } f _ { \theta } ( \mathbf { x } ) ^ { \top } \mathbf { x } = \mathbf { J } _ { \mathbf { x } } \mathbf { x } } \\ { \quad = \displaystyle \frac { 1 } { L + 1 } \nabla _ { \theta } f _ { \theta } ( \mathbf { x } ) ^ { \top } \pmb \theta = \frac { 1 } { L + 1 } \mathbf { J } _ { \theta } \pmb \theta } \end{array}
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
The key observation of Lemma 1 is that rectified neural networks are piecewise linear up to the output $f _ { \pmb { \theta } } ( \mathbf { x } )$ . And ReLU activation function satisfies the property $\sigma ( { \bf z } ) = \sigma ^ { \prime } ( { \bf z } ) { \bf z }$ .
|
| 344 |
+
|
| 345 |
+
Proof. For convenience, we introduce some notations here. Let $\mathbf { z } _ { L + 1 }$ denotes output logits $f _ { \theta } ( \mathbf { x } ) , \mathbf { z } _ { l }$ the output $l$ -th layer. Similarly, we define ${ \bf a } _ { l } = \sigma ( { \bf z } _ { l } )$ and $\mathbf { a } _ { 0 } = \mathbf { x }$ . By definition, it is easy to see that
|
| 346 |
+
|
| 347 |
+
$$
|
| 348 |
+
\begin{array} { c } { \displaystyle { { \bf z } _ { l + 1 } = { \bf W } _ { l } { \bf a } _ { l } = \frac { \partial { \bf z } _ { l + 1 } } { \partial { \bf a } _ { l } ^ { \top } } { \bf a } _ { l } } } \\ { \displaystyle { = \frac { \partial { \bf z } _ { l + 1 } } { \partial { \bf a } _ { l } ^ { \top } } \frac { \partial { \bf a } _ { l } } { \partial { \bf z } _ { l } ^ { \top } } { \bf z } _ { l } } } \\ { \displaystyle { = \frac { \partial { \bf z } _ { l + 1 } } { \partial { \bf z } _ { l } ^ { \top } } { \bf z } _ { l } } } \end{array}
|
| 349 |
+
$$
|
| 350 |
+
|
| 351 |
+
By induction, we conclude that $f _ { \pmb { \theta } } ( \mathbf { x } ) = \nabla _ { \mathbf { x } } f _ { \pmb { \theta } } ( \mathbf { x } ) ^ { \top } \mathbf { x } = \mathbf { J } _ { \mathbf { x } } \mathbf { x } .$ .
|
| 352 |
+
|
| 353 |
+
On the other side, we have
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\mathbf { z } _ { l + 1 } = \mathbf { W } _ { l } \mathbf { a } _ { l } = \sum _ { i , j } \frac { \partial \mathbf { z } _ { l + 1 } } { \partial \mathbf { W } _ { l } ^ { i , j } } \mathbf { W } _ { l } ^ { i , j }
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
According to equation B, $\begin{array} { r } { { \bf z } _ { L + 1 } = \frac { \partial { \bf z } _ { L + 1 } } { \partial { \bf z } _ { l + 1 } } { \bf z } _ { l + 1 } ^ { \top } } \end{array}$ ∂zL+1∂zl+1 z>l+1, therefore we get
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\mathbf { z } _ { L + 1 } = \sum _ { i , j } \frac { \partial \mathbf { z } _ { L + 1 } } { \partial \mathbf { W } _ { l } ^ { i , j } } \mathbf { W } _ { l } ^ { i , j }
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
Summing over all the layers, we conclude the following equation eventually:
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
( L + 1 ) f _ { \pmb \theta } ( \mathbf x ) = \sum _ { l } \sum _ { i , j } \frac { \partial \mathbf z _ { L + 1 } } { \partial \mathbf W _ { l } ^ { i , j } } \mathbf W _ { l } ^ { i , j } = \nabla _ { \pmb \theta } f _ { \pmb \theta } ( \mathbf x ) ^ { \top } \pmb \theta = \mathbf J _ { \pmb \theta } \pmb \theta
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
# C PROOF OF LEMMA 2
|
| 372 |
+
|
| 373 |
+
Claim. For a feed-forward neural network of depth $L$ with ReLU activation function and no biases, we observe:
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \| f _ { \pmb \theta } ( \mathbf { x } ) \| ^ { 2 } \right]
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
Furthermore, if we restrict the network to be linear with only fully-connected layers, we have K-FAC Gauss-Newton norm as follows
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\lVert \pmb { \theta } \rVert _ { \mathbf { G } _ { \mathrm { K - F A C } } } ^ { 2 } = ( L + 1 ) \mathbb { E } \left[ \lVert f _ { \pmb { \theta } } ( \mathbf { x } ) \rVert ^ { 2 } \right]
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
Proof. We first prove the equaility $\| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \| f _ { \pmb \theta } ( \mathbf { x } ) \| ^ { 2 } \right]$ . Using the definition of the Gauss-Newton norm in equation 3, we have
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\begin{array} { r } { \| \pmb { \theta } \| _ { \mathbf { G } } ^ { 2 } = \mathbb { E } \left[ \pmb { \theta } ^ { \top } \mathbf { J } _ { \pmb { \theta } } ^ { \top } \mathbf { J } _ { \pmb { \theta } } \pmb { \theta } \right] = \mathbb { E } \left[ \| \mathbf { J } _ { \pmb { \theta } } \pmb { \theta } \| ^ { 2 } \right] } \end{array}
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
From Lemma 1, we have
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\mathbf { J } _ { \theta } \theta = ( L + 1 ) f _ { \theta } ( \mathbf { x } ) = ( L + 1 ) \mathbf { J } _ { \mathbf { x } } \mathbf { x }
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
Combining above equalities, we arrive at the conclusion.
|
| 398 |
+
|
| 399 |
+
For second part $\lVert \pmb { \theta } \rVert _ { \mathbf { G } _ { \mathrm { K - F A C } } } ^ { 2 } = ( L + 1 ) \mathbb { E } \left[ \lVert f _ { \pmb { \theta } } ( \mathbf { x } ) \rVert ^ { 2 } \right]$ , we note that kronecker-product is exact under the condition that the network is linear (Bernacchia et al., 2018), which means $\mathbf { G } _ { \mathrm { K - F A C } }$ is the diagonal block version of Gauss-Newton matrix $\mathbf { G }$ . Therefore, we have
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\lVert \pmb { \theta } \rVert _ { \mathbf { G } _ { \mathrm { K - F A C } } } ^ { 2 } = \sum _ { l } \mathbb { E } \left[ \pmb { \theta } _ { l } ^ { \top } \mathbf { J } _ { \pmb { \theta } _ { l } } ^ { \top } \mathbf { J } _ { \pmb { \theta } _ { l } } \pmb { \theta } _ { l } \right]
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
According to Lemma 1, we have $\mathbb { E } \left[ \pmb { \theta } _ { l } ^ { \top } \mathbf { J } _ { \pmb { \theta } _ { l } } ^ { \top } \mathbf { J } _ { \pmb { \theta } _ { l } } \pmb { \theta } _ { l } \right] = \mathbb { E } \left[ \| \mathbf { \it f } _ { \pmb { \theta } } ( \mathbf { x } ) \| ^ { 2 } \right]$ , therefore we conclude that
|
| 406 |
+
|
| 407 |
+
$$
|
| 408 |
+
\lVert \pmb { \theta } \rVert _ { \mathbf { G } _ { \mathrm { K - F A C } } } ^ { 2 } = ( L + 1 ) \mathbb { E } \left[ \lVert f _ { \pmb { \theta } } ( \mathbf { x } ) \rVert ^ { 2 } \right]
|
| 409 |
+
$$
|
| 410 |
+
|
| 411 |
+
# D DERIVATION OF EQUATION 16
|
| 412 |
+
|
| 413 |
+
Claim. During training, the weight direction $\hat { \pmb { \theta } } _ { l } ^ { t } = { \pmb { \theta } } _ { l } ^ { t } / \| { \pmb { \theta } } _ { l } ^ { t } \| _ { 2 }$ is updated according to
|
| 414 |
+
|
| 415 |
+
$$
|
| 416 |
+
\begin{array} { r } { \hat { \theta } _ { t + 1 } \gets \hat { \theta } _ { t } - \eta ( \mathbf { I } - \hat { \theta } _ { t } \hat { \theta } _ { t } ^ { \top } ) ( \mathbf { C } ( \hat { \theta } _ { t } ) + \| \pmb { \theta } _ { t } \| _ { 2 } ^ { 2 } \lambda \mathbf { I } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \theta } _ { t } ) + O ( \eta ^ { 2 } ) } \end{array}
|
| 417 |
+
$$
|
| 418 |
+
|
| 419 |
+
Proof. Natural gradient update is given by
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\pmb { \theta } _ { t + 1 } \pmb { \theta } _ { t } - \eta ( \mathbf { C } ( \pmb { \theta } _ { t } ) + \lambda \mathbf { I } ) ^ { - 1 } \nabla \mathcal { L } ( \pmb { \theta } _ { t } )
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
Denote $\rho _ { t } = \| \pmb { \theta } _ { t } \| _ { 2 }$ . Then we have
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
\begin{array} { r } { \rho _ { t + 1 } ^ { 2 } = \rho _ { t } ^ { 2 } - 2 \eta \rho _ { t } ^ { 2 } \hat { { \theta } } _ { t } ^ { \top } ( \mathbf { C } ( \hat { { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } \mathbf { I } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { { \theta } } _ { t } ) + \eta ^ { 2 } \rho _ { t } ^ { 2 } \| ( \mathbf { C } ( \hat { { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } \mathbf { I } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { { \theta } } _ { t } ) \| _ { 2 } ^ { 2 } } \end{array}
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
and therefore
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\begin{array} { r l } & { \rho _ { t + 1 } = \rho _ { t } \sqrt { 1 - 2 \eta \hat { { \theta } } _ { t } ^ { \top } ( { \mathbf { C } } ( \hat { { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } { \nabla } \mathcal { L } ( \hat { { \theta } } _ { t } ) + \eta ^ { 2 } \| ( { \mathbf { C } } ( \hat { { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } { \nabla } \mathcal { L } ( \hat { { \theta } } _ { t } ) \| _ { 2 } ^ { 2 } } } \\ & { \qquad = \rho _ { t } \big ( 1 - \eta \hat { { \theta } } _ { t } ^ { \top } ( { \mathbf { C } } ( \hat { { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } { \nabla } \mathcal { L } ( \hat { { \theta } } _ { t } ) \big ) + O \big ( \eta ^ { 2 } \big ) } \end{array}
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Additionally, we can rewrite the natural gradient update as follows
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
\rho _ { t + 1 } \hat { \pmb { \theta } } _ { t + 1 } = \rho _ { t } \hat { \pmb { \theta } } _ { t } - \eta \rho _ { t } ( \mathbf { C } ( \hat { \pmb { \theta } } _ { t } ) + \lambda \rho _ { t } ^ { 2 } \mathbf { I } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \pmb { \theta } } _ { t } )
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
And therefore,
|
| 444 |
+
|
| 445 |
+
$$
|
| 446 |
+
\begin{array} { r l } & { \hat { \theta } _ { t + 1 } = \frac { \rho _ { t } } { \rho _ { t + 1 } } \left( \hat { \theta } _ { t } - \eta ( { \mathbf { C } } ( \hat { \theta } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \theta } _ { t } ) \right) } \\ & { \qquad = \left( 1 + \eta \hat { \theta } _ { t } ^ { \top } ( { \mathbf { C } } ( \hat { \theta } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \theta } _ { t } ) \right) \left( \hat { \theta } _ { t } - \eta ( { \mathbf { C } } ( \hat { \theta } _ { t } ) + \lambda \rho _ { t } ^ { 2 } { \mathbf { I } } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \theta } _ { t } ) \right) + O ( \eta ^ { 2 } ) } \\ & { \qquad = \hat { \theta } _ { t } - \eta ( { \mathbf { I } } - \hat { \theta } _ { t } \hat { \theta } _ { t } ^ { \top } ) ( { \mathbf { C } } ( \hat { \theta } _ { t } ) + \| \theta _ { t } \| _ { 2 } ^ { 2 } \lambda { \mathbf { I } } ) ^ { - 1 } \nabla \mathcal { L } ( \hat { \theta } _ { t } ) + O ( \eta ^ { 2 } ) } \end{array}
|
| 447 |
+
$$
|
| 448 |
+
|
| 449 |
+
# E THE GRADIENT OF GAUSS-NEWTON NORM
|
| 450 |
+
|
| 451 |
+
For Gauss-Newton norm $\| \pmb \theta \| _ { \mathbf { G } } ^ { 2 } = ( L + 1 ) ^ { 2 } \mathbb { E } _ { \mathbf { x } } \left[ \langle f _ { \pmb \theta } ( \mathbf { x } ) , f _ { \pmb \theta } ( \mathbf { x } ) \rangle \right] ,$ , its gradient has the following form:
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
\frac { \partial \| \pmb { \theta } \| _ { \mathbf { G } } ^ { 2 } } { \partial \pmb { \theta } } = 2 ( L + 1 ) ^ { 2 } \mathbb { E } \left[ \mathbf { J } _ { \pmb { \theta } } ^ { \top } f _ { \pmb { \theta } } ( \mathbf { x } ) \right]
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
According to Lemma 1, we have $\begin{array} { r } { f _ { \pmb { \theta } } ( \mathbf { x } ) = \frac { 1 } { L + 1 } \mathbf { J } _ { \pmb { \theta } } \pmb { \theta } } \end{array}$ , therefore we can rewrite equation 17
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
\begin{array} { r } { \frac { \partial \| \pmb { \theta } \| _ { \mathbf { G } } ^ { 2 } } { \partial \pmb { \theta } } = 2 ( L + 1 ) \mathbb { E } \left[ \mathbf { J } _ { \pmb { \theta } } ^ { \top } \mathbf { J } _ { \pmb { \theta } } \pmb { \theta } \right] } \\ { = 2 ( L + 1 ) \mathbf { G } \pmb { \theta } } \end{array}
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
Surprisingly, the resulting gradient has the same form as the case where we take Gauss-Newton matrix as a constant of $\pmb \theta$ up to a constant $( L + 1 )$ .
|
| 464 |
+
|
| 465 |
+
# F KRONECKER-FACTORED APPROXIMATE CURVATURE (K-FAC)
|
| 466 |
+
|
| 467 |
+
Martens & Grosse (2015) proposed K-FAC for performing efficient natural gradient optimization in deep neural networks. Following on that work, K-FAC has been adopted in many tasks (Wu et al., 2017; Zhang et al., 2017) to gain optimization benefits, and was shown to be amendable to distributed computation (Ba et al., 2016).
|
| 468 |
+
|
| 469 |
+
# F.1 BASIC IDEA OF K-FAC
|
| 470 |
+
|
| 471 |
+
As shown by Luk & Grosse (2018), K-FAC can be applied to general pullback metric, including Fisher metric and the Gauss-Newton metric. For convenience, we introduce K-FAC here using the Fisher metric.
|
| 472 |
+
|
| 473 |
+
Considering $l$ -th layer in the neural network whose input activations are $\mathbf { a } _ { l } \in \mathbb { R } ^ { n _ { 1 } }$ , weight ${ \bf W } _ { l } \in { \bf \Psi }$ $\mathbb { R } ^ { n _ { 1 } \times n _ { 2 } }$ , and output $\mathbf { s } _ { l } \in \mathbb { R } ^ { n _ { 2 } }$ , we have $\mathbf { s } _ { l } = \mathbf { W } _ { l } ^ { \top } \mathbf { a } _ { l } ^ { \top }$ . Therefore, weight gradient is $\nabla _ { \mathbf { W } _ { l } } \mathcal { L } \mathbf { \Phi } =$ $\mathbf { a } _ { l } ( \nabla _ { \mathbf { s } _ { l } } \mathcal { L } ) ^ { \top }$ . With this gradient formula, K-FAC decouples this layer’s fisher matrix $\mathbf { { F } } _ { l }$ using mild approximations,
|
| 474 |
+
|
| 475 |
+
$$
|
| 476 |
+
\begin{array} { r l } & { { \bf { F } } _ { l } = \mathbb { E } \left[ { \mathrm { v e c } } \{ \nabla _ { { \bf { w } } _ { l } } \mathcal { L } \} { \mathrm { v e c } } \{ \nabla _ { { \bf { w } } _ { l } } \mathcal { L } \} ^ { \top } \right] = \mathbb { E } \left[ \{ \nabla _ { { \bf { s } } _ { l } } \mathcal { L } \} \{ \nabla _ { { \bf { s } } _ { l } } \mathcal { L } \} ^ { \top } \otimes { \bf { a } } _ { l } { \bf { a } } _ { l } ^ { \top } \right] } \\ & { \quad \approx \mathbb { E } \left[ \{ \nabla _ { { \bf { s } } _ { l } } \mathcal { L } \} \{ \nabla _ { { \bf { s } } _ { l } } \mathcal { L } \} ^ { \top } \right] \otimes \mathbb { E } \left[ { \bf { a } } _ { l } { \bf { a } } _ { l } ^ { \top } \right] = { \bf { S } } _ { l } \otimes { \bf { A } } _ { l } } \end{array}
|
| 477 |
+
$$
|
| 478 |
+
|
| 479 |
+
Where $\mathbf { A } _ { l } = \mathbb { E } \left[ \mathbf { a } \mathbf { a } ^ { \top } \right]$ and $\mathbf { S } _ { l } = \mathbb { E } \left[ \{ \nabla _ { \mathbf { s } } \mathcal { L } \} \{ \nabla _ { \mathbf { s } } \mathcal { L } \} ^ { \top } \right]$ . The approximation above assumes independence between $^ { a }$ and $\pmb { s }$ , which proves to be accurate in practice. Further, assuming between-layer independence, the whole fisher matrix $\mathbf { F }$ can be approximated as block diagonal consisting of layerwise fisher matrices $\mathbf { { F } } _ { l }$ . Decoupling $\mathbf { { F } } _ { l }$ into ${ \bf A } _ { l }$ and $\mathbf { S } _ { l }$ not only avoids the memory issue saving $\mathbf { { F } } _ { l }$ , but also provides efficient natural gradient computation.
|
| 480 |
+
|
| 481 |
+
$$
|
| 482 |
+
\mathbf { F } _ { l } ^ { - 1 } \mathrm { v e c } \{ \nabla _ { \mathbf { W } _ { l } } \mathcal { L } \} = \mathbf { S } _ { l } ^ { - 1 } \otimes \mathbf { A } _ { l } ^ { - 1 } \mathrm { v e c } \{ \nabla _ { \mathbf { W } _ { l } } \mathcal { L } \} = \mathrm { v e c } [ \mathbf { A } _ { l } ^ { - 1 } \nabla _ { \mathbf { W } _ { l } } \mathcal { L } \mathbf { S } _ { l } ^ { - 1 } ]
|
| 483 |
+
$$
|
| 484 |
+
|
| 485 |
+
As shown by equation 20, computing natural gradient using K-FAC only consists of matrix transformations comparable to size of $\mathbf { W } _ { l }$ , making it very efficient.
|
| 486 |
+
|
| 487 |
+
# F.2 PSEUDO CODE OF K-FAC
|
| 488 |
+
|
| 489 |
+
Algorithm 1 K-FAC with $L _ { 2 }$ regularization and K-FAC with weight decay. Subscript $l$ denotes layers, $\mathbf { w } _ { l } = \mathrm { v e c } ( \mathbf { W } _ { l } )$ . We assume zero momentum for simplicity.
|
| 490 |
+
|
| 491 |
+
Require: $\eta$ : stepsize
|
| 492 |
+
Require: $\beta$ : weight decay
|
| 493 |
+
Require: stats and inverse update intervals $T _ { \mathrm { s t a t s } }$ and $T _ { \mathrm { i n v } }$ $k \gets 0$ and initialize $\{ \mathbf { W } _ { l } \} _ { l = 1 } ^ { L } , \{ \mathbf { S } _ { l } \} _ { l = 1 } ^ { L } , \{ \mathbf { A } _ { l } \} _ { l = 1 } ^ { L }$ while stopping criterion not met do $k \gets k + 1$ if $k \equiv 0$ (mod $T _ { \mathrm { s t a t s , } }$ ) then Update the factors $\{ \mathbf { S } _ { l } \} _ { l = 1 } ^ { L } , \{ \mathbf { A } _ { l } \} _ { l = 0 } ^ { L - 1 }$ with moving average end if if $k \equiv 0$ (mod late th $T _ { \mathrm { i n v . } }$ ) thenerses $\{ [ \mathbf { S } _ { l } ] ^ { - 1 } \} _ { l = 1 } ^ { L } , \{ [ \mathbf { A } _ { l } ] ^ { - 1 } \} _ { l = 0 } ^ { L - 1 }$ $\mathbf { V } _ { l } = \nabla _ { \mathbf { W } _ { l } } \log p ( y | \mathbf { x } , \mathbf { w } ) + \beta \cdot \mathbf { W } _ { l }$ $\mathbf { W } _ { l } \gets \mathbf { W } _ { l } - \left( \eta [ \mathbf { A } _ { l } ] ^ { - 1 } \mathbf { V } _ { l } [ \mathbf { S } _ { l } ] ^ { - 1 } \right. \qquad \mathrm { ~ ) ~ }$ end while
|
| 494 |
+
|
| 495 |
+
# G ADDITIONAL RESULTS
|
| 496 |
+
|
| 497 |
+
# G.1 LARGE-BATCH TRAINING
|
| 498 |
+
|
| 499 |
+
It has been shown that K-FAC scales very favorably to larger mini-batches compared to SGD, enjoying a nearly linear relationship between mini-batch size and per-iteration progress for medium-to-large sized mini-batches (Martens & Grosse, 2015; Ba et al., 2016). However, Keskar et al. (2016) showed that large-batch methods converge to sharp minima and generalize worse. In this subsection, we measure the generalization performance of K-FAC with large batch training and analyze the effect of weight decay.
|
| 500 |
+
|
| 501 |
+
In Table 3, we compare K-FAC with SGD using different batch sizes. In particular, we interpolate between small-batch (BS128) and large-batch (BS2000). We can see that in accordance with previous works (Keskar et al., 2016; Hoffer et al., 2017) the move from a small-batch to a large-batch indeed incurs a substantial generalization gap. However, adding weight decay regularization to K-FAC almost close the gap on CIFAR-10 and cause much of the gap diminish on CIFAR-100. Surprisingly, the generalization gap of SGD also disappears with well-tuned weight decay regularization. Moreover, we observe that the training loss cannot decrease to zero if weight decay is not used, indicating weight decay may also speed up the training.
|
| 502 |
+
|
| 503 |
+
Table 3: Classification results with different batch sizes. WD denotes weight decay regularization. We tune weight decay factor and learning rate using held-out validation set.
|
| 504 |
+
|
| 505 |
+
<table><tr><td rowspan=2 colspan=1>Dataset</td><td rowspan=2 colspan=1>Network</td><td rowspan=2 colspan=1>Method</td><td rowspan=1 colspan=6>BS128 BS640 BS2000</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>WD</td></tr><tr><td rowspan=1 colspan=1>CIFAR10</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>SGDK-FAC-FK-FAC-G</td><td rowspan=1 colspan=1>91.7193.1293.19</td><td rowspan=1 colspan=1>93.3993.9093.80</td><td rowspan=1 colspan=1>90.4692.9392.98</td><td rowspan=1 colspan=1>93.0993.5593.74</td><td rowspan=1 colspan=1>88.5092.1790.78</td><td rowspan=1 colspan=1>92.2493.3193.46</td></tr><tr><td rowspan=1 colspan=1>CIFAR10</td><td rowspan=1 colspan=1>ResNet32</td><td rowspan=1 colspan=1>SGDK-FAC-FK-FAC-G</td><td rowspan=1 colspan=1>92.9593.8093.44</td><td rowspan=1 colspan=1>95.1495.3595.04</td><td rowspan=1 colspan=1>91.6892.3091.80</td><td rowspan=1 colspan=1>94.4594.7994.73</td><td rowspan=1 colspan=1>89.7091.1590.02</td><td rowspan=1 colspan=1>94.6894.4394.85</td></tr><tr><td rowspan=1 colspan=1>CIFAR100</td><td rowspan=1 colspan=1>ResNet32</td><td rowspan=1 colspan=1>SGDK-FAC-FK-FAC-G</td><td rowspan=1 colspan=1>73.6174.4973.70</td><td rowspan=1 colspan=1>77.7378.0178.02</td><td rowspan=1 colspan=1>71.7473.5471.13</td><td rowspan=1 colspan=1>76.6777.3477.40</td><td rowspan=1 colspan=1>65.3871.6465.41</td><td rowspan=1 colspan=1>76.8777.1376.93</td></tr></table>
|
| 506 |
+
|
| 507 |
+
# G.2 THE CURVES OF TEST ACCURACIES
|
| 508 |
+
|
| 509 |
+

|
| 510 |
+
Figure 8: Test accuracy as a function of training epoch. We plot baseline vs $L _ { 2 }$ regularization vs weight decay regularization on CIFAR-10 and CIFAR-100 datasets. The $\ ' + \ '$ denotes with BN and data augmentation. Note that training accuracies of all the models are $1 0 0 \%$ in the end of the training. We smooth all the curves for visual clarity.
|
| 511 |
+
|
| 512 |
+
# G.3 OPTIMIZATION PERFORMANCE OF DIFFERENT OPTIMIZERS
|
| 513 |
+
|
| 514 |
+
While this paper mostly focus on generalization, we also report the convergence speed of different optimizers in deep neural networks; we report both per-epoch performance and wall-clock time performance.
|
| 515 |
+
|
| 516 |
+
We consider the task of image classification on CIFAR-10 (Krizhevsky & Hinton, 2009) dataset. The models we use consist of VGG16 (Simonyan & Zisserman, 2014) and ResNet32 (He et al., 2016). We compare our K-FAC-G, K-FAC-F with SGD, Adam (Kingma & Ba, 2014). We experiment with constant learning for K-FAC-G and K-FAC-F. For SGD and Adam, we set batch size as 128. For K-FAC, we use batch size of 640, as suggested by Martens & Grosse (2015).
|
| 517 |
+
|
| 518 |
+
In Figure 9, we report the training curves of different algorithms. Figure 9a show that K-FAC-G yields better optimization than other baselines in training loss per epoch. We highlight that the training loss decreases to 1e-4 within 10 epochs with K-FAC-G. Although K-FAC based algorithms take more time for each epoch, Figure 9b still shows wall-clock time improvements over the baselines.
|
| 519 |
+
|
| 520 |
+
In Figure ${ 9 \mathrm { c } }$ and 9d, we report similar results on the ResNet32. Note that we make the network wider with a widening factor of 4 according to Zagoruyko & Komodakis (2016). K-FAC-G outperforms both K-FAC-F and other baselines in term of optimization per epoch, and compute time.
|
| 521 |
+
|
| 522 |
+

|
| 523 |
+
Figure 9: CIFAR-10 image classification task.
|
md/train/B1mAJI9gl/B1mAJI9gl.md
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TOWARDS UNDERSTANDING THE INVERTIBILITY OF CONVOLUTIONAL NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anna C. Gilbert1 Yi Zhang1 Kibok Lee1 Yuting Zhang1 Honglak Lee1,2
|
| 4 |
+
|
| 5 |
+
1University of Michigan, Ann Arbor, MI 48109 2Google Brain, Mountain View, CA 94043 {annacg,yeezhang,kibok,yutingzh,honglak}@umich.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Several recent works have empirically observed that Convolutional Neural Nets (CNNs) are (approximately) invertible. To understand this approximate invertibility phenomenon and how to leverage it more effectively, we focus on a theoretical explanation and develop a mathematical model of sparse signal recovery that is consistent with CNNs with random weights. We give an exact connection to a particular model of model-based compressive sensing (and its recovery algorithms) and random-weight CNNs. We show empirically that several learned networks are consistent with our mathematical analysis and then demonstrate that with such a simple theoretical framework, we can obtain reasonable reconstruction results on real images. We also discuss gaps between our model assumptions and the CNN trained for classification in practical scenarios.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Deep learning has achieved remarkable success in many technological areas (Bengio et al., 2013; Schmidhuber, 2015), including computer vision (Krizhevsky et al., 2012; Szegedy et al., 2015; Simonyan and Zisserman, 2015), automatic speech recognition (Hinton et al., 2012; Hannun et al., 2014), natural language processing (Collobert et al., 2011; Mikolov et al., 2013; Cho et al., 2014), bioinformatics (Chicco et al., 2014), even high energy particle physics (Baldi et al., 2014). In particular, deep Convolutional Neural Networks (CNNs) (LeCun et al., 1989; Krizhevsky et al., 2012; Simonyan and Zisserman, 2015) have been a critical enabling technique for analyzing images and sequential data.
|
| 14 |
+
|
| 15 |
+
Following the unprecedented success of deep networks, there has been some theoretical work (e.g., Arora et al. (2014; 2015); Paul and Venkatasubramanian (2014)) that suggest several mathematical models for different deep learning architectures. However, theoretical analysis and understanding lag behind the very rapid evolution and empirical success of deep architectures, and more theoretical analysis is needed to better understand the state-of-the-art deep architectures, and possibly to improve them further.
|
| 16 |
+
|
| 17 |
+
In this paper, we attempt to address the gap between the empirical success and theoretical understanding of the Convolutional Neural Nets, in particular its invertibility (i.e., reconstructing the input from the hidden activations), by analyzing a simplified mathematical model using random weights.1
|
| 18 |
+
|
| 19 |
+
This property is intriguing because convolutional neural networks are typically trained with discriminative objectives (i.e., unrelated to reconstruction) with a large amount of labels, such as the ImageNet dataset. For example, Dosovitskiy and Brox (2016) used upsampling-deconvolutional architectures to invert the hidden activations of feedforward CNNs to the input domain. In other related work, Zhao et al. (2016) proposed stacked a what-where network via a (deconvolutional) decoder and demonstrate its promise in unsupervised and semi-supervised settings. Bruna et al. (2014) studied signal discovery from generalized pooling operators using image patches on non-convolutional small scale networks and datasets. Zhang et al. (2016) showed that CNNs discriminately trained for image classification (e.g., VGG Net (Simonyan and Zisserman, 2015)) are almost fully invertible using pooling switches. Despite these interesting results, there is no clear theoretical explanation as to why CNNs are invertible yet.
|
| 20 |
+
|
| 21 |
+
We introduce three new concepts that, coupled with the accepted notion that images have sparse representations, guide our understanding of CNNs:
|
| 22 |
+
|
| 23 |
+
1. we provide a particular model of sparse linear combinations of the learned filters that are consistent with natural images; also, this model of sparsity is itself consistent with the feedforward network;
|
| 24 |
+
2. we show that the effective matrices that capture explicitly the convolution of multiple filters exhibit a model-Restricted Isometry Property (model-RIP) (Baraniuk et al., 2010); and
|
| 25 |
+
3. our model can explain each layer of the feedforward CNN algorithm as one iteration of Iterative Hard Thresholding (IHT) (Blumensath and Davies, 2009) for model-based compressive sensing and, hence, we can reconstruct the input simply and accurately.
|
| 26 |
+
|
| 27 |
+
In other words, we give a theoretical connection to a particular model of model-based compressive sensing (and its recovery algorithms) and CNNs. We show empirically that large-scale deep convolution networks are consistent with our mathematical analysis. We then demonstrate that with such a simple theoretical framework, we can obtain reasonable reconstruction results on real images, using filters from trained networks. Finally, we observe that it makes a significant difference which filters one uses for encoding and decoding, whether they are trained specifically for reconstruction, or random, or the same for both procedures. This paper explores these properties and elucidate specific empirical aspects that any more sophisticated mathematical model should take into account.2
|
| 28 |
+
|
| 29 |
+
# 2 PRELIMINARIES
|
| 30 |
+
|
| 31 |
+
In this section, we set the stage for our mathematical analysis in Section 3. We begin with discussion on the use of random weights in (convolutional) neural networks, and then provide the definitions and models for CNNs. Then, we discuss compressive sensing and sparse signal recovery. We define a particular model of sparsity that we will use throughout our analysis and detail the Iterative Hard Thresholding (IHT) algorithm which is the basis of our reconstruction analysis.
|
| 32 |
+
|
| 33 |
+
In order to simplify our notation and to make clear our analysis, we focus on a single layer in the analysis instead of multiple layers.3 Also, we assume that all of our input signals are vectors rather than matrices and that any operations we would ordinarily carry out on images (e.g., convolving with a filter bank, dividing into regions over which we pool coefficients), we do on vectors with the appropriate modifications for a simplified structure. While these assumptions ease our exposition, they do not change the nature of our arguments nor their implications for images. Furthermore, we demonstrate the validity of our results in two-dimensional natural images.
|
| 34 |
+
|
| 35 |
+
# 2.1 EFFECTIVENESS OF GAUSSIAN RANDOM FILTERS
|
| 36 |
+
|
| 37 |
+
We analyze theoretically CNNs with Gaussian random filters, which have been surprisingly effective in unsupervised and supervised deep learning tasks. Jarrett et al. (2009) showed that random filters in 2-layer CNNs work well for image classification. In addition, Saxe et al. (2011) observed that convolutional layer followed by pooling layer is frequency selective and translation invariant, even with random filters, and these properties lead to good performance for object recognition tasks. On the other hand, Giryes et al. (2016) proved that CNNs with random Gaussian filters have metric preservation property, and they argued that the role of training is to select better hyperplanes discriminating classes by distorting boundary points among classes. According to their observation, random filters are in fact a good choice if training data are initially well-separated. Also, He et al. (2016) empirically showed that random weight CNNs can do image reconstruction well.
|
| 38 |
+
|
| 39 |
+
To better demonstrate the effectiveness of Gaussian random CNNs, we evaluate their classification performance on CIFAR-10; see Section 4.1 for details. We find that a 3-layer Gaussian random CNN is able to achieve $\sim 7 5 \%$ accuracy on the test set, with only the last classifier layer optimized, (see Table 1 for more details). Even though this number is far from the state-of-the-art results, it is surprisingly good considering the networks are almost untrained. Our theoretical results may provide another new perspective on explaining these phenomena.
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\begin{array} { r l } { W } & { x \quad = \quad h } \\ \underbrace { \frac { l } { \sqrt { 1 + \cdots } } - \cdots - \cdots } _ | \begin{array} { l } { \frac { l } { 1 } } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \cdots - \cdots } \\ { \frac { l } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \cdots - \cdots } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \cdots - \cdots } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \cdots - \cdot } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \cdots - \cdots } \\ { \frac { l } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { - \cdots } - \frac { l } { \sqrt { 1 + \cdots } } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { - \cdots } - \frac { l } { \sqrt { 1 + \cdots } } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { - \cdots } - \frac { l } { \sqrt { 1 + \cdots } } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { - \cdots } - \frac { l } { \sqrt { 1 + \cdots } } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \frac { l } { \sqrt { - \cdots } - \frac { l } { \sqrt { 1 + \cdots } } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \\ { \quad - \frac { l } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } - \frac { 1 } { \sqrt { 1 + \cdots } } } \end{array} ] , M [ \begin{array} { l } \frac { l } \end{array} \end{array}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
Figure 1: One-dimensional CNN architecture where $\boldsymbol { W } \in \mathbb { R } ^ { K n \times M D }$ is the matrix instantiation of convolution over $M$ channels with a filter bank consisting of $K$ different filters. Note that a filter bank has $\mathbf { K }$ filters of size $l \times M$ , such that there are $l M K$ parameters in this architecture.
|
| 46 |
+
|
| 47 |
+
# 2.2 CONVOLUTIONAL NEURAL NETS
|
| 48 |
+
|
| 49 |
+
We define a single layer of our CNN as follows. We assume that the input signal $_ { \textbf { \em x } }$ consists of $M$ channels, each of length $D$ , and we write $\pmb { x } \in \mathbb { R } ^ { M D }$ . For each of the input channels, $m = 1 , \ldots , M$ let ${ \pmb w } _ { i , m }$ , $i = 1 , \ldots , K$ denote one of $K$ filters, each of length $\ell$ . Let $t$ be the stride length, the number of indices by which we shift each filter. Note that $t$ can be larger than 1.
|
| 50 |
+
|
| 51 |
+
We assume that the number of shifts, $n = ( D - \ell ) / t + 1$ , is an integer. Let $\pmb { w } _ { i , m } ^ { j }$ be a vector of length $D$ that consists of the $( i , m )$ -th filter shifted by $j t , j = 0 , \ldots , n - 1$ (i.e., $\pmb { w } _ { i , m } ^ { j }$ has at most $\ell$ non-zero entries). We will concatenate over the $M$ channels each of these vectors (as row vectors) to form a large matrix, $W$ , which is the $K n \times M D$ matrix made up of $K$ blocks of the $n$ shifts of each filter in each of $M$ channels. We assume that $K n \ge M D$ . We also assume that the $K n$ row vectors of $W$ span $\mathbb { R } ^ { M D }$ and that we have normalized the rows so that they have unit $\ell _ { 2 }$ norm. We assume that the hidden units of the feed-forward CNN are computed by multiplying an input signal $\pmb { x } \in \mathbb { R } ^ { M D }$ by the matrix $W$ (i.e., convolving, in each channel, by a filter bank of size $K$ , and summing over the channels to obtain $K n$ outputs), applying the ReLU function to the $K n$ outputs, and then selecting the value with maximum absolute value in each of the $K$ blocks; i.e., we perform max pooling over each of the convolved filters and sum over the channels.4 We use $h = W x$ for the hidden activation computed by a single layer CNN without pooling. Figure 1 illustrates the architecture.
|
| 52 |
+
|
| 53 |
+
# 2.3 COMPRESSIVE SENSING
|
| 54 |
+
|
| 55 |
+
Let $\Phi$ be a $i \times j$ matrix with $j > i$ . We say that $\Phi$ satisfies the Restricted Isometry Property $\mathrm { R I P } ( k , \delta _ { k } )$ (or, just RIP) if there is a distortion factor $\delta _ { k } > 0$ such that for all $z \in \mathbb { R } ^ { j }$ with exactly $k$ non-zero entries, $( 1 - \delta _ { k } ) \| z \| _ { 2 } ^ { 2 } \leq \| \Phi z \| _ { 2 } ^ { 2 } \leq ( 1 + \delta _ { k } ) \| z \| _ { 2 } ^ { 2 }$ . If $\Phi$ satisfies RIP (for appropriate sparsity level $k$ and sufficiently small $\delta _ { k }$ ) and if $z \in \mathbb { R } ^ { j }$ is $k$ -sparse, then, given the vector $\mathbf { \bar { x } } = \Phi \boldsymbol { z } \in \bar { \mathbb { R } } ^ { i }$ , we can efficiently recover $_ z$ (see Candés (2008) for more details)5. There are many efficient algorithms for doing so, including $\ell _ { 1 }$ sparse coding (e.g., $\ell _ { 2 }$ minimization with $\ell _ { 1 }$ regularization) and greedy, iterative algorithms (such as Iterative Hard Thresholding or IHT).
|
| 56 |
+
|
| 57 |
+
Model-based compressive sensing. While sparse signals are a natural model for some applications, they are less realistic for CNNs. We consider a vector $z \in \mathbb { R } ^ { K n }$ as the true sparse code for generating the CNN input $_ { \textbf { \em x } }$ with a particular model of sparsity. Rather than permitting $k$ non-zero entries anywhere in the vector $_ z$ , we divide the support of $_ z$ into $K$ contiguous blocks of size $n$ and we stipulate that from each block there is at most one non-zero entry in $_ z$ with a total of $k$ non-zero entries. We call a vector with this sparsity model model- $k$ -sparse and denote the union of all $k$ - sparse subspaces with this structure analysis, we consider linear combinati $\mathcal { M } _ { k }$ . It is clear tof two model- at -s $\mathcal { M } _ { k }$ contains signals. $n ^ { k } \binom { K } { k }$ subspaces. In ourrecise, suppose that $k$ $z = \alpha _ { 1 } z _ { 1 } + \alpha _ { 2 } z _ { 2 }$ is the linear combination of two elements in $\mathcal { M } _ { k }$ . Then, we say that $_ z$ lies in the linear subspace $\mathcal { M } _ { k } ^ { 2 }$ that consists of all linear combinations of vectors from $\mathcal { M } _ { k }$ .
|
| 58 |
+
|
| 59 |
+
We say that a matrix $\Phi$ satisfies the model-RIP condition for parameter $k$ if, there is a distortion factor $\delta _ { k } > 0$ such that, for all $z \in \mathcal { M } _ { k }$ ,
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
( 1 - \delta _ { k } ) \| z \| _ { 2 } ^ { 2 } \leq \| \Phi z \| _ { 2 } ^ { 2 } \leq ( 1 + \delta _ { k } ) \| z \| _ { 2 } ^ { 2 } .
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
See Baraniuk et al. (2010) for the definitions of model sparse and model-RIP, as well as the necessary modifications to account for signal noise and compressible (as opposed to exactly sparse) signals (which we have neglected to consider to keep our analysis simple). Intuitively speaking, a matrix that satisfies the model-RIP is a nearly an orthonormal matrix for a particular set of sparse vectors with a particular sparsity model or pattern.
|
| 66 |
+
|
| 67 |
+
For our analysis, we also need matrices $\Phi$ that satisfy the model-RIP condition for vectors $z \in \mathcal { M } _ { k } ^ { 2 }$ We denote the distortion factor $\delta _ { 2 k }$ for such matrices. Note that $\delta _ { k } \le \delta _ { 2 k } < 1$ .
|
| 68 |
+
|
| 69 |
+
# Algorithm 1 Model-based IHT
|
| 70 |
+
|
| 71 |
+
Input: model-RIP matrix $\Phi$ , measure ments $x = \Phi z$ , structured sparse approximation algorithm $\mathbb { M }$
|
| 72 |
+
Output: $k$ -sparse approximation $_ z$
|
| 73 |
+
1: Initialize $z _ { \mathrm { 0 } } = \mathrm { 0 }$ , ${ \pmb d } = { \pmb x }$ , $i = 0$
|
| 74 |
+
2: while stopping criteria not met do
|
| 75 |
+
3: $\begin{array} { r l } & { i i + 1 } \\ & { b z _ { i - 1 } + \Phi ^ { T } d } \\ & { z _ { i } \mathbb { M } ( b , k ) } \\ & { d x - \Phi z _ { i } } \end{array}$
|
| 76 |
+
4:
|
| 77 |
+
5:
|
| 78 |
+
6:
|
| 79 |
+
7: end while
|
| 80 |
+
8: return $z z _ { i }$
|
| 81 |
+
|
| 82 |
+
Many efficient algorithms have been proposed for sparse coding and compressive sensing (Olshausen et al., 1996; Mallat and Zhang, 1993; Beck and Teboulle, 2009). As with traditional compressive sensing, there are efficient algorithms for recovering model- $k$ -sparse signals from measurements (see Baraniuk et al. (2010)), assuming the existence of an efficient structured sparse approximation algorithm M, that given an input vector and the sparsity parameter, returns the vector closest to the input with the specified sparsity structure.
|
| 83 |
+
|
| 84 |
+
In convolutional neural networks, the max pooling operator finds the downsampled activations that are closest to the activations of the original size by retaining the most significant values. The max pooling can be viewed as two steps: 1) zeroing out the locally non-maximum values;
|
| 85 |
+
|
| 86 |
+
2) downsampling the activations with the locally maximum values retained. To study the pooled activations with sparsity structures, we can recover dimension loss from the second step (downsampling step) by an unsampling operator. This procedure defines our structured sparse approximation algorithm $\mathbb { M } ( z , k )$ , where $_ { z }$ is the original (unpooled) code, and $k$ is the sparsity parameter for further sparsification, which guarantees that $\mathbb { M } ( z , k )$ is a model- $k$ -sparse signal. With the standard layered formulation for neural networks, we have
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathbb { M } ( z , k ) = \mathrm { b l o c k - s p a r s i f y } ( \operatorname { u p s a m p l e } ( \operatorname { m a x - p o o l } ( z ) , s ) , k ) ,
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
where $\pmb { s }$ denotes the upsampling switches that indicate where to place the non-zero values in the upsampled activations. Taking the pooling switches known from the max pooling operation as $\pmb { s }$ , we specifically define $\mathbb { M }$ as the nesting of the max pooling and the unpooling with known switch. We define this special case as
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathbb { M } _ { \mathrm { k n o w n } } ( z , k ) = \mathrm { b l o c k - s p a r s i f y } ( \mathrm { u p s a m p l e } ( \operatorname* { m a x } \mathrm { - p o o l } ( z ) , \operatorname* { m a x } \mathrm { - p o o l } \mathrm { - s w i t c h } ( z ) ) , k ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
Alternatively, using the fixed uniform switches as $\pmb { s }$ , we specifically define $\mathbb { M }$ as the nesting of the max pooling and the naive unsampling, denoted by $\mathbb { M } _ { \mathrm { f i x e d } }$ . In the rest of this paper, our theoretical analysis are generic to any type of valid upsampling switches6, so we use $\mathbb { M } ( z , k )$ to denote the structured sparse approximation algorithm without worrying about $\pmb { s }$ . The two special cases $\mathbb { M } _ { \mathrm { k n o w n } }$ and $\mathbb { M } _ { \mathrm { f i x e d } }$ are used in the empirical analysis when we need to specify $\mathbb { M } ( z , k )$ as a fully concrete operator.
|
| 99 |
+
|
| 100 |
+
The main recovery algorithm that we focus on is a model-sparse version of Iterative Hard Thresholding (IHT) (see Blumensath and Davies (2009)), not because we are interested in recovering modelsparse signals, per se, but because one iteration of IHT for our model of sparsity captures exactly a feedforward CNN.7 Algorithm 1 describes the model-based IHT algorithm. In particular, the sequence of steps 4–6 in the middle IHT (without the outer iterative loop) is exactly one layer of a feedforward CNN. As a result, the theoretical analysis of IHT for model-based sparse signal recovery serves as a guide for how to analyze the approximation activations of a CNN.
|
| 101 |
+
|
| 102 |
+
# 3 ANALYSIS
|
| 103 |
+
|
| 104 |
+
To motivate our more formal analysis, we begin with a simple example. Suppose that the matrix $W$ is an orthonormal basis for $\mathbb { R } ^ { M D }$ and define $\mathbf { \bar { \Psi } } \mathbf { \Psi } \mathbf { \Psi } \mathbf { \Psi } \mathbf { \Psi } \mathbf { \bar { \Psi } } \mathbf { \Psi } \mathbf { \Psi } \mathbf { \Psi } \mathbf { \bar { \Psi } } - \mathbf { \bar { \Psi } } \mathbf { \Psi } \mathbf { \Psi } ^ { T } ]$ .
|
| 105 |
+
|
| 106 |
+
Proposition 1. A one-layer CNN using the matrix $\Psi ^ { T }$ , with no pooling, gives perfect reconstruction (with the matrix Ψ) for any input vector x ∈ RMD.
|
| 107 |
+
|
| 108 |
+
Proof. Because we have both the positive and the negative dot products of the signal with the basis vectors in ReL $\operatorname { U } ( \Psi ^ { T } \pmb { x } ) = \operatorname { R e L U } \bigg ( \bigg [ \pmb { W } \pmb { x } \bigg ] \bigg )$ , we have positive and negative versions of the hidden units $\pmb { h } _ { + } = \mathrm { R e L U } ( W \pmb { x } )$ and $\pmb { h } _ { - } = \mathrm { R e L U } ( - W \pmb { x } )$ where we decompose $\pmb { h } = \pmb { W } \pmb { x } = \pmb { h } _ { + } - \pmb { h } _ { - }$ into the difference of two non-negative vectors, the positive and the negative entries of $^ { h }$ . From this decomposition, we can easily reconstruct the original signal via
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\Psi \left[ \stackrel { h _ { + } } { h } \right] = \left[ W ^ { T } \quad - W ^ { T } \right] \left[ \stackrel { h _ { + } } { h } \right] = W ^ { T } ( h _ { + } - h _ { - } ) = W ^ { T } h = W ^ { T } W x = x .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
In the example above, we have pairs of vectors $( { \pmb w } , - { \pmb w } )$ in our matrix $\Psi$ . This settings allow us to turn what would ordinarily be a nonlinear function, ReLU, into a linear one. In fact, the assumption that trained CNN filters come in positive and negative is validated by Shang et al. (2016), which makes a CNN much easier to analyze within the model compressed sensing framework.
|
| 115 |
+
|
| 116 |
+
Suppose that we have a vector $_ { z }$ that we split into positive and negative components, $z = z _ { + } - z _ { - }$ , and that we synthesize (or construct) a signal $_ { \textbf { \em x } }$ from $_ z$ using the matrix $\begin{array} { r l } { \left[ \bar { W ^ { T } } \right. } & { { } \left. - W ^ { T } \right] } \end{array}$ . Then, we have
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\left[ \begin{array} { l l } { \boldsymbol { W } ^ { T } } & { - \boldsymbol { W } ^ { T } } \end{array} \right] \left[ \begin{array} { l } { \boldsymbol { z } _ { + } } \\ { \boldsymbol { z } _ { - } } \end{array} \right] = \boldsymbol { W } ^ { T } ( \boldsymbol { z } _ { + } - \boldsymbol { z } _ { - } ) = \mathbf { W } ^ { T } \boldsymbol { z } = \boldsymbol { x } .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Next, suppose that we multiply $\mathbf { x } = \mathbf { W } ^ { T } z$ by the transpose of the same matrix, we find $\left[ { \frac { W } { - W } } \right] x =$ $\left[ \begin{array} { c } { W W ^ { T } z } \\ { - W W ^ { T } z } \end{array} \right]$ and, if we apply ReLU to this vector, we produce $\left[ \begin{array} { l } { ( W W ^ { T } z ) _ { + } } \\ { ( W W ^ { T } z ) _ { - } } \end{array} \right]$ a vector that is split into its positive and negative components. To determine whether or not we have “reconstructed” the vector $_ z$ , the structure of the product $W W ^ { T }$ is crucial. In addition, this calculation shows that if we have both positive and negative pairs of filters or vectors, then the ReLU function applied to both the positive and negative dot products simply splits the vector into the positive and negative components. These components are then reassembled in the next computation. For this reason, in the analysis in the following sections, it is sufficient to consider $\mathbf { \boldsymbol { W } } ^ { T } \boldsymbol { z } = \mathbf { \boldsymbol { x } }$ and $W x = h$ with max pooling alone applied to $^ { h }$ , assuming that all of the entries in the vectors are real numbers, rather than only non-negative.
|
| 123 |
+
|
| 124 |
+
# 3.1 MODEL-RIP AND RANDOM FILTERS
|
| 125 |
+
|
| 126 |
+
Our first main result says that if we use Gaussian random filters in our CNN, then, with high probability, the transpose of the matrix $W$ formed by the convolutions with these filters has the model-RIP property. In other words, Gaussian random filters generate a matrix whose transpose $W ^ { T }$ is almost an orthonormal transform for sparse signals with a particular sparsity pattern (that is consistent with our pooling procedure). The bounds in the theorem tell us that we must balance the size of the filters $\ell$ and the number of channels $M$ against the sparsity of the hidden units $k$ , the number of the filter banks $K$ , the number of shifts $n$ , the distortion parameter $\delta _ { k }$ , and the failure probability $\epsilon$ . The proof is in Appendix A.
|
| 127 |
+
|
| 128 |
+
Theorem 3.1. Assume that we have $M K$ vectors ${ \pmb w } _ { i , m }$ of length $\ell$ in which each entry is a scaled i.i.d. (sub-)Gaussian random variable with mean zero and variance $^ { l }$ (the scaling factor is $1 / { \sqrt { M \ell } } )$ . Let t be the stride length (where $n = ( D - \ell ) / t + 1 )$ and build the structured random matrix $W$ as the weight matrix in a single layer CNN for $M$ -channel input dimension $D$ . If
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\frac { M \ell ^ { 2 } } { D } \geq \frac { C k } { \delta _ { k } ^ { 2 } } \Big ( \log ( K ) + \log ( n ) - \log ( \epsilon ) \Big ) ,
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
then, with probability $1 - \epsilon$ , the $M D \times K n$ matrix $W ^ { T }$ satisfies the model-RIP for model $\mathcal { M } _ { k }$ with parameter $\delta _ { k }$ .
|
| 135 |
+
|
| 136 |
+
We also note that the same analysis can be applied to the sum of two model- $k$ -sparse signals, with changes in the constants (that we do not track here).
|
| 137 |
+
|
| 138 |
+
Corollary 3.2. Random matrices with the CNN structure have, with high probability, the model-RIP property for $\mathcal { M } _ { k } ^ { 2 }$ .
|
| 139 |
+
|
| 140 |
+
Other examples of matrices that satisfy model-RIP (both empirically and via a less sophisticated analysis on the dot products between any two columns) include wavelets and localized Fourier bases; both examples that can be easily and efficiently implemented via convolutions in a CNN.
|
| 141 |
+
|
| 142 |
+
# 3.2 RECONSTRUCTION BOUNDS
|
| 143 |
+
|
| 144 |
+
To distinguish the true sparse code $_ z$ and its reconstruction, we use $\hat { z } = \mathbb { M } ( \boldsymbol { h } , \boldsymbol { k } ) = \mathbb { M } ( W \boldsymbol { x } , \boldsymbol { k } )$ for the reconstruction by CNN. Our next result tells us that if we compute the hidden units $^ { h }$ from an input signal $_ { \textbf { \em x } }$ using a weight matrix $W$ whose transpose has the model-RIP and using max pooling over each filter $( \hat { z } )$ , then we can reconstruct (approximately) the input signal $_ { \textbf { \em x } }$ simply by multiplying the hidden units by $W$ . This result bounds the relative error between the approximate reconstruction $\hat { \pmb x }$ and the input as a function of the distortion for the model-RIP. In our analysis, we assume that the input signal $\mathbf { \bar { x } } = \mathbf { W } ^ { T } \boldsymbol { z }$ is a sparse linear combination of hidden activations, captured approximately by the filters in $W$ . See Appendix B for the detailed proofs. Part of our analysis also shows that the hidden units $\hat { z }$ are approximately the putative coefficient vector $_ z$ in the sparse linear representation for the input signal.
|
| 145 |
+
|
| 146 |
+
Theorem 3.3. We assume that $W ^ { T }$ satisfies the $\mathcal { M } _ { k } ^ { 2 }$ -RIP with constant $\delta _ { k } \leq \delta _ { 2 k } < 1 .$ . If we use $W$ in a single layer CNN both to compute the hidden units $\hat { z }$ and to reconstruct the input $_ { \textbf { \em x } }$ from these hidden units as $\hat { \pmb x }$ so that $\hat { \pmb { x } } = \pmb { W } ^ { \hat { T } } \mathbb { M } ( \pmb { W } \pmb { x } , \boldsymbol { k } )$ , the error in our reconstruction is
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\| \hat { \pmb x } - \pmb x \| _ { 2 } \le \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \frac { \sqrt { 1 + \delta _ { 2 k } } } { \sqrt { 1 - \delta _ { 2 k } } } \| \pmb x \| _ { 2 } .
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
Recall that the structured sparsity approximation algorithm $\mathbb { M }$ includes the downsampling caused by pooling and an unsampling operator. Theorem 3.3 is applicable to any type of upsampling switches, so our reconstruction bound is generic to the particular design choice on how to recover the activation size in a decoding neural network.
|
| 153 |
+
|
| 154 |
+
# 4 EXPERIMENTAL EVIDENCE AND ANALYSIS
|
| 155 |
+
|
| 156 |
+
In this section, we provide experimental validation of our theoretical model and analysis. We first validate experimentally the relevance of our assumption by examining the effectiveness of random filter CNNs. We then provide an experimental validation of our theoretical analysis on the synthetic 1D case, then we provide experimental results on more realistic scenarios. In particular, we study popular deep neural networks trained for image classification on the ImageNet ILSVRC 2012 dataset (Deng et al., 2009). We calculate empirical model-RIP bounds for $\mathbf { \bar { W } } ^ { T }$ , showing that they are consistent with theory. Our results are also consistent with a long line of research shows that it is reasonable to model real, natural images as sparse linear combinations over learned dictionaries (e.g., Boureau et al. (2008); Le et al. (2013); Lee et al. (2008); Olshausen et al. (1996); Ranzato et al. (2007); Yang et al. (2010)). In addition, we verify our theoretical bounds for the reconstruction error $\| \pmb { x } - \pmb { W } ^ { T } \hat { \pmb { z } } \| _ { 2 } / \| \pmb { x } \| _ { 2 }$ on real images. (This is the relative $\ell _ { 2 }$ distance between the original image and the reconstruction.) We investigate both randomly sampled filters and empirically learned filters in these experiments. Our implementation is based on the Caffe (Jia et al., 2014) and MatConvNet (Vedaldi and Lenc, 2015) toolboxes.
|
| 157 |
+
|
| 158 |
+
# 4.1 EVALUATION OF GAUSSIAN RANDOM CNNS ON CIFAR-10
|
| 159 |
+
|
| 160 |
+
To show the practical relevance of our theoretical assumptions on using random filters for CNNs as stated in Section 2.1, we evaluate simple CNNs with Gaussian random filters (with i.i.d. zeromean unit-variance entries) on the CIFAR-10 dataset. The goal of this experiment is not to achieve state-of-the-art results, but to examine practical relevance of our assumption on random filter CNNs. Once the CNNs weights are initialized (randomly), they are fixed during the training of the classifiers. Specifically, we test random CNNs with 1, 2, and 3 convolutional layers, where we use ReLU as the activation. A $2 \times 2$ max pooling layer follows each convolutional layer to down-sample the feature map.8 We experiment with different filter sizes $( 3 , 5 , 7 )$ and numbers of channels (64, 128, 256, 1024, 2048) and report the classification accuracy of the best-performing architectures based on cross-validation in Table 1. We also report the best performance using learnable filters for comparison. More details about the architectures can be found in Section C.1 of the supplementary materials. We observe the CNNs with Gaussian random filters achieve surprisingly good classification performance (implying that they serve as reasonable representation of input data), although fully learnable CNN counterparts perform better. Our experimental results are also consistent with the observations made by Jarrett et al. (2009) and Saxe et al. (2011). Overall, these results seem to suggest that the CNNs with Gaussian random filters might be a reasonable setup which is amenable to mathematical analysis while not being too far off in terms of practical relevance.
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>1 layer</td><td rowspan=1 colspan=1>2 layers</td><td rowspan=1 colspan=1>3layers</td></tr><tr><td rowspan=1 colspan=1>Random filters</td><td rowspan=1 colspan=1>66.5%</td><td rowspan=1 colspan=1>74.6%</td><td rowspan=1 colspan=1>74.8%</td></tr><tr><td rowspan=1 colspan=1>Learned filters</td><td rowspan=1 colspan=1>68.1%</td><td rowspan=1 colspan=1>83.3%</td><td rowspan=1 colspan=1>89.3%</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Table 1: Classification accuracy of CNNs with random and learnable filters on CIFAR-10. A typical layer consists of four operators: convolution, ReLU, batch normalization and max pooling. Networks with optimal filter size and numbers of output channels are used (see Section C.1 in the supplementary materials for the architecture details). The random filters, assumed in our theoretical analysis, perform reasonably well, not far off the learned filters.
|
| 165 |
+
|
| 166 |
+
# 4.2 EXPERIMENTAL VALIDATION OF THE ANALYSIS IN 1D SYNTHETIC DATA
|
| 167 |
+
|
| 168 |
+
We use 1-D synthetic data to empirically show the basic validity of our theory in terms of the modelRIP condition in Equation (1) and reconstruction bound in Theorem 3.3. We plot the histograms√ of the empirical model-RIP values of 1D Gaussian random filters $W$ ( scaled by $1 / \sqrt { l M }$ ) with size $l \times 1 \times M \times K = 5 \times 1 \times 3 2 \times 9 6$ on 1D $\mathcal { M } _ { k }$ sparse signal $_ z$ with size $D = 3 2$ and sparsity $k = 1 0$ , whose non-zero elements are drawn from a uniform distribution on $[ - 1 , 1 ]$ . The histograms in Figure 2a and 2b are tightly centered around 1, suggesting that $W ^ { T }$ satisfies the model-RIP condition in Equation (1) and its corollary from Lemma B.1 in the supplementary materials. We also empirically show the reconstruction bound in Theorem 3.3 on synthetic vectors $\mathbf { \Psi } _ { \pmb { x } } = \mathbf { W } ^ { T } \boldsymbol { z }$ (Figure 2c). The reconstruction error is concentrated at around 0.1–0.2 and bound under 0.5. Results in Figure 2 suggests the practical validity of our theory when the model assumptions hold.
|
| 169 |
+
|
| 170 |
+
# 4.3 ARCHITECTURES AND DATASET
|
| 171 |
+
|
| 172 |
+
We conduct the rest of our experimental evaluations on the 16-layer VGGNet (Model D in Simonyan and Zisserman (2015)),9 where the computation is carried out on images; e.g., convolution with a 2-D filter bank and pooling on square regions. In contrast to the theory, the realistic network does not pool activations over all the possible shifts for each filter, but rather on non-overlapping patches. The networks are trained for the large-scale ImageNet classification task, which is important for extending to other supervised tasks in vision. The main findings on VGGNet are presented in the rest of this section; we also provide some analysis on AlexNet (Krizhevsky et al., 2012) in the supplementary materials.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 2: For 1D scaled Gaussian random filters $W$ , we plot the histogram of ratios (a) $\| \boldsymbol { W } ^ { T } \boldsymbol { z } \| _ { 2 } / \| \boldsymbol { z } \| _ { 2 }$ (modelRIP condition in Equation (1); supposed to be concentrated at 1), (b) $\| W W ^ { T } z \| _ { 2 } / \| z \| _ { 2 }$ (model-RIP corollary from Lemma B.1 in the supplementary materials; supposed to be concentrated at 1), and (c) $\| \hat { \pmb x } - \pmb x \| _ { 2 } / \| \pmb x \| _ { 2 }$ (reconstruction bound in Theorem 3.3, supposed to be small), where $_ { z }$ is a $\mathcal { M } _ { k }$ sparse signal that generates the vector $_ { \pmb { x } }$ and $\pmb { \hat { x } } = \pmb { W } ^ { T } \mathbb { M } _ { \mathrm { f i x e d } } ( \pmb { W } \pmb { x } , \hat { k } )$ is the reconstruction of $_ { \textbf { \em x } }$ , where we use the naive unsampling to recover the reduced dimension due to pooling (see Section 2.3).
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>c(1,1)</td><td rowspan=1 colspan=1>c(1,2)</td><td rowspan=1 colspan=1>p(1)</td><td rowspan=1 colspan=1>c(2,1)</td><td rowspan=1 colspan=1>c(2,2)</td><td rowspan=1 colspan=1>p(2)</td><td rowspan=1 colspan=1>c(3,1)</td><td rowspan=1 colspan=1>c(3,2)</td><td rowspan=1 colspan=1>c(3,3)</td><td rowspan=1 colspan=1>p(3)</td></tr><tr><td rowspan=1 colspan=1>% of non-zeros</td><td rowspan=1 colspan=1>49.1</td><td rowspan=1 colspan=1>69.7</td><td rowspan=1 colspan=1>80.8</td><td rowspan=1 colspan=1>67.4</td><td rowspan=1 colspan=1>49.7</td><td rowspan=1 colspan=1>70.7</td><td rowspan=1 colspan=1>53.4</td><td rowspan=1 colspan=1>51.9</td><td rowspan=1 colspan=1>28.7</td><td rowspan=1 colspan=1>45.9</td></tr><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>c(4,1)</td><td rowspan=1 colspan=1>c(4,2)</td><td rowspan=1 colspan=1>c(4,3)</td><td rowspan=1 colspan=1>p(4)</td><td rowspan=1 colspan=1>c(5,1)</td><td rowspan=1 colspan=1>c(5,2)</td><td rowspan=1 colspan=1>c(5,3)</td><td rowspan=2 colspan=3>p(5)13.1</td></tr><tr><td rowspan=1 colspan=1>% of non-zeros</td><td rowspan=1 colspan=1>35.6</td><td rowspan=1 colspan=1>29.6</td><td rowspan=1 colspan=1>12.6</td><td rowspan=1 colspan=1>23.1</td><td rowspan=1 colspan=1>23.9</td><td rowspan=1 colspan=1>20.6</td><td rowspan=1 colspan=1>7.3</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 2: Layer-wise sparsity of VGGNet on ILSVRC-2012 validation set. “c” stands for convolutional layers while “p” represents pooling layers. CNN with random filters in Section 4.4 can be simulated with the same sparsity.
|
| 180 |
+
|
| 181 |
+
VGGNet contains five groups of convolution and pooling layers, each group has 2\~3 convolutional layers followed by a pooling layer. We denote the $j$ -th convolutional layer in the $i$ -th group “conv $( i , j )$ ,” and the pooling layer “pool(i).” When we say the activations/features are from $i$ -th layer, we mean they are the output of $\mathsf { p o o l } ( i )$ . Our analysis is for single convolutional layers. When evaluating the $i$ -th layer, we take the activations from the $( i - 1 )$ -th layer, and investigate the filters and output of $\mathrm { c o n v } ( i , 1 )$ .
|
| 182 |
+
|
| 183 |
+
# 4.4 2D MODEL-RIP
|
| 184 |
+
|
| 185 |
+
The key to our reconstruction bound is Theorem 3.3 is the model-RIP condition for our particular model of sparsity in Equation (1). We empirically evaluate the model-RIP property, i.e., $\| \boldsymbol { W } ^ { \hat { T } } \boldsymbol { z } \| / \| \boldsymbol { z } \|$ , for real CNN filters of the pretrained VGGNet. We use two-dimensional coefficients (or hidden units) $_ z$ (each block of coefficients is of size $D \times D ,$ ), $K$ filters of size $\ell \times \ell$ , and pool the coefficients over smaller pooling regions (i.e., not over all possible shifts of each filter). The following experimental evidence suggest that the sparsity model and the model-RIP property of the filters are consistent with what we conclude from the mathematical analysis on the simpler one-dimensional case.
|
| 186 |
+
|
| 187 |
+
To check the significance of the model-RIP property (i.e., how close $\| \mathbfcal { W } ^ { T } z \| / \| z \|$ is to 1) in controlled settings, we first synthesize the hidden activations $_ z$ with sparse uniform random variables, which fully agree with our model assumptions. The sparsity of $_ { z }$ is constrained to the average level of the real CNN activations (refer to Table 2). Given the filters of a certain convolutional layer, we use the synthetic $_ z$ (in equal position to this layer’s output activations) to get statistics for the model-RIP property. To be consistent with succeeding experiments, we choose conv $( 5 , 2 )$ , while other layers show similar results. Figure 3 (a) summarizes the distribution of empirical model-RIP values, which is clearly centered around 1 and satisfies Equation (1) with a short tail roughly bounded by $\delta _ { k } < 1$ For more details of the algorithm, we normalize the filters from the conv $( 5 , 2 )$ layer, which are $\ell \times \ell$ $\ell = 3$ ). All $K = 5 1 2$ filters with $M = 5 1 2$ input channels are used.10 We set $D = 1 5$ (the same as the output activations of conv $( 5 , 2 )$ ) and use $2 \times 2$ pooling regions11 (commonly used in recent deep networks). We generate $1 0 0 0 \mathcal { M } _ { k }$ randomly sampled sparse activation $( z )$ maps by first sampling their non-zero supports and then filling elements on the supports uniformly from $[ - 1 , 1 ]$ . The sparsity is the same as that in $\mathrm { c o n v } ( 5 , 1 )$ activations.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 3: For VGGNet’s conv $( 5 , 2 )$ filters $W$ , we plot the histogram of ratios $\| \boldsymbol { W } ^ { T } \boldsymbol { z } \| _ { 2 } / \| \boldsymbol { z } \| _ { 2 }$ (the model-RIP value derived from Equation (1); supposed to be concentrated at 1) where $_ { z }$ is a $\mathcal { M } _ { k }$ sparse signal. (a) $_ { z }$ is randomly generated with the same sparsity as the conv $( 5 , 2 )$ activations and from a uniform distribution for the non-zero magnitude. (b) $_ { z }$ is recovered by Algorithm 2 from the conv(5,1) activations before applying ReLU. (c) $_ { z }$ is recovered by Algorithm 2 from the conv(5,1) activations after applying ReLU. The learned filters admits similar model-RIP value distributions to the random filters except for a bit larger bandwidth, which means the model-RIP condition in Equation (1) can empirically hold even when the filters do not necessarily subject to the i.i.d Gaussian random assumption.
|
| 191 |
+
|
| 192 |
+
To conduct more realistic experiments, we observe the actual conv $( 5 , 2 )$ activations from VGGNet are not necessarily drawn from a model-sparse uniform distribution. This motivates us to evaluate the empirical model-RIP property on the hidden activations $_ z$ that reconstruct the actual input activations $_ { \textbf { \em x } }$ from conv $( 5 , 1 )$ by $\dot { W } ^ { T } z$ . Per theory, the $_ { \textbf { \em x } }$ is given by a max pooling layer, so we constrain the sparsity
|
| 193 |
+
|
| 194 |
+
Algorithm 2 Sparse hidden activation recovery
|
| 195 |
+
|
| 196 |
+
Input: convolution matrix $W$ , input activation/image $_ { \textbf { \em x } }$
|
| 197 |
+
|
| 198 |
+
Output: hidden code $_ z$ , satisfying our model-RIP assumption with $\mathcal { M } _ { k }$ and reconstructing $_ { \textbf { \em x } }$ with $W$ $\begin{array} { r } { ! \ : \ z ^ { \mathrm { i n i t } } = \arg \operatorname* { m i n } _ { z } \left\| x - W ^ { T } z \right\| _ { 2 } ^ { 2 } + \lambda \| z \| _ { 1 } } \end{array}$
|
| 199 |
+
2: $z ^ { \mathrm { m o d e l } } = \mathbb { M } _ { \mathrm { k n o w n } } ( z ^ { \mathrm { i n i t } } , k )$
|
| 200 |
+
3: $\begin{array} { r } { z = \mathrm { a r g m i n } _ { z } \left\| \boldsymbol { x } - \boldsymbol { W } ^ { T } \boldsymbol { z } \right\| _ { 2 } ^ { 2 } + \lambda \| \boldsymbol { z } \| _ { 1 } , } \end{array}$ s.t. $z _ { i } = 0$ if $z _ { i } ^ { \mathrm { m o d e l } } = 0$
|
| 201 |
+
|
| 202 |
+
(i.e., the size of the support set is no more than 1 in a pooling region for a single channel). We use a simple and efficient algorithm to recover $_ z$ from $_ { \textbf { \em x } }$ in Algorithm 2. The algorithm is inspired by $^ { 6 6 } \ell _ { 1 }$ heuristic" method that are commonly used in practice (e.g. Boyd (2015)). As shown in Algorithm 2, we first do $\ell _ { 1 }$ -regularized least squares without constraining the support set. Max pooling is then applied to figure out the support set for each pooling region. In particular, we use $\mathbb { M } _ { \mathrm { k n o w n } }$ , defined in (3), to zero out the locally non-maximum values without messing up the support structures. We perform $\ell _ { 1 }$ -regularized least squares again on the fixed support set to recover the hidden activations satisfying the model sparsity. As shown in Figures 3 (b)–(c), the empirical model-RIP property values for visual activations $_ { \textbf { \em x } }$ from conv $( 5 , 1 )$ with/without ReLU are both close to 1. The center offset to 1 is less than 0.05 and the range bound $\delta _ { k }$ is rough less then 0.05, which agrees with the theoretical bound (1) quite well.
|
| 203 |
+
|
| 204 |
+
To gain more insight, we summarize the learned filter coherence in Table 4 for all the convolutional layers in VGGNet.12 This measures the correlation or similarity between the columns of $W ^ { T }$ and is a proxy for the value of the model-RIP parameter $\delta _ { k }$ (which we can only estimate computationally). The smaller the coherence, the smaller $\delta _ { k }$ is, and the better the reconstruction. The coherence of the learned filters is not low, which is inconsistent with our theoretical assumptions. However, the model-RIP property turns out to be robust to this mismatch. It also demonstrates the strong invertibility of CNN in practice.
|
| 205 |
+
|
| 206 |
+
# 4.5 RECONSTRUCTION BOUNDS
|
| 207 |
+
|
| 208 |
+
With model-RIP as a sufficient condition, Theorem 3.3 provides theoretical bounds for layer-wise reconstruction via $\pmb { \hat { x } } = \pmb { W } ^ { T } \mathbb { M } ( \pmb { W } \pmb { x } , \boldsymbol { k } )$ . This operator consists of the projection and reconstruction in one IHT iteration. Without confusion, we refer to it as IHT for notational convenience. We investigate the practical reconstruction errors on Layer 1\~4 activations (i.e., pool(1)\~(4)) of VGGNet.
|
| 209 |
+
|
| 210 |
+
To encode and reconstruct intermediate activations of CNNs, we employ IHT with sparsity estimated from the real CNN activations on ILSVRC-2012 validation set (see Table 2). We also reconstruct input images, since CNN inversion is not limited to a single layer, and images are easier to visualize than hidden activations. To implement image reconstruction, we project the reconstructed activations into the image space via a pretrained decoding network as in (Zhang et al., 2016), which extends a similar autoencoder architecture as in (Dosovitskiy and Brox, 2016) to a stacked “what-where” autoencoder (Zhao et al., 2016). The reconstructed activations were scaled to have the same norm as the original activations so that we can feed them into the decoding network.
|
| 211 |
+
|
| 212 |
+

|
| 213 |
+
Figure 4: Visualization of images reconstructed by a pretrained decoding network with VGGNet’s pool(4) activation reconstructed using different methods: (a) original image, (b) output of the 5-layer decoding network with original activation, (c) output of the decoding net with reconstructed activation by IHT with learned filters, (d) output of the decoding net with reconstructed activation by IHT with Gaussian random filters, (e) output of the decoding net with Gaussian random activation.
|
| 214 |
+
|
| 215 |
+
As an example, Figure 4 illustrates the image reconstruction results for the hidden activations of the 4-th layer, the ground truth of which is obtained by feeding natural images to the CNNs. Interestingly, the decoding network itself is powerful, since it can reconstruct the glimpse of images with Gaussian random input, as shown in Figure 4 (e). Object shapes are recovered by using the pooling switches only in the “what-where” autoencoder. This result suggests that it is important to determine which pooling units are active and then to estimate these values accurately. These steps are consistent with the steps in the inner loop of any iterative sparse signal reconstruction algorithm.
|
| 216 |
+
|
| 217 |
+
In Figure 4 (c), we take the pretrained conv $( 5 , 1 )$ filters for IHT. The images recovered from the IHT reconstructed 4-th layer activations are reasonable and the reconstruction quality is significantly better than the random input baseline. We also try Gaussian random filters (Figure 4 (d)), which agree more with the model assumptions (e.g., lower coherence, see Table 4). The learned filters from VGGNet perform equally well visually. IHT ties the encoder and decoder weights (no filter learning for the decoder), so it does not perform as well as the decoding network trained with a huge batch of data (Figure 4 (b)). Nevertheless, we show both theoretically and experimentally decent reconstruction bounds for these simple reconstruction methods on real CNNs. More visualization results for more layers are in the supplementary materials (Figure 5 in Section C.3).
|
| 218 |
+
|
| 219 |
+
In Table 3, we summarize reconstruction performance for all 4 layers. With random filters, the model assumptions hold and the IHT reconstruction is the best quantitatively. IHT with real CNN filters performs comparable to the best case and much better than the baseline established by the randomly sampled activations.
|
| 220 |
+
|
| 221 |
+
Additionally, reconstruction performance of IHT is strongly related to the filter coherence, summarized in Table 4. Lower coherence agrees more closely with the model assumptions and leads to higher reconstruction quality. Higher coherence yields worse recovery of the hidden activation (i.e., large $\lVert \hat { z } - z \rVert$ , where $\hat { z }$ is the hidden activations recovered by IHT, $_ z$ is the true activation). Compared to Algorithm 2, (one-step) IHT is not so robust to high coherence.
|
| 222 |
+
|
| 223 |
+
In summary, when the assumption of i.i.d Gaussian randomness of the CNN filters holds, our theoretical reconstruction bound strictly match with the empirical observations. More importantly, we demonstrate that the bound can still reasonably hold in practice for discriminatively learned CNN layers, which is particularly true for layers with relatively lower coherence.
|
| 224 |
+
|
| 225 |
+
# 5 CONCLUSION
|
| 226 |
+
|
| 227 |
+
We introduce three concepts that tie together a particular model of compressive sensing (and the associated recovery algorithms), the properties of learned filters, and the empirical observation that CNNs are (approximately) invertible. Our experiments show that filters in trained CNNs are consistent with the mathematical properties we present while the hidden units exhibit a much richer structure than mathematical analysis suggests. Perhaps simply moving towards a compressive, rather than exactly sparse, model for the hidden units will capture the sophisticated structure in these layers of a CNN or, perhaps, we need a more sophisticated model. Our experiments also demonstrate that there is considerable information captured in the switch units (or the identities of the non-zeros in the hidden units after pooling) that no mathematical model has yet expressed or explored thoroughly.
|
| 228 |
+
|
| 229 |
+
Table 3: Layer-wise relative reconstruction errors by different methods in activation space and image space between reconstructed and original activations. For layer $_ { i }$ , we take its activation after pooling from that layer and reconstruct it with different methods (using learned filters from the layer above or scaled Gaussian random filters) and feed the reconstructed activation to a pretrained corresponding decoding network.13
|
| 230 |
+
|
| 231 |
+
<table><tr><td rowspan=2 colspan=1>layer</td><td rowspan=1 colspan=3>image space relative error</td><td rowspan=1 colspan=3>activation space relative error</td></tr><tr><td rowspan=1 colspan=1>learnedfilters</td><td rowspan=1 colspan=1>randomfilters</td><td rowspan=1 colspan=1>randomactivations</td><td rowspan=1 colspan=1>learnedfilters</td><td rowspan=1 colspan=1>randomfilters</td><td rowspan=1 colspan=1>randomactivations</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0.423</td><td rowspan=1 colspan=1>0.380</td><td rowspan=1 colspan=1>0.610</td><td rowspan=1 colspan=1>0.895</td><td rowspan=1 colspan=1>0.872</td><td rowspan=1 colspan=1>1.414</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>0.692</td><td rowspan=1 colspan=1>0.438</td><td rowspan=1 colspan=1>0.864</td><td rowspan=1 colspan=1>0.961</td><td rowspan=1 colspan=1>0.926</td><td rowspan=1 colspan=1>1.414</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>0.326</td><td rowspan=1 colspan=1>0.345</td><td rowspan=1 colspan=1>0.652</td><td rowspan=1 colspan=1>0.912</td><td rowspan=1 colspan=1>0.862</td><td rowspan=1 colspan=1>1.414</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>0.379</td><td rowspan=1 colspan=1>0.357</td><td rowspan=1 colspan=1>0.436</td><td rowspan=1 colspan=1>1.051</td><td rowspan=1 colspan=1>0.992</td><td rowspan=1 colspan=1>1.414</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 4: Comparison of coherence between learned filters in each convolutional layer of VGGNet and Gaussian random filters with corresponding sizes.
|
| 234 |
+
|
| 235 |
+
<table><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>(1,1)</td><td rowspan=1 colspan=1>(1,2)</td><td rowspan=1 colspan=1>(2,1)</td><td rowspan=1 colspan=1>(2,2)</td><td rowspan=1 colspan=1>(3,1)</td><td rowspan=1 colspan=1>(3,2)</td><td rowspan=1 colspan=1>(3.3)</td></tr><tr><td rowspan=1 colspan=1>coherence of learned flters</td><td rowspan=1 colspan=1>0.9427</td><td rowspan=1 colspan=1>0.7340</td><td rowspan=1 colspan=1>0.6435</td><td rowspan=1 colspan=1>0.7465</td><td rowspan=1 colspan=1>0.5838</td><td rowspan=1 colspan=1>0.4844</td><td rowspan=1 colspan=1>0.5194</td></tr><tr><td rowspan=1 colspan=1>coherence of random filters</td><td rowspan=1 colspan=1>0.6701</td><td rowspan=1 colspan=1>0.1218</td><td rowspan=1 colspan=1>0.1546</td><td rowspan=1 colspan=1>0.1053</td><td rowspan=1 colspan=1>0.1099</td><td rowspan=1 colspan=1>0.0895</td><td rowspan=1 colspan=1>0.0802</td></tr><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>(4,1)</td><td rowspan=1 colspan=1>(4,2)</td><td rowspan=1 colspan=1>(4,3)</td><td rowspan=1 colspan=1>(5,1)</td><td rowspan=1 colspan=1>(5,2)</td><td rowspan=3 colspan=2>(5.3)0.40460.0674</td></tr><tr><td rowspan=1 colspan=1>coherence of learned filters</td><td rowspan=1 colspan=1>0.4596</td><td rowspan=1 colspan=1>0.4574</td><td rowspan=1 colspan=1>0.4043</td><td rowspan=1 colspan=1>0.4099</td><td rowspan=1 colspan=1>0.4099</td><td rowspan=1 colspan=1>0.4046</td></tr><tr><td rowspan=1 colspan=1>coherence of random filters</td><td rowspan=1 colspan=1>0.0920</td><td rowspan=1 colspan=1>0.0619</td><td rowspan=1 colspan=1>0.0617</td><td rowspan=1 colspan=1>0.0696</td><td rowspan=1 colspan=1>0.0674</td><td rowspan=1 colspan=1>0.0674</td></tr></table>
|
| 236 |
+
|
| 237 |
+
# REFERENCES
|
| 238 |
+
|
| 239 |
+
S. Arora, A. Bhaskara, R. Ge, and T. Ma. Provable Bounds for Learning Some Deep Representations. ICML, pages 584–592, 2014.
|
| 240 |
+
S. Arora, Y. Liang, and T. Ma. Why are deep nets reversible: A simple theory, with implications for training. arXiv:1511.05653, 2015.
|
| 241 |
+
P. Baldi, P. Sadowski, and D. Whiteson. Searching for exotic particles in high-energy physics with deep learning. Nature communications, 5, 2014.
|
| 242 |
+
R. G. Baraniuk, V. Cevher, M. F. Duarte, and C. Hegde. Model-Based Compressive Sensing. IEEE Transactions on Information Theory, 56(4):1982–2001, 2010.
|
| 243 |
+
A. Beck and M. Teboulle. A fast iterative shrinkage-thresholding algorithm for linear inverse problems. SIAM Journal of Imaging Science, 2:183–202, 2009.
|
| 244 |
+
Y. Bengio, A. Courville, and P. Vincent. Representation Learning: A Review and New Perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8), 2013.
|
| 245 |
+
T. Blumensath and M. E. Davies. Iterative hard thresholding for compressed sensing. Applied and Computational Harmonic Analysis, 27(3):265–274, 2009.
|
| 246 |
+
Y.-l. Boureau, Y. L. Cun, et al. Sparse feature learning for deep belief networks. In NIPS, 2008.
|
| 247 |
+
S. Boyd. l1-norm methods for convex-cardinality problems, ee364b: Convex optimization ii lecture notes, 2014-2015 spring. 2015.
|
| 248 |
+
J. Bruna, A. Szlam, and Y. LeCun. Signal recovery from pooling representations. In ICML, pages 307–315, 2014.
|
| 249 |
+
E. J. Candés. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9):589–592, 2008.
|
| 250 |
+
D. Chicco, P. Sadowski, and P. Baldi. Deep autoencoder neural networks for gene ontology annotation predictions. In Proceedings of the 5th ACM Conference Bioinformatics, Computational Biology, and Health Informatics, pages 533–540, 2014.
|
| 251 |
+
K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 252 |
+
R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12(Aug):2493–2537, 2011.
|
| 253 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, June 2009.
|
| 254 |
+
A. Dosovitskiy and T. Brox. Inverting visual representations with convolutional networks. CVPR, 2016.
|
| 255 |
+
R. Giryes, G. Sapiro, and A. M. Bronstein. Deep neural networks with random gaussian weights: A universal classification strategy? IEEE Transactions on Signal Processing, 64(13):3444–3457, 2016.
|
| 256 |
+
A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenger, S. Satheesh, S. Sengupta, A. Coates, et al. Deep speech: Scaling up end-to-end speech recognition. arXiv preprint arXiv:1412.5567, 2014.
|
| 257 |
+
K. He, Y. Wang, and J. Hopcroft. A powerful generative model using random weights for the deep image representation. arXiv preprint arXiv:1606.04801, 2016.
|
| 258 |
+
G. Hinton, L. Deng, D. Yu, G. E. Dahl, A.-r. Mohamed, N. Jaitly, A. Senior, V. Vanhoucke, P. Nguyen, T. 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.
|
| 259 |
+
K. Jarrett, K. Kavukcuoglu, M. Ranzato, and Y. LeCun. What is the best multi-stage architecture for object recognition? In ICCV, pages 2146–2153, 2009.
|
| 260 |
+
Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv:1408.5093, 2014.
|
| 261 |
+
A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1097–1105, 2012.
|
| 262 |
+
Q. V. Le, M. Ranzato, R. Monga, M. Devin, K. Chen, G. S. Corrado, J. Dean, and A. Y. Ng. Building high-level features using large scale unsupervised learning. In ICML, 2013.
|
| 263 |
+
Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1(4):541–551, 1989.
|
| 264 |
+
H. Lee, C. Ekanadham, and A. Y. Ng. Sparse deep belief net model for visual area v2. In NIPS, 2008.
|
| 265 |
+
S. Mallat and Z. Zhang. Matching pursuits with time-frequency dictionaries. IEEE Transactions on Signal Processing, 41:3397 – 3415, 1993.
|
| 266 |
+
T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013.
|
| 267 |
+
B. A. Olshausen et al. Emergence of simple-cell receptive field properties by learning a sparse code for natural images. Nature, 381(6583):607–609, 1996.
|
| 268 |
+
J. Y. Park, H. L. Yap, C. Rozell, and M. B. Wakin. Concentration of Measure for Block Diagonal Matrices With Applications to Compressive Signal Processing. IEEE Transactions on Signal Processing, 59(12):5859–5875, 2011.
|
| 269 |
+
A. Paul and S. Venkatasubramanian. Why does Deep Learning work? - A perspective from Group Theory. arXiv.org, Dec. 2014.
|
| 270 |
+
M. A. Ranzato, F. J. Huang, Y.-L. Boureau, and Y. LeCun. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In CVPR, 2007.
|
| 271 |
+
A. Saxe, P. W. Koh, Z. Chen, M. Bhand, B. Suresh, and A. Y. Ng. On random weights and unsupervised feature learning. In ICML, pages 1089–1096, 2011.
|
| 272 |
+
J. Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 2015.
|
| 273 |
+
W. Shang, K. Sohn, D. Almeida, and H. Lee. Understanding and improving convolutional neural networks via concatenated rectified linear units. In ICML, 2016.
|
| 274 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 275 |
+
C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015.
|
| 276 |
+
A. Vedaldi and K. Lenc. Matconvnet – convolutional neural networks for matlab. In Proceeding of the ACM Int. Conf. on Multimedia, 2015.
|
| 277 |
+
R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv.org, Nov. 2010.
|
| 278 |
+
J. Yang, J. Wright, T. S. Huang, and Y. Ma. Image super-resolution via sparse representation. Image Processing, IEEE Transactions on, 19(11):2861–2873, 2010.
|
| 279 |
+
Y. Zhang, K. Lee, and H. Lee. Augmenting neural networks with reconstructive decoding pathways for large-scale image classification. In ICML, 2016.
|
| 280 |
+
J. Zhao, M. Mathieu, R. Goroshin, and Y. Lecun. Stacked what-where auto-encoders. arXiv:1506.02351, 2016.
|
| 281 |
+
|
| 282 |
+
# Supplementary Materials: Towards Understanding the Invertibility of Convolutional Neural Networks
|
| 283 |
+
|
| 284 |
+
A MATHEMATICAL ANALYSIS: MODEL-RIP AND RANDOM FILTERS
|
| 285 |
+
|
| 286 |
+
Theorem 3.1(Restated) Assume that we have $M K$ vectors ${ \pmb w } _ { i , m }$ of length $\ell$ in which each entry is a scaled i.i.d. (sub-)Gaussian random variable with mean zero and variance√ $^ { l }$ (the scaling factor is $1 / \sqrt { M \ell } )$ . Let t be the stride length (where $n = ( D - \ell ) / t + 1 )$ and build the structured random matrix $W$ as the weight matrix in a single layer CNN for $M$ -channel input dimension $D$ . If
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\frac { M \ell ^ { 2 } } { D } \geq \frac { C k } { \delta _ { k } ^ { 2 } } \Big ( \log ( K ) + \log ( n ) - \log ( \epsilon ) \Big ) ,
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
then, with probability $1 - \epsilon ,$ , the $M D \times K n$ matrix $W ^ { T }$ satisfies the model-RIP for model $\mathcal { M } _ { k }$ with parameter $\delta _ { k }$ .
|
| 293 |
+
|
| 294 |
+
Proof. We note that this result follows the same structure of that for many proofs of the RIP for (structured) random matrices (see Park et al. (2011); Vershynin (2010) for details) although we make minor tweaks to account for the particular structure of $W ^ { \overline { { T } } }$ .
|
| 295 |
+
|
| 296 |
+
Suppose that $z \in \mathcal { M } _ { k }$ which means that $_ z$ consists of at most $k$ non-zero entries that each appear in a distinct block of size $n$ (there are a total of $K$ blocks). First, we observe that the norm of $\dot { W } ^ { T } z$ is preserved in expectation.
|
| 297 |
+
|
| 298 |
+
# Lemma A.1.
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\mathbb { E } ( \| \boldsymbol { W } ^ { T } \boldsymbol { z } \| _ { 2 } ^ { 2 } ) = \| \boldsymbol { z } \| _ { 2 } ^ { 2 }
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
Proof. Note that each entry of $W ^ { T }$ is either zero or Gaussian random variable $w \sim N ( 0 , 1 )$ (suitably normalized). Therefore, it is obvious that $\mathbb { E } ( W W ^ { T } ) = I$ since each row of $W$ satisfies $\mathbb { E } \left( \left( \boldsymbol { \omega } _ { i , m _ { 1 } } ^ { j _ { 1 } } \right) ^ { T } \left( \boldsymbol { \omega } _ { i , m _ { 2 } } ^ { j _ { 2 } } \right) \right) = 0$ if $j _ { 1 } \neq j _ { 2 }$ or $m _ { 1 } \neq m _ { 2 }$ , and we normalized the random variables so that $\mathbb { E } \left( \left\| \left[ \left( \boldsymbol { w } _ { i , 1 } ^ { j } \right) ^ { T } , \ldots , \left( \boldsymbol { w } _ { i , M } ^ { j } \right) ^ { T } \right] \right\| _ { 2 } \right) = 1$ for all $j$ . Finally, we have
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r } { \mathbb { E } \left( \| \boldsymbol { W } ^ { T } \boldsymbol { z } \| _ { 2 } ^ { 2 } \right) = \mathbb { E } \left( \boldsymbol { z } ^ { T } \boldsymbol { W } \boldsymbol { W } ^ { T } \boldsymbol { z } \right) = \boldsymbol { z } ^ { T } \mathbb { E } \left( \boldsymbol { W } \boldsymbol { W } ^ { T } \right) \boldsymbol { z } = \boldsymbol { z } ^ { T } \boldsymbol { z } = \| \boldsymbol { z } \| _ { 2 } ^ { 2 } . } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
Let $\begin{array} { r } { \pmb { y } = \pmb { W } ^ { T } \pmb { z } } \end{array}$ . We aim to show that the square norm of the random variable $\| \boldsymbol { y } \| _ { 2 } ^ { 2 }$ concentrates tightly about its mean; i.e., with exceedingly low probability
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
\left| \| \pmb { y } \| _ { 2 } ^ { 2 } - \| \pmb { z } \| _ { 2 } ^ { 2 } \right| > \delta \| \pmb { z } \| _ { 2 } ^ { 2 } .
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+
To do so, we need several properties of sub-Gaussian and sub-exponential random variables. A mean-zero sub-Gaussian random variable $Z$ has a moment generating function that satisfies
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\mathbb { E } ( \exp ( t Z ) ) \le \exp ( t ^ { 2 } C ^ { 2 } )
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
for all $t \in \mathbb { R }$ and some constant $C$ . The sub-Gaussian norm of $Z$ , denoted $\| Z \| _ { \psi _ { 2 } }$ is
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\| Z \| _ { \psi _ { 2 } } = \operatorname* { s u p } _ { p \geq 1 } { \frac { 1 } { \sqrt { p } } } \Bigl ( \mathbb { E } | Z | ^ { p } \Bigr ) ^ { 1 / p } .
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
If $Z \sim N ( 0 , \sigma ^ { 2 } )$ , then $\| Z \| _ { \psi _ { 2 } } \leq c \sigma$ .
|
| 329 |
+
|
| 330 |
+
A sub-exponential random variable $X$ satisfies14
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\mathbb { P } \Big ( | X | > t \Big ) \le \exp ( 1 - t / C )
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
for all $t \geq 0$ .
|
| 337 |
+
|
| 338 |
+
Let $\mathbf { \nabla } _ { \mathbf { \boldsymbol { y } } _ { i } }$ denote the $i$ th entry of the vector $\begin{array} { r } { \pmb { y } = \pmb { W } ^ { T } \pmb { z } } \end{array}$ . We can write
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\mathbf { \boldsymbol { y } } _ { i } = \sum _ { j = 1 } ^ { K n } \mathbf { \boldsymbol { W } } _ { i , j } ^ { T } \mathbf { \boldsymbol { z } } _ { j }
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
and observe that $\mathbf { \nabla } _ { \mathbf { \psi } _ { 3 } } \psi _ { i }$ is a linear combination of i.i.d. sub-Gaussian random variables (or it is identically equal to 0) and, as such, is itself a sub-Gaussian random variable with mean zero and sub-Gaussian√ norm $\| \pmb { y _ { i } } \| _ { \psi _ { 2 } } \le C / \sqrt { M \ell } \| w \| _ { \psi _ { 2 } } \| z \| _ { 2 }$ (see Vershynin (2010), Lemma 5.9). The structure of the random matrix and how many non-zero entries are in row $i$ of $W$ do enter the more refined bound on the sub-Gaussian norm of $\left\| \boldsymbol { y } _ { i } \right\| _ { \psi _ { 2 } }$ (again, see Vershynin (2010), Lemma 5.9 for details) but we ignore such details for this estimate as they are not necessary for the next estimate.
|
| 345 |
+
|
| 346 |
+
To obtain a concentration bound for $\| \pmb { y } _ { i } \| _ { 2 } ^ { 2 }$ , we recall from Park et al. (2011); Vershynin (2010) that the sum of squares of sub-Gaussian random variables tightly concentrate.
|
| 347 |
+
|
| 348 |
+
Theorem A.2. Let $Y _ { 1 } , \dots , Y _ { M D }$ be independent sub-Gaussian random variables with sub-Gaussian norms $\| Y _ { i } \| _ { \psi _ { 2 } }$ for all $i = 1 , \ldots , M D$ . Let $T = \operatorname* { m a x } _ { i } \| Y _ { i } \| _ { \psi _ { 2 } }$ . The for every $t \geq 0$ and every a ∈ RMD,
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
\mathbb { P } \Bigg ( \Big \vert \sum _ { i = 1 } ^ { M D } \pmb { a } _ { i } ( Y _ { i } - \mathbb { E } Y _ { i } ^ { 2 } ) \Big \vert \geq t \Bigg ) \leq 2 \exp \Bigg ( - C \operatorname* { m i n } \Big ( \frac { C t ^ { 2 } } { T ^ { 2 } \| \pmb { a } \| _ { 2 } ^ { 2 } } , \frac { C t } { T \| \pmb { a } \| _ { \infty } } \Big ) \Bigg ) .
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
We note that although some entries $\mathbf { \nabla } _ { \mathbf { \psi } _ { 3 } } \psi _ { i }$ may be identically zero, depending on the sparsity pattern of $_ { z }$ , not all entries are. Let us define $\begin{array} { r } { \tilde { \pmb { y } } _ { i } = \frac { \pmb { y } _ { i } } { \lVert \pmb { y } _ { i } \rVert _ { \psi _ { 2 } } } } \end{array}$ so that $\| \tilde { \pmb y } _ { i } \| _ { \psi _ { 2 } } = 1$ and observe that
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\mathbb { P } \bigg ( \Big | \| \pmb { y } \| _ { 2 } ^ { 2 } - \| \pmb { z } \| _ { 2 } ^ { 2 } \Big | > \delta \| \pmb { z } \| _ { 2 } ^ { 2 } \bigg ) = \mathbb { P } \Bigg ( \Big | \sum _ { i = 1 } ^ { M D } \| \pmb { y } _ { i } \| _ { \psi _ { 2 } } ^ { 2 } \big ( \tilde { \pmb { y } } _ { i } ^ { 2 } - \mathbb { E } \tilde { \pmb { y } } _ { i } ^ { 2 } \big ) \Big | > \delta \| \pmb { z } \| _ { 2 } ^ { 2 } \Bigg ) .
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
We apply Theorem A.2 to the sub-Gaussian random variables $\tilde { \mathbf { \ b { y } } } _ { i }$ with the weights $\| \pmb { y } _ { i } \| _ { \psi _ { 2 } } ^ { 2 }$ . We have
|
| 361 |
+
|
| 362 |
+
$$
|
| 363 |
+
\| \pmb { a } \| _ { 2 } ^ { 2 } = \sum _ { i = 1 } ^ { M D } \| \pmb { y } _ { i } \| _ { \psi _ { 2 } } ^ { 4 } \leq \frac { C D \| w \| _ { \psi _ { 2 } } ^ { 4 } \| \pmb { z } \| _ { 2 } ^ { 4 } } { M \ell ^ { 2 } } \quad \mathrm { a n d } \quad \| \pmb { a } \| _ { \infty } \leq \frac { C \| w \| _ { \psi _ { 2 } } ^ { 2 } \| \pmb { z } \| _ { 2 } ^ { 2 } } { M \ell } .
|
| 364 |
+
$$
|
| 365 |
+
|
| 366 |
+
If we set $T = 1$ , $t = \delta \| z \| _ { 2 } ^ { 2 }$ , and use the above estimates for the norms of $^ { a }$ , we have
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
\mathbb { P } \bigg ( \Big | \| y \| _ { 2 } ^ { 2 } - \| z \| _ { 2 } ^ { 2 } \Big | > \delta \| z \| _ { 2 } ^ { 2 } \bigg ) \leq 2 \exp \bigg ( - C \operatorname* { m i n } \Big ( \frac { C \delta ^ { 2 } M \ell ^ { 2 } } { D \| w \| _ { \psi _ { 2 } } ^ { 4 } } , \frac { C \delta M \ell } { \| w \| _ { \psi _ { 2 } } ^ { 2 } } \Big ) \bigg ) .
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
Finally, we use the concentration of measure result in a crude union bound to bound the failure probability over all vectors $z \in \mathcal { M } _ { k }$ . We take $n ^ { k } { \binom { K } { k } } \approx ( n K ) ^ { k }$ and $\epsilon$ for a desired constant failure probability. Using the smaller term in Equation (4), (note that $\delta < 1$ , $\ell / D < 1$ , and $\| w \| _ { \psi _ { 2 } } \geq 1 \qquad $ ) we have
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
\exp \Big ( - C \frac { M \ell ^ { 2 } \delta ^ { 2 } } { D \| w \| _ { \psi _ { 2 } } ^ { 4 } } \Big ) \exp \Big ( k ( \log ( K ) + \log ( n ) ) \Big ) \leq \exp ( \log ( \epsilon ) )
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
which implies
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\frac { M \ell ^ { 2 } } { D } \geq \frac { k } { \delta ^ { 2 } } \| w \| _ { \psi _ { 2 } } ^ { 4 } \bigg ( \log ( K ) + \log ( n ) - \log ( \epsilon ) \bigg ) = C \frac { k } { \delta ^ { 2 } } \Big ( \log ( K ) + \log ( n ) - \log ( \epsilon ) \Big ) .
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
Therefore, if design our matrix $W$ as described and with the parameter relationship as above, the matrix $W ^ { T }$ with satisfy the model-RIP for $\mathcal { M } _ { k }$ and parameter $\delta$ with probability $1 - \epsilon$ . □
|
| 385 |
+
|
| 386 |
+
Let us discuss the relationship amongst the parameters in our result. First, if we have only one channel $M = 1$ and the filter length $\ell = D$ , then our bound on the number of measurements $D$ matches those of traditional (model-based) compressive sensing; namely,
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
D \geq C { \frac { k } { \delta ^ { 2 } } } \left( \log ( K ) + \log ( n ) - \log ( \epsilon ) \right) .
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
If $\ell < D$ (i.e., the filters are much shorter than the length of the input signal as in a CNN), then we can compensate by adding more channels; i.e., the filter length $\ell$ needs to be larger than $\sqrt { D }$ , or, if add more channels, $\sqrt { D / M }$ .
|
| 393 |
+
|
| 394 |
+
# B MATHEMATICAL ANALYSIS: RECONSTRUCTION BOUNDS
|
| 395 |
+
|
| 396 |
+
The consequences of having model-RIP are two-fold. The first is that if we assume that an input image is the structured sparse linear combination of filters, $\begin{array} { r } { \pmb { x } = \pmb { W } ^ { T } \pmb { z } } \end{array}$ (where $z \in \mathcal { M } _ { k }$ and $\dot { W } ^ { T }$ satisfies the model-RIP property), then we know an upper and lower bound on the norm of $_ { \textbf { \em x } }$ in terms of the norm of its sparse coefficients, $\| \pmb { x } \| _ { 2 } \le ( 1 \pm \bar { \delta } ) \| \geqslant \| _ { 2 }$ . Additionally,
|
| 397 |
+
|
| 398 |
+
$$
|
| 399 |
+
\| z \| _ { 2 } \leq { \frac { 1 } { \sqrt { 1 - \delta } } } \| x \| _ { 2 } .
|
| 400 |
+
$$
|
| 401 |
+
|
| 402 |
+
More importantly, when we calculate the hidden units of $_ { \textbf { \em x } }$ ,
|
| 403 |
+
|
| 404 |
+
$$
|
| 405 |
+
\pmb { h } = \mathrm { R e L U } ( \pmb { W } \pmb { x } ) = \mathrm { R e L U } ( \pmb { W } \pmb { W } ^ { T } \pmb { z } )
|
| 406 |
+
$$
|
| 407 |
+
|
| 408 |
+
we can see that the computation of $^ { h }$ is nothing other than the first step of a reconstruction algorithm analogous to that of model-based compressed sensing. As a result, we have a bound on the error between $^ { h }$ and $_ { z }$ and we see that we can analyze the approximation properties of a feedfoward CNN and its linear reconstruction algorithm. In particular, we can conclude that a feedforward CNN and a linear reconstruction algorithm provide a good approximation to the original input image.
|
| 409 |
+
|
| 410 |
+
Theorem 3.3(Restated) We assume that $W ^ { T }$ satisfies the $\mathcal { M } _ { k } ^ { 2 }$ -RIP with constant $\delta _ { k } \le \delta _ { 2 k } < 1$ . If we use $W$ in a single layer CNN both to compute the hidden units $\hat { z }$ and to reconstruct the input $_ { \textbf { \em x } }$ from these hidden units as $\hat { \pmb x }$ so that $\hat { \pmb { x } } = \pmb { W } ^ { \hat { T } } \mathbb { M } ( \pmb { W } \pmb { x } , \boldsymbol { k } )$ , the error in our reconstruction is
|
| 411 |
+
|
| 412 |
+
$$
|
| 413 |
+
\| \hat { \pmb x } - \pmb x \| _ { 2 } \le \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \frac { \sqrt { 1 + \delta _ { 2 k } } } { \sqrt { 1 - \delta _ { 2 k } } } \| \pmb x \| _ { 2 } .
|
| 414 |
+
$$
|
| 415 |
+
|
| 416 |
+
Proof. To show this result, we recall the two following lemmas from Baraniuk et al. (2010) and rephrase them in the setting of a feedforward CNN.
|
| 417 |
+
|
| 418 |
+
Lemma B.1. Suppose $W ^ { T }$ has $\mathcal { M } _ { k }$ -RIP with constant $\delta _ { k }$ . Let $\Omega$ be a support corresponding to a subspace in $\mathcal { M } _ { k }$ . Then we have the following bounds:
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
\begin{array} { r } { \| \pmb { W } _ { \Omega } \pmb { x } \| _ { 2 } \le \sqrt { 1 + \delta _ { k } } \| \pmb { x } \| _ { 2 } } \\ { \| \pmb { W } _ { \Omega } \pmb { W } _ { \Omega } ^ { T } \pmb { z } \| _ { 2 } \le ( 1 + \delta _ { k } ) \| \pmb { z } \| _ { 2 } } \\ { \| \pmb { W } _ { \Omega } \pmb { W } _ { \Omega } ^ { T } \pmb { z } \| _ { 2 } \ge ( 1 - \delta _ { k } ) \| \pmb { z } \| _ { 2 } } \end{array}
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
Lemma B.2. Suppose that $W ^ { T }$ has $\mathcal { M } _ { k } ^ { 2 }$ -RIP with constant $\delta _ { 2 k }$ . Let $\Omega$ be a support corresponding to a subspace of $\mathcal { M } _ { k }$ and suppose that $\boldsymbol { z } \in \mathcal { M } _ { k }$ (not necessarily supported on $\Omega$ ). Then
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\begin{array} { r } { \| { W _ { \Omega } } { W ^ { T } } { z } | _ { \Omega ^ { c } } \| _ { 2 } \leq \delta _ { 2 k } \| { z } | _ { \Omega ^ { c } } \| _ { 2 } . } \end{array}
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
Let $\Pi$ denote the support of the $\mathcal { M } _ { k }$ sparse vector $_ { z }$ . Set $h = W x$ and set $\hat { z }$ to be the result of max pooling applied to the vector $^ { h }$ , or the best fit (with respect to the $\ell _ { 2 }$ norm) to $^ { h }$ in the model $\mathcal { M } _ { k }$ Let $\Omega$ denote the support set of $\hat { z } \in \mathcal { M } _ { k }$ . For simplicity, we assume $| \Pi | = k = | \Omega |$ .
|
| 431 |
+
|
| 432 |
+
Lemma B.3 (Identification). The support set, $\Omega$ , of the switch units captures a significant fraction of the total energy in the coefficient vector $_ z$
|
| 433 |
+
|
| 434 |
+
$$
|
| 435 |
+
\| z | _ { \Omega ^ { c } } \| _ { 2 } \leq \frac { 2 \delta _ { 2 k } } { 1 - \delta _ { k } } \| z \| _ { 2 } .
|
| 436 |
+
$$
|
| 437 |
+
|
| 438 |
+
Proof. Let $h _ { \Omega }$ and $h _ { \mathrm { I I } }$ be the vector $^ { h }$ restricted to the support sets $\Omega$ and $\Pi$ , respectively. Since both are support sets for $\mathcal { M } _ { k }$ and since $\Omega$ is the best support set for $^ { h }$ ,
|
| 439 |
+
|
| 440 |
+
$$
|
| 441 |
+
\| h - h _ { \Omega } \| _ { 2 } \leq \| h - h _ { \Pi } \| _ { 2 } ,
|
| 442 |
+
$$
|
| 443 |
+
|
| 444 |
+
and, after several calculations, we have
|
| 445 |
+
|
| 446 |
+
$$
|
| 447 |
+
\| h | _ { \Omega \backslash \Pi } \| _ { 2 } ^ { 2 } \geq \| h | _ { \Pi \backslash \Omega } \| _ { 2 } ^ { 2 } .
|
| 448 |
+
$$
|
| 449 |
+
|
| 450 |
+
Using Lemma B.2 and the size $| ( \Omega \setminus \Pi ) \bigcup \Pi | \leq 2 k$ , we have
|
| 451 |
+
|
| 452 |
+
$$
|
| 453 |
+
\begin{array} { r } { \| h _ { \Omega \setminus \Pi } \| _ { 2 } = \| W _ { \Omega \setminus \Pi } W ^ { T } z \| _ { 2 } \leq \delta _ { 2 k } \| z \| _ { 2 } . } \end{array}
|
| 454 |
+
$$
|
| 455 |
+
|
| 456 |
+
We can bound the other side of the inequality as
|
| 457 |
+
|
| 458 |
+
$$
|
| 459 |
+
\begin{array} { r l } & { \| \pmb { h } _ { \Pi \setminus \Omega } \| _ { 2 } \geq \| \pmb { W } _ { \Pi \setminus \Omega } ( \pmb { W } ^ { T } z | _ { \Pi \setminus \Omega } ) \| _ { 2 } - \| \pmb { W } _ { \Pi \setminus \Omega } ( \pmb { W } ^ { T } z | _ { \Omega } ) \| _ { 2 } } \\ & { \qquad \geq ( 1 - \delta _ { k } ) \| z | _ { \Pi \setminus \Omega } \| _ { 2 } - \delta _ { 2 k } \| z | _ { \Omega } \| _ { 2 } . } \end{array}
|
| 460 |
+
$$
|
| 461 |
+
|
| 462 |
+
Since the support of $_ z$ is the set $\Pi$ $, \Pi \setminus \Omega = \Omega ^ { c }$ and we can conclude that
|
| 463 |
+
|
| 464 |
+
$$
|
| 465 |
+
\begin{array} { r } { \delta _ { 2 k } \| z \| _ { 2 } \geq ( 1 - \delta _ { k } ) \| z | _ { \Omega ^ { c } } \| _ { 2 } - \delta _ { 2 k } \| z | _ { \Omega } \| _ { 2 } , } \end{array}
|
| 466 |
+
$$
|
| 467 |
+
|
| 468 |
+
and with some rearrangement, we have
|
| 469 |
+
|
| 470 |
+
$$
|
| 471 |
+
\| z | _ { \Omega ^ { c } } \| _ { 2 } \leq \frac { 2 \delta _ { 2 k } } { 1 - \delta _ { k } } \| z \| _ { 2 } .
|
| 472 |
+
$$
|
| 473 |
+
|
| 474 |
+
To set the value of $\hat { z }$ on its support set $\Omega$ , we simply set $\hat { z } = h | _ { \Omega }$ and $\hat { z } | _ { \Omega ^ { c } } = 0$ . Then
|
| 475 |
+
|
| 476 |
+
Lemma B.4 (Estimation).
|
| 477 |
+
|
| 478 |
+
$$
|
| 479 |
+
\| z - \hat { z } \| _ { 2 } \leq \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \| z \| _ { 2 }
|
| 480 |
+
$$
|
| 481 |
+
|
| 482 |
+
Proof. First, note that $\lVert \pmb { I } - \pmb { W } _ { \Omega } \pmb { W } _ { \Omega } ^ { T } \rVert _ { 2 } \leq \delta _ { k }$ since
|
| 483 |
+
|
| 484 |
+
$$
|
| 485 |
+
( 1 - \delta _ { k } ) \leq \operatorname* { s u p } _ { \| \boldsymbol { z } \| \neq 0 } \frac { \| \boldsymbol { W } _ { \Omega } ^ { T } \boldsymbol { z } \| _ { 2 } ^ { 2 } } { \| \boldsymbol { z } \| _ { 2 } ^ { 2 } } \left( = \sigma _ { \operatorname* { m a x } } ^ { 2 } ( \boldsymbol { W } _ { \Omega } ^ { T } ) = \sigma _ { \operatorname* { m a x } } ( \boldsymbol { W } _ { \Omega } \boldsymbol { W } _ { \Omega } ^ { T } ) \right) \leq ( 1 + \delta _ { k } ) ,
|
| 486 |
+
$$
|
| 487 |
+
|
| 488 |
+
where $\sigma _ { \mathrm { m a x } }$ is the maximum singular value. Therefore,
|
| 489 |
+
|
| 490 |
+
$$
|
| 491 |
+
\begin{array} { r l } { \| z - \hat { z } \| _ { 2 } \leq \| z | _ { \Omega ^ { c } } \| _ { 2 } + \| z | _ { \Omega } - \hat { z } | _ { \Omega } \| _ { 2 } } \\ & { \qquad = \| z | _ { \Omega ^ { c } } \| _ { 2 } + \| z | _ { \Omega } - W _ { \Omega } ( W ^ { T } z | _ { \Omega } + W ^ { T } z | _ { \Omega ^ { c } } ) \| _ { 2 } } \\ & { \qquad \leq \| z \| _ { \Omega ^ { c } } \| _ { 2 } + \| ( I - W _ { \Omega } W _ { \Omega } ^ { T } ) z | _ { \Omega } \| _ { 2 } + \| W _ { \Omega } W ^ { T } z | _ { \Omega ^ { c } } \| _ { 2 } } \\ & { \qquad \leq \| z \| _ { \Omega ^ { c } } \| _ { 2 } + \| I - W _ { \Omega } W _ { \Omega } ^ { T } \| _ { 2 } \| z \| _ { \Omega } \| _ { 2 } + \delta _ { 2 k } \| z | _ { \Omega ^ { c } } \| _ { 2 } } \\ & { \qquad \leq \| z | _ { \Omega ^ { c } } \| _ { 2 } + \delta _ { k } \| z | _ { \Omega } \| _ { 2 } + \delta _ { 2 k } \| z \| _ { \Omega ^ { c } } \| _ { 2 } } \\ & { \qquad \leq \Big ( ( 1 + \delta _ { 2 k } ) \frac { 2 \delta _ { 2 k } } { 1 - \delta _ { k } } + \delta _ { k } \Big ) \| z \| _ { 2 } } \\ & { \qquad \leq \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \| z \| _ { 2 } . } \end{array}
|
| 492 |
+
$$
|
| 493 |
+
|
| 494 |
+
Finally, if we use the autoencoder formulation to reconstruct the original image $_ { \textbf { \em x } }$ by setting ${ \hat { \mathbf { x } } } =$ $W ^ { T } \hat { z }$ , we can estimate the reconstruction error. We note that $\hat { z }$ is $\mathcal { M } _ { k }$ -sparse by construction and remind the reader that $W ^ { T }$ satisfies $\mathcal { M } _ { k } ^ { 2 }$ -model-RIP with constants $\delta _ { k } \le \delta _ { 2 k } \ll 1$ . Then, using Lemma B.4 as well as the $\mathcal { M } _ { k } ^ { 2 }$ -sparse properties of $W ^ { T }$ ,
|
| 495 |
+
|
| 496 |
+
$$
|
| 497 |
+
\begin{array} { r l } & { \| \boldsymbol { x } - \hat { \boldsymbol { x } } \| _ { 2 } = \| \boldsymbol { W } ^ { T } ( \boldsymbol { z } - \hat { \boldsymbol { z } } ) \| _ { 2 } \leq \sqrt { 1 + \delta _ { 2 k } } \| \boldsymbol { z } - \hat { \boldsymbol { z } } \| _ { 2 } } \\ & { \qquad \leq \displaystyle \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \sqrt { 1 + \delta _ { 2 k } } \| \boldsymbol { z } \| _ { 2 } } \\ & { \qquad \leq \displaystyle \frac { 5 \delta _ { 2 k } } { 1 - \delta _ { k } } \frac { \sqrt { 1 + \delta _ { 2 k } } } { \sqrt { 1 - \delta _ { 2 k } } } \| \boldsymbol { x } \| _ { 2 } . } \end{array}
|
| 498 |
+
$$
|
| 499 |
+
|
| 500 |
+
This proves that a feedforward CNN with a linear reconstruction algorithm is an approximate autoencoder and bounds the reconstruction error of the input image in terms of the geometric properties of the filters. □
|
| 501 |
+
|
| 502 |
+
# C MORE EXPERIMENTAL RESULTS
|
| 503 |
+
|
| 504 |
+
# C.1 MORE DETAILS ON EVALUATION OF CNNS WITH GAUSSIAN RANDOM FILTERS
|
| 505 |
+
|
| 506 |
+
In this section, we provide more details on the network architectures that we used in Table 1. In particular, we describe the best performing architectures for all cases in Table 5.
|
| 507 |
+
|
| 508 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>#Layers</td><td rowspan=1 colspan=1>1 layers</td><td rowspan=1 colspan=1>2 layers</td><td rowspan=1 colspan=1>3layers</td></tr><tr><td rowspan=2 colspan=1>Random filters</td><td rowspan=1 colspan=1>Bestparam.</td><td rowspan=1 colspan=1>(2048)5c-2pmax-4pave</td><td rowspan=1 colspan=1>(2048)3c-2pmax-(2048)3c-2pmax-2pave</td><td rowspan=1 colspan=1>(2048)3c-2pmax-(2048)3c-2pmax-(1024)3c-2pmax</td></tr><tr><td rowspan=1 colspan=1>Accuracy</td><td rowspan=1 colspan=1>66.5%</td><td rowspan=1 colspan=1>74.6%</td><td rowspan=1 colspan=1>74.8%</td></tr><tr><td rowspan=1 colspan=1>Learned filters</td><td rowspan=1 colspan=1>Bestparam.</td><td rowspan=1 colspan=1>(1024)5c-2pmax-4pave</td><td rowspan=1 colspan=1>(1024)3c-2pmax-(1024)3c-2pmax-2pave</td><td rowspan=1 colspan=1>(1024)3c-2pmax-(1024)3c-2pmax-(1024)3c-2pmax</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Accuracy</td><td rowspan=1 colspan=1>68.1%</td><td rowspan=1 colspan=1>83.3%</td><td rowspan=1 colspan=1>89.3%</td></tr></table>
|
| 509 |
+
|
| 510 |
+
Table 5: Best-performing architecture and classification accuracy of random CNNs on CIFAR-10. “ $\mathbf { \bar { \rho } } ( [ \mathbf { n } ] ) [ \mathbf { k } ] \mathbf { c } ^ { \prime }$ denotes a convolution layer with a stride 1, a kernel size [k] and $[ \mathbf { n } ]$ output channels, “ $\mathbf { \hat { \rho } } [ \mathbf { k } ] \mathbf { p } _ { \mathrm { m a x } } \mathbf { \hat { \rho } } ^ { \mathrm { , , } }$ denotes a max pooling layer with a kernel size [k] and a stride [k], and “ $[ \mathbf { k } ] \mathbf { p } _ { \mathrm { a v e } }$ ” denotes a average pooling layer. A typical layer consists of four operations, namely convolution, ReLU, batch normalization, and max pooling.
|
| 511 |
+
|
| 512 |
+
# C.2 LAYER-WISE COHERENCE AND SPARSITY FOR ALEXNET
|
| 513 |
+
|
| 514 |
+
We present coherence (see Table 6) and sparsity level (see Table 7) for each layer in AlexNet.
|
| 515 |
+
|
| 516 |
+
<table><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>5</td></tr><tr><td rowspan=1 colspan=1>coherence of learned filters</td><td rowspan=1 colspan=1>0.9172</td><td rowspan=1 colspan=1>0.6643</td><td rowspan=1 colspan=1>0.6200</td><td rowspan=1 colspan=1>0.6382</td><td rowspan=1 colspan=1>0.3390</td></tr><tr><td rowspan=1 colspan=1>coherence of random filters</td><td rowspan=1 colspan=1>0.1996</td><td rowspan=1 colspan=1>0.1263</td><td rowspan=1 colspan=1>0.0929</td><td rowspan=1 colspan=1>0.1073</td><td rowspan=1 colspan=1>0.1026</td></tr></table>
|
| 517 |
+
|
| 518 |
+
Table 6: Comparison of coherence between learned filters in each layer of AlexNet and Gaussian random filters with corresponding sizes.
|
| 519 |
+
|
| 520 |
+
Table 7: Layer-wise sparsity of AlexNet on ILSVRC-2012 validation set.
|
| 521 |
+
|
| 522 |
+
<table><tr><td rowspan=1 colspan=1>layer</td><td rowspan=1 colspan=1>conv1</td><td rowspan=1 colspan=1>pool1</td><td rowspan=1 colspan=1>conv2</td><td rowspan=1 colspan=1>pool2</td><td rowspan=1 colspan=1>conv3</td><td rowspan=1 colspan=1>conv4</td><td rowspan=1 colspan=1>conv5</td><td rowspan=1 colspan=1>pool5</td></tr><tr><td rowspan=1 colspan=1>% of non-zeros</td><td rowspan=1 colspan=1>49.41</td><td rowspan=1 colspan=1>87.79</td><td rowspan=1 colspan=1>18.97</td><td rowspan=1 colspan=1>44.13</td><td rowspan=1 colspan=1>31.08</td><td rowspan=1 colspan=1>30.95</td><td rowspan=1 colspan=1>9.78</td><td rowspan=1 colspan=1>28.15</td></tr></table>
|
| 523 |
+
|
| 524 |
+
# C.3 VISUALIZATION OF IMAGE RECONSTRUCTION FOR VGGNET
|
| 525 |
+
|
| 526 |
+
In Figure 5, we show reconstructed images from each layer using different reconstruction methods via a pretrained decoding network.
|
| 527 |
+
|
| 528 |
+

|
| 529 |
+
Figure 5: Visualization of images reconstructed by a pretrained decoding network with VGGNet’s pool(4) activation reconstructed using different methods: (a) original image, (b) output of the 5-layer decoding network with original activation, (c) output of the decoding net with reconstructed activation by IHT with learned filters, (d) output of the decoding net with reconstructed activation by IHT with Gaussian random filters, (e) output of the decoding net with Gaussian random activation.
|
md/train/B1xxAJHFwS/B1xxAJHFwS.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/BJO-BuT1g/BJO-BuT1g.md
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A LEARNED REPRESENTATION FOR ARTISTIC STYLE
|
| 2 |
+
|
| 3 |
+
Vincent Dumoulin & Jonathon Shlens & Manjunath Kudlur
|
| 4 |
+
|
| 5 |
+
Google Brain, Mountain View, CA
|
| 6 |
+
|
| 7 |
+
vi.dumoulin@gmail.com, shlens@google.com, keveman@google.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
The diversity of painting styles represents a rich visual vocabulary for the construction of an image. The degree to which one may learn and parsimoniously capture this visual vocabulary measures our understanding of the higher level features of paintings, if not images in general. In this work we investigate the construction of a single, scalable deep network that can parsimoniously capture the artistic style of a diversity of paintings. We demonstrate that such a network generalizes across a diversity of artistic styles by reducing a painting to a point in an embedding space. Importantly, this model permits a user to explore new painting styles by arbitrarily combining the styles learned from individual paintings. We hope that this work provides a useful step towards building rich models of paintings and offers a window on to the structure of the learned representation of artistic style.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
A pastiche is an artistic work that imitates the style of another one. Computer vision and more recently machine learning have a history of trying to automate pastiche, that is, render an image in the style of another one. This task is called style transfer, and is closely related to the texture synthesis task. While the latter tries to capture the statistical relationship between the pixels of a source image which is assumed to have a stationary distribution at some scale, the former does so while also attempting to preserve some notion of content.
|
| 16 |
+
|
| 17 |
+
On the computer vision side, Efros & Leung (1999) and Wei & Levoy (2000) attempt to “grow” textures one pixel at a time using non-parametric sampling of pixels in an examplar image. Efros & Freeman (2001) and Liang et al. (2001) extend this idea to “growing” textures one patch at a time, and Efros & Freeman (2001) uses the approach to implement “texture transfer”, i.e. transfering the texture of an object onto another one. Kwatra et al. (2005) approaches the texture synthesis problem from an energy minimization perspective, progressively refining the texture using an EMlike algorithm. Hertzmann et al. (2001) introduces the concept of “image analogies”: given a pair of “unfiltered” and “filtered” versions of an examplar image, a target image is processed to create an analogous “filtered” result. More recently, Frigo et al. (2016) treats style transfer as a local texture transfer (using an adaptive patch partition) followed by a global color transfer, and Elad & Milanfar (2016) extends Kwatra’s energy-based method into a style transfer algorithm by taking content similarity into account.
|
| 18 |
+
|
| 19 |
+
On the machine learning side, it has been shown that a trained classifier can be used as a feature extractor to drive texture synthesis and style transfer. Gatys et al. (2015a) uses the VGG-19 network (Simonyan & Zisserman, 2014) to extract features from a texture image and a synthesized texture. The two sets of features are compared and the synthesized texture is modified by gradient descent so that the two sets of features are as close as possible. Gatys et al. (2015b) extends this idea to style transfer by adding the constraint that the synthesized image also be close to a content image with respect to another set of features extracted by the trained VGG-19 classifier.
|
| 20 |
+
|
| 21 |
+
While very flexible, this algorithm is expensive to run due to the optimization loop being carried. Ulyanov et al. (2016a), Li & Wand (2016) and Johnson et al. (2016) tackle this problem by introducing a feedforward style transfer network, which is trained to go from content to pastiche image in one pass. However, in doing so some of the flexibility of the original algorithm is lost: the style transfer network is tied to a single style, which means that separate networks have to be trained (a) With conditional instance normalization, a single style transfer network can capture 32 styles at the same time, five of which are shown here. All 32 styles in this single model are in the Appendix. Golden Gate Bridge photograph by Rich Niewiroski Jr.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
|
| 27 |
+
(b) The style representation learned via conditional instance normalization permits the arbitrary combination of artistic styles. Each pastiche in the sequence corresponds to a different step in interpolating between the $\gamma$ and $\beta$ values associated with two styles the model was trained on.
|
| 28 |
+
|
| 29 |
+
Figure 1: Pastiches produced by a style transfer network trained on 32 styles chosen for their variety.
|
| 30 |
+
|
| 31 |
+
for every style being modeled. Subsequent work has brought some performance improvements to style transfer networks, e.g. with respect to color preservation (Gatys et al., 2016a) or style transfer quality (Ulyanov et al., 2016b), but to our knowledge the problem of the single-purpose nature of style transfer networks remains untackled.
|
| 32 |
+
|
| 33 |
+
We think this is an important problem that, if solved, would have both scientific and practical importance. First, style transfer has already found use in mobile applications, for which on-device processing is contingent upon the models having a reasonable memory footprint. More broadly, building a separate network for each style ignores the fact that individual paintings share many common visual elements and a true model that captures artistic style would be able to exploit and learn from such regularities. Furthermore, the degree to which an artistic styling model might generalize across painting styles would directly measure our ability to build systems that parsimoniously capture the higher level features and statistics of photographs and images (Simoncelli & Olshausen, 2001).
|
| 34 |
+
|
| 35 |
+
In this work, we show that a simple modification of the style transfer network, namely the introduction of conditional instance normalization, allows it to learn multiple styles (Figure 1a).We demonstrate that this approach is flexible yet comparable to single-purpose style transfer networks, both qualitatively and in terms of convergence properties. This model reduces each style image into a point in an embedding space. Furthermore, this model provides a generic representation for artistic styles that seems flexible enough to capture new artistic styles much faster than a single-purpose network. Finally, we show that the embeddding space representation permits one to arbitrarily combine artistic styles in novel ways not previously observed (Figure 1b).
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 2: Style transfer network training diagram (Johnson et al., 2016; Ulyanov et al., 2016a). A pastiche image is produced by feeding a content image through the style transfer network. The two images, along with a style image, are passed through a trained classifier, and the resulting intermediate representations are used to compute the content loss $\mathcal { L } _ { c }$ and style loss $\mathcal { L } _ { s }$ . The parameters of the classifier are kept fixed throughout training.
|
| 39 |
+
|
| 40 |
+
# 2 STYLE TRANSFER WITH DEEP NETWORKS
|
| 41 |
+
|
| 42 |
+
Style transfer can be defined as finding a pastiche image $p$ whose content is similar to that of a content image $c$ but whose style is similar to that of a style image $s$ . This objective is by nature vaguely defined, because similarity in content and style are themselves vaguely defined.
|
| 43 |
+
|
| 44 |
+
The neural algorithm of artistic style proposes the following definitions:
|
| 45 |
+
|
| 46 |
+
• Two images are similar in content if their high-level features as extracted by a trained classifier are close in Euclidian distance.
|
| 47 |
+
• Two images are similar in style if their low-level features as extracted by a trained classifier share the same statistics or, more concretely, if the difference between the features’ Gram matrices has a small Frobenius norm.
|
| 48 |
+
|
| 49 |
+
The first point is motivated by the empirical observation that high-level features in classifiers tend to correspond to higher levels of abstractions (see Zeiler & Fergus (2014) for visualizations; see Johnson et al. (2016) for style transfer features). The second point is motivated by the observation that the artistic style of a painting may be interpreted as a visual texture (Gatys et al., 2015a). A visual texture is conjectured to be spatially homogenous and consist of repeated structural motifs whose minimal sufficient statistics are captured by lower order statistical measurements (Julesz, 1962; Portilla & Simoncelli, 1999).
|
| 50 |
+
|
| 51 |
+
In its original formulation, the neural algorithm of artistic style proceeds as follows: starting from some initialization of $p$ (e.g. $c$ , or some random initialization), the algorithm adapts $p$ to minimize the loss function
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\begin{array} { r } { \mathcal { L } ( s , c , p ) = \lambda _ { s } \mathcal { L } _ { s } ( p ) + \lambda _ { c } \mathcal { L } _ { c } ( p ) , } \end{array}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\mathcal { L } _ { s } ( p )$ is the style loss, $\mathcal { L } _ { c } ( p )$ is the content loss and $\lambda _ { s } , \lambda _ { c }$ are scaling hyperparameters. Given a set of “style layers” $s$ and a set of “content layers” $\mathcal { C }$ , the style and content losses are themselves defined as
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { c } { { \mathcal { L } _ { s } ( p ) = \displaystyle \sum _ { i \in \mathcal { S } } \frac { 1 } { U _ { i } } \parallel G ( \phi _ { i } ( p ) ) - G ( \phi _ { i } ( s ) ) \parallel _ { F } ^ { 2 } } } \\ { { \mathcal { L } _ { c } ( p ) = \displaystyle \sum _ { j \in \mathcal { C } } \frac { 1 } { U _ { j } } \parallel \phi _ { j } ( p ) - \phi _ { j } ( c ) \parallel _ { 2 } ^ { 2 } } } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $\phi _ { l } ( x )$ are the classifier activations at layer $l$ , $U _ { l }$ is the total number of units at layer $l$ and $G ( \phi _ { l } ( x ) )$ is the Gram matrix associated with the layer $l$ activations. In practice, we set $\lambda _ { c } = 1 . 0$ and and leave $\lambda _ { s }$ as a free hyper-parameter.
|
| 64 |
+
|
| 65 |
+
In order to speed up the procedure outlined above, a feed-forward convolutional network, termed a style transfer network $T$ , is introduced to learn the transformation (Johnson et al., 2016; Li & Wand, 2016; Ulyanov et al., 2016a). It takes as input a content image $c$ and outputs the pastiche image $p$ directly (Figure 2). The network is trained on many content images (Deng et al., 2009) using the same loss function as above, i.e.
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\begin{array} { r } { \mathcal { L } ( s , c ) = \lambda _ { s } \mathcal { L } _ { s } ( T ( c ) ) + \lambda _ { c } \mathcal { L } _ { c } ( T ( c ) ) . } \end{array}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
While feedforward style transfer networks solve the problem of speed at test-time, they also suffer from the fact that the network $T$ is tied to one specific painting style. This means that a separate network $T$ has to be trained for every style to be imitated. The real-world impact of this limitation is that it becomes prohibitive to implement a style transfer application on a memory-limited device, such as a smartphone.
|
| 72 |
+
|
| 73 |
+
# 2.1 N-STYLES FEEDFORWARD STYLE TRANSFER NETWORKS
|
| 74 |
+
|
| 75 |
+
Our work stems from the intuition that many styles probably share some degree of computation, and that this sharing is thrown away by training $N$ networks from scratch when building an $N .$ - styles style transfer system. For instance, many impressionist paintings share similar paint strokes but differ in the color palette being used. In that case, it seems very wasteful to treat a set of $N$ impressionist paintings as completely separate styles.
|
| 76 |
+
|
| 77 |
+
To take this into account, we propose to train a single conditional style transfer network $T ( c , s )$ for $N$ styles. The conditional network is given both a content image and the identity of the style to apply and produces a pastiche corresponding to that style. While the idea is straightforward on paper, there remains the open question of how conditioning should be done. In exploring this question, we found a very surprising fact about the role of normalization in style transfer networks: to model a style, it is sufficient to specialize scaling and shifting parameters after normalization to each specific style. In other words, all convolutional weights of a style transfer network can be shared across many styles, and it is sufficient to tune parameters for an affine transformation after normalization for each style.
|
| 78 |
+
|
| 79 |
+
We call this approach conditional instance normalization. The goal of the procedure is transform a layer’s activations $x$ into a normalized activation $z$ specific to painting style $s$ . Building off the instance normalization technique proposed in Ulyanov et al. (2016b), we augment the $\gamma$ and $\beta$ parameters so that they’re $N \times C$ matrices, where $N$ is the number of styles being modeled and $C$ is the number of output feature maps. Conditioning on a style is achieved as follows:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
z = \gamma _ { s } \left( \frac { x - \mu } { \sigma } \right) + \beta _ { s }
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where $\mu$ and $\sigma$ are $x$ ’s mean and standard deviation taken across spatial axes and $\gamma _ { s }$ and $\beta _ { s }$ are obtained by selecting the row corresponding to $s$ in the $\gamma$ and $\beta$ matrices (Figure 3). One added benefit of this approach is that one can stylize a single image into $N$ painting styles with a single feed forward pass of the network with a batch size of $N$ . In constrast, a single-style network requires $N$ feed forward passes to perform $N$ style transfers (Johnson et al., 2016; Li & Wand, 2016; Ulyanov et al., 2016a).
|
| 86 |
+
|
| 87 |
+
Because conditional instance normalization only acts on the scaling and shifting parameters, training a style transfer network on $N$ styles requires fewer parameters than the naive approach of training $N$ separate networks. In a typical network setup, the model consists of roughly 1.6M parameters, only around 3K (or $0 . 2 \%$ ) of which specify individual artistic styles. In fact, because the size of $\gamma$ and $\beta$ grows linearly with respect to the number of feature maps in the network, this approach requires $O ( N \times L )$ parameters, where $L$ is the total number of feature maps in the network.
|
| 88 |
+
|
| 89 |
+
In addition, as is discussed in subsection 3.4, conditional instance normalization presents the advantage that integrating an $N + 1 ^ { t h }$ style to the network is cheap because of the very small number of parameters to train.
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Figure 3: Conditional instance normalization. The input activation $x$ is normalized across both spatial dimensions and subsequently scaled and shifted using style-dependent parameter vectors $\gamma _ { s } , \beta _ { s }$ where $s$ indexes the style label.
|
| 93 |
+
|
| 94 |
+
# 3 EXPERIMENTAL RESULTS
|
| 95 |
+
|
| 96 |
+
# 3.1 METHODOLOGY
|
| 97 |
+
|
| 98 |
+
Unless noted otherwise, all style transfer networks were trained using the hyperparameters outlined in the Appendix’s Table 1.
|
| 99 |
+
|
| 100 |
+
We used the same network architecture as in Johnson et al. (2016), except for two key details: zero-padding is replaced with mirror-padding, and transposed convolutions (also sometimes called deconvolutions) are replaced with nearest-neighbor upsampling followed by a convolution. The use of mirror-padding avoids border patterns sometimes caused by zero-padding in SAME-padded convolutions, while the replacement for transposed convolutions avoids checkerboard patterning, as discussed in in Odena et al. (2016). We find that with these two improvements training the network no longer requires a total variation loss that was previously employed to remove high frequency noise as proposed in Johnson et al. (2016).
|
| 101 |
+
|
| 102 |
+
Our training procedure follows Johnson et al. (2016). Briefly, we employ the ImageNet dataset (Deng et al., 2009) as a corpus of training content images. We train the $N$ -style network with stochastic gradient descent using the Adam optimizer (Kingma & Ba, 2014). Details of the model architecture are in the Appendix. A complete implementation of the model in TensorFlow (Abadi et al., 2016) as well as a pretrained model are available for download 1. The evaluation images used for this work were resized such that their smaller side has size 512. Their stylized versions were then center-cropped to 512x512 pixels for display.
|
| 103 |
+
|
| 104 |
+
# 3.2 TRAINING A SINGLE NETWORK ON N STYLES PRODUCES STYLIZATIONS COMPARABLETO INDEPENDENTLY-TRAINED MODELS
|
| 105 |
+
|
| 106 |
+
As a first test, we trained a 10-styles model on stylistically similar images, namely 10 impressionist paintings from Claude Monet. Figure 4 shows the result of applying the trained network on evaluation images for a subset of the styles, with the full results being displayed in the Appendix. The model captures different color palettes and textures. We emphasize that $9 9 . 8 \%$ of the parameters are shared across all styles in contrast to $0 . 2 \%$ of the parameters which are unique to each painting style.
|
| 107 |
+
|
| 108 |
+
To get a sense of what is being traded off by folding 10 styles into a single network, we trained a separate, single-style network on each style and compared them to the 10-styles network in terms of style transfer quality and training speed (Figure 5).
|
| 109 |
+
|
| 110 |
+
The left column compares the learning curves for style and content losses between the single-style networks and the 10-styles network. The losses were averaged over 32 random batches of content images. By visual inspection, we observe that the 10-styles network converges as quickly as the single-style networks in terms of style loss, but lags slightly behind in terms of content loss.
|
| 111 |
+
|
| 112 |
+
In order to quantify this observation, we compare the final losses for 10-styles and single-style models (center column). The 10-styles network’s content loss is around $8 . 7 \pm 3 . 9 \%$ higher than its single-style counterparts, while the difference in style losses $( 8 . 9 \pm 1 6 . 5 \%$ lower) is insignificant. While the $N$ -styles network suffers from a slight decrease in content loss convergence speed, this may not be a fair comparison, given that it takes $N$ times more parameter updates to train $N$ singlestyle networks separately than to train them with an $N$ -styles network.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 4: A single style transfer network was trained to capture the style of 10 Monet paintings, five of which are shown here. All 10 styles in this single model are in the Appendix. Golden Gate Bridge photograph by Rich Niewiroski Jr.
|
| 116 |
+
|
| 117 |
+
The right column shows a comparison between the pastiches produced by the 10-styles network and the ones produced by the single-style networks. We see that both results are qualitatively similar.
|
| 118 |
+
|
| 119 |
+
# 3.3 THE N-STYLES MODEL IS FLEXIBLE ENOUGH TO CAPTURE VERY DIFFERENT STYLES
|
| 120 |
+
|
| 121 |
+
We evaluated the flexibility of the $N$ -styles model by training a style transfer network on 32 works of art chosen for their diversity. Figure 1a shows the result of applying the trained network on evaluation images for a subset of the styles. Once again, the full results are displayed in the Appendix. The model appears to be capable of modeling all 32 styles in spite of the tremendous variation in color palette and the spatial scale of the painting styles.
|
| 122 |
+
|
| 123 |
+
# 3.4 THE TRAINED NETWORK GENERALIZES ACROSS PAINTING STYLES
|
| 124 |
+
|
| 125 |
+
Since all weights in the transformer network are shared between styles, one way to incorporate a new style to a trained network is to keep the trained weights fixed and learn a new set of $\gamma$ and $\beta$ parameters. To test the efficiency of this approach, we used it to incrementally incorporate Monet’s Plum Trees in Blossom painting to the network trained on 32 varied styles. Figure 6 shows that doing so is much faster than training a new network from scratch (left) while yielding comparable pastiches: even after eight times fewer parameter updates than its single-style counterpart, the finetuned model produces comparable pastiches (right).
|
| 126 |
+
|
| 127 |
+
# 3.5 THE TRAINED NETWORK CAN ARBITRARILY COMBINE PAINTING STYLES
|
| 128 |
+
|
| 129 |
+
The conditional instance normalization approach raises some interesting questions about style representation. In learning a different set of $\gamma$ and $\beta$ parameters for every style, we are in some sense learning an embedding of styles.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 5: The $N$ -styles model exhibits learning dynamics comparable to individual models. (Left column) The N-styles model converges slightly slower in terms of content loss (top) and as fast in terms of style loss (bottom) than individual models. Training on a single Monet painting is represented by two curves with the same color. The dashed curve represents the $N$ -styles model, and the full curves represent individual models. Emphasis has been added on the styles for Vetheuil (1902) (teal) and Water Lilies (purple) for visualization purposes; remaining colors correspond to other Monet paintings (see Appendix). (Center column) The N-styles model reaches a slightly higher final content loss than (top, $8 . 7 \pm 3 . 9 \%$ increase) and a final style loss comparable to (bottom, $8 . 9 \pm 1 6 . 5 \%$ decrease) individual models. (Right column) Pastiches produced by the $N$ -styles network are qualitatively comparable to those produced by individual networks.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 6: The trained network is efficient at learning new styles. (Left column) Learning $\gamma$ and $\beta$ from a trained style transfer network converges much faster than training a model from scratch. (Right) Learning $\gamma$ and $\beta$ for 5,000 steps from a trained style transfer network produces pastiches comparable to that of a single network trained from scratch for 40,000 steps. Conversely, 5,000 step of training from scratch produces leads to a poor pastiche.
|
| 136 |
+
|
| 137 |
+
Previous work suggested that cleverly balancing optimization strategies offers an opportunity to blend painting styles 2. To probe the utility of this embedding, we tried convex combinations of the $\gamma$ and $\beta$ values to blend very distinct painting styles (Figure 1b; Figure 7, left column). Employing a single convex combination produces a smooth transition from one style to the other. Suppose $( \gamma _ { 1 } , \beta _ { 1 } )$ and $( \gamma _ { 2 } , \beta _ { 2 } )$ are the parameters corresponding to two different styles. We use $\gamma = \alpha \times \gamma _ { 1 } +$ $( 1 - \alpha ) \times \gamma _ { 2 }$ and $\beta = \alpha \times \beta _ { 1 } + ( 1 - \alpha ) \times \beta _ { 2 }$ to stylize an image. Employing convex combinations may be extended to an arbitrary number of styles 3. Figure 7 (right column) shows the style loss from the transformer network for a given source image, with respect to the Bicentennial Print and Head of a Clown paintings, as we vary $\alpha$ from 0 to 1. As $\alpha$ increases, the style loss with respect to Bicentennial Print increases, which explains the smooth fading out of that style’s artifact in the transformed image.
|
| 138 |
+
|
| 139 |
+

|
| 140 |
+
Figure 7: The $N$ -styles network can arbitrarily combine artistic styles. (Left) Combining four styles, shown in the corners. Each pastiche corresponds to a different convex combination of the four styles’ $\gamma$ and $\beta$ values. (Right) As we transition from one style to another (Bicentennial Print and Head of a Clown in this case), the style losses vary monotonically.
|
| 141 |
+
|
| 142 |
+
# 4 DISCUSSION
|
| 143 |
+
|
| 144 |
+
It seems surprising that such a small proportion of the network’s parameters can have such an impact on the overall process of style transfer. A similar intuition has been observed in auto-regressive models of images (van den Oord et al., 2016b) and audio (van den Oord et al., 2016a) where the conditioning process is mediated by adjusting the biases for subsequent samples from the model. That said, in the case of art stylization when posed as a feedforward network, it could be that the specific network architecture is unable to take full advantage of its capacity. We see evidence for this behavior in that pruning the architecture leads to qualitatively similar results. Another interpretation could be that the convolutional weights of the style transfer network encode transformations that represent “elements of style”. The scaling and shifting factors would then provide a way for each style to inhibit or enhance the expression of various elements of style to form a global identity of style. While this work does not attempt to verify this hypothesis, we think that this would constitute a very promising direction of research in understanding the computation behind style transfer networks as well as the representation of images in general.
|
| 145 |
+
|
| 146 |
+
Concurrent to this work, Gatys et al. (2016b) demonstrated exciting new methods for revising the loss to selectively adjust the spatial scale, color information and spatial localization of the artistic style information. These methods are complementary to the results in this paper and present an interesting direction for exploring how spatial and color information uniquely factor into artistic style representation.
|
| 147 |
+
|
| 148 |
+
The question of how predictive each style image is of its corresponding style representation is also of great interest. If it is the case that the style representation can easily be predicted from a style image, one could imagine building a transformer network which skips learning an individual conditional embedding and instead learn to produce a pastiche directly from a style and a content image, much like in the original neural algorithm of artistic style, but without any optimization loop at test time.
|
| 149 |
+
|
| 150 |
+
Finally, the learned style representation opens the door to generative models of style: by modeling enough paintings of a given artistic movement (e.g. impressionism), one could build a collection of style embeddings upon which a generative model could be trained. At test time, a style representation would be sampled from the generative model and used in conjunction with the style transfer network to produce a random pastiche of that artistic movement.
|
| 151 |
+
|
| 152 |
+
In summary, we demonstrated that conditional instance normalization constitutes a simple, efficient and scalable modification of style transfer networks that allows them to model multiple styles at the same time. A practical consequence of this approach is that a new painting style may be transmitted to and stored on a mobile device with a small number of parameters. We showed that despite its simplicity, the method is flexible enough to capture very different styles while having very little impact on training time and final performance of the trained network. Finally, we showed that the learned representation of style is useful in arbitrarily combining artistic styles. This work suggests the existence of a learned representation for artistic styles whose vocabulary is flexible enough to capture a diversity of the painted world.
|
| 153 |
+
|
| 154 |
+
# ACKNOWLEDGMENTS
|
| 155 |
+
|
| 156 |
+
We would like to thank Fred Bertsch, Douglas Eck, Cinjon Resnick and the rest of the Google Magenta team for their feedback; Peyman Milanfar, Michael Elad, Feng Yang, Jon Barron, Bhavik Singh, Jennifer Daniel as well as the the Google Brain team for their crucial suggestions and advice; an anonymous reviewer for helpful suggestions about applying this model in a mobile domain. Finally, we would like to thank the Google Cultural Institute, whose curated collection of art photographs was very helpful in finding exciting style images to train on.
|
| 157 |
+
|
| 158 |
+
# REFERENCES
|
| 159 |
+
|
| 160 |
+
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.
|
| 161 |
+
|
| 162 |
+
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.
|
| 163 |
+
|
| 164 |
+
Alexei A Efros and William T Freeman. Image quilting for texture synthesis and transfer. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pp. 341–346. ACM, 2001.
|
| 165 |
+
|
| 166 |
+
Alexei A Efros and Thomas K Leung. Texture synthesis by non-parametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pp. 1033–1038. IEEE, 1999.
|
| 167 |
+
|
| 168 |
+
Michael Elad and Peyman Milanfar. Style-transfer via texture-synthesis. arXiv preprint arXiv:1609.03057, 2016.
|
| 169 |
+
|
| 170 |
+
Oriel Frigo, Neus Sabater, Julie Delon, and Pierre Hellier. Split and match: Example-based adaptive patch sampling for unsupervised style transfer. 2016.
|
| 171 |
+
|
| 172 |
+
Leon Gatys, Alexander S Ecker, and Matthias Bethge. Texture synthesis using convolutional neural networks. In Advances in Neural Information Processing Systems, pp. 262–270, 2015a.
|
| 173 |
+
|
| 174 |
+
Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015b.
|
| 175 |
+
|
| 176 |
+
Leon A Gatys, Matthias Bethge, Aaron Hertzmann, and Eli Shechtman. Preserving color in neural artistic style transfer. arXiv preprint arXiv:1606.05897, 2016a.
|
| 177 |
+
|
| 178 |
+
Leon A. Gatys, Alexander S. Ecker, Matthias Bethge, Aaron Hertzmann, and Eli Shechtman. Controlling perceptual factors in neural style transfer. CoRR, abs/1611.07865, 2016b. URL http://arxiv.org/abs/1611.07865.
|
| 179 |
+
|
| 180 |
+
Aaron Hertzmann, Charles E Jacobs, Nuria Oliver, Brian Curless, and David H Salesin. Image analogies. In Proceedings of the 28th annual conference on Computer graphics and interactive techniques, pp. 327–340. ACM, 2001.
|
| 181 |
+
|
| 182 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. arXiv preprint arXiv:1603.08155, 2016.
|
| 183 |
+
|
| 184 |
+
Bela Julesz. Visual pattern discrimination. IRE Trans. Info Theory, 8:84–92, 1962.
|
| 185 |
+
|
| 186 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 187 |
+
|
| 188 |
+
Vivek Kwatra, Irfan Essa, Aaron Bobick, and Nipun Kwatra. Texture optimization for examplebased synthesis. ACM Transactions on Graphics (ToG), 24(3):795–802, 2005.
|
| 189 |
+
|
| 190 |
+
Chuan Li and Michael Wand. Precomputed real-time texture synthesis with markovian generative adversarial networks. ECCV, 2016. URL http://arxiv.org/abs/1604.04382.
|
| 191 |
+
|
| 192 |
+
Lin Liang, Ce Liu, Ying-Qing Xu, Baining Guo, and Heung-Yeung Shum. Real-time texture synthesis by patch-based sampling. ACM Transactions on Graphics (ToG), 20(3):127–150, 2001.
|
| 193 |
+
|
| 194 |
+
Augustus Odena, Christopher Olah, and Vincent Dumoulin. Avoiding checkerboard artifacts in neural networks. Distill, 2016.
|
| 195 |
+
|
| 196 |
+
Javier Portilla and Eero Simoncelli. A parametric texture model based on joint statistics of complex wavelet coefficients. International Journal of Computer Vision, 40:49–71, 1999.
|
| 197 |
+
|
| 198 |
+
Eero Simoncelli and Bruno Olshausen. Natural image statistics and neural representation. Annual Review of Neuroscience, 24:1193–1216, 2001.
|
| 199 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 200 |
+
Dmitry Ulyanov, Vadim Lebedev, Andrea Vedaldi, and Victor Lempitsky. Texture networks: Feedforward synthesis of textures and stylized images. arXiv preprint arXiv:1603.03417, 2016a.
|
| 201 |
+
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016b.
|
| 202 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, ¨ Nal Kalchbrenner, Andrew W. Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. CoRR, abs/1609.03499, 2016a. URL http://arxiv.org/abs/1609.03499.
|
| 203 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray ¨ Kavukcuoglu. Conditional image generation with pixelcnn decoders. CoRR, abs/1606.05328, 2016b. URL http://arxiv.org/abs/1606.05328.
|
| 204 |
+
Li-Yi Wei and Marc Levoy. Fast texture synthesis using tree-structured vector quantization. In Proceedings of the 27th annual conference on Computer graphics and interactive techniques, pp. 479–488. ACM Press/Addison-Wesley Publishing Co., 2000.
|
| 205 |
+
Matthew D Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In European Conference on Computer Vision, pp. 818–833. Springer, 2014.
|
| 206 |
+
|
| 207 |
+
# APPENDIX
|
| 208 |
+
|
| 209 |
+
HYPERPARAMETERS
|
| 210 |
+
Table 1: Style transfer network hyperparameters.
|
| 211 |
+
|
| 212 |
+
<table><tr><td></td><td></td><td></td><td>OperationKernel sizeStrideFeature mapsPaddingNonlinearity</td><td></td><td></td></tr><tr><td>Network-256 × 256× 3 input</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Convolution</td><td>9</td><td>1</td><td>32</td><td>SAME</td><td>ReLU</td></tr><tr><td>Convolution</td><td>3</td><td>2</td><td>64</td><td>SAME</td><td>ReLU</td></tr><tr><td>Convolution</td><td>3</td><td>2</td><td>128</td><td>SAME</td><td>ReLU</td></tr><tr><td>Residual block</td><td></td><td></td><td>128</td><td></td><td></td></tr><tr><td>Residual block</td><td></td><td></td><td>128</td><td></td><td></td></tr><tr><td>Residual block</td><td></td><td></td><td>128</td><td></td><td></td></tr><tr><td>Residual block</td><td></td><td></td><td>128</td><td></td><td></td></tr><tr><td>Residual block</td><td></td><td></td><td>128</td><td></td><td></td></tr><tr><td>Upsampling</td><td></td><td></td><td>64</td><td></td><td></td></tr><tr><td>Upsampling</td><td></td><td></td><td>32</td><td></td><td></td></tr><tr><td>Convolution</td><td>9</td><td>1</td><td>3</td><td>SAME</td><td>Sigmoid</td></tr><tr><td>Residual block - C feature maps</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Convolution</td><td>3</td><td>1</td><td>C</td><td>SAME</td><td>ReLU</td></tr><tr><td>Convolution</td><td>3</td><td>1</td><td>C</td><td>SAME</td><td>Linear</td></tr><tr><td></td><td>Add the input and the output</td><td></td><td></td><td></td><td></td></tr><tr><td>Upsampling- C feature maps</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td>Nearest-neighbor interpolation,factor 2</td><td></td><td></td></tr><tr><td>Convolution</td><td>3</td><td>1</td><td>C</td><td>SAME</td><td>ReLU</td></tr><tr><td></td><td>Padding mode REFLECT</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Normalization Conditional instance normalization after every convolution</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Optimizer Adam (Kingma & Ba,2014) (α = 0.001, β1 = 0.9, β2 = 0.999)</td><td></td><td></td><td></td><td></td></tr><tr><td>Parameter updates 40,000</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size 16</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Weight initialization Isotropic gaussian (μ = O,σ = 0.01)</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 213 |
+
|
| 214 |
+
# MONET PASTICHES
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
|
| 218 |
+
Claude Monet, Grainstacks at Giverny; the Evening Sun (1888/1889).
|
| 219 |
+
|
| 220 |
+

|
| 221 |
+
Claude Monet, Plum Trees in Blossom (1879).
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
Claude Monet, Poppy Field (1873).
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
Claude Monet, Rouen Cathedral, West Fac¸ade (1894).
|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
Claude Monet, Sunrise (Marine) (1873).
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
Claude Monet, Three Fishing Boats (1886).
|
| 236 |
+
|
| 237 |
+

|
| 238 |
+
|
| 239 |
+
Claude Monet, Vetheuil ´ (1879).
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
|
| 243 |
+
Claude Monet, Vetheuil ´ (1902).
|
| 244 |
+
|
| 245 |
+

|
| 246 |
+
|
| 247 |
+
Claude Monet, Water Lilies (ca. 1914-1917).
|
| 248 |
+
|
| 249 |
+
# VARIED PASTICHES
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
|
| 253 |
+
Roy Lichtenstein, Bicentennial Print (1975).
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
|
| 257 |
+
Ernst Ludwig Kirchner, Boy with Sweets (1918).
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
Paul Signac, Cassis, Cap Lombard, Opus 196 (1889).
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Paul Klee, Colors from a Distance (1932).
|
| 264 |
+
|
| 265 |
+

|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
|
| 269 |
+
Jamini Roy, Crucifixion.
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
Henri de Toulouse-Lautrec, Divan Japonais (1893).
|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
Egon Schiele, Edith with Striped Dress, Sitting (1915).
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
|
| 279 |
+
Georges Rouault, Head of a Clown (ca. 1907-1908).
|
| 280 |
+
|
| 281 |
+

|
| 282 |
+
William Hoare, Henry Hoare, ”The Magnificent”, of Stourhead (about 1750-1760).
|
| 283 |
+
|
| 284 |
+

|
| 285 |
+
|
| 286 |
+
Giorgio de Chirico, Horses on the seashore (1927/1928).
|
| 287 |
+
|
| 288 |
+

|
| 289 |
+
Vincent van Gogh, Landscape at Saint-Remy (Enclosed Field with Peasant) ´ (1889).
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Nicolas Poussin, Landscape with a Calm (1650-1651).
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
|
| 296 |
+
Bernardino Fungai, Madonna and Child with Two Hermit Saints (early 1480s).
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Max Hermann Maxy, Portrait of a Friend (1926).
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Juan Gris, Portrait of Pablo Picasso (1912).
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
|
| 306 |
+
Severini Gino, Ritmo plastico del 14 luglio (1913).
|
| 307 |
+
|
| 308 |
+

|
| 309 |
+
|
| 310 |
+
Richard Diebenkorn, Seawall (1957).
|
| 311 |
+
|
| 312 |
+

|
| 313 |
+
Alice Bailly, Self-Portrait (1917).
|
| 314 |
+
|
| 315 |
+

|
| 316 |
+
Grayson Perry, The Annunciation of the Virgin Deal (2012).
|
| 317 |
+
|
| 318 |
+

|
| 319 |
+
William Glackens, The Green Boathouse (ca. 1922).
|
| 320 |
+
|
| 321 |
+

|
| 322 |
+
|
| 323 |
+
Edvard Munch, The Scream (1910).
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
|
| 327 |
+
Vincent van Gogh, The Starry Night (1889).
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Pieter Bruegel the Elder, The Tower of Babel (1563).
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Wolfgang Lettl, The Trial (1981).
|
| 334 |
+
|
| 335 |
+

|
| 336 |
+
|
| 337 |
+
Douglas Coupland, Thomson No. 5 (Yellow Sunset) (2011).
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Claude Monet, Three Fishing Boats (1886).
|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
John Ruskin, Trees in a Lane (1847).
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Giuseppe Cades, Tullia about to Ride over the Body of Her Father in Her Chariot (about 1770-1775).
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Berthe Morisot, Under the Orange Tree (1889).
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
|
| 353 |
+
Giulio Romano (Giulio Pippi), Victory, Janus, Chronos and Gaea (about 1532-1534).
|
| 354 |
+
|
| 355 |
+

|
| 356 |
+
|
| 357 |
+
Wassily Kandinsky, White Zig Zags (1922).
|
md/train/BJepcaEtwB/BJepcaEtwB.md
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# META-GRAPH: FEW SHOT LINK PREDICTION VIA META LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We consider the task of few shot link prediction, where the goal is to predict missing edges across multiple graphs using only a small sample of known edges. We show that current link prediction methods are generally ill-equipped to handle this task—as they cannot effectively transfer knowledge between graphs in a multigraph setting and are unable to effectively learn from very sparse data. To address this challenge, we introduce a new gradient-based meta learning framework, Meta-Graph, that leverages higher-order gradients along with a learned graph signature function that conditionally generates a graph neural network initialization. Using a novel set of few shot link prediction benchmarks, we show that MetaGraph enables not only fast adaptation but also better final convergence and can effectively learn using only a small sample of true edges.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Given a graph representing known relationships between a set of nodes, the goal of link prediction is to learn from the graph and infer novel or previously unknown relationships (Liben-Nowell & Kleinberg, 2003). For instance, in a social network we may use link prediction to power a friendship recommendation system (Aiello et al., 2012), or in the case of biological network data we might use link prediction to infer possible relationships between drugs, proteins, and diseases (Zitnik & Leskovec, 2017). However, despite its popularity, previous work on link prediction generally focuses only on one particular problem setting: it generally assumes that link prediction is to be performed on a single large graph and that this graph is relatively complete, i.e., that at least $50 \%$ of the true edges are observed during training (e.g., see Grover & Leskovec, 2016; Kipf & Welling, 2016b; Liben-Nowell & Kleinberg, 2003; Lu & Zhou, 2011). ¨
|
| 12 |
+
|
| 13 |
+
In this work, we consider the more challenging setting of few shot link prediction, where the goal is to perform link prediction on multiple graphs that contain only a small fraction of their true, underlying edges. This task is inspired by applications where we have access to multiple graphs from a single domain but where each of these individual graphs contains only a small fraction of the true, underlying edges. For example, in the biological setting, high-throughput interactomics offers the possibility to estimate thousands of biological interaction networks from different tissues, cell types, and organisms (Barrios-Rodiles et al., 2005); however, these estimated relationships can be noisy and sparse, and we need learning algorithms that can leverage information across these multiple graphs in order to overcome this sparsity. Similarly, in the e-commerce and social network settings, link prediction can often have a large impact in cases where we must quickly make predictions on sparsely-estimated graphs, such as when a service has been recently deployed to a new locale. That is to say to link prediction for a new sparse graph can benefit from transferring knowledge from other, possibly more dense, graphs assuming there is exploitable shared structure.
|
| 14 |
+
|
| 15 |
+
We term this problem of link prediction from sparsely-estimated multi-graph data as few shot link prediction analogous to the popular few shot classification setting (Miller et al., 2000; Lake et al., 2011; Koch et al., 2015). The goal of few shot link prediction is to observe many examples of graphs from a particular domain and leverage this experience to enable fast adaptation and higher accuracy when predicting edges on a new, sparsely-estimated graph from the same domain—a task that can can also be viewed as a form of meta learning, or learning to learn (Bengio et al., 1990; 1992; Thrun & Pratt, 2012; Schmidhuber, 1987) in the context of link prediction. This few shot link prediction setting is particularly challenging as current link prediction methods are generally ill-equipped to transfer knowledge between graphs in a multi-graph setting and are also unable to effectively learn from very sparse data.
|
| 16 |
+
|
| 17 |
+
Present work. We introduce a new framework called Meta-Graph for few shot link prediction and also introduce a series of benchmarks for this task. We adapt the classical gradient-based metalearning formulation for few shot classification (Miller et al., 2000; Lake et al., 2011; Koch et al., 2015) to the graph domain. Specifically, we consider a distribution over graphs as the distribution over tasks from which a global set of parameters are learnt, and we deploy this strategy to train graph neural networks (GNNs) that are capable of few-shot link prediction. To further bootstrap fast adaptation to new graphs we also introduce a graph signature function, which learns how to map the structure of an input graph to an effective initialization point for a GNN link prediction model. We experimentally validate our approach on three link prediction benchmarks. We find that our MetaGraph approach not only achieves fast adaptation but also converges to a better overall solution in many experimental settings, with an average improvement of $5 . { \bar { 3 } } \%$ in AUC at convergence over non-meta learning baselines.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Left: Graphical model for Meta-Graph vs. MAML. Right: Meta-Graph architecture.
|
| 21 |
+
|
| 22 |
+
# 2 PRELIMINARIES AND PROBLEM DEFINITION
|
| 23 |
+
|
| 24 |
+
The basic set-up for few shot link prediction is as follows: We assume that we have a distribution $p ( \mathcal G )$ over graphs, from which we can sample training graphs $\mathcal { G } _ { i } ~ \sim ~ p ( \mathcal { G } )$ , where each $\mathcal { G } _ { i } = ( \mathcal { V } _ { i } , \mathcal { E } _ { i } , X _ { i } )$ is defined by a set of nodes $\nu _ { i }$ , edges $\mathcal { E } _ { i }$ , and matrix of real-valued node attributes $X \in \mathbb { R } ^ { | \mathcal { V } _ { i } | \times d }$ . When convenient, we will also equivalently represent a graph as $\mathcal { G } _ { i } = ( \mathcal { V } _ { i } , A _ { i } , X _ { i } )$ , where $A _ { i } \in \mathbb { Z } ^ { | \mathcal { V } _ { i } | \times | \mathcal { V } _ { i } | }$ is an adjacency matrix representation of the edges in $\mathcal { E } _ { i }$ . We assume that each of these sampled graphs, $\mathcal { G } _ { i }$ , is a simple graph (i.e., contain a single type of relation and no self loops) and that every node $v \in \mathcal V _ { i }$ in the graph is associated with a real valued attribute vector $\mathbf { x } _ { v } \in \bar { \mathbb { R } ^ { d } }$ from a common vector space. We further assume that for each graph $\mathcal { G } _ { i }$ we have access to only a sparse subset of the true edges $\mathcal { E } _ { i } ^ { \mathrm { t r a i n } } \subset \mathcal { E } _ { i }$ (with $| \mathcal { E } _ { i } ^ { \mathrm { t r a i n } } | < < | \mathcal { E } _ { i } | )$ during training. In terms of distributional assumptions we assume that this $p ( \mathcal G )$ is defined over a set of related graphs (e.g., graphs drawn from a common domain or application setting).
|
| 25 |
+
|
| 26 |
+
Our goal is to learn a global or meta link prediction model from a set of sampled training graphs $\mathcal { G } _ { i } \sim p ( \mathcal { G } ) , i = 1 . . . n$ , such that we can use this meta model to quickly learn an effective link prediction model on a newly sampled graph $\mathcal { G } _ { * } \sim p ( \mathcal { G } )$ . More specifically, we wish to optimize a global set of parameters $\theta$ , as well as a graph signature function $\psi ( \mathcal { G } _ { i } )$ , which can be used together to generate an effective parameter initialization, $\phi _ { i }$ , for a local link prediction model on graph $\mathcal { G } _ { i }$ .
|
| 27 |
+
|
| 28 |
+
Relationship to standard link prediction. Few shot link prediction differs from standard link prediction in three important ways:
|
| 29 |
+
|
| 30 |
+
1. Rather than learning from a single graph $\mathcal { G }$ , we are learning from multiple graphs $\{ { \mathcal { G } } _ { 1 } , . . . , { \mathcal { G } } _ { n } \}$ sampled from a common distribution or domain.
|
| 31 |
+
|
| 32 |
+
2. We presume access to only a very sparse sample of true edges. Concretely, we focus on settings where at most $30 \%$ of the edges in $\mathcal { E } _ { i }$ are observed during training, i.e., where $\frac { | \mathcal { E } ^ { \mathrm { t r a i n } } | } { | \mathcal { E } | } \leq 0 . 3$ . 1
|
| 33 |
+
|
| 34 |
+
3. We distinguish between the global parameters, which are used to encode knowledge about the underlying distribution of graphs, and the local parameters $\phi _ { i }$ , which are optimized to perform link prediction on a specific graph $\mathcal { G } _ { i }$ . This distinction allows us to consider leveraging information from multiple graphs, while still allowing for individually-tuned link prediction models on each specific graph.
|
| 35 |
+
|
| 36 |
+
Relationship to traditional meta learning. Traditional meta learning for few-shot classification, generally assumes a distribution $p ( \mathcal { T } )$ over classification tasks, with the goal of learning global parameters that can facilitate fast adaptation to a newly sampled task $\mathcal { T } _ { i } \sim p ( \mathcal { T } )$ with few examples. We instead consider a distribution $p ( \mathcal G )$ over graphs with the goal of performing link prediction on a newly sampled graph. An important complication of this graph setting is that the individual predictions for each graph (i.e., the training edges) are not i.i.d.. Furthermore, for few shot link prediction we require training samples as a sparse subset of true edges that represents a small percentage of all edges in a graph. Note that for very small percentages we effectively break all graph structure and recover the supervised setting for few shot classification and thus simplifying the problem.
|
| 37 |
+
|
| 38 |
+
# 3 PROPOSED APPROACH
|
| 39 |
+
|
| 40 |
+
We now outline our proposed approach, Meta-Graph, to the few shot link prediction problem. We first describe how we define the local link prediction models, which are used to perform link prediction on each specific graph $\mathcal { G } _ { i }$ . Next, we discuss our novel gradient-based meta learning approach to define a global model that can learn from multiple graphs to generate effective parameter initializations for the local models. The key idea behind Meta-Graph is that we use gradient-based meta learning to optimize a shared parameter initialization $\theta$ for the local models, while also learning a parametric encoding of each graph $\mathcal { G } _ { i }$ that can be used to modulate this parameter initialization in a graph-specific way (Figure 1).
|
| 41 |
+
|
| 42 |
+
# 3.1 LOCAL LINK PREDICTION MODEL
|
| 43 |
+
|
| 44 |
+
In principle, our framework can be combined with a wide variety of GNN-based link prediction approaches, but here we focus on variational graph autoencoders (VGAEs) (Kipf & Welling, 2016b) as our base link prediction framework. Formally, given a graph $\mathcal { G } = ( \nu , A , X )$ , the VGAE learns an inference model, $q _ { \phi }$ , that defines a distribution over node embeddings $q _ { \phi } ( Z | A , X )$ , where each row $z _ { v } \in \mathbb { R } ^ { d }$ of $Z \in \mathbb { R } ^ { | \nu | \times d }$ is a node embedding that can be used to score the likelihood of an edge existing between pairs of nodes. The parameters of the inference model are shared across all the nodes in $\mathcal { G }$ , to define the approximate posterior $q _ { \phi } ( z _ { v } | A , X ) = \mathcal { N } ( z _ { v } | \mu _ { v } , \mathrm { d i a g } ( \sigma _ { v } ^ { 2 } ) )$ , where the parameters of the normal distribution are learned via GNNs:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\mu = { \bf G } { \bf N } { \bf N } _ { \mu } ( A , X ) , \qquad \mathrm { a n d } \qquad \log ( \sigma ) = { \bf G } { \bf N } { \bf N } _ { \sigma } ( A , X ) .
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
The generative component of the VGAE is then defined as
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
p ( A | Z ) = \prod _ { i = 1 } ^ { N } \prod _ { j = 1 } ^ { N } p ( A _ { u , v } | z _ { u } , z _ { v } ) , \qquad \mathrm { w i t h } \qquad p ( A _ { u , v } | z _ { u } , z _ { v } ) = \sigma ( z _ { u } ^ { \top } z _ { v } ) ,
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
i.e., the likelihood of an edge existing between two nodes, $u$ and $v$ , is proportional to the dot product of their node embeddings. Given the above components, the inference GNNs can be trained to minimize the variational lower bound on the training data:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathcal { L } _ { G } = \mathbb { E } _ { q _ { \phi } } [ \log p ( A ^ { \operatorname { t r a i n } } | Z ) ] - K L [ q _ { \phi } ( Z | X , A ^ { \operatorname { t r a i n } } ) | | p ( z ) ] ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where a Gaussian prior is used for $p ( z )$ .
|
| 63 |
+
|
| 64 |
+
We build upon VGAEs due to their strong performance on standard link prediction benchmarks (Kipf & Welling, 2016b), as well as the fact that they have a well-defined probabilistic interpretation that generalizes many embedding-based approaches to link prediction (e.g., node2vec (Grover & Leskovec, 2016)). We describe the specific GNN implementations we deploy for the inference model in Section 3.3.
|
| 65 |
+
|
| 66 |
+
# 3.2 OVERVIEW OF META-GRAPH
|
| 67 |
+
|
| 68 |
+
The key idea behind Meta-Graph is that we use gradient-based meta learning to optimize a shared parameter initialization $\theta$ for the inference models of a VGAE, while also learning a parametric encoding $\psi ( \mathcal { G } _ { i } )$ that modulates this parameter initialization in a graph-specific way. Specifically, given a sampled training graph $\mathcal { G } _ { i }$ , we initialize the inference model $q _ { \phi _ { i } }$ for a VGAE link prediction model using a combination of two learned components:
|
| 69 |
+
|
| 70 |
+
• A global initialization, $\theta$ , that is used to initialize all the parameters of the GNNs in the inference model. The global parameters $\theta$ are optimized via second-order gradient descent to provide an effective initialization point for any graph sampled from the distribution $p ( \mathcal G )$ . • A graph signature $s _ { \mathcal { G } _ { i } } ~ = ~ \psi ( \mathcal { G } _ { i } )$ that is used to modulate the parameters of inference model $\phi _ { i }$ based on the history of observed training graphs. In particular, we assume that the inference model $q _ { \phi _ { i } }$ for each graph $\mathcal { G } _ { i }$ can be conditioned on the graph signature. That is, we augment the inference model to $g _ { \phi _ { i } } ( Z | A , X , s _ { \mathcal { G } _ { i } } )$ , where we also include the graph signature $s _ { \mathcal { G } _ { i } }$ as a conditioning input. We use a $\mathbf { k }$ -layer graph convolutional network (GCN) (Kipf & Welling, 2016a), with sum pooling to compute the signature:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
s _ { \mathcal { G } } = \psi ( \mathcal { G } ) = \mathbf { M } \mathbf { L } \mathbf { P } ( \sum _ { v \in \mathcal { V } } z _ { v } ) \qquad \mathrm { w i t h } \qquad Z = \mathbf { G } \mathbf { C } \mathbf { N } ( A , X ) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where GCN denotes a k-layer GCN (as defined in (Kipf & Welling, 2016a)), MLP denotes a densely-connected neural network, and we are summing over the node embeddings $z _ { v }$ output from the GCN. As with the global parameters $\theta$ , the graph signature model $\psi$ is optimized via second-order gradient descent.
|
| 77 |
+
|
| 78 |
+
The overall Meta-Graph architecture is detailed in Figure 1 and the core learning algorithm is summarized in the algorithm block below.
|
| 79 |
+
|
| 80 |
+
# Algorithm 1: Meta-Graph for Few Shot Link Prediction
|
| 81 |
+
|
| 82 |
+
Result: Global parameters $\theta$ , Graph signature function $\psi$
|
| 83 |
+
Initialize learning rates: $\alpha , \epsilon$
|
| 84 |
+
Sample a mini-batch of graphs, $\mathcal { G } _ { b a t c h }$ from $p ( \mathcal G )$ ;
|
| 85 |
+
for each $\mathcal { G } \in \mathcal { G } _ { b a t c h }$ do ${ \mathcal { E } } = { \mathcal { E } } ^ { \mathrm { t r a i n } } \cup { \mathcal { E } } ^ { \mathrm { v a l } } \cup { \mathcal { E } } ^ { \mathrm { t e s t } } / /$ / Split edges into train, val, and test $s _ { \mathcal { G } } = \psi ( \mathcal { G } , \mathcal { E } ^ { \mathrm { t r a i n } } )$ // Compute graph signature Initialize: $\phi ^ { ( 0 ) } \theta / /$ Initialize local parameters via global parameters for $k$ in $[ 1 : K ]$ do $s _ { \mathcal { G } } = \mathrm { s t o p g r a d } ( s _ { \mathcal { G } } )$ // Stop Gradients to Graph Signature $\mathcal { L } _ { t r a i n } = \mathbb { E } _ { q } [ \log p ( A ^ { \mathrm { { t r a i n } } } | Z ) ] - K L [ q _ { \phi } ( Z | \mathcal { E } ^ { \mathrm { t r a i n } } , s _ { \mathcal { G } } ) | | p ( z ) ]$ Update ${ \phi } ^ { ( k ) } \gets { \phi } ^ { ( k - 1 ) } - \alpha \nabla _ { \phi } \mathcal { L } _ { t r a i n }$ end Initialize: $\theta \phi _ { K }$ $s _ { \mathcal { G } } = \psi ( \mathcal { G } , \mathcal { E } ^ { \mathrm { v a l } } \cup \mathcal { E } ^ { \mathrm { t r a i n } } )$ // Compute graph signature with validation edges $\begin{array} { r } { \dot { \mathcal { L } } _ { v a l } = \mathbb { E } _ { q } [ \log p ( A ^ { \mathrm { v a l } } | \dot { Z } ) ] - K \dot { L } [ q ( \bar { Z } | \dot { \mathcal { E } } ^ { \mathrm { v a l } } \cup \dot { \mathcal { E } } ^ { \mathrm { t r a i n } } , s _ { \mathcal { G } } ) | | p ( z ) ] } \end{array}$ Update $\theta \theta - \epsilon \nabla _ { \theta } \mathcal { L } _ { v a l }$ Update $\psi \psi - \epsilon \nabla _ { \psi } \mathcal { L } _ { v a l }$
|
| 86 |
+
end
|
| 87 |
+
|
| 88 |
+
The basic idea behind the algorithm is that we (i) sample a batch of training graphs, (ii) initialize VGAE link prediction models for these training graphs using our global parameters and signature function, (iii) run $K$ steps of gradient descent to optimize each of these VGAE models, and (iv) use second order gradient descent to update the global parameters and signature function based on a held-out validation set of edges. As depicted in Fig 1, this corresponds to updating the GCN based encoder for the local link prediction parameters $\phi _ { j }$ and global parameters $\theta$ along with the graph signature function $\psi$ using second order gradients. Note that since we are running $K$ steps of gradient descent within the inner loop of Algorithm 1, we are also “meta” optimizing for fast adaptation, as $\theta$ and $\psi$ are being trained via second-order gradient descent to optimize the local model performance after $K$ gradient updates, where generally $K \in \{ 0 , 1 , \ldots , 5 \}$ .
|
| 89 |
+
|
| 90 |
+
# 3.3 VARIANTS OF META-GRAPH
|
| 91 |
+
|
| 92 |
+
We consider several concrete instantiations of the Meta-Graph framework, which differ in terms of how the output of the graph signature function is used to modulate the parameters of the VGAE inference models. For all the Meta-Graph variants, we build upon the standard GCN propagation rule (Kipf & Welling, 2016a) to construct the VGAE inference models. In particular, we assume that all the inference GNNs (Equation 1) are defined by stacking $K$ neural message passing layers of the form:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
h _ { v } ^ { ( k ) } = \mathrm { R e L U } \left( \sum _ { u \in \mathcal { N } ( v ) \cup \{ v \} } \frac { m _ { s _ { \mathcal { G } } } \left( W ^ { ( k ) } h _ { u } ^ { ( k - 1 ) } \right) } { \sqrt { | \mathcal { N } ( v ) | | \mathcal { N } ( u ) | } } \right) ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $h _ { v } \in \mathbb { R } ^ { d }$ denotes the embedding of node $v$ at layer $k$ of the model, $\mathcal { N } ( v ) = \{ u \in \mathcal { V } : e _ { u , v } \in$ $\mathcal { E } \}$ denotes the nodes in the graph neighborhood of $v$ , and $W ^ { ( k ) } \in \mathbb { R } ^ { d \times d }$ is a trainable weight matrix for layer $k$ . The key difference between Equation 5 and the standard GCN propagation rule is that we add the modulation function $m _ { s _ { \mathcal G } }$ , which is used to modulate the message passing based on the graph signature $s _ { \mathcal { G } } = \psi ( \mathcal { G } )$ .
|
| 99 |
+
|
| 100 |
+
We describe different variations of this modulation below. In all cases, the intuition behind this modulation is that we want to compute a structural signature from the input graphs that can be used to condition the initialization of the local link prediction models. Intuitively, we expect this graph signature to encode structural properties of sampled graphs $\mathcal { G } _ { i } \sim p ( \mathcal { G } )$ in order to modulate the parameters of the local VGAE link prediction models and adapt it to the current graph.
|
| 101 |
+
|
| 102 |
+
GS-Modulation. Inspired by Brockschmidt (2019), we experiment with basic feature-wise linear modulation (Strub et al., 2018) to define the modulation function $m _ { s _ { \mathcal G } }$ :
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array} { c } { \beta _ { k } , \gamma _ { k } , = \psi ( \mathcal { G } ) } \\ { m _ { \beta _ { k } , \gamma _ { k } } \left( W ^ { ( k ) } h _ { u } ^ { ( k - 1 ) } \right) = \gamma _ { k } \odot W h ^ { ( k - 1 ) } + \beta _ { k } . } \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Here, we restrict the modulation terms $\beta _ { k }$ and $\gamma _ { k }$ output by the signature function to be in $[ - 1 , 1 ]$ by applying a tanh non-linearity after Equation 4.
|
| 109 |
+
|
| 110 |
+
GS-Gating. Feature-wise linear modulation of the GCN parameters (Equation 6) is an intuitive and simple choice that provides flexible modulation while still being relatively constrained. However, one drawback of the basic linear modulation is that it is “always on”, and there may be instances where the modulation could actually be counter-productive to learning. To allow the model to adaptively learn when to apply modulation, we extend the feature-wise linear modulation using a sigmoid gating term, $\rho _ { k }$ (with $[ 0 , 1 ]$ entries), that gates in the influence of $\gamma$ and $\beta$ :
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\begin{array} { r } { \begin{array} { c } { \beta _ { k } , \gamma _ { k } , \rho _ { k } = \psi ( \mathcal { G } ) } \\ { \beta _ { k } = \rho _ { k } \odot \beta _ { k } + \left( \mathbb { 1 } - \rho _ { k } \right) \odot \mathbb { 1 } } \\ { \gamma _ { k } = \rho _ { k } \odot \gamma _ { k } + \left( \mathbb { 1 } - \rho _ { k } \right) \odot \mathbb { 1 } } \\ { m _ { \beta _ { k } , \gamma _ { k } } \left( W ^ { ( k ) } h _ { u } ^ { ( k - 1 ) } \right) = \gamma _ { k } \odot W h ^ { ( k - 1 ) } + \beta _ { k } . } \end{array} } \end{array}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
GS-Weights. In the final variant of Meta-Graph, we extend the gating and modulation idea by separately aggregating graph neighborhood information with and without modulation and then merging these two signals via a convex combination:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\begin{array} { r l } & { \beta _ { k } , \gamma _ { k } , \rho _ { k } = \psi ( \mathcal { G } ) } \\ & { \quad h _ { v } ^ { ( k ) , 1 } = \mathrm { R e L U } \left( \displaystyle \sum _ { u \in N ( v ) \cup \{ v \} } \frac { W ^ { ( k ) } h _ { u } ^ { ( k - 1 ) } } { \sqrt { | \mathcal { N } ( v ) | | \mathcal { N } ( u ) | } } \right) } \\ & { \quad h _ { v } ^ { ( k ) , 2 } = \mathrm { R e L U } \left( \displaystyle \sum _ { u \in N ( v ) \cup \{ v \} } \frac { m _ { s _ { \beta _ { k } , \gamma _ { k } } } \left( W ^ { ( k ) } h _ { u } ^ { ( k - 1 ) } \right) } { \sqrt { | \mathcal { N } ( v ) | | \mathcal { N } ( u ) | } } \right) } \\ & { \quad h _ { \eta } ^ { ( k ) } = \rho _ { k } \odot h _ { v } ^ { ( k ) , 1 } + ( 1 - \rho _ { k } ) \odot h _ { \eta } ^ { ( k ) , 2 } , } \end{array}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where we use the basic linear modulation (Equation 6) to define $m _ { s _ { \beta _ { k } } , \gamma _ { k } }$
|
| 123 |
+
|
| 124 |
+
# 3.4 MAML FOR LINK PREDICTION AS A SPECIAL CASE
|
| 125 |
+
|
| 126 |
+
Note that a simplification of Meta-Graph, where the graph signature function is removed, can be viewed as an adaptation of model agnostic meta learning (MAML) (Finn et al., 2017) to the few shot link prediction setting. As discussed in Section 2, there are important differences in the setup for few shot link prediction, compared to traditional few shot classification. Nonetheless, the core idea of leveraging an inner and outer loop of training in Algorithm 1—as well as using second order gradients to optimize the global parameters—can be viewed as an adaptation of MAML to the graph setting, and we provide comparisons to this simplified MAML approach in the experiments below. We formalize the key differences by depicting the graphical model of MAML as first depicted in (Grant et al., 2018) and contrasting it with the graphical model for Meta-Graph, in Figure 1. MAML when reinterpreted for a distribution over graphs, maximizes the likelihood over all edges in the distribution. On the other hand, Meta-Graph when recast in a hierarchical Bayesian framework adds a graph signature function that influences $\tilde { \phi _ { j } }$ to produce the modulated parameters $\phi _ { j }$ from $N$ sampled edges. This explicit influence of $\psi$ is captured by the term $p ( \tilde { \phi _ { j } } | \psi , \phi _ { j } )$ in Equation 7 below:
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
p ( \mathcal { E } | \theta ) = \prod _ { j } ^ { J } \left( \int \int p ( \mathcal { E } _ { j } | \phi _ { j } ) p ( \phi _ { j } | \psi , \tilde { \phi } _ { j } ) p ( \tilde { \phi _ { j } } | \theta ) d \phi _ { j } d \tilde { \phi _ { j } } \right)
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
For computational tractability we take the likelihood of the modulated parameters as a point estimate —i.e., $p \bar { ( \phi _ { j } | \psi , \tilde { \phi _ { j } } ) } = \delta ( \psi \cdot \tilde { \tilde { \phi _ { j } } } )$ .
|
| 133 |
+
|
| 134 |
+
# 4 EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
We design three novel benchmarks for the few-shot link prediction task. All of these benchmarks contain a set of graphs drawn from a common domain. In all settings, we use $80 \%$ of these graphs for training and $10 \%$ as validation graphs, where these training and validation graphs are used to optimize the global model parameters (for Meta-Graph) or pre-train weights (for various baseline approaches). We then provide the remaining $10 \%$ of the graphs as test graphs, and our goal is to fine-tune or train a model on these test graphs to achieve high link prediction accuracy. Note that in this few shot link prediction setting, there are train/val/test splits at both the level of graphs and edges: for every individual graph, we are optimizing a model using the training edges to predict the likelihood of the test edges, but we are also training on multiple graphs with the goal of facilitating fast adaptation to new graphs via the global model parameters.
|
| 137 |
+
|
| 138 |
+
Our goal is to use our benchmarks to investigate four key empirical questions:
|
| 139 |
+
|
| 140 |
+
Q1 How does the overall performance of Meta-Graph compare to various baselines, including (i) a simple adaptation of MAML (Finn et al., 2017) (i.e., an ablation of Meta-Graph where the graph signature function is removed), (ii), standard pre-training approaches where we pre-train the VGAE model on the training graphs before fine-tuning on the test graphs, and (iii) naive baselines that do not leverage multi-graph information (i.e., a basic VGAE without pre-training, the Adamic-Adar heuristic (Adamic & Adar, 2003), and DeepWalk (Perozzi et al., 2014))?
|
| 141 |
+
Q2 How well does Meta-Graph perform in terms of fast adaption? Is Meta-Graph able to achieve strong performance after only a small number of gradient steps on the test graphs?
|
| 142 |
+
Q3 How necessary is the graph signature function for strong performance, and how do the different variants of the Meta-Graph signature function compare across the various benchmark settings?
|
| 143 |
+
Q4 What is learned by the graph signature function? For example, do the learned graph signatures correlate with the structural properties of the input graphs, or are they more sensitive to node feature information?
|
| 144 |
+
|
| 145 |
+
Datasets. Two of our benchmarks are derived from standard multi-graph datasets from proteinprotein interaction (PPI) networks (Zitnik & Leskovec, 2017) and 3D point cloud data (FirstMMDB) (Neumann et al., 2013). These benchmarks are traditionally used for node and graph classification, respectively, but we adapt them for link prediction. We also create a novel multi-graph dataset based upon the AMINER citation data (Tang et al., 2008), where each node corresponds to a paper and links represent citations. We construct individual graphs from AMINER data by sampling ego networks around nodes and create node features using embeddings of the paper abstracts (see Appendix for details). We preprocess all graphs in each domain such that each graph contains a minimum of 100 nodes and up to a maximum of 20000 nodes. For all datasets, we perform link prediction by training on a small subset (i.e., a percentage) of the edges and then attempting to predict the unseen edges (with $2 0 \%$ of the held-out edges used for validation). Key dataset statistics are summarized in Table 1.
|
| 146 |
+
|
| 147 |
+
Table 1: Statistics for the three datasets used to test Meta-Graph.
|
| 148 |
+
|
| 149 |
+
<table><tr><td colspan="2">DATASET</td><td colspan="2">#GRAPHS</td><td colspan="2">AVG.NODES</td><td colspan="2">AVG.EDGES</td><td colspan="2">#NODE FEATS</td><td></td></tr><tr><td colspan="2">PPI</td><td colspan="2">24</td><td colspan="2">2,331</td><td colspan="2">64,596</td><td colspan="3">50</td></tr><tr><td colspan="2">FIRSTMMDB</td><td colspan="2">41</td><td colspan="2">1,377</td><td colspan="2">6,147</td><td colspan="3">5</td></tr><tr><td colspan="2">EGO-AMINER</td><td colspan="2">72</td><td colspan="2">462</td><td colspan="2">2245</td><td colspan="3">300</td></tr><tr><td colspan="9">PPI</td><td rowspan="2">Ego-AMINER</td><td colspan="2"></td></tr><tr><td colspan="2">Edges</td><td>10%</td><td>20%</td><td>30%</td><td>10%</td><td>20%</td><td>FirstMMDB 30%</td><td>10%</td><td>20%</td><td>30%</td></tr><tr><td colspan="2">Meta-Graph</td><td>0.795</td><td>0.833</td><td>0.845</td><td>0.782</td><td>0.786</td><td>0.783</td><td>0.626</td><td></td><td></td><td>0.786</td></tr><tr><td colspan="2">MAML</td><td>0.770</td><td>0.815</td><td>0.828</td><td>0.776</td><td>0.782</td><td></td><td>0.793</td><td>0.561</td><td>0.738 0.662</td><td>0.667</td></tr><tr><td colspan="2">Random</td><td>0.578</td><td>0.651</td><td>0.697</td><td>0.742</td><td>0.732</td><td></td><td>0.720</td><td>0.500</td><td>0.500</td><td>0.500</td></tr><tr><td colspan="2">No Fintune</td><td>0.738</td><td>0.786</td><td>0.801</td><td>0.740</td><td>0.710</td><td></td><td>0.734</td><td>0.548</td><td>0.621</td><td>0.673</td></tr><tr><td colspan="2">Finetune</td><td>0.752</td><td>0.801</td><td>0.821</td><td>0.752</td><td>0.735</td><td></td><td>0.723</td><td>0.623</td><td>0.691</td><td>0.723</td></tr><tr><td colspan="2">Adamic</td><td>0.540</td><td>0.623</td><td>0.697</td><td>0.504</td><td>0.519</td><td></td><td>0.544</td><td>0.515</td><td>0.549</td><td>0.597</td></tr><tr><td colspan="2">Deepwalk</td><td>0.664</td><td>0.673</td><td>0.694</td><td>0.487</td><td>0.473</td><td></td><td>0.510</td><td>0.602</td><td>0.638</td><td>0.672</td></tr><tr><td colspan="2"></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 2: Convergence AUC results for different training edge splits.
|
| 152 |
+
|
| 153 |
+
Baseline details. Several baselines correspond to modifications or ablations of Meta-Graph, including the straightforward adaptation of MAML (which we term MAML in the results), a finetune baseline where we pre-train a VGAE on the training graphs observed in a sequential order and finetune on the test graphs (termed Finetune). We also consider a VGAE trained individually on each test graph (termed No Finetune). For Meta-Graph and all of these baselines we employ Bayesian optimization with Thompson sampling (Kandasamy et al., 2018) to perform hyperparameter selection using the validation sets. We use the recommended default hyperparameters for DeepWalk and Adamic-Adar baseline is hyperparameter-free. 2
|
| 154 |
+
|
| 155 |
+
# 4.1 RESULTS
|
| 156 |
+
|
| 157 |
+
Q1: Overall Performance. Table 2 shows the link prediction AUC for Meta-Graph and the baseline models when trained to convergence using $10 \%$ , $20 \%$ or $30 \%$ of the graph edges. In this setting, we adapt the link prediction models on the test graphs until learning converges, as determined by performance on the validation set of edges, and we report the average link prediction AUC over the test edges of the test graphs. Overall, we find that Meta-Graph achieves the highest average AUC in all but one setting, with an average relative improvement of $4 . 8 \%$ in AUC compared to the MAML approach and an improvement of $5 . 3 \%$ compared to the Finetune baseline. Notably, MetaGraph is able to maintain especially strong performance when using only $1 0 \%$ of the graph edges for training, highlighting how our framework can learn from very sparse samples of edges. Interestingly, in the Ego-AMINER dataset, unlike PPI and FIRSTMM DB, we observe the relative difference in performance between Meta-Graph and MAML to increase with density of the training set. We hypothesize that this is due to fickle nature of optimization with higher order gradients in MAML (Antoniou et al., 2018) which is somewhat alleviated in GS-gating due to the gating mechanism. With respect to computational complexity we observe a slight overhead when comparing MetaGraph to MAML which can be reconciled by realizing that the graph signature function is not updated in the inner loop update but only in outer loop. In the Appendix, we provide additional results when using larger sets of training edges, and, as expected, we find that the relative gains of Meta-Graph decrease as more and more training edges are available.
|
| 158 |
+
|
| 159 |
+
Q2: Fast Adaptation. Table 3 highlights the average AUCs achieved by Meta-Graph and the baselines after performing only 5 gradient updates on the batch of training edges. Note that in this setting we only compare to the MAML, Finetune, and No Finetune baselines, as fast adaption in this setting is not well defined for the DeepWalk and Adamic-Adar baselines. In terms of fast adaptation, we again find that Meta-Graph is able to outperform all the baselines in all but one setting, with an average relative improvement of $9 . 4 \%$ compared to MAML and $8 . 0 \%$ compared to the Finetune baseline—highlighting that Meta-Graph can not only learn from sparse samples of edges but is also able to quickly learn on new data using only a small number of gradient steps. Also, we observe poor performance for MAML in the Ego-AMINER dataset dataset which we hypothesize is due to extremely low learning rates —i.e. $1 e - 7$ needed for any learning, the addition of a graph signature alleviates this problem. Figure 2 shows the learning curves for the various models on the PPI and FirstMM DB datasets, where we can see that Meta-Graph learns very quickly but can also begin to overfit after only a small number of gradient updates, making early stopping essential.
|
| 160 |
+
|
| 161 |
+
<table><tr><td></td><td colspan="3">PPI</td><td colspan="3">FirstMM DB</td><td colspan="3">Eg0-AMINER</td></tr><tr><td>Edges</td><td>10%</td><td>20%</td><td>30%</td><td>10%</td><td>20%</td><td>30%</td><td>10%</td><td>20%</td><td>30%</td></tr><tr><td>Meta-Graph</td><td>0.795</td><td>0.824</td><td>0.847</td><td>0.773</td><td>0.767</td><td>0.737</td><td>0.620</td><td>0.585</td><td>0.732</td></tr><tr><td>MAML</td><td>0.728</td><td>0.809</td><td>0.804</td><td>0.763</td><td>0.750</td><td>0.750</td><td>0.500</td><td>0.504</td><td>0.500</td></tr><tr><td> No Fintune</td><td>0.600</td><td>0.697</td><td>0.717</td><td>0.708</td><td>0.680</td><td>0.709</td><td>0.500</td><td>0.500</td><td>0.500</td></tr><tr><td>Finetune</td><td>0.582</td><td>0.727</td><td>0.774</td><td>0.705</td><td>0.695</td><td>0.704</td><td>0.608</td><td>0.675</td><td>0.713</td></tr></table>
|
| 162 |
+
|
| 163 |
+
Table 3: 5-gradient update AUC results with various fractions of training edges.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
|
| 167 |
+

|
| 168 |
+
Figure 2: AUC scores on PPI (Left) and FirstMM DB (Right) graphs with $1 0 \%$ of edges observed.
|
| 169 |
+
|
| 170 |
+
Q3: Choice of Meta-Graph Architecture. We study the impact of the graph signature function and its variants GS-Gating and GS-Weights by performing an ablation study using the FirstMM DB dataset. Figure 3 shows the performance of the different model variants and baselines considered as the training progresses. In addition to models that utilize different signature functions we report a random baseline where parameters are initialized but never updated allowing us to assess the inherent power of the VGAE model for few-shot link prediction. To better understand the utility of using a GCN based inference network we also report a VGAE model that uses a simple MLP on the node features and is trained analogously to Meta-Graph as a baseline. As shown in Figure 3 many versions of the signature function start at a better initialization point or quickly achieve higher AUC scores in comparison to MAML and the other baselines, but simple modulation and GS-Gating are superior to GS-Weights after a few gradient steps.
|
| 171 |
+
|
| 172 |
+
Q4: What is learned by the graph signature? To gain further insight into what knowledge is transferable among graphs we use the FirstMM DB and Ego-AMINER datasets to probe and compare the output of the signature function with various graph heuristics. In particular, we treat the output of ${ \bar { s _ { \mathscr { G } } } } = \psi ( { \mathscr { G } } )$ as a vector and compute the cosine similarity between all pairs of graph in the training set (i.e., we compute the pairwise cosine similarites between graph signatures, $s _ { \mathcal { G } }$ ). We similarly compute three pairwise graph statistics—namely, the cosine similarity between average node features in the graphs, the difference in number of nodes, and the difference in number of edges—and we compute the Pearson correlation between the pairwise graph signature similarities and these other pairwise statistics. As shown in Table 4 we find strong positive correlation in terms of Pearson correlation coefficient between node features and the output of the signature function for both datasets, indicating that the graph signature function is highly sensitive to feature information. This observation is not entirely surprising given that we use such sparse samples of edges—meaning that many structural graph properties are likely lost and making the meta-learning heavily reliant on node feature information. We also observe moderate negative correlation with respect to the average difference in nodes and edges between pairs of graphs for FirstMM DB dataset. For Ego-AMINER we observe small positive correlation for difference in nodes and edges.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 3: Ablation study on PPI (Left) and FirstMM DB (Right) graphs with $1 0 \%$ of edges.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
|
| 179 |
+
<table><tr><td></td><td colspan="3">FirstMMDB</td><td colspan="3">Ego-AMINER</td></tr><tr><td>% Edges</td><td>10%</td><td>20%</td><td>30%</td><td>10%</td><td>20%</td><td>30%</td></tr><tr><td>Node Feats</td><td>0.928</td><td>0.950</td><td>0.761</td><td>0.473</td><td>0.385</td><td>0.448</td></tr><tr><td>Diff Num. Nodes</td><td>-0.093</td><td>-0.196</td><td>-0.286</td><td>0.095</td><td>0.086</td><td>0.085</td></tr><tr><td>Diff Num. Edges</td><td>-0.093</td><td>-0.195</td><td>-0.281</td><td>0.093</td><td>0.072</td><td>0.075</td></tr></table>
|
| 180 |
+
|
| 181 |
+
Table 4: Pearson scores between graph signature output and other graph statistics.
|
| 182 |
+
|
| 183 |
+
# 5 RELATED WORK
|
| 184 |
+
|
| 185 |
+
We now briefly highlight related work on link prediction, meta-learning, few-shot classification, and few-shot learning in knowledge graphs. Link prediction considers the problem of predicting missing edges between two nodes in a graph that are likely to have an edge. (Liben-Nowell & Kleinberg, 2003). Common successful applications of link prediction include friend and content recommendations (Aiello et al., 2012), shopping and movie recommendation (Huang et al., 2005), knowledge graph completion (Nickel et al., 2015) and even important social causes such as identifying criminals based on past activities (Hasan et al., 2006). Historically, link prediction methods have utilized topological graph features such as common neighbors yielding strong baselines like Adamic/Adar measure (Adamic & Adar, 2003), Jaccard Index among others. Other approaches include Matrix Factorization (Menon & Elkan, 2011) and more recently deep learning and graph neural networks based approaches (Grover & Leskovec, 2016; Wang et al., 2015; Zhang & Chen, 2018) have risen to prominence. A commonality among all the above approaches is that the link prediction problem is define over a single dense graph where the objective is to predict unknown/future links within the same graph. Unlike these previous approaches, our approach considers link prediction tasks over multiple sparse graphs which are drawn from distribution over graphs akin to real world scenario such as protein-protein interaction graphs, 3D point cloud data and citation graphs in different communities.
|
| 186 |
+
|
| 187 |
+
In meta-learning or learning to learn (Bengio et al., 1990; 1992; Thrun & Pratt, 2012; Schmidhuber, 1987), the objective is to learn from prior experiences to form inductive biases for fast adaptation to unseen tasks. Meta-learning has been particularly effective in few-shot learning tasks with a few notable approaches broadly classified into metric based approaches (Vinyals et al., 2016; Snell et al., 2017; Koch et al., 2015), augmented memory (Santoro et al., 2016; Kaiser et al., 2017; Mishra et al., 2017) and optimization based approaches (Finn et al., 2017; Lee & Choi, 2018). Recently, there are several works that lie at the intersection of meta-learning for few-shot classification and graph based learning. In Latent Embedding Optimization, Rusu et al. (2018) learn a graph between tasks in embedding space while Liu et al. (2019) introduce a message propagation rule between prototypes of classes. However, both these methods are restricted to the image domain and do not consider meta-learning over a distribution of graphs as done here.
|
| 188 |
+
|
| 189 |
+
Another related line of work considers the task of few-shot relation prediction in knowledge graphs. Xiong et al. (2018) developed the first method for this task, which leverages a learned matching metric using both a learned embedding and one-hop graph structures. More recently Chen et al. (2019) introduce Meta Relational Learning framework (MetaR) that seeks to transfer relation-specific meta information to new relation types in the knowledge graph. A key distinction between few-shot relation setting and the one which we consider in this work is that we assume a distribution over graphs while in the knowledge graph setting there is only a single graph and the challenge is generalizing to new types of relations within this graph.
|
| 190 |
+
|
| 191 |
+
# 6 DISCUSSION AND CONCLUSION
|
| 192 |
+
|
| 193 |
+
We introduce the problem of few-shot link prediction—where the goal is to learn from multiple graph datasets to perform link prediction using small samples of graph data—and we develop the Meta-Graph framework to address this task. Our framework adapts gradient-based meta learning to optimize a shared parameter initialization for local link prediction models, while also learning a parametric encoding, or signature, of each graph, which can be used to modulate this parameter initialization in a graph-specific way. Empirically, we observed substantial gains using Meta-Graph compared to strong baselines on three distinct few-shot link prediction benchmarks. In terms of limitations and directions for future work, one key limitation is that our graph signature function is limited to modulating the local link prediction model through an encoding of the current graph, which does not explicitly capture the pairwise similarity between graphs in the dataset. Extending Meta-Graph by learning a similarity metric or kernel between graphs—which could then be used to condition meta-learning—is a natural direction for future work. Another interesting direction for future work is extending the Meta-Graph approach to multi-relational data, and exploiting similarities between relation types through a suitable Graph Signature function.
|
| 194 |
+
|
| 195 |
+
# REFERENCES
|
| 196 |
+
|
| 197 |
+
Lada A Adamic and Eytan Adar. Friends and neighbors on the web. Social networks, 25(3):211–230, 2003.
|
| 198 |
+
|
| 199 |
+
Luca Maria Aiello, Alain Barrat, Rossano Schifanella, Ciro Cattuto, Benjamin Markines, and Filippo Menczer. Friendship prediction and homophily in social media. ACM Trans. Web, 6 (2):9:1–9:33, June 2012. ISSN 1559-1131. doi: 10.1145/2180861.2180866. URL http: //doi.acm.org/10.1145/2180861.2180866.
|
| 200 |
+
|
| 201 |
+
Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint arXiv:1810.09502, 2018.
|
| 202 |
+
|
| 203 |
+
Miriam Barrios-Rodiles, Kevin R Brown, Barish Ozdamar, Rohit Bose, Zhong Liu, Robert S Donovan, Fukiko Shinjo, Yongmei Liu, Joanna Dembowy, Ian W Taylor, et al. High-throughput mapping of a dynamic signaling network in mammalian cells. Science, 307(5715):1621–1625, 2005.
|
| 204 |
+
|
| 205 |
+
Samy Bengio, Yoshua Bengio, Jocelyn Cloutier, and Jan Gecsei. On the optimization of a synaptic learning rule. In Preprints Conf. Optimality in Artificial and Biological Neural Networks, pp. 6–8. Univ. of Texas, 1992.
|
| 206 |
+
|
| 207 |
+
Yoshua Bengio, Samy Bengio, and Jocelyn Cloutier. Learning a synaptic learning rule. Universite´ de Montreal, D ´ epartement d’informatique et de recherche , 1990. ´
|
| 208 |
+
|
| 209 |
+
Marc Brockschmidt. Gnn-film: Graph neural networks with feature-wise linear modulation. arXiv preprint arXiv:1906.12192, 2019.
|
| 210 |
+
|
| 211 |
+
Mingyang Chen, Wen Zhang, Wei Zhang, Qiang Chen, and Huajun Chen. Meta relational learning for few-shot link prediction in knowledge graphs. arXiv preprint arXiv:1909.01515, 2019.
|
| 212 |
+
|
| 213 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine LearningVolume 70, pp. 1126–1135. JMLR. org, 2017.
|
| 214 |
+
|
| 215 |
+
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradientbased meta-learning as hierarchical bayes. arXiv preprint arXiv:1801.08930, 2018.
|
| 216 |
+
|
| 217 |
+
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.
|
| 218 |
+
|
| 219 |
+
Mohammad Al Hasan, Vineet Chaoji, Saeed Salem, and Mohammed Zaki. Link prediction using supervised learning. In In Proc. of SDM 06 workshop on Link Analysis, Counterterrorism and Security, 2006.
|
| 220 |
+
|
| 221 |
+
Zan Huang, Xin Li, and Hsinchun Chen. Link prediction approach to collaborative filtering. In Proceedings of the 5th ACM/IEEE-CS Joint Conference on Digital Libraries, JCDL ’05, pp. 141– 142, New York, NY, USA, 2005. ACM. ISBN 1-58113-876-8. doi: 10.1145/1065385.1065415. URL http://doi.acm.org/10.1145/1065385.1065415.
|
| 222 |
+
|
| 223 |
+
Łukasz Kaiser, Ofir Nachum, Aurko Roy, and Samy Bengio. Learning to remember rare events. arXiv preprint arXiv:1703.03129, 2017.
|
| 224 |
+
|
| 225 |
+
Kirthevasan Kandasamy, Akshay Krishnamurthy, Jeff Schneider, and Barnabas P ´ oczos. Parallelised ´ bayesian optimisation via thompson sampling. In International Conference on Artificial Intelligence and Statistics, pp. 133–142, 2018.
|
| 226 |
+
|
| 227 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016a.
|
| 228 |
+
|
| 229 |
+
Thomas N Kipf and Max Welling. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308, 2016b.
|
| 230 |
+
|
| 231 |
+
Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2, 2015.
|
| 232 |
+
|
| 233 |
+
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.
|
| 234 |
+
|
| 235 |
+
Yoonho Lee and Seungjin Choi. Gradient-based meta-learning with learned layerwise metric and subspace. arXiv preprint arXiv:1801.05558, 2018.
|
| 236 |
+
|
| 237 |
+
David Liben-Nowell and Jon Kleinberg. The link prediction problem for social networks. In Proceedings of the Twelfth International Conference on Information and Knowledge Management, CIKM ’03, pp. 556–559, New York, NY, USA, 2003. ACM. ISBN 1-58113-723-0. doi: 10.1145/956863.956972. URL http://doi.acm.org/10.1145/956863.956972.
|
| 238 |
+
|
| 239 |
+
Lu Liu, Tianyi Zhou, Guodong Long, Jing Jiang, and Chengqi Zhang. Learning to propagate for graph meta-learning. In Advances in Neural Information Processing Systems, 2019.
|
| 240 |
+
|
| 241 |
+
Linyuan Lu and Tao Zhou. Link prediction in complex networks: A survey. ¨ Physica A: statistical mechanics and its applications, 390(6):1150–1170, 2011.
|
| 242 |
+
|
| 243 |
+
Aditya Krishna Menon and Charles Elkan. Link prediction via matrix factorization. In Proceedings of the 2011 European Conference on Machine Learning and Knowledge Discovery in Databases - Volume Part II, ECML PKDD’11, pp. 437–452, Berlin, Heidelberg, 2011. Springer-Verlag. ISBN 978-3-642-23782-9. URL http://dl.acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 2034117. 2034146.
|
| 244 |
+
|
| 245 |
+
Erik G Miller, Nicholas E Matsakis, and Paul A Viola. Learning from one example through shared densities on transforms. In Proceedings IEEE Conference on Computer Vision and Pattern Recognition. CVPR 2000 (Cat. No. PR00662), volume 1, pp. 464–471. IEEE, 2000.
|
| 246 |
+
|
| 247 |
+
Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive metalearner. arXiv preprint arXiv:1707.03141, 2017.
|
| 248 |
+
|
| 249 |
+
Marion Neumann, Plinio Moreno, Laura Antanas, Roman Garnett, and Kristian Kersting. Graph kernels for object category prediction in task-dependent robot grasping. In Online Proceedings of the Eleventh Workshop on Mining and Learning with Graphs, pp. 0–6, 2013.
|
| 250 |
+
|
| 251 |
+
Maximilian Nickel, Kevin Murphy, Volker Tresp, and Evgeniy Gabrilovich. A review of relational machine learning for knowledge graphs. Proceedings of the IEEE, 104(1):11–33, 2015.
|
| 252 |
+
|
| 253 |
+
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.
|
| 254 |
+
|
| 255 |
+
Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. arXiv preprint arXiv:1807.05960, 2018.
|
| 256 |
+
|
| 257 |
+
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.
|
| 258 |
+
|
| 259 |
+
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. ¨
|
| 260 |
+
|
| 261 |
+
Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pp. 4077–4087, 2017.
|
| 262 |
+
|
| 263 |
+
Florian Strub, Mathieu Seurin, Ethan Perez, Harm De Vries, Jer´ emie Mary, Philippe Preux, and ´ Aaron CourvilleOlivier Pietquin. Visual reasoning with multi-hop feature modulation. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 784–800, 2018.
|
| 264 |
+
|
| 265 |
+
Jie Tang, Jing Zhang, Limin Yao, Juanzi Li, Li Zhang, and Zhong Su. Arnetminer: extraction and mining of academic social networks. In Proceedings of the 14th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 990–998. ACM, 2008.
|
| 266 |
+
|
| 267 |
+
Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 2012.
|
| 268 |
+
Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pp. 3630–3638, 2016.
|
| 269 |
+
Peng Wang, BaoWen Xu, YuRong Wu, and XiaoYu Zhou. Link prediction in social networks: the state-of-the-art. Science China Information Sciences, 58(1):1–38, 2015.
|
| 270 |
+
Wenhan Xiong, Mo Yu, Shiyu Chang, Xiaoxiao Guo, and William Yang Wang. One-shot relational learning for knowledge graphs. arXiv preprint arXiv:1808.09040, 2018.
|
| 271 |
+
Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. In Advances in Neural Information Processing Systems, pp. 5165–5175, 2018.
|
| 272 |
+
Marinka Zitnik and Jure Leskovec. Predicting multicellular function through multi-layer tissue networks. Bioinformatics, 33(14):i190–i198, 2017.
|
| 273 |
+
|
| 274 |
+
# 7 APPENDIX
|
| 275 |
+
|
| 276 |
+
# 7.1 A: EGO-AMINER DATASET CONSTRUCTION
|
| 277 |
+
|
| 278 |
+
To construct the Ego-Aminer dataset we first create citation graphs from different fields of study. We then select the top 100 graphs in terms number of nodes for further pre-processing. Specifically, we take the 5-core of each graph ensuring that each node has a minimum of 5-edges. We then construct ego networks by randomly sampling a node from the 5-core graph and taking its two hop neighborhood. Finally, we remove graphs with fewer than 100 nodes and greater than 20000 nodes which leads to a total of 72 graphs as reported in Table 1.
|
| 279 |
+
|
| 280 |
+
# 7.2 B: ADDITIONAL RESULTS
|
| 281 |
+
|
| 282 |
+
We list out complete results when using larger sets of training edges for PPI, FIRSTMM DB and Ego-Aminer datasets. We show the results for two metrics i.e. Average AUC across all test graphs. As expected, we find that the relative gains of Meta-Graph decrease as more and more training edges are available.
|
| 283 |
+
|
| 284 |
+
Table 5: AUC Convergence results for PPI dataset for training edge splits
|
| 285 |
+
|
| 286 |
+
<table><tr><td colspan="8">PPI</td></tr><tr><td>Convergence</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.795</td><td>0.831</td><td>0.846</td><td>0.853</td><td>0.848</td><td>0.853</td><td>0.855</td></tr><tr><td>MAML</td><td>0.745</td><td>0.820</td><td>0.840</td><td>0.852</td><td>0.854</td><td>0.856</td><td>0.863</td></tr><tr><td>Random</td><td>0.578</td><td>0.651</td><td>0.697</td><td>0.729</td><td>0.756</td><td>0.778</td><td>0.795</td></tr><tr><td>No Finetune</td><td>0.738</td><td>0.786</td><td>0.801</td><td>0.817</td><td>0.827</td><td>0.837</td><td>0.836</td></tr><tr><td>Finetune</td><td>0.752</td><td>0.8010</td><td>0.821</td><td>0.832</td><td>0.818</td><td>0.856</td><td>0.841</td></tr><tr><td>Adamic</td><td>0.540</td><td>0.623</td><td>0.697</td><td>0.756</td><td>0.796</td><td>0.827</td><td>0.849</td></tr><tr><td>MAML-MLP</td><td>0.603</td><td>0.606</td><td>0.606</td><td>0.606</td><td>0.604</td><td>0.604</td><td>0.605</td></tr><tr><td>Deepwalk</td><td>0.664</td><td>0.673</td><td>0.694</td><td>0.727</td><td>0.731</td><td>0.747</td><td>0.761</td></tr></table>
|
| 287 |
+
|
| 288 |
+
Table 6: 5-gradient update AUC results for PPI for training edge splits
|
| 289 |
+
|
| 290 |
+
<table><tr><td>PPI-5 updates</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.795</td><td>0.829</td><td>0.847</td><td>0.853</td><td>0.848</td><td>0.854</td><td>0.856</td></tr><tr><td>MAML</td><td>0.756</td><td>0.837</td><td>0.840</td><td>0.852</td><td>0.855</td><td>0.855</td><td>0.856</td></tr><tr><td>No Finetune</td><td>0.600</td><td>0.697</td><td>0.717</td><td>0.784</td><td>0.814</td><td>0.779</td><td>0.822</td></tr><tr><td>Finetune</td><td>0.582</td><td>0.727</td><td>0.774</td><td>0.702</td><td>0.804</td><td>0.718</td><td>0.766</td></tr><tr><td>MAML-MLP</td><td>0.603</td><td>0.606</td><td>0.603</td><td>0.604</td><td>0.603</td><td>0.606</td><td>0.605</td></tr></table>
|
| 291 |
+
|
| 292 |
+
Table 7: AUC Convergence results for FIRSTMM DB dataset for training edge splits
|
| 293 |
+
|
| 294 |
+
<table><tr><td colspan="8">FirstMMDB</td></tr><tr><td>Convergence</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.782</td><td>0.786</td><td>0.783</td><td>0.781</td><td>0.760</td><td>0.746</td><td>0.739</td></tr><tr><td>MAML</td><td>0.776</td><td>0.782</td><td>0.793</td><td>0.785</td><td>0.791</td><td>0.663</td><td>0.788</td></tr><tr><td>Random</td><td>0.742</td><td>0.732</td><td>0.720</td><td>0.714</td><td>0.705</td><td>0.698</td><td>0.695</td></tr><tr><td>No Finetune</td><td>0.740</td><td>0.710</td><td>0.734</td><td>0.722</td><td>0.712</td><td>0.710</td><td>0.698</td></tr><tr><td>Finetune</td><td>0.752</td><td>0.735</td><td>0.723</td><td>0.734</td><td>0.749</td><td>0.700</td><td>0.695</td></tr><tr><td>Adamic</td><td>0.504</td><td>0.519</td><td>0.544</td><td>0.573</td><td>0.604</td><td>0.643</td><td>0.678</td></tr><tr><td>Deepwalk</td><td>0.487</td><td>0.473</td><td>0.510</td><td>0.608</td><td>0.722</td><td>0.832</td><td>0.911</td></tr></table>
|
| 295 |
+
|
| 296 |
+
Table 8: 5-gradient update AUC results for FIRSTMM DB for training edge splits
|
| 297 |
+
|
| 298 |
+
<table><tr><td colspan="8">FirstMMDB</td></tr><tr><td>5 updates</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.773</td><td>0.767</td><td>0.743</td><td>0.759</td><td>0.742</td><td>0.732</td><td>0.688</td></tr><tr><td>MAML</td><td>0.763</td><td>0.750</td><td>0.624</td><td>0.776</td><td>0.759</td><td>0.663</td><td>0.738</td></tr><tr><td>No Finetune</td><td>0.708</td><td>0.680</td><td>0.709</td><td>0.701</td><td>0.685</td><td>0.683</td><td>0.653</td></tr><tr><td>Finetune</td><td>0.705</td><td>0.695</td><td>0.704</td><td>0.704</td><td>0.696</td><td>0.658</td><td>0.670</td></tr></table>
|
| 299 |
+
|
| 300 |
+
Table 9: AUC Convergence results for Ego-Aminer dataset for training edge splits
|
| 301 |
+
|
| 302 |
+
<table><tr><td colspan="8">Ego-Aminer</td></tr><tr><td>Convergence</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.626</td><td>0.738</td><td>0.786</td><td>0.791</td><td>0.792</td><td>0.817</td><td>0.786</td></tr><tr><td>MAML</td><td>0.561</td><td>0.662</td><td>0.667</td><td>0.682</td><td>0.720</td><td>0.741</td><td>0.768</td></tr><tr><td>Random</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td></tr><tr><td>No Finetune</td><td>0.548</td><td>0.621</td><td>0.673</td><td>0.702</td><td>0.652</td><td>0.7458</td><td>0.769</td></tr><tr><td>Finetune</td><td>0.623</td><td>0.691</td><td>0.723</td><td>0.764</td><td>0.767</td><td>0.792</td><td>0.781</td></tr><tr><td>Adamic</td><td>0.515</td><td>0.549</td><td>0.597</td><td>0.655</td><td>0.693</td><td>0.744</td><td>0.772</td></tr><tr><td>Deepwalk</td><td>0.602</td><td>0.638</td><td>0.672</td><td>0.686</td><td>0.689</td><td>0.711</td><td>0.731</td></tr></table>
|
| 303 |
+
|
| 304 |
+
Table 10: 5-gradient update AUC results for Ego-Aminer for training edge splits
|
| 305 |
+
|
| 306 |
+
<table><tr><td colspan="8">Ego-Aminer</td></tr><tr><td>5 updates</td><td>10%</td><td>20%</td><td>30%</td><td>40%</td><td>50%</td><td>60%</td><td>70%</td></tr><tr><td>Meta-Graph</td><td>0.620</td><td>0.5850</td><td>0.732</td><td>0.500</td><td>0.790</td><td>0.733</td><td>0.500</td></tr><tr><td>MAML</td><td>0.500</td><td>0.504</td><td>0.500</td><td>0.500</td><td>0.519</td><td>0.500</td><td>0.500</td></tr><tr><td>No Finetune</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td><td>0.500</td></tr><tr><td>Finetune</td><td>0.608</td><td>0.675</td><td>0.713</td><td>0.755</td><td>0.744</td><td>0.706</td><td>0.671</td></tr></table>
|
md/train/BJgy96EYvr/BJgy96EYvr.md
ADDED
|
@@ -0,0 +1,561 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INFLUENCE-BASED MULTI-AGENT EXPLORATION
|
| 2 |
+
|
| 3 |
+
Tonghan Wang∗, Jianhao Wang∗, Yi Wu & Chongjie Zhang
|
| 4 |
+
|
| 5 |
+
Institute for Interdisciplinary Information Sciences
|
| 6 |
+
Tsinghua University
|
| 7 |
+
Beijing, China
|
| 8 |
+
wangth18@mails.tsinghua.edu.cn, wjh720.eric@gmail.com
|
| 9 |
+
jxwuyi@openai.com, chongjie@tsinghua.edu.cn
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Intrinsically motivated reinforcement learning aims to address the exploration challenge for sparse-reward tasks. However, the study of exploration methods in transition-dependent multi-agent settings is largely absent from the literature. We aim to take a step towards solving this problem. We present two exploration methods: exploration via information-theoretic influence (EITI) and exploration via decision-theoretic influence (EDTI), by exploiting the role of interaction in coordinated behaviors of agents. EITI uses mutual information to capture the interdependence between the transition dynamics of agents. EDTI uses a novel intrinsic reward, called Value of Interaction (VoI), to characterize and quantify the influence of one agent’s behavior on expected returns of other agents. By optimizing EITI or EDTI objective as a regularizer, agents are encouraged to coordinate their exploration and learn policies to optimize the team performance. We show how to optimize these regularizers so that they can be easily integrated with policy gradient reinforcement learning. The resulting update rule draws a connection between coordinated exploration and intrinsic reward distribution. Finally, we empirically demonstrate the significant strength of our methods in a variety of multi-agent scenarios.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
Reinforcement learning algorithms aim to learn a policy that maximizes the accumulative reward from an environment. Many advances of deep reinforcement learning rely on a dense shaped reward function, such as distance to the goal (Mirowski et al., 2016; Wu et al., 2018), scores in games (Mnih et al., 2015) or expert-designed rewards (Wu & Tian, 2016; OpenAI, 2018), but they tend to struggle in many real-world scenarios with sparse rewards (Burda et al., 2019). Therefore, many recent works propose to introduce additional intrinsic incentives to boost exploration, including pseudocounts (Bellemare et al., 2016; Tang et al., 2017; Ostrovski et al., 2017), model-learning improvements (Burda et al., 2019; Pathak et al., 2017; Burda et al., 2018), and information gain (Florensa et al., 2017; Gupta et al., 2018; Hyoungseok Kim, 2019). These works result in significant progress in many challenging tasks such as Montezuma Revenge (Burda et al., 2018), robotic manipulation (Pathak et al., 2018; Riedmiller et al., 2018), and Super Mario games (Burda et al., 2019; Pathak et al., 2017).
|
| 18 |
+
|
| 19 |
+
Notably, most of the existing breakthroughs on sparse-reward environments have been focusing on single-agent scenarios and leave the exploration problem largely unstudied for multi-agent settings – it is common in real-world applications that multiple agents are required to solve a task in a coordinated fashion (Cao et al., 2012; Nowe et al., 2012; Zhang & Lesser, 2011). This problem has recently ´ attracted attention and several exploration strategies have been proposed for transition-independent cooperative multi-agent settings (Dimakopoulou & Van Roy, 2018; Dimakopoulou et al., 2018; Bargiacchi et al., 2018; Iqbal & Sha, 2019b). Nevertheless, how to explore effectively in more general scenarios with complex reward and transition dependency among cooperative agents remains an open research problem.
|
| 20 |
+
|
| 21 |
+
This paper aims to take a step towards this goal. Our basic idea is to coordinate agents’ exploration by taking into account their interactions during their learning processes. Configurations where interaction happens (interaction points) lie at critical junctions in the state-action space, through these critical configurations can transit to potentially important under-explored regions. To exploit this idea, we propose exploration strategies where agents start with decentralized exploration driven by their individual curiosity, and are also encouraged to visit interaction points to influence the exploration processes of other agents and help them get more extrinsic and intrinsic rewards. Based on how to quantify influence among agents, we propose two exploration methods. Exploration via information-theoretic influence (EITI) uses mutual information (MI) to capture the interdependence between the transition dynamics of agents. Exploration via decision-theoretic influence (EDTI) goes further and uses a novel measure called value of interaction (VoI) to disentangle the effect of one agent’s state-action pair on the expected (intrinsic) value of other agents. By optimizing MI or VoI as a regularizer to the value function, agents are encouraged to explore state-action pairs where they can exert influences on other agents for learning sophisticated multi-agent cooperation strategies.
|
| 22 |
+
|
| 23 |
+
To efficiently optimize MI and VoI, we propose augmented policy gradient formulations so that the gradients can be estimated purely from trajectories. The resulting update rule draws a connection between coordinated exploration and the distribution of individual intrinsic rewards among team members, which further explains why our methods are able to facilitate multi-agent exploration.
|
| 24 |
+
|
| 25 |
+
We demonstrate the effectiveness of our methods on a variety of sparse-reward cooperative multiagent tasks. Empirical results show that both EITI and EDTI allow for the discovery of influential states and EDTI further filter out interactions that have no effects on the performance. Our results also imply that these influential states are implicitly discovered as subgoals in search space that guide and coordinate exploration. The video of experiments is available at https://sites. google.com/view/influence-based-mae/.
|
| 26 |
+
|
| 27 |
+
# 2 SETTINGS
|
| 28 |
+
|
| 29 |
+
In our work, we consider a fully cooperative multi-agent task that can be modelled by a factored multi-agent MDP $G = \langle N , S , \overset { \cdot } { A } , T , \overset { \cdot } { r } , h , n \rangle$ , where $\bar { \boldsymbol { N } } \equiv \{ 1 , 2 , . . . , n \}$ is the finite set of agents, ${ \cal S } \equiv \times _ { i \in N } S _ { i }$ is the finite set of joint states and $S _ { i }$ is the state set of agent $i$ . At each timestep, each agent selects an action $a _ { i } \in A _ { i }$ at state $\pmb { s }$ , forming a joint action $\pmb { a } \in A \equiv \times _ { i \in N } A _ { i }$ , resulting in a shared extrinsic reward $r ( s , a )$ for each agent and the next state $s ^ { \prime }$ according to the transition function $T ( s ^ { \prime } | s , a )$ .
|
| 30 |
+
|
| 31 |
+
The objective of the task is that each agent learns a policy $\pi _ { i } ( a _ { i } | s _ { i } )$ , jointly maximizing team performance. The joint policy ${ \pmb { \pi } } \mathrm { = } \langle \pi _ { 1 } , \ldots , \pi _ { n } \rangle$ induces an action-value function, ${ Q } ^ { e x t , \pi } ( { \pmb s } , { \pmb a } ) =$ $\scriptstyle \mathbb { E } _ { \tau } [ \sum _ { t = 0 } ^ { h } r ^ { t } | s ^ { 0 } = s , { \boldsymbol { a } } ^ { 0 } = { \boldsymbol { a } } , \pi ]$ , and a value function $V ^ { e x t , \pi } ( s ) { = } \operatorname* { m a x } _ { \pmb { a } } Q ^ { e x t , \pi } ( s , \pmb { a } )$ , where $\tau$ is the $h$
|
| 32 |
+
|
| 33 |
+
We adopt a centralized training and decentralized execution paradigm, which has been widely used in multi-agent deep reinforcement learning (Foerster et al., 2016; Lowe et al., 2017; Foerster et al., 2018; Rashid et al., 2018). During training, agents are granted access to the states, actions, (intrinsic) rewards, and value functions of other agents, while decentralized execution only requires individual states.
|
| 34 |
+
|
| 35 |
+
# 3 INFLUENCE-BASED COORDINATED MULTI-AGENT EXPLORATION
|
| 36 |
+
|
| 37 |
+
Efficient exploration is critical for reinforcement learning, particularly in sparse-reward tasks. Intrinsic motivation (Oudeyer & Kaplan, 2009) is a crucial mechanism for behaviour learning since it provides the driver of exploration. Therefore, to trade off exploration and exploitation, it is common for an RL agent to maximize an objective of the expected extrinsic reward augmented by the expected intrinsic reward. Curiosity is one of the extensively-studied intrinsic rewards to encourage an agent to explore according to its uncertainty about the environment, which can be measured by model prediction error (Burda et al., 2019; Pathak et al., 2017; Burda et al., 2018) or state visitation count (Bellemare et al., 2016; Tang et al., 2017; Ostrovski et al., 2017).
|
| 38 |
+
|
| 39 |
+
While such an intrinsic motivation as curiosity drives effective individual exploration, it is often not sufficient enough for learning in collaborative multi-agent settings, because it does not take into account agent interactions. To encourage interactions, we propose an influence value aims to quantify one agent’s influence on the exploration processes of other agents. Maximizing this value will encourage agents to visit interaction points more often through which the agent team can reach configurations that are rarely visited by decentralized exploration. In next sections, we will provide two ways to formulate the influence value with such properties, leading to two exploration strategies.
|
| 40 |
+
|
| 41 |
+
Thus, for each agent $i$ , our overall optimization objective is:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
J _ { \theta _ { i } } [ \pi _ { i } | \pi _ { - i } , p _ { 0 } ] \equiv V ^ { e x t , \pi } ( s _ { 0 } ) + V _ { i } ^ { i n t , \pi } ( s _ { 0 } ) + \beta \cdot I _ { - i | i } ^ { \pi } ,
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $p _ { 0 } ( s _ { 0 } )$ is the initial state distribution, $\pi _ { - i }$ is the joint policy excluding that of agent $i$ , and $V _ { i } ^ { i n t , \pi } ( s )$ is the intrinsic value function of agent $i$ , $I _ { - i | i } ^ { \pi }$ is the influence value, $\beta > 0$ is a weighting term. In this paper, we use the following notations:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { r l } & { \displaystyle \tilde { r } _ { i } ( s , \pmb { a } ) = r ( s , \pmb { a } ) + u _ { i } ( s _ { i } , { a } _ { i } ) , } \\ & { \displaystyle V _ { i } ^ { \pi } ( \pmb { s } ) = V ^ { e x t , \pi } ( \pmb { s } ) + V _ { i } ^ { i n t , \pi } ( \pmb { s } ) , } \\ & { \displaystyle Q _ { i } ^ { \pi } ( \pmb { s } , \pmb { a } ) = \tilde { r } _ { i } ( \pmb { s } , \pmb { a } ) + \sum _ { s ^ { \prime } } T ( \pmb { s } ^ { \prime } | \pmb { s } , \pmb { a } ) V _ { i } ^ { \pi } ( \pmb { s } ^ { \prime } ) , } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $u _ { i } ( s _ { i } , a _ { i } )$ is a curiosity-derived intrinsic reward, $\tilde { r } _ { i } ( s , { \pmb a } )$ is a sum of intrinsic and extrinsic rewards, $V _ { i } ^ { \pi } ( s )$ and $Q _ { i } ^ { \pi } ( s , { \pmb a } )$ here contain both intrinsic and extrinsic rewards.
|
| 54 |
+
|
| 55 |
+
# 3.1 EXPLORATION VIA INFORMATION-THEORETIC INFLUENCE
|
| 56 |
+
|
| 57 |
+
One critical problem in our learning framework presented above is to define the influence value $I$ . For simplicity, we start with a two-agent case. The first method we propose is to use mutual information between agents’ trajectories to measure one agent’s influence on other agents’ learning processes. Such mutual information can be defined as information gain of one agent’s state transition given the other’s state and action. Without loss of generality, we define it from the perspective of agent 1:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
M I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \sum _ { s , a , s _ { 2 } ^ { \prime } \in ( S , A , S _ { 2 } ) } p ^ { \pi } ( s , a , s _ { 2 } ^ { \prime } ) \left[ \log p ^ { \pi } ( s _ { 2 } ^ { \prime } | s , a ) - \log p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) \right] ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $\pmb { s } = ( s _ { 1 } , s _ { 2 } )$ is the joint state, $\pmb { a } = ( a _ { 1 } , a _ { 2 } )$ is the joint action, and $S _ { i }$ and $A _ { i }$ are the random variables of state and action of agent $i$ subject to the distribution induced by the joint policy $\pi$ . So we define $I _ { 2 | 1 } ^ { \pi }$ as $M I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } )$ that captures transition interactions between agents. Optimizing this objective encourages agent 1 to visited critical points where it can influence the transition probability of agent 2. We call such an exploration method exploration via informationtheoretic influence (EITI).
|
| 64 |
+
|
| 65 |
+
Optimizing $M I _ { 2 | 1 } ^ { \pi }$ with respect to the policy parameters $\theta _ { 1 }$ of agent 1 is a little bit challenging, because it is an expectation with respect to a distribution that depends on $\theta _ { 1 }$ . The gradient consists of two terms:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\begin{array} { r l r } { { \nabla _ { \theta _ { 1 } } M I ^ { \boldsymbol { \pi } } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \sum _ { \boldsymbol { s } , \boldsymbol { a } , \boldsymbol { s } _ { 2 } ^ { \prime } \in ( S , A , S _ { 2 } ) } \nabla _ { \theta _ { 1 } } ( p ^ { \boldsymbol { \pi } } ( \boldsymbol { s } , \boldsymbol { a } , \boldsymbol { s } _ { 2 } ^ { \prime } ) ) \log \frac { p ( s _ { 2 } ^ { \prime } | \boldsymbol { s } , \boldsymbol { a } ) } { p ^ { \pi } ( s _ { 2 } ^ { \prime } | \boldsymbol { s } _ { 2 } , \boldsymbol { a } _ { 2 } ) } } } \\ & { } & { + \sum _ { \boldsymbol { s } , \boldsymbol { a } , \boldsymbol { s } _ { 2 } ^ { \prime } \in ( S , A , S _ { 2 } ) } p ^ { \pi } ( \boldsymbol { s } , \boldsymbol { a } , \boldsymbol { s } _ { 2 } ^ { \prime } ) \nabla _ { \theta _ { 1 } } \log \frac { p ( s _ { 2 } ^ { \prime } | \boldsymbol { s } , \boldsymbol { a } ) } { p ^ { \pi } ( s _ { 2 } ^ { \prime } | \boldsymbol { s } _ { 2 } , \boldsymbol { a } _ { 2 } ) } . } \end{array}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
While the second term is an expectation over the trajectory and can be shown to be zero (see Appendix B.1), it is unwieldy to deal with the first term because it requires the gradient of the stationary distribution, which depends on the policies and the dynamics of the environment. Fortunately, the gradient can still be estimated purely from sampled trajectories by drawing inspiration from the proof of the policy gradient theorem (Sutton et al., 2000).
|
| 72 |
+
|
| 73 |
+
The resulting policy gradient update is:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\nabla _ { \boldsymbol { \theta } _ { 1 } } J _ { \boldsymbol { \theta } _ { 1 } } ( t ) = \left( \hat { R } _ { 1 } ^ { t } - \hat { V } _ { 1 } ^ { \pi } ( s _ { t } ) \right) \nabla _ { \boldsymbol { \theta } _ { 1 } } \log \pi _ { \boldsymbol { \theta } _ { 1 } } ( a _ { 1 } ^ { t } | s _ { 1 } ^ { t } )
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\hat { V } _ { 1 } ^ { \pi } ( s _ { t } )$ is an augmented value function of $\begin{array} { r } { \hat { R } _ { 1 } ^ { t } = \sum _ { t ^ { \prime } = t } ^ { h } \hat { r } _ { 1 } ^ { t ^ { \prime } } } \end{array}$ and
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\begin{array} { r } { \hat { r } _ { 1 } ^ { t } = r ^ { t } + u _ { 1 } ^ { t } + \beta \log \frac { p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { t } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } ) } { p ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } ) } . } \end{array}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
The third term, which we call EITI reward, is 0 when the agents are transition-independent, i.e., when $p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { t } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } ) \stackrel { } { = } p ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } )$ , and is positive when $s _ { 1 } ^ { t } , a _ { 1 } ^ { t }$ increase the probability 2 of agent 2 translating to $s _ { 2 } ^ { t + 1 }$ 2 . Therefore, the EITI reward is an intrinsic motivation that encourages agent 1 to visit more frequently the state-action pairs where it can influence the trajectory of agent 2. The estimation of $p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { \dot { t } } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } )$ and $p ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } )$ are discussed in Appendix C. We assume that agents know the states and actions of other agents, but this information is only available during centralized training. When execution, agents only have access to their local observations.
|
| 86 |
+
|
| 87 |
+
# 3.2 EXPLORATION VIA DECISION-THEORETIC INFLUENCE
|
| 88 |
+
|
| 89 |
+
Mutual information characterizes the influence of one agent’s trajectory on that of the other and captures interactions between the transition functions of the agents. However, it does not provide the value of these interactions to identify interactions related to more internal and external rewards $( \tilde { r } )$ . To address this issue, we propose exploration via decision-theoretic influence (EDTI) based on a decision-theoretic measure of $I$ , called Value of Interaction (VoI), which disentangles both transition and reward influences. VoI is defined as the expected difference between the action-value function of one agent (e.g., agent 2) and its counterfactual action-value function without considering the state and action of the other agent (e.g., agent 1):
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
{ V o I } _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \sum _ { s , a , s _ { 2 } ^ { \prime } \in ( S , A , S _ { 2 } ) } p ^ { \pi } ( s , a , s _ { 2 } ^ { \prime } ) \left[ Q _ { 2 } ^ { \pi } ( s , a , s _ { 2 } ^ { \prime } ) - Q _ { 2 | 1 } ^ { \pi , * } ( s _ { 2 } , a _ { 2 } , s _ { 2 } ^ { \prime } ) \right] ,
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $Q _ { 2 } ^ { \pi } ( s , { \pmb a } , s _ { 2 } ^ { \prime } )$ is the expected rewards (including intrinsic rewards) of agent 2 defined as:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
Q _ { 2 } ^ { \pi } ( \pmb { s } , \pmb { a } , \pmb { s } _ { 2 } ^ { \prime } ) = \tilde { r } _ { 2 } ( \pmb { s } , \pmb { a } ) + \gamma \sum _ { \pmb { s } _ { 1 } ^ { \prime } } p ( \pmb { s } _ { 1 } ^ { \prime } | \pmb { s } , \pmb { a } , \pmb { s } _ { 2 } ^ { \prime } ) V _ { 2 } ^ { \pi } ( \pmb { s } ^ { \prime } ) ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
and the counterfactual action-value function $Q _ { 2 } ^ { \pi , * }$ (also includes intrinsic and extrinsic rewards) can be obtained by marginalizing out the state and action of agent 1:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\partial _ { 2 | 1 } ^ { \pi , * } ( s _ { 2 } , a _ { 2 } , s _ { 2 } ^ { \prime } ) = \sum _ { s _ { 1 } ^ { * } , a _ { 1 } ^ { * } } p ^ { \pi } ( s _ { 1 } ^ { * } , a _ { 1 } ^ { * } | s _ { 2 } , a _ { 2 } ) [ \tilde { r } _ { 2 } ( s _ { 1 } ^ { * } , s _ { 2 } , a _ { 1 } ^ { * } , a _ { 2 } ) + \gamma \sum _ { s _ { 1 } ^ { \prime } } p ( s _ { 1 } ^ { \prime } | s _ { 1 } ^ { * } , s _ { 2 } , a _ { 1 } ^ { * } , a _ { 2 } , s _ { 2 } ^ { \prime } ) V _ { 2 } ^ { \pi } ( s ^ { \prime } ) ] .
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
Note that the definition of VoI is analogous to that of MI and the difference lies in that $\log p ( \cdot )$ measures the amount of information while $Q$ measures the action value. Although VoI can be obtained by learning $Q _ { 2 } ^ { \pi } ( s , \pmb { a } )$ and $Q _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } )$ and calculating the difference, we propose to explicitly marginalize out $s _ { 1 } ^ { * }$ and $a _ { 1 } ^ { * }$ utilizing the estimated model transition probability $p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ and $p ( s _ { 2 } ^ { \prime } | s , \mathbf { a } )$ to get a more accurate value estimate (Feinberg et al., 2018). The performance of these two formulations are compared in the experiments.
|
| 108 |
+
|
| 109 |
+
Value functions $Q$ and $V$ used in VoI contains both expected external rewards and internal rewards, which will not only encourage coordinated exploration by the influence between intrinsic rewards but also filter out meaningless interactions which can not lead to extrinsic reward after intrinsic reward diminishes. To facilitate the optimization of VoI, we rewrite it as an expectation over stateaction trajectories.
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
V o I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \mathbb { E } _ { \tau } \left[ \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) + \gamma \left( 1 - \frac { p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s , a ) } \right) V _ { 2 } ^ { \pi } ( s ^ { \prime } ) \right] ,
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $\tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } )$ is the counterfactual immediate reward. The detailed proof is deferred to Appendix B.2. From this definition, we can intuitively see how VoI reflects the value of interactions. $\tilde { r } _ { 2 } ( s , a ) -$ $\tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } )$ and $1 - p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) / p ( s _ { 2 } ^ { \prime } | \bar { s , } a )$ measure the influence of agent 1 on the immediate reward and the transition function of agent 2, and $V _ { 2 } ^ { \pi } ( s ^ { \prime } )$ serves as a scale factor in terms of future value. Only when agent 1 and agent 2 are both transition- and reward-independent, i.e., when $p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , \bar { a _ { 2 } } ) = p ( s _ { 2 } ^ { \prime } | s , \pmb { a } )$ and $r _ { 2 } ^ { \pi } \bar { ( } s _ { 2 } , a _ { 2 } ) = r _ { 2 } ( s , a )$ will VoI equal to 0. In particular, maximizing
|
| 116 |
+
|
| 117 |
+
VoI with respect to policy parameters $\theta _ { 1 }$ will lead agent 1 to meaningful interaction points, where $V _ { 2 } ^ { \pi } ( s ^ { \prime } )$ is high and $s _ { 1 } , a _ { 1 }$ can increase the probability that $\scriptstyle { \boldsymbol { s } } ^ { \prime }$ is reached.
|
| 118 |
+
|
| 119 |
+
In this learning framework, agents initially explore the environment individually driven by its own curiosity, during which process they will discover potentially valuable interaction points where they can influence the transition function and (intrinsic) rewarding structure of each other. VoI highlights these points and encourages agents to visit these configurations more frequently. As intrinsic reward diminishes, VoI can gradually distinguish those interaction points which are necessary to get extrinsic rewards.
|
| 120 |
+
|
| 121 |
+
# 3.2.1 POLICY OPTIMIZATION WITH VOI
|
| 122 |
+
|
| 123 |
+
We want to optimize $J _ { \theta _ { i } }$ with respect to the policy parameters $\theta _ { i }$ , where the most cumbrous term is $\nabla _ { \theta _ { i } } V o I _ { - i | i }$ . For brevity, we can consider a two-agent case, e.g., optimizing $V o I _ { 2 | 1 }$ with respect to the policy parameters $\theta _ { 1 }$ . Directly computing the gradient $\nabla _ { \theta _ { 1 } } V o I _ { 2 | 1 }$ is not stable, because $V o I _ { 2 | 1 }$ contains policy-dependent functions $\tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) , p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ , and $V _ { 2 } ^ { \pi } ( s ^ { \prime } )$ (see Eq. 12). To stabilize training , we use target functions to approximate these policy-dependent functions, which is a commonly used technique in deep RL (Mnih et al., 2015). With this approximation, we denote
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
g _ { 2 } ( s , a ) = \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) + \gamma \sum _ { s ^ { \prime } } T ( s ^ { \prime } | s , a ) \left( 1 - \frac { p ^ { - } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s , a ) } \right) V _ { 2 } ^ { - } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } ) .
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $r _ { 2 } ^ { - } , p ^ { - }$ , and $V _ { 2 } ^ { - }$ are corresponding target functions. As these target functions are only periodically updated during the learning, their gradients over $\theta _ { 1 }$ can be approximately ignored. Therefore, from Eq. 12, we have
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\nabla _ { \theta _ { 1 } } V o I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) \approx \sum _ { s , a \in ( S , A ) } \left( \nabla _ { \theta _ { 1 } } p ^ { \pi } ( s , a ) \right) g _ { 2 } ( s , a ) .
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
Similar to the calculation of $\nabla _ { \boldsymbol { \theta } _ { i } } M \boldsymbol { I }$ , we get the gradient at every step (see Appendix B.3 for proof):
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\begin{array} { r } { \nabla _ { \theta _ { 1 } } J _ { \theta _ { 1 } } ( t ) \approx \left( \hat { R } _ { 1 } ^ { t } - \hat { V } _ { 1 } ^ { \pi } ( s _ { t } ) \right) \nabla _ { \theta _ { 1 } } \log \pi _ { \theta _ { 1 } } ( a _ { 1 } ^ { t } | s _ { 1 } ^ { t } ) , } \end{array}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where $\hat { V } _ { 1 } ^ { \pi } ( s _ { t } )$ is an augmented value function regressed towards $\begin{array} { r } { \hat { R } _ { 1 } ^ { t } = \sum _ { t ^ { \prime } = t } ^ { h } \hat { r } _ { 1 } ^ { t ^ { \prime } } } \end{array}$ and
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\hat { r } _ { 1 } ^ { t } = r ^ { t } + u _ { 1 } ^ { t } + \beta \left[ u _ { 2 } ^ { t } + \gamma \left( 1 - \frac { p ^ { - } ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } ) } { p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { t } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } ) } \right) V _ { 2 } ^ { - } ( s _ { 1 } ^ { t + 1 } , s _ { 2 } ^ { t + 1 } ) \right] .
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
We call ut2 + γ 1 − p−(st+12 |st2,at2)p(st+1|st ,st ,at ,at ) $\begin{array} { r } { u _ { 2 } ^ { t } + \gamma \left( 1 - \frac { p ^ { - } ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } ) } { p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { t } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } ) } \right) V _ { 2 } ^ { - } ( s _ { 1 } ^ { t + 1 } , s _ { 2 } ^ { t + 1 } ) } \end{array}$ the EDTI reward.
|
| 148 |
+
|
| 149 |
+
# 3.3 DISCUSSIONS
|
| 150 |
+
|
| 151 |
+
Scale to Large Settings: For cases with more than two agents, the VoI of agent $i$ on other agents can be defined similarly to Eq. 9, which is annotated with $V o I _ { - i | i } ^ { \pi } ( S _ { - i } ^ { \prime } ; S _ { i } , A _ { i } | S _ { - i } , A _ { - i } )$ , where $S _ { - i }$ and $A _ { - i }$ are the state and action sets of all agents other than agent $i$ . In practice, agents interaction can often be decomposed to pairwise interaction so $V o I _ { - i | i } ^ { \pi } ( S _ { - i } ^ { \prime } ; S _ { i } , A _ { i } | S _ { - i } , A _ { - i } )$ is well approximated by the sum of values of pairwise value of interaction:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
V o I _ { - i | i } ^ { \pi } ( S _ { - i } ^ { \prime } ; S _ { i } , A _ { i } | S _ { - i } , A _ { - i } ) \approx \sum _ { j \in N , j \ne i } V o I _ { j | i } ^ { \pi } ( S _ { j } ^ { \prime } ; S _ { i } , A _ { i } | S _ { - i } , A _ { - i } ) .
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
Relationship between EITI and EDTI: EITI and EDTI gradient updates are obtained by information- and decision-theoretical influence respectively. Therefore, it is nontrivial to derive that part of the EDTI reward is a lower bound of the EITI reward:
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
1 - \frac { p ( s _ { - i } ^ { \prime } | s _ { - i } , a _ { - i } ) } { p ( s _ { - i } ^ { \prime } | s , a ) } \leq \log \frac { p ( s _ { - i } ^ { \prime } | s , a ) } { p ( s _ { - i } ^ { \prime } | s _ { - i } , a _ { - i } ) } , \forall s , a , s _ { - i } ^ { \prime }
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
which easily follows given that $\log x \geq 1 - 1 / x$ for $\forall x > 0$ . This draws a connection between EITI and EDTI reward.
|
| 164 |
+
|
| 165 |
+
Table 1: Baseline algorithms. The third column is the reward used to train the value function of PPO. $u _ { i }$ and $u _ { c e n }$ are curiosity about individual state $s _ { i }$ and global state $\pmb { s }$ , $\begin{array} { r l } { T _ { 1 } } & { { } = } \end{array}$ $\log \left( p ( s _ { - i } ^ { \prime } | \pmb { s } , \pmb { a } ) / p ( s _ { - i } ^ { \prime } | s _ { - i } , a _ { - i } ) \right)$ , $T _ { 2 } = 1 - p ( s _ { - i } ^ { \prime } | s _ { - i } , a _ { - i } ) / p ( s _ { - i } ^ { \prime } | s , a )$ , and $\begin{array} { r l } { \Delta Q _ { - i } ( s , \pmb { a } ) } & { { } = } \end{array}$ $Q _ { - i } ( s , { \pmb a } ) - Q _ { - i } ( s _ { - i } , a _ { - i } )$ . Social influence (Jaques et al., 2018) and COMA (Foerster et al., 2018) are augmented with curiosity.
|
| 166 |
+
|
| 167 |
+
<table><tr><td></td><td>Alg.</td><td>Reward</td><td>Description</td></tr><tr><td>Ours</td><td>EITI EDTI</td><td>r+ui+βTi r+ui+β(u-i+γTV-i)</td><td>Influence-theoretic influence Decision-theoretic influence</td></tr><tr><td>Other Exploration Methods</td><td>random cen dec cen_control</td><td>r r+ucen r+ui r+ucen</td><td>Pure PPO Decentralized PPO with cen curiosity Decentralized PPO with dec curiosity Centralized PPO with cen curiosity</td></tr><tr><td>Ablations</td><td>r_influence plusV shared_critic Q-Q</td><td>r+ui+βu-i r+ui+βV-i r+ucen r+ui + β△Q-i(s,a)</td><td>Disentangle reward interaction Use other agents’value functions PPO with shared V and cen curiosity EDTI without explicit counterfactual</td></tr><tr><td>Related Works</td><td>social COMA Multi</td><td></td><td>By Jaques et al. (2018) By Foerster et al. (2018) By Iqbal & Sha (2019b)</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Comparing EDTI to Centralized Methods: Different from a centralized method which directly includes value functions of other agents in the optimization objective, (i.e., by setting total reward $\hat { r } _ { i } = r + u _ { i } + \beta ( u _ { - i } + \gamma V _ { - i } )$ , which is called plusV henceforth), the EDTI reward for agent $i$ disentangles its contributions to values of another agents using a counterfactual formulation. This difference is important for quantifying influence because the value of another agent does not just contain the contributions from agent $i$ , but also those of itself and third-party agents. Therefore, EDTI is a kind of intrinsic reward assignment. Our experiments in the next section will compare the performance of plusV against our methods, which verify the importance of the intrinsic reward assignment.
|
| 170 |
+
|
| 171 |
+
# 4 EXPERIMENTAL RESULTS
|
| 172 |
+
|
| 173 |
+
Our experiments aim to answer the following questions: (1) Can EITI and EDTI rewards capture interaction points? If they can, how do these points change throughout exploration? (2) Can exploiting these interaction points facilitate exploration and learning performance? (3) Can EDTI filter out interaction points that are not related to environmental rewards? (4) What if only reward influence between agents are disentangled? We evaluate our approach on a set of multi-agent tasks with sparse rewards based on a discrete version of multi-agent particle world environment (Lowe et al., 2017). PPO (Schulman et al., 2017) is used as the underlying algorithm. For evaluation, all experiments are carried out with 5 different random seeds and results are shown with $9 5 \%$ confidence interval. Demonstrative videos1 are available online.
|
| 174 |
+
|
| 175 |
+
Baselines We compare our methods with various baselines shown in Table 1. In particular, we carry out the following ablation studies: i) r influence disentangles immediate reward influence between agents, (derivation of the associated augmented reward can be found in Appendix B.4. Reward influence in long term is not considered because it inevitably involves transition interactions) ii) PlusV as described in Sec. 3.3. iii) Shared critic uses decentralized PPO agents with shared centralized value function and thus is a cooperative version of MADDPG (Lowe et al., 2017) augmented with intrinsic reward of curiosity. iv) Q-Q is similar to EDTI but without explicit counterfactual formulation, as described in Sec. 3.2. We also note that EITI is an ablation of EDTI which considers transition interactions. PlusV, shared critic, Q-Q, and cen control have access to global or other agents’ value functions during training. When execution, all the methods except cen control only require local state.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 1: Didactic examples. Left: task Pass. Two agents starting at the upper-left corner are only rewarded when both of them reach the other room through the door, which will open only when at least one of the switches is occupied by one or more agents. Middle: Secret-Room. An extension of Pass with 4 rooms and switches. When the switch 1 is occupied, all the three doors turn open. And the three switches on the right only control the door of its room. The agents need to reach the upper right room to achieve any reward. Right: comparison of our methods with ablations on Pass.
|
| 179 |
+
|
| 180 |
+
We present two didactic examples of multi-agent cooperation tasks with sparse reward to explain how EITI and EDTI work. The first didactic example consists of a $3 0 \times 3 0$ maze with two rooms and a door with two switches (Fig. 1 left). In the optimal strategy, one agent should first step on switch 1 to help the other agent pass the door, and then the agent that has already reached the right half should further go to switch 2 to bring the remaining agent in. There are two pairs of interaction points in this task: (switch 1, door) and (switch 2, door), i.e., transition probability of the agent near door is determined by whether another agent is on one of the switch.
|
| 181 |
+
|
| 182 |
+
Fig. 1-right and Fig. 2-top show the learning curves of our methods and all the baselines, among which EITI, EDTI, r influence, Multi, and centralized control can learn the winning strategy and ours learn much more efficiently. Fig. 2-bottom gives a possible explanation why our methods work. EITI and EDTI rewards successfully highlight the interaction points (before 100 and 2100 updates, respectively). Agents are encouraged to explore these configurations more frequently and thus have better chance to learn the goal strategy. EDTI reward considers the value function of the other agent, so it converges slower than the EITI reward. In contrast, directly adding the other agent’s intrinsic rewards and value functions is noisy (see ”plusV reward”) and confuses the agent because these contain the effect of the other agent’s exploration. As for centralized control, global curiosity encourages agents to try all possible configurations, so it can find environmental rewards in most tasks. However, visiting all configurations without bias renders it inefficient – external rewards begin to dominate the behaviors of agents after 7000 updates even with the help of centralized learning algorithm. Our methods use the same information as centralized exploration but take advantages of agents’ interactions to accelerate exploration.
|
| 183 |
+
|
| 184 |
+
In order to evaluate whether EDTI can help filter out noisy interaction points and accelerate exploration, we conduct experiments in a second didactic task (see Fig. 1 middle). It is also a navigation task in a $2 5 \times 2 5$ maze where agents are rewarded for being in a goal room. However, in this experiment, we consider a case where there are four rooms and the upper right one is attached to reward. This task contains 6 pairs of interaction points (switch 1 with each of the doors, each switch with the door of the same room), but only two of them are related to external rewards, i.e., (switch 1, door 1) and (switch 2, door 1). As Fig. 3-right shows, EITI agents treat three doors equally even after 7400 updates (see Fig. 3 right, 7400 updates, top row). In comparison, although EDTI reward suffers from noise in the beginning, it clearly highlight two pairs of valuable interaction points (see Fig. 3 right, 7400 updates, bottom row) as intrinsic reward diminishes. This can explain why EDTI outperforms EITI (Fig. 3 left).
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
Figure 2: Development of performance of our methods compared to baselines and intrinsic reward terms of EITI, EDTI, and plusV over the training period of 9000 PPO updates segmented into three phases. ”Team Reward” shows averaged team reward gained in a episode, with a maximum of 1000. It shows that only EITI, EDTI, and centralized control and Multi can learn the strategy during this stage. ”EITI reward”, ”EDTI reward”, and ”plusV reward” demonstrate the evolving of corresponding intrinsic rewards.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
|
| 191 |
+

|
| 192 |
+
Figure 3: Left: performance comparison between EDTI and EITI on Secret-Room over 7400 PPO updates. Right: EITI and EDTI terms of two agents after 100, 2900, and 7400 updates.
|
| 193 |
+
Figure 4: Comparison of our methods against ablations for Push-Box, Island, and Large-Island. Comparison with baselines is shown in Fig. 8 in Appendix D.
|
| 194 |
+
|
| 195 |
+
# 4.2 EXPLORATION IN COMPLEX TASKS
|
| 196 |
+
|
| 197 |
+
Next, we evaluate the performance of our methods on more complex tasks. To this end, we use three sparse reward cooperative multi-agent tasks depicted in Fig. 7 of Appendix D and analyzed below. Details of implementation and experiment settings are also described in Appendix D.
|
| 198 |
+
|
| 199 |
+
Push-Box: A $1 5 \times 1 5$ room is populated with 2 agents and 1 box. Agents need to push the box to the wall in 300 environment steps to get a reward of 1000. However, the box is so heavy that only when two agents push it in the same direction at the same time can it be moved a grid. Agents need to coordinate their positions and actions for multiple steps to earn a reward. The purpose of this task is to demonstrate that EITI and EDTI can explore long-term cooperative strategy.
|
| 200 |
+
|
| 201 |
+
Island: This task is a modified version of the classic Stag Hunt game (Peysakhovich & Lerer, 2018) where two agents roam a $1 0 \times 1 0$ island populated with 9 treasures and a random walking beast for 300 environment steps. Agents can collect a treasure by stepping on it to get a team reward of 10 or, by attacking the beast within their attack range, capture it for a reward of 300. The beast would also attack the agents when they are too close. The beast and agent have a maximum energy of 8 and 5 respectively, which will be subtracted by 1 every time attacked. Therefore, an agent is too weak to beat the beast alone and they have to cooperate. In order to learn optimal strategy in this task, one method has to keep exploring after sub-optimal external rewards are found.
|
| 202 |
+
|
| 203 |
+
Large-Island: Similar to Island but with more agents (4), more treasures (16), and a beast with more energy (16) and a higher reward (600) for being caught. This task aims to demonstrate feasibility of our methods in cases with more than 2 agents.
|
| 204 |
+
|
| 205 |
+
Push-Box requires agents to take coordinated actions at certain positions for multiple steps to get rewarded. Therefore, this task is particularly challenging and all the baselines struggle to earn any reward (Fig. 4 left and Fig. 8 left). Our methods are considerably more successful because interaction happens when the box is moved – agents remain unmoved when they push the box alone but will move by a grid if push it together. In this way, EITI and EDTI agents are rewarded intrinsically to move the box and thus are able to quickly find the optimal policy.
|
| 206 |
+
|
| 207 |
+
In the Island task, collecting treasures is a easily-attainable local optimal. However, efficient treasures collecting requires the agents to spread on the island. This leads to a situation where attempting to attack the beast seems a bad choice since it is highly possible that agents will be exposed to the beast’s attack alone. They have to give up profitable spreading strategy and take the risk of being killed to discover that if they attack the beast collectively for several timesteps, they will get much more rewards. Our methods help solve this challenge by giving agents intrinsic incentives to appear together in the attack range of the beast, where they have indirect interactions (health is part of the state and it decreases slower when the two are attacked alternatively). Fig. 9 in Appendix D demonstrates that our methods learn to catch the beast quickly, and thus have better performance (Fig. 8 right).
|
| 208 |
+
|
| 209 |
+
Finally, outperformance of our methods on Large-Island proves that they can successfully handle cases with more than two agents.
|
| 210 |
+
|
| 211 |
+
In summary, both of our methods are able to facilitate effective exploration on all the tasks by exploiting interactions. EITI outperforms EDTI in scenarios where all interaction points align with extrinsic rewards. On other tasks, EDTI performs better than EITI due to its ability to filter out interaction points that can not lead to more values.
|
| 212 |
+
|
| 213 |
+
We also study EDTI with only intrinsic rewards, discussion and results are included in Appendix A.
|
| 214 |
+
|
| 215 |
+
# 5 RELATED WORKS
|
| 216 |
+
|
| 217 |
+
Single-agent exploration achieves conspicuous success recently. Provably efficient methods are proposed, such as upper confidence bound (UCB) (Jaksch et al., 2010; Azar et al., 2017; Jin et al., 2018) and posterior sampling for reinforcement learning (PSRL) (Strens, 2000; Osband et al., 2013; Osband & Van Roy, 2016; Agrawal & Jia, 2017). Given that these methods do not scale well to large or continuous settings, another line of research has been focusing on curiosity-driven exploration (Schmidhuber, 1991; Chentanez et al., 2005; Oudeyer et al., 2007; Barto, 2013; Bellemare et al., 2016; Pathak et al., 2017; Ostrovski et al., 2017), and have shown impressive results (Burda et al., 2019; 2018; Hyoungseok Kim, 2019). In addition, methods based on variational information maximization (Houthooft et al., 2016; Barron et al., 2018) and mutual information (Rubin et al., 2012; Still & Precup, 2012; Salge et al., 2014; Mohamed & Rezende, 2015; Hyoungseok Kim, 2019) have been proposed for single-agent intrinsically motivated exploration.
|
| 218 |
+
|
| 219 |
+
Although multi-agent reinforcement learning (MARL) has been making significant progresses in recent years (Foerster et al., 2018; Lowe et al., 2017; Wen et al., 2019; Iqbal & Sha, 2019a; Sunehag et al., 2018; Son et al., 2019; Rashid et al., 2018), less attention has been drawn to multi-agent exploration. Dimakopoulou & Van Roy (2018) and Dimakopoulou et al. (2018) propose posterior sampling methods for exploration of concurrent reinforcement learning in coverage problems, Bargiacchi et al. (2018) presents a multi-agent upper confidence exploration method for repeated single-stage problems, and Iqbal & Sha (2019b) investigates methods to combine several decentralized curiosity-driven exploration strategies. All these works focus on transition-independent settings. Another Bayesian exploration approach has been proposed for learning in stateless repeated games (Chalkiadakis & Boutilier, 2003). In contrast, this paper focuses on more general multi-agent sequential decision making problems with complex reward dependencies and transition interactions among agents.
|
| 220 |
+
|
| 221 |
+
In the literature of MARL, COMA (Foerster et al., 2018) shares some similarity with our decisiontheoretic EDTI approach in that both of them use the idea of counterfactual formulations. However, they are quite different in terms of definition and optimization: (1) conceptually, EDTI measures the influence of one agent on the value functions of other agents, while COMA quantifies individual contribution to the team value; (2) EDTI is defined on counterfactual Q-value over state-action pairs of other agents given its own state-action pair, while COMA uses the counterfactual Q-value just over its own action without considering state information, which is critical for exploration; (3) we explicitly derive the gradients for optimizing EDTI influence for coordinated exploration in the policy gradient framework, which provides more accurate feedback, while COMA uses the counterfactual Q value as a critic. Another line of relevant works (Oliehoek et al., 2012; de Castro et al., 2019) propose influence-based abstraction to predict influence sources to help local decision making of agents. In contrast, this paper presents two novel approaches that quantify and maximize the influence between agents for enabling coordinated multi-agent exploration.
|
| 222 |
+
|
| 223 |
+
In addition, some previous MARL work has also studied intrinsic rewards. One notably relevant work is Jaques et al. (2018), which models the social influence of one agent on other agents’ policies. In contrast, EITI measures the influence of one agent on the transition dynamics of other agents. Accompanying this distinction, EITI includes states of agents in the calculation of influence while social influence dos not. Apart from that, the optimization methods are also different – we directly derive the gradients of mutual information and incorporate its optimization in the policy gradient framework, while Jaques et al. (2018) adds social influence reward to the immediate environmental reward for training policies. Hughes et al. (2018) proposes an inequality aversion reward for learning in intertemporal social dilemmas. Strouse et al. (2018) uses mutual information between goal and states or actions as an intrinsic reward to train the agent to share or hide their intentions.
|
| 224 |
+
|
| 225 |
+
# 6 CLOSING REMARKS
|
| 226 |
+
|
| 227 |
+
In this paper, we study the multi-agent exploration problem and propose two influence-based methods that exploits the interaction structure. These methods are based on two interaction measures, MI and Value of Interaction (VoI), which respectively measure the amount and value of one agent’s influence on the other agents’ exploration processes. These two measures can be best regraded as exploration bonus distribution. We also propose an optimization method in the policy gradient framework, which enables agents to achieve coordinated exploration in a decentralized manner and optimize team performance.
|
| 228 |
+
|
| 229 |
+
# REFERENCES
|
| 230 |
+
|
| 231 |
+
Shipra Agrawal and Randy Jia. Optimistic posterior sampling for reinforcement learning: worst-case regret bounds. In Advances in Neural Information Processing Systems, pp. 1184–1194, 2017.
|
| 232 |
+
|
| 233 |
+
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
|
| 234 |
+
|
| 235 |
+
70, pp. 263–272. JMLR. org, 2017.
|
| 236 |
+
|
| 237 |
+
Eugenio Bargiacchi, Timothy Verstraeten, Diederik Roijers, Ann Nowe, and Hado Hasselt. Learning ´ to coordinate with coordination graphs in repeated single-stage multi-agent decision problems. In International Conference on Machine Learning, pp. 491–499, 2018.
|
| 238 |
+
|
| 239 |
+
Trevor Barron, Oliver Obst, and Heni Ben Amor. Information maximizing exploration with a latent dynamics model. arXiv preprint arXiv:1804.01238, 2018.
|
| 240 |
+
|
| 241 |
+
Andrew G Barto. Intrinsic motivation and reinforcement learning. In Intrinsically motivated learning in natural and artificial systems, pp. 17–47. Springer, 2013.
|
| 242 |
+
|
| 243 |
+
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, pp. 1471–1479, 2016.
|
| 244 |
+
|
| 245 |
+
Yuri Burda, Harrison Edwards, Amos Storkey, and Oleg Klimov. Exploration by random network distillation. arXiv preprint arXiv:1810.12894, 2018.
|
| 246 |
+
|
| 247 |
+
Yuri Burda, Harri Edwards, Deepak Pathak, Amos Storkey, Trevor Darrell, and Alexei A Efros. Large-scale study of curiosity-driven learning. International Conference on Learning Representations, 2019.
|
| 248 |
+
|
| 249 |
+
Yongcan Cao, Wenwu Yu, Wei Ren, and Guanrong Chen. An overview of recent progress in the study of distributed multi-agent coordination. IEEE Transactions on Industrial informatics, 9(1): 427–438, 2012.
|
| 250 |
+
|
| 251 |
+
Georgios Chalkiadakis and Craig Boutilier. Coordination in multiagent reinforcement learning: A bayesian approach. In Proceedings of the Second International Joint Conference on Autonomous Agents and Multiagent Systems, AAMAS $^ { \ ' 0 3 }$ , pp. 709–716, New York, NY, USA, 2003. ACM. ISBN 1-58113-683-8. doi: 10.1145/860575.860689. URL http://doi.acm. org/10.1145/860575.860689.
|
| 252 |
+
|
| 253 |
+
Nuttapong Chentanez, Andrew G Barto, and Satinder P Singh. Intrinsically motivated reinforcement learning. In Advances in neural information processing systems, pp. 1281–1288, 2005.
|
| 254 |
+
|
| 255 |
+
Miguel Suau de Castro, Elena Congeduti, Rolf AN Starre, Aleksander Czechowski, and Frans A Oliehoek. Influence-based abstraction in deep reinforcement learning. In Adaptive, learning agents workshop (Vol. 34)., 2019.
|
| 256 |
+
|
| 257 |
+
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.
|
| 258 |
+
|
| 259 |
+
Maria Dimakopoulou and Benjamin Van Roy. Coordinated exploration in concurrent reinforcement learning. In International Conference on Machine Learning, pp. 1270–1278, 2018.
|
| 260 |
+
|
| 261 |
+
Maria Dimakopoulou, Ian Osband, and Benjamin Van Roy. Scalable coordinated exploration in concurrent reinforcement learning. In Advances in Neural Information Processing Systems, pp. 4219–4227, 2018.
|
| 262 |
+
|
| 263 |
+
Vladimir Feinberg, Alvin Wan, Ion Stoica, Michael I Jordan, Joseph E Gonzalez, and Sergey Levine. Model-based value estimation for efficient model-free reinforcement learning. arXiv preprint arXiv:1803.00101, 2018.
|
| 264 |
+
|
| 265 |
+
Carlos Florensa, Yan Duan, and Pieter Abbeel. Stochastic neural networks for hierarchical reinforcement learning. arXiv preprint arXiv:1704.03012, 2017.
|
| 266 |
+
|
| 267 |
+
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.
|
| 268 |
+
|
| 269 |
+
Jakob N Foerster, Gregory Farquhar, Triantafyllos Afouras, Nantas Nardelli, and Shimon Whiteson. Counterfactual multi-agent policy gradients. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 270 |
+
|
| 271 |
+
Charles W Fox and Stephen J Roberts. A tutorial on variational bayesian inference. Artificial intelligence review, 38(2):85–95, 2012.
|
| 272 |
+
|
| 273 |
+
Abhishek Gupta, Russell Mendonca, YuXuan Liu, Pieter Abbeel, and Sergey Levine. Metareinforcement learning of structured exploration strategies. In Advances in Neural Information Processing Systems, pp. 5302–5311, 2018.
|
| 274 |
+
|
| 275 |
+
Rein Houthooft, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. Vime: Variational information maximizing exploration. In Advances in Neural Information Processing Systems, pp. 1109–1117, 2016.
|
| 276 |
+
|
| 277 |
+
Edward Hughes, Joel Z Leibo, Matthew Phillips, Karl Tuyls, Edgar Duenez-Guzman, Anto- ˜ nio Garc´ıa Castaneda, Iain Dunning, Tina Zhu, Kevin McKee, Raphael Koster, et al. Inequity˜ aversion improves cooperation in intertemporal social dilemmas. In Advances in Neural Information Processing Systems, pp. 3330–3340, 2018.
|
| 278 |
+
|
| 279 |
+
Yeonwoo Jeong Sergey Levine Hyun Oh Song Hyoungseok Kim, Jaekyeom Kim. Emi: Exploration with mutual information. In Proceedings of the 36th International Conference on Machine Learning. JMLR. org, 2019.
|
| 280 |
+
|
| 281 |
+
Shariq Iqbal and Fei Sha. Actor-attention-critic for multi-agent reinforcement learning. In International Conference on Machine Learning, pp. 2961–2970, 2019a.
|
| 282 |
+
|
| 283 |
+
Shariq Iqbal and Fei Sha. Coordinated exploration via intrinsic rewards for multi-agent reinforcement learning. arXiv preprint arXiv:1905.12127, 2019b.
|
| 284 |
+
|
| 285 |
+
Thomas Jaksch, Ronald Ortner, and Peter Auer. Near-optimal regret bounds for reinforcement learning. Journal of Machine Learning Research, 11(Apr):1563–1600, 2010.
|
| 286 |
+
|
| 287 |
+
Natasha Jaques, Angeliki Lazaridou, Edward Hughes, Caglar Gulcehre, Pedro A Ortega, DJ Strouse, Joel Z Leibo, and Nando de Freitas. Intrinsic social motivation via causal influence in multi-agent rl. arXiv preprint arXiv:1810.08647, 2018.
|
| 288 |
+
|
| 289 |
+
Chi Jin, Zeyuan Allen-Zhu, Sebastien Bubeck, and Michael I Jordan. Is q-learning provably efficient? In Advances in Neural Information Processing Systems, pp. 4863–4873, 2018.
|
| 290 |
+
|
| 291 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. Computer Science, 2014.
|
| 292 |
+
|
| 293 |
+
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. 6379–6390, 2017.
|
| 294 |
+
|
| 295 |
+
Piotr Mirowski, Razvan Pascanu, Fabio Viola, Hubert Soyer, Andrew J Ballard, Andrea Banino, Misha Denil, Ross Goroshin, Laurent Sifre, Koray Kavukcuoglu, et al. Learning to navigate in complex environments. arXiv preprint arXiv:1611.03673, 2016.
|
| 296 |
+
|
| 297 |
+
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.
|
| 298 |
+
|
| 299 |
+
Shakir Mohamed and Danilo Jimenez Rezende. Variational information maximisation for intrinsically motivated reinforcement learning. In Advances in neural information processing systems, pp. 2125–2133, 2015.
|
| 300 |
+
|
| 301 |
+
Ann Nowe, Peter Vrancx, and Yann-Micha ´ el De Hauwere. Game theory and multi-agent reinforce- ¨ ment learning. In Reinforcement Learning, pp. 441–470. Springer, 2012.
|
| 302 |
+
|
| 303 |
+
Frans Adriaan Oliehoek, Stefan J Witwicki, and Leslie Pack Kaelbling. Influence-based abstraction for multiagent systems. In Twenty-Sixth AAAI Conference on Artificial Intelligence, 2012.
|
| 304 |
+
|
| 305 |
+
OpenAI. Openai five. https://blog.openai.com/openai-five/, 2018.
|
| 306 |
+
|
| 307 |
+
Ian Osband and Benjamin Van Roy. On lower bounds for regret in reinforcement learning. arXiv preprint arXiv:1608.02732, 2016.
|
| 308 |
+
|
| 309 |
+
Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. In Advances in Neural Information Processing Systems, pp. 3003–3011, 2013.
|
| 310 |
+
|
| 311 |
+
Georg Ostrovski, Marc G Bellemare, Aaron van den Oord, and R ¨ emi Munos. Count-based ex-´ ploration with neural density models. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 2721–2730. JMLR. org, 2017.
|
| 312 |
+
|
| 313 |
+
Pierre-Yves Oudeyer and Frederic Kaplan. What is intrinsic motivation? a typology of computational approaches. Frontiers in neurorobotics, 1:6, 2009.
|
| 314 |
+
|
| 315 |
+
Pierre-Yves Oudeyer, Frdric Kaplan, and Verena V Hafner. Intrinsic motivation systems for autonomous mental development. IEEE transactions on evolutionary computation, 11(2):265–286, 2007.
|
| 316 |
+
|
| 317 |
+
Deepak Pathak, Pulkit Agrawal, Alexei A Efros, and Trevor Darrell. Curiosity-driven exploration by self-supervised prediction. In International Conference on Machine Learning, pp. 2778–2787, 2017.
|
| 318 |
+
|
| 319 |
+
Deepak Pathak, Parsa Mahmoudieh, Guanghao Luo, Pulkit Agrawal, Dian Chen, Yide Shentu, Evan Shelhamer, Jitendra Malik, Alexei A Efros, and Trevor Darrell. Zero-shot visual imitation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 2050–2053, 2018.
|
| 320 |
+
|
| 321 |
+
Alexander Peysakhovich and Adam Lerer. Prosocial learning agents solve generalized stag hunts better than selfish ones. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2043–2044. International Foundation for Autonomous Agents and Multiagent Systems, 2018.
|
| 322 |
+
|
| 323 |
+
Tabish Rashid, Mikayel Samvelyan, Christian Schroeder Witt, Gregory Farquhar, Jakob Foerster, and Shimon Whiteson. Qmix: Monotonic value function factorisation for deep multi-agent reinforcement learning. In International Conference on Machine Learning, pp. 4292–4301, 2018.
|
| 324 |
+
|
| 325 |
+
Martin Riedmiller, Roland Hafner, Thomas Lampe, Michael Neunert, Jonas Degrave, Tom Van de Wiele, Volodymyr Mnih, Nicolas Heess, and Jost Tobias Springenberg. Learning by playingsolving sparse reward tasks from scratch. arXiv preprint arXiv:1802.10567, 2018.
|
| 326 |
+
|
| 327 |
+
Jonathan Rubin, Ohad Shamir, and Naftali Tishby. Trading value and information in mdps. In Decision Making with Imperfect Decision Makers, pp. 57–74. Springer, 2012.
|
| 328 |
+
|
| 329 |
+
Christoph Salge, Cornelius Glackin, and Daniel Polani. Changing the environment based on empowerment as intrinsic motivation. Entropy, 16(5):2789–2819, 2014.
|
| 330 |
+
|
| 331 |
+
Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
|
| 332 |
+
|
| 333 |
+
Jurgen Schmidhuber. A possibility for implementing curiosity and boredom in model-building neu- ¨ ral controllers. In Proc. of the international conference on simulation of adaptive behavior: From animals to animats, pp. 222–227, 1991.
|
| 334 |
+
|
| 335 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 336 |
+
|
| 337 |
+
Kyunghwan Son, Daewoo Kim, Wan Ju Kang, David Earl Hostallero, and Yung Yi. Qtran: Learning to factorize with transformation for cooperative multi-agent reinforcement learning. In International Conference on Machine Learning, pp. 5887–5896, 2019.
|
| 338 |
+
|
| 339 |
+
Susanne Still and Doina Precup. An information-theoretic approach to curiosity-driven reinforcement learning. Theory in Biosciences, 131(3):139–148, 2012.
|
| 340 |
+
|
| 341 |
+
Malcolm Strens. A bayesian framework for reinforcement learning. In ICML, volume 2000, pp. 943–950, 2000.
|
| 342 |
+
|
| 343 |
+
DJ Strouse, Max Kleiman-Weiner, Josh Tenenbaum, Matt Botvinick, and David J Schwab. Learning to share and hide intentions using information regularization. In Advances in Neural Information Processing Systems, pp. 10249–10259, 2018.
|
| 344 |
+
|
| 345 |
+
Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi, Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z Leibo, Karl Tuyls, et al. Value-decomposition networks for cooperative multi-agent learning based on team reward. In Proceedings of the 17th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2085–2087. International Foundation for Autonomous Agents and Multiagent Systems, 2018.
|
| 346 |
+
|
| 347 |
+
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.
|
| 348 |
+
|
| 349 |
+
Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, OpenAI Xi Chen, Yan Duan, John Schulman, Filip DeTurck, and Pieter Abbeel. # exploration: A study of count-based exploration for deep reinforcement learning. In Advances in neural information processing systems, pp. 2753– 2762, 2017.
|
| 350 |
+
|
| 351 |
+
Ying Wen, Yaodong Yang, Rui Luo, Jun Wang, and Wei Pan. Probabilistic recursive reasoning for multi-agent reinforcement learning. In International Conference on Learning Representations, 2019.
|
| 352 |
+
|
| 353 |
+
Yi Wu, Yuxin Wu, Georgia Gkioxari, and Yuandong Tian. Building generalizable agents with a realistic and rich 3d environment. arXiv preprint arXiv:1801.02209, 2018.
|
| 354 |
+
|
| 355 |
+
Yuxin Wu and Yuandong Tian. Training agent for first-person shooter game with actor-critic curriculum learning. ICLR, 2016.
|
| 356 |
+
|
| 357 |
+
Chongjie Zhang and Victor Lesser. Coordinated multi-agent reinforcement learning in networked distributed pomdps. In Twenty-Fifth AAAI Conference on Artificial Intelligence, 2011.
|
| 358 |
+
|
| 359 |
+
# APPENDIX
|
| 360 |
+
|
| 361 |
+
# A INTRINSIC EDTI
|
| 362 |
+
|
| 363 |
+
Value of interaction (VoI) captures both transition and reward influence among agents, and it facilitates coordinated exploration by encouraging interactions. VoI contains influence of both intrinsic and extrinsic rewards. Since single-agent literature has studied purely curiosity-driven learning and gets cutting-edge performance (Burda et al., 2019), it is interesting to investigate the performance of VoI given only intrinsic rewards.
|
| 364 |
+
|
| 365 |
+
Intuitively, intrinsic VoI distributes individual curiosity among team members and facilitates exploration by encouraging agents to help each other to reach under-explored states. Specifically, we use the following objective:
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
J _ { \theta _ { i } } [ \pi _ { i } | \pi _ { - i } , p _ { 0 } ] \equiv V ^ { e x t , \pi } ( s _ { 0 } ) + V _ { i } ^ { i n t , \pi } ( s _ { 0 } ) + \beta \cdot V o I _ { - i | i } ^ { i n t , \pi } .
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
The corresponding augmented reward is:
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
\hat { r } _ { 1 } ^ { t } = r _ { t } + u _ { 1 } ^ { t } + \beta \left[ u _ { 2 } ^ { t } + \gamma \left( 1 - \frac { p ^ { - } ( s _ { 2 } ^ { t + 1 } | s _ { 2 } ^ { t } , a _ { 2 } ^ { t } ) } { p ( s _ { 2 } ^ { t + 1 } | s _ { 1 } ^ { t } , s _ { 2 } ^ { t } , a _ { 1 } ^ { t } , a _ { 2 } ^ { t } ) } \right) V _ { 2 } ^ { i n t , - } ( s _ { 1 } ^ { t + 1 } , s _ { 2 } ^ { t + 1 } ) \right]
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
We use this method (intrinsic EDTI) to train the agents on Pass, Secret-Room, Push-Box, and Island and show the results in Fig. 5.
|
| 378 |
+
|
| 379 |
+
# B MATHEMATICAL DETAILS
|
| 380 |
+
|
| 381 |
+
# B.1 GRADIENT OF MUTUAL INFORMATION
|
| 382 |
+
|
| 383 |
+
To encourage agents to exert influence on transitions of other agents, we optimize mutual information between agent’s trajectories. In particular, in the following, we show that term 2 in Eq. 6 is always zero.
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
\begin{array} { r c l } { \tau _ { \mathrm { S } } } & { - } & { \displaystyle \sum _ { \alpha \in \mathbb { Z } _ { h } } \frac { \tau _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } } \\ & { - } & { \displaystyle \sum _ { \alpha \in \mathbb { Z } _ { h } } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } } \\ & { = } & { \displaystyle \sum _ { \alpha \in \mathbb { Z } _ { h } } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } } \\ & { - } & \displaystyle \sum _ { \alpha \in \mathbb { Z } _ { h } } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \frac { \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ { h } ) } { \sigma ( \Delta \alpha _ { h } , \zeta _ { h } ) } \\ & { - } & \displaystyle \sum _ { \alpha \in \mathbb { Z } _ { h } } \frac \epsilon _ { \alpha } ^ { \alpha } ( \Delta \alpha _ { h } , \zeta _ \end{array}
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
Figure 5: Performance of intrinsic EDTI in comparison with EITI and EDTI on Pass, Secret-Room, Push-Box, and Island.
|
| 391 |
+
|
| 392 |
+
$$
|
| 393 |
+
\begin{array} { r l } { = } & { { } - \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } ^ { * } } p ( s _ { 1 } ^ { * } | s _ { 2 } , a _ { 2 } ) \nabla _ { \theta _ { 1 } } \sum _ { a _ { 1 } ^ { * } } \pi _ { \theta _ { 1 } } ( a _ { 1 } ^ { * } | s _ { 1 } ^ { * } ) } \\ { = } & { { } - \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } ^ { * } } p ( s _ { 1 } ^ { * } | s _ { 2 } , a _ { 2 } ) \nabla _ { \theta _ { 1 } } 1 } \\ { = } & { { } 0 } \end{array}
|
| 394 |
+
$$
|
| 395 |
+
|
| 396 |
+
# B.2 DEFINITION OF Value of Interaction
|
| 397 |
+
|
| 398 |
+
To capture both transition and reward interactions between agents and thereby achieve intrinsic reward distribution, we propose a decision-theoretic measure called Value of Interaction. We start from 2-agent cases and the following theorem gives the definition of $V o I _ { 2 | 1 }$ in the form of an expectation over trajectories, which is especially helpful in the derivation of the EDTI policy gradient update shown Eq. 15.
|
| 399 |
+
|
| 400 |
+
Theorem 1. Value of Interaction of agent 1 on agent 2 is:
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
V o I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \mathbb { E } _ { \tau } \left[ \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) + \gamma \left( 1 - \frac { p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s , a ) } \right) V _ { 2 } ^ { \pi } ( s ^ { \prime } ) \right] ,
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
where $\tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } )$ is the counterfactual immediate reward.
|
| 407 |
+
|
| 408 |
+
$V o I _ { 2 | 1 }$ can be defined similarly. To lighten notation in the proof, we define
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
V _ { 2 } ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) = \sum _ { s _ { 1 } ^ { \prime } } p ( s _ { 1 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } , s _ { 2 } ^ { \prime } ) V _ { 2 } ^ { \pi } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } )
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
$$
|
| 415 |
+
\begin{array} { c } { { \displaystyle { \tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) = \sum _ { s _ { 1 } ^ { * } , a _ { 1 } ^ { * } } p ^ { \pi } ( s _ { 1 } ^ { * } , a _ { 1 } ^ { * } | s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ( s _ { 1 } ^ { * } , s _ { 2 } , a _ { 1 } ^ { * } , a _ { 2 } ) , } } } \\ { { \displaystyle { V _ { 2 } ^ { \pi , * } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) = \sum _ { s _ { 1 } ^ { * } , a _ { 1 } ^ { * } } p ^ { \pi } ( s _ { 1 } ^ { * } , a _ { 1 } ^ { * } | s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } ^ { \prime } } p ( s _ { 1 } ^ { \prime } | s _ { 1 } ^ { * } , s _ { 2 } , a _ { 1 } ^ { * } , a _ { 2 } , s _ { 2 } ^ { \prime } ) V _ { 2 } ^ { \pi } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } ) . } } } \end{array}
|
| 416 |
+
$$
|
| 417 |
+
|
| 418 |
+
We first prove Lemma 1, which is used in the proof of Theorem 1.
|
| 419 |
+
|
| 420 |
+
# Lemma 1.
|
| 421 |
+
|
| 422 |
+
$$
|
| 423 |
+
\begin{array} { r l r } { { \sum _ { s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } } \atop 0 } p ^ { \pi } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \gamma \sum _ { s _ { 2 } ^ { \prime } } p ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) V _ { 2 } ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } & { ( 3 7 ) } \\ & { = } & { \sum _ { s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } } p ^ { \pi } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \gamma \sum _ { s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } } T ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \cdot \frac { p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) } V _ { 2 } ^ { \pi } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } ) . } \end{array}
|
| 424 |
+
$$
|
| 425 |
+
|
| 426 |
+
Proof.
|
| 427 |
+
|
| 428 |
+
$$
|
| 429 |
+
\begin{array} { r l } & { \quad \sum _ { j = 1 } ^ { N } \frac { \partial ^ { j } } { \partial x _ { j } } g ^ { ( j ) } ( x _ { j + 1 } , y _ { j + 1 } , x _ { j } ) \geq \frac { \gamma _ { j } ^ { j } } { N } g ^ { ( j ) } ( x _ { j + 1 } , y _ { j } , x _ { j } ) < \beta _ { j } ^ { j } < \zeta _ { j } , } \\ { = } & { \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } \left( g ^ { ( j ) } ( x _ { j + 1 } , y _ { j } , x _ { j } ) + \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j } , x _ { j } ) \right) , } \\ { = } & { \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } \left( g ^ { ( j ) } ( x _ { j } , y _ { j } , x _ { j } ) + \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } \right) , } \\ { = } & { \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } \left( g ^ { ( j ) } ( x _ { j } , y _ { j } , x _ { j } ) \right) > \frac { \gamma _ { j } ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j } , x _ { j } ) < \beta _ { j } ^ { j } , } \\ { = } & { \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j + 1 } , x _ { j } ) > \frac { \gamma _ { j } ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j + 1 } , x _ { j } ) < \beta _ { j } ^ { j } , } \\ { = } & { \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j + 1 } , x _ { j } ) > \frac { \gamma _ { j } ^ { j } } { N } g ^ { ( j ) } ( x _ { j } , y _ { j + 1 } , x _ { j } ) , } \\ & \quad \sum _ { j = 1 } ^ { N } \frac { \beta ^ { j } } { N } \left( g ^ { ( j ) } ( x _ { j } , y _ { j + 1 } , x _ { j } ) \right) > \frac { \gamma _ { j } ^ { j } } \end{array}
|
| 430 |
+
$$
|
| 431 |
+
|
| 432 |
+
We now give the proof of Theorem 1:
|
| 433 |
+
|
| 434 |
+
Proof.
|
| 435 |
+
|
| 436 |
+
$$
|
| 437 |
+
\begin{array} { r l } & { V o I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) } \\ { = } & { \underset { s , a , s _ { 2 } \in ( S , A , S _ { 2 } ) } { \sum } p ^ { \pi } ( s , a , s _ { 2 } ^ { \prime } ) \left[ Q _ { 2 } ^ { \pi } ( s , a , s _ { 2 } ^ { \prime } ) - Q _ { 2 | 1 } ^ { \pi , * } ( s _ { 2 } , a _ { 2 } , s _ { 2 } ^ { \prime } ) \right] } \\ { = } & { \underset { s _ { 1 } , s _ { 2 } , a , 1 , a _ { 2 } } { \sum } p ^ { \pi } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \big ( \widetilde { r } _ { 2 } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) - \widetilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) + } \\ & { \underset { s _ { 1 } , s _ { 2 } , a , 1 , a _ { 2 } } { \sum } p ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \big ( \widetilde { V } _ { 2 } ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) - \widetilde { V } _ { 2 } ^ { \pi , * } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) \big ) } \\ & { \overset { } { \underset { s _ { 2 } ^ { \prime } } { \sum } } p ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \big ( \widetilde { V } _ { 2 } ^ { \pi } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) - \widetilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) \big ) } \\ { = } & \underset { s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } } { \sum } p ^ { \pi } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \big ( \widetilde { r } _ { 2 } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \end{array}
|
| 438 |
+
$$
|
| 439 |
+
|
| 440 |
+
$$
|
| 441 |
+
\begin{array} { r l } & { \gamma \displaystyle \sum _ { s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } } T ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) ( 1 - \frac { p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) } ) V _ { 2 } ^ { \pi } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } ) ) \ ( { \bf L e m m a \ 1 } ) } \\ { = } & { \mathbb { E } _ { \tau } \left[ \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ^ { \pi } ( s _ { 2 } , a _ { 2 } ) + \gamma \left( 1 - \frac { p ^ { \pi } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s , a ) } \right) V _ { 2 } ^ { \pi } ( s ^ { \prime } ) \right] . } \end{array}
|
| 442 |
+
$$
|
| 443 |
+
|
| 444 |
+
# B.3 CALCULATING GRADIENT OF VOI
|
| 445 |
+
|
| 446 |
+
In order to optimize $V o I$ with respect to the parameters of agent policy, in Sec. 3.2.1, we propose to use target function and get:
|
| 447 |
+
|
| 448 |
+
$$
|
| 449 |
+
\begin{array} { r l } & { \nabla _ { \theta _ { 1 } } V o I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) \approx \displaystyle \sum _ { s , a \in ( S , A ) } \left( \nabla _ { \theta _ { 1 } } p ^ { \pi } ( s , a ) \right) [ \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) + } \\ & { \qquad \quad \qquad \ \gamma \displaystyle \sum _ { s ^ { \prime } } T ( s ^ { \prime } | s , a ) \left( 1 - \frac { p ^ { - } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) } { p ( s _ { 2 } ^ { \prime } | s , a ) } \right) V _ { 2 } ^ { - } ( s _ { 1 } ^ { \prime } , s _ { 2 } ^ { \prime } ) ] . } \end{array}
|
| 450 |
+
$$
|
| 451 |
+
|
| 452 |
+
We prove that $\begin{array} { r l } { { } } & { { } \sum _ { s , a } \left( \nabla _ { \theta _ { 1 } } p ^ { \pi } ( s , a ) \right) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) } \end{array}$ is $0$ in the following lemma.
|
| 453 |
+
|
| 454 |
+
Lemma 2.
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
\sum _ { s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } } \left( \nabla _ { \theta _ { 1 } } p ^ { \boldsymbol { \pi } } ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) \right) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) = 0 .
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
Proof. Similar to the way that policy gradient theorem was proved by Sutton et al. (2000),
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
\begin{array} { r l } \underset \{ \mathbf { x } _ { h } ^ { 2 } , \mathbf { x } _ { h } ^ { 2 } \geq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf { x } _ { h } ^ { 2 } \leq 0 , \mathbf x \end{array}
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
$$
|
| 467 |
+
\begin{array} { r l } { = } & { { } \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } , a _ { 1 } } p ^ { \pi } ( s _ { 1 } | s _ { 2 } , a _ { 2 } ) \left( \nabla _ { \theta _ { 1 } } \pi ( a _ { 1 } | s _ { 1 } , s _ { 2 } ) \right) } \\ { = } & { { } \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } } p ^ { \pi } ( s _ { 1 } | s _ { 2 } , a _ { 2 } ) \sum _ { a _ { 1 } } \left( \nabla _ { \theta _ { 1 } } \pi ( a _ { 1 } | s _ { 1 } , s _ { 2 } ) \right) } \\ { = } & { { } \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } } p ^ { \pi } ( s _ { 1 } | s _ { 2 } , a _ { 2 } ) \left( \nabla _ { \theta _ { 1 } } \sum _ { a _ { 1 } } \pi ( a _ { 1 } | s _ { 1 } , s _ { 2 } ) \right) } \\ { = } & { { } \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } } p ^ { \pi } ( s _ { 1 } | s _ { 2 } , a _ { 2 } ) \left( \nabla _ { \theta _ { 1 } } \sum _ { a _ { 1 } } \pi ( a _ { 1 } | s _ { 1 } , s _ { 2 } ) \right) } \\ { = } & { { } \displaystyle \sum _ { s _ { 2 } , a _ { 2 } } p ^ { \pi } ( s _ { 2 } , a _ { 2 } ) \tilde { r } _ { 2 } ^ { - } ( s _ { 2 } , a _ { 2 } ) \sum _ { s _ { 1 } } p ^ { \pi } ( s _ { 1 } | s _ { 2 } , a _ { 2 } ) \left( \nabla _ { \theta _ { 1 } } 1 \right) } \end{array}
|
| 468 |
+
$$
|
| 469 |
+
|
| 470 |
+
# B.4 IMMEDIATE REWARD INFLUENCE
|
| 471 |
+
|
| 472 |
+
Similar to MI and $V o I$ , we can define influence of agent 1 on the immediate rewards of agent 2 as:
|
| 473 |
+
|
| 474 |
+
$$
|
| 475 |
+
R I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \sum _ { s , a \in ( S , A ) } p ^ { \pi } ( s , a ) [ \tilde { r } _ { 2 } ( s , a ) - \tilde { r } _ { 2 } ( s _ { 2 } , a _ { 2 } ) ] .
|
| 476 |
+
$$
|
| 477 |
+
|
| 478 |
+
Use Lemma 2, we can get:
|
| 479 |
+
|
| 480 |
+
$$
|
| 481 |
+
\nabla _ { \theta _ { 1 } } R I _ { 2 | 1 } ^ { \pi } ( S _ { 2 } ^ { \prime } ; S _ { 1 } , A _ { 1 } | S _ { 2 } , A _ { 2 } ) = \sum _ { s , a \in ( S , A ) } \nabla _ { \theta _ { 1 } } ( p ^ { \pi } ( s , a ) ) \tilde { r } _ { 2 } ( s , a ) .
|
| 482 |
+
$$
|
| 483 |
+
|
| 484 |
+
Now we have
|
| 485 |
+
|
| 486 |
+
$$
|
| 487 |
+
\begin{array} { r } { \nabla _ { \boldsymbol { \theta } _ { 1 } } J _ { \boldsymbol { \theta } _ { 1 } } ( t ) \approx \left( \hat { R } _ { 1 } ^ { t } - \hat { V } _ { 1 } ^ { \pi } ( \boldsymbol { s } _ { t } ) \right) \nabla _ { \boldsymbol { \theta } _ { 1 } } \log \pi _ { \boldsymbol { \theta } _ { 1 } } ( a _ { 1 } ^ { t } | \boldsymbol { s } _ { 1 } ^ { t } ) , } \end{array}
|
| 488 |
+
$$
|
| 489 |
+
|
| 490 |
+
where $\hat { V } _ { 1 } ^ { \pi } ( s _ { t } )$ is an augmented value function of $\begin{array} { r } { \hat { R } _ { 1 } ^ { t } = \sum _ { t ^ { \prime } = t } ^ { h } \hat { r } _ { 1 } ^ { t ^ { \prime } } } \end{array}$ and
|
| 491 |
+
|
| 492 |
+
$$
|
| 493 |
+
\hat { r } _ { 1 } ^ { t } = r ^ { t } + u _ { 1 } ^ { t } + \beta u _ { 2 } ^ { t } .
|
| 494 |
+
$$
|
| 495 |
+
|
| 496 |
+
# C ESTIMATION OF CONDITIONAL PROBABILITIES
|
| 497 |
+
|
| 498 |
+
To quantify interdependence among exploration processes of agents, we use mutual information and value of interaction. Calculations of MI and VoI need estimation of $p ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ and $p ( s _ { 2 } ^ { \prime } | s , \mathbf { a } )$ . In practice, we track the empirical frequencies $p _ { e m p } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ and $p _ { e m p } ( s _ { 2 } ^ { \prime } | s , \pmb { a } )$ and substitute them for the corresponding terms in Eq. 8 and 16.
|
| 499 |
+
|
| 500 |
+
Estimating $p _ { e m p } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ and $p _ { e m p } ( s _ { 2 } ^ { \prime } | s , \pmb { a } )$ is one obstacle to the scalability of our method, we now discuss how to solve this problem. When the state and action space is small, we can use hash table to implement Monte Carlo method (MC) for estimating the distributions accurately. In the MC sampling, we count from the samples the state frequencies $\begin{array} { r } { p ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } ) \equiv \frac { N ( s _ { 2 } ^ { \prime } , s _ { 2 } , a _ { 2 } ) } { N ( s _ { 2 } , a _ { 2 } ) } } \end{array}$ and $\begin{array} { r } { p ( s _ { 2 } ^ { \prime } | \pmb { s } , \pmb { a } ) \equiv \frac { N ( s _ { 2 } ^ { \prime } , s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) } { N ( s _ { 1 } , s _ { 2 } , a _ { 1 } , a _ { 2 } ) } } \end{array}$ , where $N ( \cdot )$ is the number of times each state-action pair was visited during the learning process. When the problem space becomes large, MC consumes large memory in practice. As an alternative, we adopt variational inference (Fox & Roberts, 2012) to learn variational distributions $q _ { \xi _ { 1 } } ( s _ { 2 } ^ { \prime } | s _ { 2 } , a _ { 2 } )$ and $q _ { \xi _ { 2 } } ( s _ { 2 } ^ { \prime } | s , \mathbf { a } )$ , parameterized via neural networks with parameters $\xi _ { 1 }$ and $\xi _ { 2 }$ , by optimizing the evidence lower bound. In Fig. 6, we show the performance of EDTI estimated using variational inference and the changing of associated EDTI rewards on Pass during 9000 PPO updates. Variational inference introduces some noise in EDTI rewards estimation and thus requires slightly more steps to learn the true probability and the strategy. However, estimating using MC sampling consumes 1.6G memory to save the hash table with 100M items each agent while variational inference needs a three-layer fully connected network with 74800 parameters occupying about 0.60M memory. This results highlights the feasibility of estimating EITI and EDTI rewards using variational inference in problem with large state-action space.
|
| 501 |
+
|
| 502 |
+

|
| 503 |
+
Figure 6: Left: Performance of EDTI (vi) (EDIT estimated using variational inference) compared with EITI and EDTI estimated using MC sampling. Others: Development of EDTI (vi) rewards during exploration process. Top row: EDTI (vi) rewards of agent 1; bottom row: EDTI (vi) rewards of agent 2.
|
| 504 |
+
|
| 505 |
+
Table 2: The scaling weights for different intrinsic reward terms in various tasks. $\beta _ { \mathrm { T } }$ is the weight of term $T _ { 1 }$ (see Table 1). $\beta _ { \mathrm { i n t } }$ and $\beta _ { \mathrm { e x t } }$ are scaling factors to combine $r$ and $u _ { i }$ in $\tilde { r }$ . $u _ { - i }$ in r influence is scaled by $\beta _ { \mathrm { r } }$ while $V _ { - i } ^ { i n t }$ and $V _ { - i } ^ { e x t }$ in plusV are respectively scaled by $\beta _ { \mathrm { i n t } } ^ { \mathrm { p l u s V } }$ and $\beta _ { \mathrm { e x t } } ^ { \mathrm { p l u s V } }$
|
| 506 |
+
|
| 507 |
+
<table><tr><td>Task</td><td>n</td><td>β</td><td>βint</td><td>βext</td><td>β</td><td></td><td>pouV</td></tr><tr><td>Pass</td><td>10.</td><td>10</td><td>1.</td><td>0.1</td><td>1.</td><td>0.1</td><td>0.01</td></tr><tr><td>Secret-Room</td><td>10.</td><td>10</td><td>1.</td><td>0.1</td><td></td><td></td><td>一</td></tr><tr><td>Push-Box</td><td>1.</td><td>100.</td><td>100.</td><td>0.1</td><td>0.1</td><td>0.1</td><td>0.01</td></tr><tr><td>Island</td><td>1.</td><td>10</td><td>10.</td><td>0.5</td><td>0.1</td><td>0.1</td><td>0.01</td></tr><tr><td>Large-Island</td><td>1.</td><td>10</td><td>1.</td><td>0.1</td><td>0.1</td><td>0.1</td><td>0.01</td></tr></table>
|
| 508 |
+
|
| 509 |
+
# D IMPLEMENTATION DETAILS
|
| 510 |
+
|
| 511 |
+
D.1 NETWORK ARCHITECTURE, HYPERPARAMETERS, AND INFRASTRUCTURE
|
| 512 |
+
|
| 513 |
+
We base our framework on OpenAI implementation of PPO2 (Dhariwal et al., 2017) and use its default parameters to carry out all the experiments. We train our models on an NVIDIA RTX 2080TI GPU using experience sampled from 32 parallel environments. We use visitation count to calculate the intrinsic reward, for its provable effectiveness (Azar et al., 2017; Jin et al., 2018). For all our methods and baselines, we use $\eta / \sqrt { N ( s ) }$ as the exploration bonus for $N ( s )$ -th visit to state s. Specific values of $\eta$ and scaling weights can be found in Table 2.
|
| 514 |
+
|
| 515 |
+
As for variational inference, the inference network is a 3-layer fully-connected network coupled with a 64-dimensional reparameterization estimator. ReLU is used as the activation function for the first two layers and the sum of negative log-likelihood and negative Evidence Lower Bound is used as loss. We use Adam optimizer (Kingma & Ba, 2014) with learning rate $1 \times 1 0 ^ { - 3 }$ and batchsize 2048. To speed up the learning of variational distributions estimation, we equip the learning with proportional prioritized experience replay (Schaul et al., 2015).
|
| 516 |
+
|
| 517 |
+
# D.2 TASK STRUCTURE
|
| 518 |
+
|
| 519 |
+
In this section, we describe the detailed settings of the experimental tasks.
|
| 520 |
+
|
| 521 |
+
Pass: There are two agents and two switches to open the door in a $3 0 \times 3 0$ grid. Only when at least one of the switches are occupied will the door open. The agents need navigate from left to right and the team reward, which is 1000, is only provided when all agents reach the target zone. Agents can observe the position of another agents.
|
| 522 |
+
|
| 523 |
+
Secret-Room: This is an extension of the Pass task with 4 rooms and 4 switches locating in different rooms. The size of the grid is $2 5 \times 2 5$ . When the left switch is occupied, all the three doors are open. And the three switches in each room on the right only control the door of its room. The agents need to navigate towards the desired room (in light red of Fig. 1 middle) to achieve the extrinsic team reward 1000. Agents can observe the position of the other agents.
|
| 524 |
+
|
| 525 |
+

|
| 526 |
+
Figure 7: Task Push-Box, Island, and Large-Island
|
| 527 |
+
|
| 528 |
+

|
| 529 |
+
Figure 8: Comparison of our methods against baselines on Push-Box (left), Island (right).
|
| 530 |
+
|
| 531 |
+
Push-Box: There are two agents and one box in a $1 5 \times 1 5$ grid. Agents need to push the box to the wall. However, the box is so heavy that only when two agents push it in the same direction at the same time can it be moved a grid. The only team reward, 1000, is given when the box is placed right against the wall. Agents can observe the coordinates of their teammate and the location of the box.
|
| 532 |
+
|
| 533 |
+
Island: A group of two agents are hunting for treasure on an island. However, a random walking beast may attack the agents when they are too close. The agents can also attack the beast within their attack range. This hurt doubles when more than one agent attack at the same time. Each agent has a maximum health of 5 and will lose $1 / n$ health per step when there are $n$ agents within the attack range of the beast. Island is a modified version of the classic coordination scenario Stag-Hunt with local optimal, because finding each treasure (9 in total) will trigger a team reward of 10 but catching the beast gives a higher team reward of 300. Agents can observe the position and health of each other, and the coordinates of the beast. Fig. 9 shows the development of the probability of catching the beast and the averaged number of treasures found in an episode during 9000 PPO updates.
|
| 534 |
+
|
| 535 |
+
Large-Island: Settings are similar to that of Island but with more agents (4), more treasures (16), and a beast with more energy (16) and a higher reward (600) for being caught.
|
| 536 |
+
|
| 537 |
+
The horizon of one episode is set to 300 timesteps in all these tasks.
|
| 538 |
+
|
| 539 |
+
# E COMPARISON WITH SINGLE-AGENT EXPLORATION METHODS
|
| 540 |
+
|
| 541 |
+
In this paper, we study the exploration problem in multi-agent settings from a decentralized perspective. Alternatively, exploration can be carried out in a centralized manner – treating agents as a joint one and using single-agent exploration algorithms. In this section, we compare our methods with centralized exploration strategies using RND (Burda et al., 2018) and EMI (Hyoungseok Kim, 2019), which are among the most cutting-edge exploration algorithms driven by curiosity and based on mutual information, respectively. We use codes published by their authors and carry out a modest grid search over hyperparameters. For RND, we search intrinsic reward coefficient in the range of [0.005, 1.0] and extrinsic reward coefficient in range [0.05, 2.0]. For EMI, we test difference combinations of loss weights. Results averaged over four random seeds with the best found parameters are shown below.
|
| 542 |
+
|
| 543 |
+

|
| 544 |
+
Figure 9: Comparison of our methods against baselines and ablations on Island in terms of the probability of catching the beast and the averaged treasures collected in an episode.
|
| 545 |
+
|
| 546 |
+

|
| 547 |
+
Figure 10: Comparison of our methods against centralized single-agent exploration algorithms on Pass (left), Secret-Room (middle), and Push-Box (right).
|
| 548 |
+
|
| 549 |
+
Performance comparisons on problems of Pass, Secret-Room, and Push-Box are illustrated in Fig. 10. We can observe that our methods significantly outperform centralized exploration strategies using RND or EMI. To better understand this observation, we plot visitation heatmaps over time for RND and EMI, respectively, in Fig. 11 and 12.
|
| 550 |
+
|
| 551 |
+
Fig. 11 shows visitation heatmaps of RND on the Pass problem. From Fig. 11 (b), we can see that RND seems finding good policies for agents to pass the door in the first 4671 updates. However, agents’ policies seem to collapse quickly after that and their visits scatter around rooms again, which explains its learning curve in Fig. 10. From the evolution of its visitation heatmaps, we hypothesize that after visiting the center of the room for many times, agents’ curiosity models overfit on a particular set of states and they start to be curious about the relatively unfamiliar transition dynamics around the wall. As the result, the RND intrinsic reward drags the agents to the walls, as shown in Fig. 11(c) and (d), and their performance quickly drops within several updates (i.e., update 4671- 4677 shown by Fig. 11(b-d)). After a while, agents then leave from the walls and visit around in the room again, as shown in Fig. 11(e). The whole exploration process repeated. Similar behaviors are also observed on the Secret-Room problem.
|
| 552 |
+
|
| 553 |
+

|
| 554 |
+
Figure 11: Visitation heatmap of RND agents on Pass of most recent $1 k$ episodes. The brighter the yellow color, the higher the visitation frequency. Top: agent 1, bottom: agent 2.
|
| 555 |
+
|
| 556 |
+

|
| 557 |
+
Figure 12: Visitation heatmap in most recent $1 k$ episodes of EMI agents on Pass. The brighter the yellow color, the higher the visitation frequency. Top: agent 1, bottom: agent 2.
|
| 558 |
+
|
| 559 |
+
We also analyze the exploration behaviors of EMI agents on Pass, as illustrated by visitation heatmaps in Fig. 12. EMI tends to explore the state-action pairs where the transition dynamics is relatively complex, such as the edges and corners of the room (Fig. 12(a-c)). For problems where these state-action pairs do not lead to goals, EMI is not very effective. As the (centralized) transition dynamics of the Pass problem is relatively simple, EMI intrinsic reward quickly diminishes, which results in the behaviors of agents keeping unchanged after 500 updates (Fig. 12(d-e)).
|
| 560 |
+
|
| 561 |
+
In summary, centralized single-agent exploration methods encode some heuristics to facilitate exploration, but they typically do not place a great emphasis on interactions among agents and are thus not very efficient for multi-agent exploration with sparse interactions.
|
md/train/BJl6TjRcY7/BJl6TjRcY7.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# NEURAL PROBABILISTIC MOTOR PRIMITIVES FOR HUMANOID CONTROL
|
| 2 |
+
|
| 3 |
+
Josh Merel∗, Leonard Hasenclever∗, Alexandre Galashov,
|
| 4 |
+
Arun Ahuja, Vu Pham, Greg Wayne, Yee Whye Teh, & Nicolas Heess
|
| 5 |
+
DeepMind
|
| 6 |
+
London, UK
|
| 7 |
+
{jsmerel,leonardh,agalashov,arahuja,vuph, gregwayne,ywteh,heess}@google.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
We focus on the problem of learning a single motor module that can flexibly express a range of behaviors for the control of high-dimensional physically simulated humanoids. To do this, we propose a motor architecture that has the general structure of an inverse model with a latent-variable bottleneck. We show that it is possible to train this model entirely offline to compress thousands of expert policies and learn a motor primitive embedding space. The trained neural probabilistic motor primitive system can perform one-shot imitation of whole-body humanoid behaviors, robustly mimicking unseen trajectories. Additionally, we demonstrate that it is also straightforward to train controllers to reuse the learned motor primitive space to solve tasks, and the resulting movements are relatively naturalistic. To support the training of our model, we compare two approaches for offline policy cloning, including an experience efficient method which we call linear feedback policy cloning. We encourage readers to view a supplementary video summarizing our results.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
A broad challenge in machine learning for control and robotics is to produce policies capable of general, flexible, and adaptive behavior of complex, physical bodies. To build policies that can effectively control simulated humanoid bodies, researchers must simultaneously overcome foundational challenges related to high-dimensional control, body balance, and locomotion. Recent progress in deep reinforcement learning has raised hopes that such behaviors can be learned end-to-end with minimal manual intervention. Yet, even though significant progress has been made thanks to better algorithms, training regimes, and computational infrastructure, the resulting behaviors still tend to exhibit significant idiosyncrasies (e.g. Heess et al., 2017; Bansal et al., 2018).
|
| 16 |
+
|
| 17 |
+
One advantage of working with humanoids in this context is that motion capture data is widely available and can serve to help design controllers that produce apparently humanlike movement. Indeed, recent developments are now allowing for the production of highly specialized expert policies which robustly, albeit narrowly, reproduce single motion capture clips (e.g. Liu et al. (2010); Peng et al. (2018)).
|
| 18 |
+
|
| 19 |
+
A remaining challenge on the way to truly flexible and general purpose control is to be able to sequence and generalize individual movements or “skills” in a task-directed manner. Achieving this goal requires not just the ability to acquire individual skills in the first place, but also an architecture and associated training procedure that supports representation, recruitment, and composition of a large number of skills.
|
| 20 |
+
|
| 21 |
+
This paper presents a step in this direction. Specifically, the setting we focus on will be one in which we have a large number of robust experts that perform single skills well and we wish to transfer these skills into a shared policy that can do what each expert does as well as the expert, while also generalizing to unseen behaviors within the distribution of skills. To this end we design a system that performs one-shot imitation as well as permits straightforward reuse (or transfer) of skills. We require our approach to scale to a very large number of individual skills while also keeping manual intervention and oversight to a minimum.
|
| 22 |
+
|
| 23 |
+
Our primary contribution is the development of a neural network architecture that can represent and generate many motor behaviors, which we refer to as neural probabilistic motor primitives. This architecture is designed to perform one-shot imitation, while learning a dense embedding space of a large number of individual motor skills. Once trained, this module does not just reproduce individual behaviors in the training data, but can sequence and compose these behaviors in a controlled fashion as well as synthesize novel movements consistent with the training data distribution. Empirically, we also find that training controllers to reuse this learned motor primitive module for new tasks generates surprisingly human-like movement and the behavior generated seems to interpolate the space of behaviors well.
|
| 24 |
+
|
| 25 |
+
In order to facilitate transfer and compression of expert skills at the scale of thousands of behaviors, we wish to avoid closed-loop RL training. We call the general, offline, functional transfer of policy content policy transfer or policy cloning and consider two approaches. The natural baseline approach involves the application of behavioral cloning to data gathered by executing experts many times, with noise, and logging intended expert actions, resembling the approach of Laskey et al. (2017). This works well, as it ensures the student behaves like the expert not only along nominal expert rollouts but also at points arrived at by perturbing the expert. However, this approach may require many rollouts, which can be costly to obtain in many settings. As a more efficient alternative we therefore consider a second solution that operates by comprehensively transferring the functional properties of an expert to a student policy by matching the local noise-feedback properties along one or a small number of representative expert reference trajectories. We call this specific proposal linear feedback policy cloning (LFPC), and we demonstrate that it is competitive with behavioral cloning from many more rollouts in our setting.
|
| 26 |
+
|
| 27 |
+
# 1.1 BACKGROUND & RELATED WORK
|
| 28 |
+
|
| 29 |
+
Recent efforts in RL for humanoid control build on a large body of research in robotics and animation. While contemporary results for learning from scratch (Schulman et al., 2015; Heess et al., 2017) can be impressive the behaviors are not consistently human-like. Learning from motion capture (mocap) can provide strong constraints, especially for running (Peng et al., 2017; Merel et al., 2017). Several recent approaches have demonstrated that it is possible to acquire specific behavioral skills, possibly jointly with external RL objectives (Merel et al., 2017; Peng et al., 2018; Liu & Hodgins, 2018). At present, the policies produced tend to be restricted to single skills/behaviors and can require very large quantities of environment interactions, motivating us to seek methods which reuse existing single-skill expert policies.
|
| 30 |
+
|
| 31 |
+
Knowledge transfer refers to the broad class of approaches which transfer the input-output functional mapping, to some extent or another, from a teacher (or expert) to a student (Hinton et al., 2015; Srinivas & Fleuret, 2018; Furlanello et al., 2018). Distillation connotes the transfer of function from one or more expert systems into a single student system often with the goal of compression or of combining multiple experts qualities (Hinton et al., 2015; Parisotto et al., 2015; Rusu et al., 2015; Teh et al., 2017). Imitation learning is the control-specific term for the production of a student policy from either an expert policy or the behavioral demonstrations of an expert. One basic algorithm is behavioral cloning, which refers to supervised training of the policy from state-action pairs. In the most simple case it only requires examples from the expert. A broader setting is that in which more liberal queries to the expert are permitted; e.g. for the online-imitation setting as in DAGGER (Ross et al., 2011). This setting is often satisfied e.g. if we wish to combine behavior from multiple experts.
|
| 32 |
+
|
| 33 |
+
One-shot imitation is a concept which means that a trained system, at test time, can watch an example behavior and imitate it, as, for instance, in Duan et al. (2017). More similar to our work is the setting examined by Wang et al. (2017), in which full-body humanoid movements were studied. Compared with this latter work, we will employ an architecture here that encourages imitation of motor details, rather than overall movement type, and we scale our approach to more expert demonstrations. The most similar work also demonstrates large-scale one-shot humanoid tracking and was contemporaneously published (Chentanez et al., 2018); the approach they described involves direct tracking as well as failure recovery, but relative to our work the authors do not consider skill reuse.
|
| 34 |
+
|
| 35 |
+
The notion of motor primitives is widespread in neuroscience, where there is evidence that lower dimensional control signals can selectively coordinate and blend behaviors produced by spinal circuits (Bizzi et al., 2008), and that the cortex organizes the space of primitive motor behaviors (Graziano, 2006). In our setting, motor primitives refer to the reusable embedding space learned from many related behaviors and the associated context-modulable policy capable of generating sensory-feedback-stabilized motor behavior when executed in an environment. The particular architecture we consider is inspired by the formalization presented in Todorov & Ghahramani (2003), which places a probabilistic latent bottleneck on the sensory-motor mapping.
|
| 36 |
+
|
| 37 |
+
In the robotics literature, there is a rich line of research into various parameterizations of motion trajectories used for robot control. A class of these are referred to as “movement primitives” (e.g. Schaal et al., 2003), including the “probabilistic movement primitives” of Paraschos et al. (2013) (see also e.g. Neumann et al., 2014). These approaches can be seen as specific implementation choices for a certain notion of motor primitive, which emphasize the parameterization and learning of movement trajectories from repeated demonstrations (Paraschos et al., 2013; Meier & Schaal, 2016), rather than learning the actuation/stabilization element, which is often handled by a prespecified PID controller.
|
| 38 |
+
|
| 39 |
+
It has previously been recognized that linear-feedback policies can work well around optimal trajectories or limit cycles even for high DoF bodies. These can be obtained by sample-based optimization (e.g. Ding et al. (2015)) or by differential dynamic programming (Morimoto & Atkeson, 2003; Tassa et al., 2012; 2014). For linear-quadratic-Gaussian control (Athans, 1971) or differential dynamic programming (Mayne, 1966; Jacobson & Mayne, 1970), we obtain feedback policies where the feedback terms are computed from the value function, amounting effectively to feedbackstabilized plans. Work by Mordatch et al. (2015) has shown that linear-feedback policies resulting from trajectory optimization can be used to train neural networks. We employ a similar idea to transfer optimal behavior from an existing policy, observing that an optimal policy implicitly reflects the structure of the (local) value landscape and appropriately functions as a feedback controller.
|
| 40 |
+
|
| 41 |
+
# 2 TRANSFER AND COMPRESSION OF EXPERT BEHAVIORS
|
| 42 |
+
|
| 43 |
+
In this section, we will first briefly describe the expert policies used in this work (Sec. 2.1). We then describe the Neural Probabilistic Motor Primitive architecture and objective (Sec. 2.2). We then describe two approaches for training the module offline (Sec. 2.3).
|
| 44 |
+
|
| 45 |
+
# 2.1 OBTAINING EXPERTS FROM MOTION CAPTURE DATA
|
| 46 |
+
|
| 47 |
+
In order to study how to transfer and consolidate experts, we must be able to generate adequate quantities of expert data. For this work, we use expert policies trained to reproduce motion capture clips. The approach we use for producing experts is detailed more fully in Merel et al. (2018) and largely follows Peng et al. (2018). It yields time-indexed neural network policies that are robust to moderate amounts of action noise (see appendix A for additional details on the training procedure). Some examples of the resulting single-skill time-indexed policies that are obtained from this procedure are
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 1: Examples of representative experts learned from motion capture. From top to bottom, these are “run and dodge”, “cartwheel”, “backflip”, and “twist”. See accompanying video. Note that these four behaviors will be used as representative examples for validation in single-skill transfer experiments.
|
| 51 |
+
|
| 52 |
+
depicted in Fig. 1. All our experts were trained in MuJoCo environments (Todorov et al., 2012).
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 2: Neural probabilistic motor primitive architecture for one-shot skill deployment. The yellow-highlighted information are available for offline, supervised training. Once the full model has been learned, the decoder can be reused as a policy in other settings.
|
| 56 |
+
|
| 57 |
+
Data We use the CMU Mocap database1, which contains more than 2000 clips of varying lengths from more than 100 subjects. The motions in this dataset are quite varied, including many clips of walking, turning, running, jumping, dancing, various hand movements, and many more idiosyncratic behaviors. From this, we selected various clips of generic whole-body movements – any clips longer than 6 seconds were cut into smaller pieces yielding approximately 3000, roughly 2-6 second snippets. Just over half of these are generic locomotion such as walking, running, jumping and turning. The rest of the clips mostly contained diverse hand movements while standing. We trained one expert policy per selected snippet, yielding 2707 expert policies in our training set.
|
| 58 |
+
|
| 59 |
+
# 2.2 NEURAL PROBABILISTIC MOTOR PRIMITIVES
|
| 60 |
+
|
| 61 |
+
Our goal is to obtain a motor primitive module that can flexibly and robustly deploy, sequence, and interpolate a diverse set of skills from a large database of reference trajectories without any manual alignment or other processing of the raw experts. This requires a representation that does not just reliably encode all behavioral modes but also allows effective indexing of behaviors for recall. To ensure plausible and reliable transitions it is further desirable that the encoding of similar behaviors should be close in some sense in the representation space.
|
| 62 |
+
|
| 63 |
+
Compression of many expert skills via a latent variable inverse model We achieve this goal by training an autoregressive latent variable model of the state-conditional action sequence which, at training time, is conditioned on short look-ahead snippets of the nominal/reference trajectory (see Fig. 2). This architecture has the general structure of an inverse model, which produces actions based on the current state and a target. The architecture and training scheme are designed for the embedding space to reflect short-term motor behavior. As we demonstrate below, this allows for the selective execution of particular behavioral modes and also admits one-shot imitation via the trajectory encoder.
|
| 64 |
+
|
| 65 |
+
We use a model with a latent variable $z _ { t }$ at each time step, modelling the state conditional action distribution. The encoder and decoder are distributions $q ( \boldsymbol { z } _ { t } | \boldsymbol { z } _ { t - 1 } , \boldsymbol { x } _ { t } )$ and $\pi ( a _ { t } | \boldsymbol { z } _ { t } , \boldsymbol { s } _ { t } )$ where $s _ { t }$ is the state as in preceding sections and $x _ { t }$ is concatenation of a small number of future states $x _ { t } = [ s _ { t } , . . . , s _ { t + K } ]$ . The encoder and decoder are MLPs with two and three layers, respectively. For architecture and experimental details see appendix B. The generative part of the model is given by:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
p ( a _ { 1 : T } , z _ { 1 : T } | s _ { 1 : T } ) = \prod _ { t = 1 } ^ { T } p _ { z } ( z _ { t } | z _ { t - 1 } ) \pi ( a _ { t } | z _ { t } , s _ { t } ) .
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
Temporally nearby trajectory snippets should have a similar representation in the latent space. To implement this intuition, we choose an AR(1) process as a weak prior:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
z _ { t } = \alpha z _ { t - 1 } + \sigma \epsilon , \ \epsilon \sim \mathcal { N } ( 0 , I ) ,
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where $\sigma = \sqrt { 1 - \alpha ^ { 2 } }$ , ensuring that marginally $z _ { t } \sim \mathcal { N } ( 0 , I )$ , and set $\alpha = 0 . 9 5$ in experiments unless otherwise stated. In subsequent efforts, it may be interesting to investigate different values of $\alpha$ and learnable priors.
|
| 78 |
+
|
| 79 |
+
In order to train this model, we consider the evidence lower bound (ELBO):
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\mathbb { E } _ { q } \left[ \sum _ { t = 1 } ^ { T } \log \pi ( a _ { t } | s _ { t } , z _ { t } ) + \beta \big ( \log p _ { z } ( z _ { t } | z _ { t - 1 } ) - \log q ( z _ { t } | z _ { t - 1 } , x _ { t } ) \big ) \right] ,
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
with a $\beta$ parameter to tune the weight of the prior. For $\beta = 1$ this objective forms the well-known variational lower bound to $\log p ( a _ { 1 : T } | s _ { 1 : T } )$ . This objective can be optimized using supervised learning (i.e. behavioral cloning from noisy rollouts) offline.
|
| 86 |
+
|
| 87 |
+
Note we chose not to condition the encoder on actions, since we are interested in one-shot imitation in settings where actions are unobserved. We experimented with different values of $K$ and obtained similar performance. All the results reported in this paper use $K = 5$ .2
|
| 88 |
+
|
| 89 |
+
Our architecture effectively implements a conditional information bottleneck between the desired future trajectory $x _ { t }$ and the action $a _ { t }$ given the past latent state $z _ { t - 1 }$ (similar to Alemi et al. (2017)). As discussed above the auto-correlated prior encourages an encoding in which temporally nearby latent states from the same trajectory tend to be close in the latent space, and the information bottleneck more generally encourages a limited dependence on $x _ { t }$ with $z _ { t }$ forming a compressed representation of the future trajectory as required for the action choice.
|
| 90 |
+
|
| 91 |
+
# 2.3 TRAINING A STUDENT POLICY FROM A SET OF EXAMPLES
|
| 92 |
+
|
| 93 |
+
When transferring knowledge from an expert policy to a student we would like the student to replicate the expert’s behavior in the full set of states plausibly visited by the expert. In our case, experts trained to reproduce single clips can be conceptualized as nonlinear feedback controllers around a nominal trajectory, and the manifold of states visited by experts can be thought of as a tube around that reference. We require the student to be able to operate successfully in and remain close to this tube even in the face of small perturbations.
|
| 94 |
+
|
| 95 |
+
Formally, to ensure that the student retains expert robustness, we would like expert actions $\mu _ { E } ( s )$ and student actions $\mu _ { \boldsymbol { \theta } } ( s )$ to be close under a plausible (noisy) expert state distribution $\rho _ { E }$ . A surrogate loss used in imitation learning as well as knowledge transfer is the quadratic loss between actions (Ross et al., 2011) (or activations Srinivas & Fleuret (2018)).
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\operatorname* { m i n } _ { \theta } \mathbb { E } _ { s \sim \rho _ { E } } [ ( \mu _ { E } ( s ) - \mu _ { \theta } ( s ) ) ^ { 2 } ]
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Behavioral cloning can refer to optimization of this objective, where $\rho _ { E }$ is replaced with an empirical distribution of a set of state-action pairs $s$ . This works well if $s$ adequately covers the state distribution later experienced by the student. Anticipating and generating an appropriate set of states on which to train the student typically requires many rollouts and can thus be expensive.
|
| 102 |
+
|
| 103 |
+
Since we are aiming to compress the behavior of thousands of experts we desire a computationally efficient method. We investigate two schemes that allow us to record the experts’ state-action mappings on a small-sample estimate of the experts’ state distributions and to then train the student via supervised learning. Both schemes are convenient to implement in a regular supervised learning pipeline and require neither querying many experts simultaneously (which limits scalability when dealing with thousands of experts) nor execution of the student at training time.
|
| 104 |
+
|
| 105 |
+
Behavioral cloning from noisy rollouts The first approach amounts to simply gathering a number of noisy trajectories from the expert (either under a stochastic policy or with noise injection) while logging the optimal/mean action of the expert instead of the noisy action actually executed. A version of this is equivalent to the DART algorithm of Laskey et al. (2017). We then perform behavioral cloning from that data.
|
| 106 |
+
|
| 107 |
+
Specifically, given an expert policy $\pi _ { E }$ , let $\mu _ { E } ( s )$ be the mean action of the expert in state $s$ . To obtain noisy rollouts, we run $\pi _ { E } ^ { \eta }$ , the expert with moderate action noise $( \eta )$ to obtain a set of data $\{ s _ { k } ^ { \eta } , \mu _ { k } \} _ { 1 \ldots K }$ , where $\mu _ { k } = \overset { } { \mu _ { E } ( s _ { k } ^ { \eta } ) }$ . And we optimize the policy according to Eqn. 4, with the expectation over $s \sim \rho _ { E }$ being approximated by a sum over the set of state and expert-actions collected. While we expect this approach can work well, we do not expect it to be particularly efficient insofar as the expert may need to be executed for many rollouts.
|
| 108 |
+
|
| 109 |
+
Linear-feedback policy cloning (LFPC) The second approach, which we refer to as linearfeedback policy cloning (LFPC), logs the action-state Jacobian as well as the expert action along a single nominal trajectory. The Jacobian can be used to construct a linear feedback controller which gives target actions in nearby perturbed states during training (described below). This approach is not intended to outperform behavioral cloning, as this should not be possible for arbitrary quantities of expert rollout data. Instead the motivation for LFPC is to do as well as behavioral cloning while using considerably fewer expert rollouts.
|
| 110 |
+
|
| 111 |
+
As pointed out above, experts trained to reproduce single clips robustly can be thought of as nonlinear feedback controllers around this nominal trajectory. The nominal trajectory refers to the sequence of nominal state-action pairs $\left\{ s _ { t } ^ { \star } , a _ { t } ^ { \star } \right\} _ { 1 \ldots T }$ obtained by executing $\mu _ { E } ( s )$ recursively from an initial point $s _ { 0 } ^ { \star }$ . Since expert behavior in our setting is well characterized by single nominal trajectories, we expect we can capture the relevant behavior of the expert by a linearization around the nominal trajectory3.
|
| 112 |
+
|
| 113 |
+
Let δs be a small perturbation of the state and let J = dµE(s) |s be the Jacobian. Then
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\mu _ { E } ( s + \delta s ) = \mu _ { E } ( s ) + \pmb { J } \delta s + O \left( \lVert \delta s \rVert ^ { 2 } \right) .
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
This linearization induces a linear-feedback-stabilized policy that at each time-step has a nominal action $a _ { t } ^ { \star }$ , but also expects to be in state $s _ { t } ^ { \star }$ , and correspondingly adjusts the nominal action with a linear correction based on discrepancy between the nominal and actual state at time $t$ :
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mu _ { F B } ( s _ { t } ) = a _ { t } ^ { \star } + { \cal J } _ { t } ^ { \star } ( s _ { t } - s _ { t } ^ { \star } ) , ~ \mathrm { w h e r e } ~ { \cal J } _ { t } ^ { \star } = \left. \frac { d \mu _ { E } ( s ) } { d s } \right| _ { s = s _ { t } ^ { \star } } .
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
We empirically validated that a linear feedback policy about the nominal trajectory of the expert can approximate the expert behavior reasonably well for clips we examine (see results Fig. 3).
|
| 126 |
+
|
| 127 |
+
Above we presented the expert as a feedback controller operating in a tube around some nominal trajectory with states $s _ { 1 } ^ { \star } , \ldots , s _ { T } ^ { \star }$ , actions $a _ { 1 } ^ { \star } , \ldots , a _ { T } ^ { \star }$ , and Jacobians $J _ { 1 } ^ { \star } , \ldots , J _ { T } ^ { \star }$ . We approximate $\rho _ { E }$ with the distribution of states introduced by state perturbations around this nominal trajectory:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\operatorname* { m i n } _ { \theta } \frac { 1 } { T } \sum _ { i } \mathbb { E } _ { \delta s _ { i } \sim \Delta ( s ) } [ \| \mu _ { E } ( s _ { i } + \delta s _ { i } ) - \mu _ { \theta } ( s _ { i } + \delta s _ { i } ) \| ^ { 2 } ] .
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
However, this objective still requires expert evaluations at the perturbed states. Using the linearization described above we can replace the expert action $\mu _ { E } ( s + \delta s )$ with the Jacobian-based linearfeedback policy $\mu _ { F B } ( s + \delta s )$ , which is available offline. This yields the LFPC objective:
|
| 134 |
+
|
| 135 |
+
$$
|
| 136 |
+
\operatorname* { m i n } _ { \theta } \frac { 1 } { T } \sum _ { i } \mathbb { E } _ { \delta s _ { i } \sim \Delta ( s ) } [ | | \mu _ { \theta } ( s _ { i } ^ { \star } + \delta s _ { i } ) - a _ { i } ^ { \star } - J _ { i } ^ { \star } \delta s _ { i } | | _ { 2 } ^ { 2 } ] ,
|
| 137 |
+
$$
|
| 138 |
+
|
| 139 |
+
One potentially important choice is the perturbation distribution $\Delta ( s )$ . Ideally, we would like $\Delta ( s )$ to be the state-dependent distribution induced by physically plausible transitions, but estimating this distribution may require potentially expensive rollouts which we are trying to avoid. A cheaper object to estimate is the stationary transition noise distribution induced by noisy actions, which can be efficiently approximated from a small number of trajectories. Empirically, we found the objective 8 to be relatively robust to some variations in $\Delta$ , and we use a fixed marginal distribution for all clips.
|
| 140 |
+
|
| 141 |
+
Objective 8 bears interesting similarities to approaches such as denoising autoencoders (Vincent et al., 2008), where networks can learn to ignore local noise perturbations on inputs sampled from a high-dimensional noise distribution. Further, Mordatch et al. (2015) successfully distill feedback policies obtained from a planner. One question left open by this latter work is that of how much data might be required. Empirically we show in the experiments below that the augmented objective 8 can produce the desired robustness even from a very limited set of states.
|
| 142 |
+
|
| 143 |
+

|
| 144 |
+
Figure 3: Comparisons of trajectory rollouts for 4 reference behaviors for the nominal trajectory and at varying noise levels. Note that the score is determined by similarity to motion-capture reference and the expert may be slightly suboptimal so slight improvements on the expert may arise by chance.
|
| 145 |
+
|
| 146 |
+
There are multiple, relevant perspectives on LFPC. From one perspective, LFPC amounts to a data augmentation method. From another vantage, the approach attempts to match the mean action as well as the Jacobian at the set of relevant behavioral states, here sampled along the nominal trajectory. In settings where expert behavior is more diverse or multimodal, LFPC should be applied to states which representatively cover relevant behavioral modes or perhaps are expanded backwards from goal states (roughly similar to the procedure used to expand LQR-trees by Tedrake 2009). Explicit Jacobian matching has been proposed elsewhere, for example in Czarnecki et al. (2017). See appendix C for further disambiguation relative to other approaches.
|
| 147 |
+
|
| 148 |
+
To train our Neural Probabilistic Motor Primitive architecture using LFPC we can adapt the objective in Eqn. 3 as follows:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\mathbb { E } _ { \delta s , q } \left[ \sum _ { t = 1 } ^ { T } \log \pi ( a _ { t } + J _ { t } \delta s _ { t } | s _ { t } + \delta s _ { t } , z _ { t } ) + \beta \big ( \log p _ { z } ( z _ { t } | z _ { t - 1 } ) - \log q ( z _ { t } | z _ { t - 1 } , x _ { t } + \delta x _ { t } ) \big ) \right] ,
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
where $\delta { s } _ { t }$ are i.i.d. perturbations drawn from suitable perturbation distribution $\Delta$ and $\delta \boldsymbol { x } _ { t }$ is the concatenation of $[ \delta s _ { t } , \delta s _ { t + 1 } , . . . , \delta s _ { t + K } ]$ .
|
| 155 |
+
|
| 156 |
+
# 3 EXPERIMENTS
|
| 157 |
+
|
| 158 |
+
# 3.1 VALIDATION: TRANSFER OF SINGLE-BEHAVIOR POLICIES
|
| 159 |
+
|
| 160 |
+
To ground our results in a simple setting, we begin with transfer of a single-skill, time-indexed policy from one network to another. We compare the performance of various time-indexed policies for each of the experts depicted in Fig. 1. We compare the original expert policy, an open-loop action sequence along the experts nominal (i.e. mean) trajectory, a linear feedback policy along the expert nominal trajectory, as well as the network trained to match the linear-feedback behavior (LFPC). In addition we compare to policies trained from 100, 200, 500 or 1000 trajectories with behavioral cloning. We compare each approach with no action noise, small action noise, and moderate action noise (noise is i.i.d. normal per actuator with standard deviation magnitude .05 and .1 respectively, for action ranges normalized to $[ - 1 , 1 ] ,$ ). Note that, open loop control almost always fails if the state is perturbed by even a small $\epsilon$ (though perhaps surprisingly, the backflip can almost be executed open loop due to limited ground contact). Remarkably, LFPC with a single trajectory performs on par with behavioral cloning based on hundreds of trajectories (see Fig. 3). For additional validation, see appendix D.
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
Figure 4: Performance relative to expert policies for trained neural probabilistic motor primitive models. Performance of model variations are compared on training and testing data. We compare models trained using cloning with 100 trajectories per expert for different levels of regularization, using a smaller latent space of dimension 20 rather than 60 in all other experiments, as well as LFPC.
|
| 164 |
+
|
| 165 |
+
# .2 CORE RESULTS: COMPRESSING THOUSANDS OF EXPERTS
|
| 166 |
+
|
| 167 |
+
Having validated that single skills can be transferred, we next consider how well we can compress behaviors of the 2707 experts in our training set into the neural probabilistic motor primitive architecture. Assessing the models using the action-reconstruction loss is not very intuitive since it does not capture model behavior in the environment. Instead we report a more relevant measure based on expert imitation. Here we encode an expert trajectory into a sequence of latent variables and then execute the policy in the environment conditioned on this sequence. Note that this approach is openloop with respect to the latents while being closed-loop with respect to state. We can then compare the performance of the trained system against experts on training and held-out clips according to the tracking reward used to train the experts originally. To account for different expert reward scales we report performance relative to the expert policy. Importantly, that this approach works is itself a partial validation of the premise of this work, insofar as open-loop execution of action sequences usually trivially fails with minor perturbations. The trained neural probabilistic motor primitive system can execute behaviors conditioned on an open-loop noisy latent variable trajectory, implying that the decoder has learned to stabilize the body during latent-conditioned behavior.
|
| 168 |
+
|
| 169 |
+
There are a few key takeaways from the comparisons we have run (see Fig. 4). Most saliently cloning based on 100 trajectories from each expert with a medium regularization value $( \beta = 0 . 1 )$ works best. LFPC with comparable parameters works less well here, but has qualitatively fairly similar performance. Our ablations show that regularization and a large latent space are important for good results. We also set the autoregressive parameter $\alpha = 0$ (.95 in other runs), making the latent variables i.i.d.. This hurts performance, validating our choice of prior.4
|
| 170 |
+
|
| 171 |
+
# 3.3 ANALYSIS OF THE TRAINED MODEL
|
| 172 |
+
|
| 173 |
+
We have no expectation that trajectories well outside the training distribution are likely to be either representable by the encoder or executable by the decoder. Nevertheless, when one-shot imitation of a trajectory fails, a natural question is whether the decoder is incapable of expressing the desired actions, or the encoder fails to encode the trajectory in such a way that the decoder will produce it.
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 5: These panels consist of visualizations of the PCA latent space with comparisons in this space between one-shot latent-variable sequences and optimized latent variable sequences for various behaviors: A. Run B. Backwards walking C. Jumping. Running executes well based on the one-shot trajectory so serves as a reference for which optimization is not noticeably different. Walking backwards and jumping one-shot imitations fail, but are noticeably improved by optimization.
|
| 177 |
+
|
| 178 |
+
We propose an analysis to distinguish this for borderline cases. For held out trajectories that yield unsatisfying performance on one-shot imitation, we can simply optimize directly:
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\operatorname* { m i n } _ { z _ { 1 } . . . z _ { T } } \sum _ { t = 1 } ^ { T } | | \mu _ { \boldsymbol { \theta } } ( s _ { t } , z _ { t } ) - a _ { t } ^ { \star } | | _ { 2 } ^ { 2 } ,
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
where $\mu _ { \theta }$ is the decoder mean. Empirically we see that this optimization meaningfully improves the executed behavior, and we visualize the shift in a three-dimensional space given by the first three principal components in Fig. 5.
|
| 185 |
+
|
| 186 |
+
We exhibit three examples where we visualize the original latent trajectory as well as the optimized latent trajectory. Performance is significantly improved (see supplementary video), showing the latent space can represent behaviors for which one-shot imitation fails. However execution remains imperfect suggesting that while much of the fault may lie with the encoder, the decoder still may be slightly undertrained on these relatively rare behavior categories. Quantitatively, among a larger set of clips with less than $50 \%$ relative expert performance for one-shot imitation we found that optimization as described above improved median relative expert performance from $43 \%$ to $78 \%$ .
|
| 187 |
+
|
| 188 |
+
Other exploratory probes of the module suggest that it is possible in certain cases to obtain seamless transitioning between behaviors by concatenating latent-variable trajectories and running the policy conditioned on this sequence (e.g. in order to perform a sequence of turns). See additional supplementary video.
|
| 189 |
+
|
| 190 |
+
Reuse of motor primitive module Finally, we experimented with reuse of the decoder as a motor primitive module. We treat the latent space as a new custom action space and train a new high-level (HL) policy to operate in this space. At each time-step the high-level policy outputs a latent-variable
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
|
| 194 |
+
(a) Median return value across 10 seeds for the goto-target task vs learner steps. Compared to a very weakly regularized module $( \beta ~ = ~ 0 . 0 0 1 )$ ), more regularized motor primitives modules both trained faster and achieved higher final performance.
|
| 195 |
+
|
| 196 |
+

|
| 197 |
+
|
| 198 |
+
(b) Our model is able to track the target speed accurately. Shown here are target speed and actual speed in the egocentric forward direction for three episodes. The reward function is a Gaussian centered at the target speed. The shaded region corresponds to $\pm$ one standard deviation.
|
| 199 |
+
|
| 200 |
+
Figure 6: Reuse of neural probabilistic motor primitive modules.
|
| 201 |
+
|
| 202 |
+
$z _ { t }$ . The actual action is then given by the motor primitive module $p ( a _ { t } | s _ { t } , z _ { t } )$ . For training we used SVG(0) (Heess et al., 2015) with the Retrace off-policy correction for learning the Q-function (Munos et al., 2016).
|
| 203 |
+
|
| 204 |
+
A natural locomotion task that can challenge the motor module is a task which requires abrupt, frequently redirected movement with sharp turns and changes of speed. To implement this we provide the higher-level controller with a target that is constant until the humanoid is near it for a few timesteps at which point it randomly moves to another nearby location. While no single task will comprehensively probe the module, performing well in this task demands a wide range of quick locomotion behavior. With only a sparse task reward, the HL-controller can learn to control the body through the learned primitive space, and it produces rather humanlike task-directed movement. We observed that more regularized motor primitive modules had more stable initial behavior when connected to the untrained high-level controller (i.e. were less likely to fall at the beginning of training). Compared to a very weakly regularized module $( \beta = 0 . 0 0 1 )$ , more regularized motor primitives modules both trained faster and achieved higher final performance (see Fig. 6a). We also investigated a go-to-target task with bumpy terrain that is unobserved by the agent. The fact that our model can learn to solve this task demonstrates its robustness to unseen perturbations for which the motor primitive module was not explicitly trained. In another experiment we investigated a task in which the agent has to move at a random, changing target speed. This requires transitions between qualitatively different locomotion behavior such as walking, jogging, and running (see Fig. 6b). See an extended video of these experiments. In a final reuse experiment, we consider an obstacle course requiring the agent to jump across gaps (as in Merel et al. (2018)). We were able to solve this challenging task with a high-level controller that operated using egocentric visual inputs (see the main supplementary video).
|
| 205 |
+
|
| 206 |
+
We emphasize a few points about these results to impact their importance: (1) Using a pretrained neural probabilistic motor primitives module, new controllers can be trained effectively from scratch on sparse reward tasks, (2) the resulting movements are visually rather humanlike without additional constraints implying that the learned embedding space is well structured, and (3) the module enables fairly comprehensive and smooth coverage for the purposes of physics-based control.
|
| 207 |
+
|
| 208 |
+
# 4 DISCUSSION
|
| 209 |
+
|
| 210 |
+
In this paper we have described approaches for transfer and compression of control policies. We have exhibited a motor primitive module that learns to represent and execute motor behaviors for control of a simulated humanoid body. Using either a variant of behavioral cloning or linear feedback policy cloning we can train the neural probabilistic motor primitive sytem to perform robust one-shotimitation, and with the latter we can use relatively restricted data consisting of only single rollouts from each expert. While LFPC did not work quite as well in the full-scale model as cloning from noisy rollouts, we consider it remarkable that it is possible in our setting to transfer expert behavior using a single rollout. We believe LFPC holds promise insofar as it may be useful in settings where rollouts are costly to obtain (e.g. adapted to real-world robotic applications), and there is room for further improvement as we did not carefully tune certain parameters, most saliently the marginal noise distribution $\Delta$ .
|
| 211 |
+
|
| 212 |
+
The resulting neural probabilistic motor primitive module is interpretable and reusable. We are optimistic that this kind of architecture could serve as a basis for further continual learning of motor skills. This work has been restricted to motor behaviors which do not involve interactions with objects and where a full set a of behaviors are available in advance. Meaningful extensions of this work may attempt to greatly enrich the space of behaviors or demonstrate how to perform continual learning and reuse of new skills.
|
| 213 |
+
|
| 214 |
+
# ACKNOWLEDGMENTS
|
| 215 |
+
|
| 216 |
+
The data used in this project was obtained from mocap.cs.cmu.edu. The database was created with funding from NSF EIA-0196217.
|
| 217 |
+
|
| 218 |
+
# REFERENCES
|
| 219 |
+
|
| 220 |
+
Alexander A Alemi, Ian Fischer, Joshua V Dillon, and Kevin Murphy. Deep variational information bottleneck. International Conference on Learning Representations, 2017.
|
| 221 |
+
|
| 222 |
+
Michael Athans. The role and use of the stochastic linear-quadratic-gaussian problem in control system design. IEEE transactions on automatic control, 16(6):529–552, 1971.
|
| 223 |
+
|
| 224 |
+
Trapit Bansal, Jakub Pachocki, Szymon Sidor, Ilya Sutskever, and Igor Mordatch. Emergent complexity via multi-agent competition. International Conference on Learning Representations, 2018.
|
| 225 |
+
|
| 226 |
+
E Bizzi, VCK Cheung, A d’Avella, P Saltiel, and Matthew Tresch. Combining modules for movement. Brain research reviews, 57(1):125–133, 2008.
|
| 227 |
+
|
| 228 |
+
Nuttapong Chentanez, Matthias Muller, Miles Macklin, Viktor Makoviychuk, and Stefan Jeschke. ¨ Physics-based motion capture imitation with deep reinforcement learning. In Proceedings of the 11th Annual International Conference on Motion, Interaction, and Games, pp. 1. ACM, 2018.
|
| 229 |
+
|
| 230 |
+
Wojciech M Czarnecki, Simon Osindero, Max Jaderberg, Grzegorz Swirszcz, and Razvan Pascanu. Sobolev training for neural networks. In Advances in Neural Information Processing Systems, pp. 4281–4290, 2017.
|
| 231 |
+
|
| 232 |
+
Kai Ding, Libin Liu, Michiel Van de Panne, and KangKang Yin. Learning reduced-order feedback policies for motion skills. In Proceedings of the 14th ACM SIGGRAPH/Eurographics Symposium on Computer Animation, pp. 83–92. ACM, 2015.
|
| 233 |
+
|
| 234 |
+
Yan Duan, Marcin Andrychowicz, Bradly Stadie, OpenAI Jonathan Ho, Jonas Schneider, Ilya Sutskever, Pieter Abbeel, and Wojciech Zaremba. One-shot imitation learning. In Advances in neural information processing systems, pp. 1087–1098, 2017.
|
| 235 |
+
|
| 236 |
+
Tommaso Furlanello, Zachary C Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. arXiv preprint arXiv:1805.04770, 2018.
|
| 237 |
+
|
| 238 |
+
Michael Graziano. The organization of behavioral repertoire in motor cortex. Annu. Rev. Neurosci., 29:105–134, 2006.
|
| 239 |
+
|
| 240 |
+
Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. In Advances in Neural Information Processing Systems, pp. 2944–2952, 2015.
|
| 241 |
+
|
| 242 |
+
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.
|
| 243 |
+
|
| 244 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 245 |
+
|
| 246 |
+
David H. Jacobson and David Q. Mayne. Differential Dynamic Programming. Elsevier, 1970.
|
| 247 |
+
|
| 248 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015.
|
| 249 |
+
|
| 250 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. International Conference on Learning Representations, 2013.
|
| 251 |
+
|
| 252 |
+
Michael Laskey, Jonathan Lee, Roy Fox, Anca Dragan, and Ken Goldberg. Dart: Noise injection for robust imitation learning. In Conference on Robot Learning, pp. 143–156, 2017.
|
| 253 |
+
|
| 254 |
+
Libin Liu and Jessica Hodgins. Learning basketball dribbling skills using trajectory optimization and deep reinforcement learning. ACM Transactions on Graphics (TOG), 37(4):142, 2018.
|
| 255 |
+
|
| 256 |
+
Libin Liu, KangKang Yin, Michiel van de Panne, Tianjia Shao, and Weiwei Xu. Sampling-based contact-rich motion control. In ACM Transactions on Graphics (TOG), volume 29, pp. 128. ACM, 2010.
|
| 257 |
+
|
| 258 |
+
David Mayne. A second-order gradient method for determining optimal trajectories of non-linear discrete-time systems. International Journal of Control, 3(1):85–95, 1966.
|
| 259 |
+
|
| 260 |
+
Franziska Meier and Stefan Schaal. A probabilistic representation for dynamic movement primitives. arXiv preprint arXiv:1612.05932, 2016.
|
| 261 |
+
|
| 262 |
+
Josh Merel, Yuval Tassa, 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.
|
| 263 |
+
|
| 264 |
+
Josh Merel, Arun Ahuja, Vu Pham, Saran Tunyasuvunakool, Siqi Liu, Dhruva Tirumala, Nicolas Heess, and Greg Wayne. Hierarchical visuomotor control of humanoids. arXiv preprint arXiv:1811.09656, 2018.
|
| 265 |
+
|
| 266 |
+
Igor Mordatch, Kendall Lowrey, Galen Andrew, Zoran Popovic, and Emanuel V Todorov. Interactive control of diverse complex characters with neural networks. In Advances in Neural Information Processing Systems, pp. 3132–3140, 2015.
|
| 267 |
+
|
| 268 |
+
Jun Morimoto and Christopher G Atkeson. Minimax differential dynamic programming: An application to robust biped walking. In Advances in neural information processing systems, pp. 1563–1570, 2003.
|
| 269 |
+
|
| 270 |
+
Remi Munos, Tom Stepleton, Anna Harutyunyan, and Marc Bellemare. Safe and efficient off-policy ´ reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1054–1062, 2016.
|
| 271 |
+
|
| 272 |
+
Gerhard Neumann, Christian Daniel, Alexandros Paraschos, Andras Kupcsik, and Jan Peters. Learning modular policies for robotics. Frontiers in computational neuroscience, 8:62, 2014.
|
| 273 |
+
|
| 274 |
+
Alexandros Paraschos, Christian Daniel, Jan R Peters, and Gerhard Neumann. Probabilistic movement primitives. In Advances in neural information processing systems, pp. 2616–2624, 2013.
|
| 275 |
+
|
| 276 |
+
Emilio Parisotto, Jimmy Lei Ba, and Ruslan Salakhutdinov. Actor-mimic: Deep multitask and transfer reinforcement learning. arXiv preprint arXiv:1511.06342, 2015.
|
| 277 |
+
|
| 278 |
+
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 (TOG), 36(4):41, 2017.
|
| 279 |
+
|
| 280 |
+
Xue Bin Peng, Pieter Abbeel, Sergey Levine, and Michiel van de Panne. Deepmimic: Example-guided deep reinforcement learning of physics-based character skills. arXiv preprint arXiv:1804.02717, 2018.
|
| 281 |
+
|
| 282 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML’14, pp. II–1278– II–1286. JMLR.org, 2014. URL http://dl.acm.org/citation.cfm?id $=$ 3044805. 3045035.
|
| 283 |
+
|
| 284 |
+
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.
|
| 285 |
+
|
| 286 |
+
Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. arXiv preprint arXiv:1511.06295, 2015.
|
| 287 |
+
|
| 288 |
+
Stefan Schaal, Jan Peters, Jun Nakanishi, and Auke Ijspeert. Learning movement primitives. In International Symposium on Robotics Research, (ISRR), 2003.
|
| 289 |
+
|
| 290 |
+
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.
|
| 291 |
+
|
| 292 |
+
Suraj Srinivas and Franc¸ois Fleuret. Knowledge transfer with jacobian matching. CoRR, abs/1803.00443, 2018. URL http://arxiv.org/abs/1803.00443.
|
| 293 |
+
|
| 294 |
+
Yuval Tassa, Tom Erez, and Emanuel Todorov. Synthesis and stabilization of complex behaviors through online trajectory optimization. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 4906–4913. IEEE, 2012.
|
| 295 |
+
|
| 296 |
+
Yuval Tassa, Nicolas Mansard, and Emo Todorov. Control-limited differential dynamic programming. In Robotics and Automation (ICRA), 2014 IEEE International Conference on, pp. 1168– 1175. IEEE, 2014.
|
| 297 |
+
|
| 298 |
+
Russ Tedrake. LQR-trees: Feedback motion planning on sparse randomized trees. 2009.
|
| 299 |
+
|
| 300 |
+
Yee Whye 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. 4499–4509, 2017.
|
| 301 |
+
|
| 302 |
+
Emanuel Todorov and Zoubin Ghahramani. Unsupervised learning of sensory-motor primitives. In Engineering in Medicine and Biology Society, 2003. Proceedings of the 25th Annual International Conference of the IEEE, volume 2, pp. 1750–1753. IEEE, 2003.
|
| 303 |
+
|
| 304 |
+
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.
|
| 305 |
+
|
| 306 |
+
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.
|
| 307 |
+
|
| 308 |
+
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.
|
| 309 |
+
|
| 310 |
+
# APPENDICES
|
| 311 |
+
|
| 312 |
+
# A MOTION CAPTURE EXPERTS
|
| 313 |
+
|
| 314 |
+
The approach we use for producing experts is detailed more fully in Merel et al. (2018). In short, this approach for producing experts largely follows Peng et al. (2018). We took the energy function proposed in SAMCON (Liu et al., 2010), and use it as a per timestep reward to train a time-indexed policy that tracks/imitates a motion capture reference clip (Peng et al., 2018). As proposed in Merel et al. (2017); Peng et al. (2018), episodes are initialized to poses throughout the motion capture reference and episodes are early-terminated when the character falls. Here we use an off-policy RL algorithm, SVG(0) (Heess et al., 2015) with Retrace (Munos et al., 2016). As done in Merel et al. (2017); Peng et al. (2018) and elsewhere, we train stochastic policies and use the mean (i.e. noiseless) action as the expert policy.
|
| 315 |
+
|
| 316 |
+
# B ARCHITECTURE AND TRAINING DETAILS
|
| 317 |
+
|
| 318 |
+
The decoder $p ( a _ { t } | s _ { t } , z _ { t } )$ in our experiments was a MLP with three layers with 1024 hidden units taking as input the concatenation of state $s _ { t }$ and latent variable $z _ { t }$ . The decoder output distribution is a multivariate Gaussian with fixed standard deviation of 0.1 (action values are normalized to $[ - 1 , 1 ] ,$ ). We found that fixing the standard deviation made it significantly easier to prevent overfitting. Note that in this setting varying the $\beta$ parameter is equivalent to varying the fixed output variance (up to a constant). The encoder $q ( z _ { t } | \boldsymbol { z } _ { t - 1 } , \boldsymbol { x } _ { t } )$ in our experiments was also an MLP with two layers of 1024 hidden units each. The inputs were simply concatenated at the input. The encoder output distribution was a multivariate Gaussian with learnt variance. In most of our experiments, we used a 60-dimensional latent space.
|
| 319 |
+
|
| 320 |
+
We used the reparametrization trick (Kingma & Welling, 2013; Rezende et al., 2014) to train the model and used stochastic gradient descent with ADAM (Kingma & Ba, 2015) with a learning rate of 0.0001. In the case of models trained on 100 trajectories per expert we used minibatches of 512 subsequences of length 30.
|
| 321 |
+
|
| 322 |
+
For LFPC we sampled 32 subsequences of length 30 and produced 5 perturbed state sequences per subsequence. In preliminary experiments the length of the subsequences did not have a major impact on model performance.
|
| 323 |
+
|
| 324 |
+
# C RELATIONSHIP TO OTHER KNOWLEDGE TRANSFER IDEAS
|
| 325 |
+
|
| 326 |
+
Firstly, we note that the emphasis of the proposal in this work is to match the responsivity of the expert policy in a neighborhood around each state. This is distinct from activation matching or KL matching where the emphasis is on matching the action/activation distribution for a particular state (Rusu et al., 2015; Teh et al., 2017). Secondly, we emphasize that the kind of robust knowledge transfer we discuss here is distinct from that which is seen to be important in other settings. For example Srinivas & Fleuret (2018) provide a line of reasoning that involves training a student system to match the exact activations of a teacher in the presence of perturbations on the student inputs. This logic is sound in the setting of large-scale vision systems. However in the context of control policies, this would look like:
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\operatorname* { m i n } _ { \theta } \sum _ { s \in S ^ { \star } } \mathbb { E } _ { \delta s \sim \Delta ( s ) } [ ( \mu _ { E } ( s ) - \mu _ { \theta } ( s + \delta s ) ) ^ { 2 } ]
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
This essentially means that the student policy is learning to “blindly” reproduce the action of the expert exactly, despite input perturbations. While this is well motivated if the noise is thought to be orthogonal to the proper functioning of the system, this is a very bad idea for control, where you need to pay close attention to small input perturbations. Technically, this amounts to setting the local feedback to zero, and behaving in a sort of open-loop-like fashion.
|
| 333 |
+
|
| 334 |
+
# D VISUALIZATION OF STATIONARY POLICY BEHAVIOR
|
| 335 |
+
|
| 336 |
+
Locomotion behavior is, at least in the simplest case roughly a limit cycle. In an additional experiment to test LFPC we gathered three gait cycles of running behavior and performed LFPC. Note that here the student policy need not be time-indexed even when the demonstrations were time-indexed. This restricted case shows striking generalization in the presence of noise (see Fig. A.1 and also see main supplementary video).
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Figure A.1: Dimensionality reduction (PCA) performed on set of poses obtained from noisy rollouts of the stationary cloned policy (blue). The limited reference data originating from a time-indexed policy has been projected into the same space (green). Observe that the rollouts are considerably noisier and consistently deviate from the reference trajectory, nevertheless the cloned-policy trajectories return to the limit cycle.
|
md/train/BJlrF24twB/BJlrF24twB.md
ADDED
|
@@ -0,0 +1,623 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BACKPACK: PACKING MORE INTO BACKPROP
|
| 2 |
+
|
| 3 |
+
Felix Dangel∗ University of Tuebingen fdangel@tue.mpg.de
|
| 4 |
+
|
| 5 |
+
Frederik Kunstner∗ University of Tuebingen kunstner@cs.ubc.ca
|
| 6 |
+
|
| 7 |
+
# Philipp Hennig
|
| 8 |
+
|
| 9 |
+
University of Tuebingen and MPI for Intelligent Systems, Tuebingen ph@tue.mpg.de
|
| 10 |
+
|
| 11 |
+
# ABSTRACT
|
| 12 |
+
|
| 13 |
+
Automatic differentiation frameworks are optimized for exactly one thing: computing the average mini-batch gradient. Yet, other quantities such as the variance of the mini-batch gradients or many approximations to the Hessian can, in theory, be computed efficiently, and at the same time as the gradient. While these quantities are of great interest to researchers and practitioners, current deep-learning software does not support their automatic calculation. Manually implementing them is burdensome, inefficient if done na¨ıvely, and the resulting code is rarely shared. This hampers progress in deep learning, and unnecessarily narrows research to focus on gradient descent and its variants; it also complicates replication studies and comparisons between newly developed methods that require those quantities, to the point of impossibility. To address this problem, we introduce BACKPACK1, an efficient framework built on top of PYTORCH, that extends the backpropagation algorithm to extract additional information from first- and second-order derivatives. Its capabilities are illustrated by benchmark reports for computing additional quantities on deep neural networks, and an example application by testing several recent curvature approximations for optimization.
|
| 14 |
+
|
| 15 |
+
# 1 INTRODUCTION
|
| 16 |
+
|
| 17 |
+
The success of deep learning and the applications it fuels can be traced to the popularization of automatic differentiation frameworks. Packages like TENSORFLOW (Abadi et al., 2016), CHAINER (Tokui et al., 2015), MXNET (Chen et al., 2015), and PYTORCH (Paszke et al., 2019) provide efficient implementations of parallel, GPU-based gradient computations to a wide range of users, with elegant syntactic sugar.
|
| 18 |
+
|
| 19 |
+
However, this specialization also has its shortcomings: it assumes the user only wants to compute gradients or, more precisely, the average of gradients across a mini-batch of examples. Other quantities can also be computed with automatic differentiation at a comparable cost or minimal overhead to the gradient backpropagation pass; for example, approximate second-order information or the variance of gradients within the batch. These quantities are valuable to understand the geometry of deep neural networks, for the identification of free parameters, and to push the development of more efficient optimization algorithms. But researchers who want to investigate their use face a chickenand-egg problem: automatic differentiation tools required to go beyond standard gradient methods are not available, but there is no incentive for their implementation in existing deep-learning software as long as no large portion of the users need it.
|
| 20 |
+
|
| 21 |
+
Second-order methods for deep learning have been continuously investigated for decades (e.g., Becker & Le Cun, 1989; Amari, 1998; Bordes et al., 2009; Martens & Grosse, 2015). But still, the standard optimizers used in deep learning remain some variant of stochastic gradient descent (SGD); more complex methods have not found wide-spread, practical use. This is in stark contrast to domains like convex optimization and generalized linear models, where second-order methods are the default. There may of course be good scientific reasons for this difference; maybe second-order methods do not work well in the (non-convex, stochastic) setting of deep learning. And the computational cost associated with the high dimensionality of deep models may offset their benefits. Whether these are the case remains somewhat unclear though, because a much more direct road-block is that these methods are so complex to implement that few practitioners ever try them out.
|
| 22 |
+
|
| 23 |
+
Recent approximate second-order methods such as KFAC (Martens & Grosse, 2015) show promising results, even on hard deep learning problems (Tsuji et al., 2019). Their approach, based on the earlier work of Schraudolph (2002), uses the structure of the network to compute approximate secondorder information in a way that is similar to gradient backpropagation. This work sparked a new line of research to improve the second-order approximation (Grosse & Martens, 2016; Botev et al., 2017; Martens et al., 2018; George et al., 2018). However, all of these methods require low-level applications of automatic differentiation to compute quantities other than the averaged gradient. It is a daunting task to implement them from scratch. Unless users spend significant time familiarizing themselves with the internals of their software tools, the resulting implementation is often inefficient, which also puts the original usability advantage of those packages into question. Even motivated researchers trying to develop new methods, who need not be expert software developers, face this problem. They often end up with methods that cannot compete in runtime, not necessarily because the method is inherently bad, but because the implementation is not efficient. New methods are also frequently not compared to their predecessors and competitors because they are so hard to reproduce. Authors do not want to represent the competition in an unfair light caused by a bad implementation.
|
| 24 |
+
|
| 25 |
+
Another example is offered by a recent string of research to adapt to the stochasticity induced by mini-batch sampling. An empirical estimate of the (marginal) variance of the gradients within the batch has been found to be theoretically and practically useful for adapting hyperparameters like learning rates (Mahsereci & Hennig, 2017) and batch sizes (Balles et al., 2017), or regularize firstorder optimization (Le Roux et al., 2007; Balles & Hennig, 2018; Katharopoulos & Fleuret, 2018). To get such a variance estimate, one simply has to square, then sum, the individual gradients after the backpropagation, but before they are aggregated to form the average gradient. Doing so should have negligible cost in principle, but is programmatically challenging in the standard packages.
|
| 26 |
+
|
| 27 |
+
Members of the community have repeatedly asked for such features2 but the established automatic differentiation frameworks have yet to address such requests, as their focus has been—rightly—on improving their technical backbone. Features like those outlined above are not generally defined for arbitrary functions, but rather emerge from the specific structure of machine learning applications. General automatic differentiation frameworks can not be expected to serve such specialist needs. This does not mean, however, that it is impossible to efficiently realize such features within these frameworks: In essence, backpropagation is a technique to compute multiplications with Jacobians. Methods to extract second-order information (Mizutani & Dreyfus, 2008) or individual gradients from a mini-batch (Goodfellow, 2015) have been known to a small group of specialists; they are just rarely discussed or implemented.
|
| 28 |
+
|
| 29 |
+
# 1.1 OUR CONTRIBUTION
|
| 30 |
+
|
| 31 |
+
To address this need for a specialized framework focused on machine learning, we propose a framework for the implementation of generalized backpropagation to compute additional quantities. The structure is based on the conceptual work of Dangel et al. (2019) for modular backpropagation. This framework can be built on top of existing graph-based backpropagation modules; we provide an implementation on top of PYTORCH, coined BACKPACK, available at
|
| 32 |
+
|
| 33 |
+
https://f-dangel.github.io/backpack/.
|
| 34 |
+
|
| 35 |
+
The initial release supports efficient computation of individual gradients from a mini-batch, their $\ell _ { 2 }$ norm, an estimate of the variance, as well as diagonal and Kronecker factorizations of the generalized Gauss-Newton (GGN) matrix (see Tab. 1 for a feature overview). The library was designed to be minimally verbose to the user, easy to use (see Fig. 1), and to have low overhead (see $\ S 3$ ). While other researchers are aiming to improve the flexibility of automatic differentiation systems (Innes, 2018a;b; Bradbury et al., 2018), our goal with this package is to provide access to quantities that are only byproducts of the backpropagation pass, rather than gradients themselves.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: BACKPACK integrates with PYTORCH to seamlessly extract more information from the backward pass. Instead of the variance (or alongside it, in the same pass), BACKPACK can compute individual gradients in the mini-batch, their $\ell _ { 2 }$ norm and $2 ^ { \mathrm { n d } }$ moment. It can also compute curvature approximations like diagonal or Kronecker factorizations of the GGN such as KFAC, KFLR & KFRA.
|
| 39 |
+
|
| 40 |
+
To illustrate the capabilities of BACKPACK, we use it to implement preconditioned gradient descent optimizers with diagonal approximations of the GGN and recent Kronecker factorizations KFAC (Martens & Grosse, 2015), KFLR, and KFRA (Botev et al., 2017). Our results show that the curvature approximations based on Monte-Carlo (MC) estimates of the GGN, the approach used by KFAC, give similar progress per iteration to their more accurate counterparts, but being much cheaper to compute. While the na¨ıve update rule we implement does not surpass first-order baselines such as SGD with momentum and Adam (Kingma & Ba, 2015), its implementation with various curvature approximations is made straightforward.
|
| 41 |
+
|
| 42 |
+
# 2 THEORY AND IMPLEMENTATION
|
| 43 |
+
|
| 44 |
+
We will distiguish between quantities that can be computed from information already present during a traditional backward pass (which we suggestively call first-order extensions), and quantities that need additional information (termed second-order extensions). The former group contains additional statistics such as the variance of the gradients within the mini-batch or the $\ell _ { 2 }$ norm of the gradient for each sample. Those can be computed with minimal overhead during the backprop pass. The latter class contains approximations of second-order information, like the diagonal or Kronecker factorization of the generalized Gauss-Newton (GGN) matrix, which require the propagation of additional information through the graph. We will present those two classes separately:
|
| 45 |
+
|
| 46 |
+
# First-order extensions
|
| 47 |
+
|
| 48 |
+
Extract more from the standard backward pass.
|
| 49 |
+
|
| 50 |
+
# Second-order extensions
|
| 51 |
+
|
| 52 |
+
Propagate new information along the graph.
|
| 53 |
+
|
| 54 |
+
– Individual gradients from a mini-batch $- \ell _ { 2 }$ norm of the individual gradients – Diagonal covariance and $\bar { 2 } ^ { \mathrm { n d } }$ moment – Diagonal of the GGN and the Hessian – KFAC (Martens & Grosse, 2015) – KFRA and KFLR (Botev et al., 2017)
|
| 55 |
+
|
| 56 |
+
These quantities are only defined, or reasonable to compute, for a subset of models: The concept of individual gradients for each sample in a mini-batch or the estimate of the variance requires the loss for each sample to be independent. While such functions are common in machine learning, not all neural networks fit into this category. For example, if the network uses Batch Normalization (Ioffe & Szegedy, 2015), the individual gradients in a mini-batch are correlated. Then, the variance is not meaningful anymore, and computing the individual contribution of a sample to the mini-batch gradient or the GGN becomes prohibitive. For those reasons, and to limit the scope of the project for version 1.0, BACKPACK currently restricts the type of models it accepts. The supported models are traditional feed-forward networks that can be expressed as a sequence of modules, for example a sequence of convolutional, pooling, linear and activation layers. Recurrent networks like LSTMs (Hochreiter & Schmidhuber, 1997) or residual networks (He et al., 2016) are not yet supported, but the framework can be extended to cover them.
|
| 57 |
+
|
| 58 |
+
We assume a sequential model $f : \Theta \times \mathbb { X } \to \mathbb { Y }$ and a dataset of $N$ samples $( { \pmb x } _ { n } , { \pmb y } _ { n } ) \in \mathbb { X } \times \mathbb { Y }$ with $n = 1 , \ldots , N$ . The model maps each sample ${ \pmb x } _ { n }$ to a prediction ${ \hat { y } } _ { n }$ using some parameters $\pmb \theta \in \Theta$ . The predictions are evaluated with a loss function $\ell : \mathbf { \bar { Y } } \times \mathbb { Y } \mathbf { \bar { \mathbb { R } } }$ , for example the cross-entropy, which compares them to the ground truth ${ \bf { { y } } } _ { n }$ . This leads to the objective function $\mathcal { L } : \Theta \to \mathbb { R }$ ,
|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
Figure 2: Schematic representation of the standard backpropagation pass for module $i$ with $N$ samples.
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\begin{array} { r } { \mathcal { L } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \ell ( f ( \pmb { \theta } , \pmb { x } _ { n } ) , \pmb { y } _ { n } ) . } \end{array}
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
As a shorthand, we will use $\ell _ { n } ( \pmb \theta ) = \ell ( f ( \pmb \theta , \pmb x _ { n } ) , \pmb y _ { n } )$ for the loss and $f _ { n } ( \pmb { \theta } ) = f ( \pmb { \theta } , \pmb { x } _ { n } )$ for the model output of individual samples. Our goal is to provide more information about the derivatives of $\{ \ell _ { n } \} _ { n = 1 } ^ { N }$ with respect to the parameters $\pmb \theta$ of the model $f$ .
|
| 68 |
+
|
| 69 |
+
# 2.1 PRIMER ON BACKPROPAGATION
|
| 70 |
+
|
| 71 |
+
Machine learning libraries with integrated automatic differentiation use the modular structure of $f _ { n } ( \pmb \theta )$ to compute derivatives (see Baydin et al. (2018) for an overview). If $f _ { n }$ is a sequence of $L$ transformations, it can be expressed as
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r } { f _ { n } ( \pmb { \theta } ) = T _ { \pmb { \theta } ^ { ( L ) } } ^ { ( L ) } \circ . . . \circ T _ { \pmb { \theta } ^ { ( 1 ) } } ^ { ( 1 ) } ( \pmb { x } _ { n } ) , } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where T (i)(i) is the ith transformation with parameters $\pmb \theta ^ { ( i ) }$ , such that $\pmb \theta = [ \pmb \theta ^ { ( 1 ) } , \dots , \pmb \theta ^ { ( L ) } ]$ . The loss function can also be seen as another transformation, appended to the network. Let $z _ { n } ^ { ( i - 1 ) } , z _ { n } ^ { ( i ) }$ denote the input and output of the operation $T _ { \pmb { \theta } ^ { ( i ) } } ^ { ( i ) }$ for sample $n$ , such that $z _ { n } ^ { ( 0 ) }$ is the original data and $z _ { n } ^ { ( 1 ) } , \cdots , z _ { n } ^ { ( L ) }$ represent the transformed output of each layer, leading to the computation graph
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
z _ { n } ^ { ( 0 ) } \xrightarrow { T _ { \theta ^ { ( 1 ) } } ^ { ( 1 ) } ( z _ { n } ^ { ( 0 ) } ) } z _ { n } ^ { ( 1 ) } \xrightarrow { T _ { \theta ^ { ( 2 ) } } ^ { ( 2 ) } ( z _ { n } ^ { ( 1 ) } ) } . . . \xrightarrow { T _ { \theta ^ { ( L ) } } ^ { ( L ) } ( z _ { n } ^ { ( L - 1 ) } ) } z ^ { ( L ) } \xrightarrow { \ell ( z _ { n } ^ { ( L ) } , y _ { n } ) } \ell _ { n } ( \theta ) .
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
To compute the gradient of $\ell _ { n }$ with respect to the $\pmb \theta ^ { ( i ) }$ , one can repeatedly apply the chain rule,
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\begin{array} { r l } & { \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell ( \pmb { \theta } ) = ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \mathrm { J } _ { z _ { n } ^ { ( i ) } } z _ { n } ^ { ( i + 1 ) } ) ^ { \top } \cdot \cdot \cdot ( \mathrm { J } _ { z _ { n } ^ { ( L - 1 ) } } z _ { n } ^ { ( L ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( L ) } } \ell _ { n } ( \pmb { \theta } ) ) } \\ & { \qquad = ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) ) , } \end{array}
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $\mathrm { J } _ { a } { b }$ is the Jacobian of $^ { b }$ with respect to $^ { a }$ , $[ \mathrm { J } _ { \pmb { a } } \pmb { b } ] _ { i j } = \partial [ \pmb { b } ] _ { i } / \partial [ \pmb { a } ] _ { j }$ . A similar expression exists for the module inputs $z _ { n } ^ { ( i - 1 ) } { \colon } \nabla _ { z _ { n } ^ { ( i - 1 ) } } \ell _ { n } ( \pmb { \theta } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) )$ . This recursive structure makes it possible to extract the gradient by propagating the gradient of the loss. In the backpropagation algorithm, a module $i$ receives the loss gradient with respect to its output, $\nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } )$ . It then extracts the gradient with respect to its parameters and inputs, $\nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } )$ and $\nabla _ { z _ { n } ^ { ( i - 1 ) } } \ell _ { n } ( \pmb { \theta } )$ , according to Eq. 3. The gradient with respect to its input is sent further down the graph. This process, illustrated in Fig. 2, is repeated for each transformation until all gradients are computed. To implement backpropagation, each module only needs to know how to multiply with its Jacobians.
|
| 90 |
+
|
| 91 |
+
For second-order quantities, we rely on the work of Mizutani $\&$ Dreyfus (2008) and Dangel et al. (2019), who showed that a scheme similar to Eq. 3 exists for the block-diagonal of the Hessian. A block with respect to the parameters of a module, $\nabla _ { \pmb { \theta } ^ { ( i ) } } ^ { 2 } \ell _ { n } ( \pmb { \theta } )$ , can be obtained by the recursion
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\begin{array} { r } { \nabla _ { \theta ^ { ( i ) } } ^ { 2 } \ell _ { n } ( \theta ) = ( \mathrm { J } _ { \theta ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } ^ { 2 } \ell _ { n } ( \theta ) ) ( \mathrm { J } _ { \theta ^ { ( i ) } } z _ { n } ^ { ( i ) } ) + \sum _ { j } \left( \nabla _ { \theta ^ { ( i ) } } ^ { 2 } [ z _ { n } ^ { ( i ) } ] _ { j } \right) \left[ \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \theta ) \right] _ { j } , } \end{array}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
and a similar relation holds for the Hessian with respect to each module’s output, $\nabla _ { z _ { n } ^ { ( i ) } } ^ { 2 } \ell _ { n } ( \pmb { \theta } )$ .
|
| 98 |
+
|
| 99 |
+
Both backpropagation schemes of Eq. 3 and Eq. 4 hinge on the multiplication by Jacobians to both vectors and matrices. However, the design of automatic differentiation limits the application of Jacobians to vectors only. This prohibits the exploitation of vectorization in the matrix case, which is needed for second-order information. The lacking flexibility of Jacobians is one motivation for our work. Since all quantities needed to compute statistics of the derivatives are already computed during the backward pass, another motivation is to provide access to them at minor overhead.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 3: Computing individual gradients in a batch using a for-loop (i.e. one individual forward and backward pass per sample) or using vectorized operations with BACKPACK. The plot shows computation time, comparing to a traditional gradient computation, on the 3C3D network (See $\ S 4 )$ ) for the CIFAR-10 dataset (Schneider et al., 2019).
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 4: Schematic representation of the individual gradients’ extraction in addition to the standard backward pass at the ith module for $N$ samples.
|
| 106 |
+
|
| 107 |
+
# 2.2 FIRST ORDER EXTENSIONS
|
| 108 |
+
|
| 109 |
+
As the principal first-order extension, consider the computation of the individual gradients in a batch of size $N$ . These individual gradients are implicitly computed during a traditional backward pass because the batch gradient is their sum, but they are not directly accessible. The na¨ıve way to compute $N$ individual gradients is to do $N$ separate forward and backward passes, This (inefficiently) replaces every matrix-matrix multiplications by $N$ matrix-vector multiplications. BACKPACK’s approach batches computations to obtain large efficiency gains, as illustrated by Fig. 3.
|
| 110 |
+
|
| 111 |
+
As the quantities necessary to compute the individual gradients are already propagated through the computation graph, we can reuse them by inserting code in the standard backward pass. With access to this information, before it is cleared for memory efficiency, BACKPACK computes the Jacobianmultiplications for each sample
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\begin{array} { r } { \{ \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) \} _ { n = 1 } ^ { N } = \{ [ \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ] ^ { \top } \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) \} _ { n = 1 } ^ { N } , } \end{array}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
without summing the result—see Fig. 4 for a schematic representation. This duplicates some of the computation performed by the backpropagation, as the Jacobian is applied twice (once by PYTORCH and BACKPACK with and without summation over the samples, respectively). However, the associated overhead is small compared to the for-loop approach: The major computational cost arises from the propagation of information required for each layer, rather than the formation of the gradient within each layer.
|
| 118 |
+
|
| 119 |
+
This scheme for individual gradient computation is the basis for all first-order extensions. In this direct form, however, it is expensive in memory: if the model is $D$ -dimensional, storing $\mathcal { O } ( N D )$ elements is prohibitive for large batches. For the variance, $2 ^ { \mathrm { n d } }$ moment and $\ell _ { 2 }$ norm, BACKPACK takes advantage of the Jacobian’s structure to directly compute them without forming the individual gradient, reducing memory overhead. See Appendix A.1 for details.
|
| 120 |
+
|
| 121 |
+
# 2.3 SECOND-ORDER EXTENSIONS
|
| 122 |
+
|
| 123 |
+
Second-order extensions require propagation of more information through the graph. As an example, we will focus on the generalized Gauss-Newton (GGN) matrix (Schraudolph, 2002). It is guaranteed to be positive semi-definite and is a reasonable approximation of the Hessian near the minimum, which motivates its use in approximate second-order methods. For popular loss functions, it coincides with the Fisher information matrix used in natural gradient methods (Amari, 1998); for a more in depth discussion of the equivalence, see the reviews of Martens (2014) and Kunstner et al. (2019). For an objective function that can be written as the composition of a loss function $\ell$ and a model $f$ , such as Eq. 1, the GGN of $\begin{array} { r } { { \frac { 1 } { N } } \sum _ { n } \ell ( f ( \pmb { \theta } , \pmb { x } _ { n } ) , \pmb { y } _ { n } ) } \end{array}$ is
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\begin{array} { r } { G ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { n } \left[ \mathrm { J } _ { \pmb { \theta } } f ( \pmb { \theta } , \pmb { x } _ { n } ) \right] ^ { \top } \nabla _ { f } ^ { 2 } \ell ( f ( \pmb { \theta } , \pmb { x } _ { n } ) , \pmb { y } _ { n } ) \left[ \mathrm { J } _ { \pmb { \theta } } f ( \pmb { \theta } , \pmb { x } _ { n } ) \right] . } \end{array}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
The full matrix is too large to compute and store. Current approaches focus on its diagonal blocks, where each block corresponds to a layer in the network. Every block itself is further approximated, for example using a Kronecker factorization. The approach used by BACKPACK for their computation is a refinement of the Hessian Backpropagation equations of Dangel et al. (2019). It relies on two insights: Firstly, the computational bottleneck in the computation of the GGN is the multiplication with the Jacobian of the network, $\operatorname { J } _ { \theta } f _ { n }$ , while the Hessian of the loss with respect to the output of the network is easy to compute for most popular loss functions. Secondly, it is not necessary to compute and store each of the $N$ $[ D \times D ]$ matrices for a network with $D$ parameters, as Eq. 6 is a quadratic expression. Given a symmetric factorization $S _ { n }$ of the Hessian, $S _ { n } S _ { n } ^ { \top } = \nabla _ { f } ^ { 2 } \hat { \ell } ( f ( \pmb \theta , \pmb x _ { n } ) , \pmb y _ { n } ) .$ , it is sufficient to compute $[ \mathrm { J } _ { \pmb { \theta } } f _ { n } ] ^ { \top } S _ { n }$ and square the result. A network output is typically small compared to its inner layers; networks on CIFAR-100 need $C = 1 0 0$ class outputs but could use convolutional layers with more than 100,000 parameters.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 5: Schematic of the additional backward pass to compute a symmetric factorization of the GGN, $\begin{array} { r } { G ( \pmb { \theta } ) = \sum _ { n } [ \mathrm { J } _ { \pmb { \theta } } f _ { n } ] ^ { \top } \pmb { S } _ { n } \pmb { S } _ { n } ^ { \top } [ \mathrm { J } _ { \pmb { \theta } } f _ { n } ] } \end{array}$ alongside the gradient at the $i$ th module, for $N$ samples.
|
| 133 |
+
|
| 134 |
+
The factorization leads to a $[ D \times C ]$ matrix, which makes it possible to efficiently compute GGN block diagonals. Also, the computation is very similar to that of a gradient, which computes $[ \mathrm { J } _ { \pmb \theta } f _ { n } ] ^ { \top } \nabla _ { f _ { n } } \ell _ { n }$ . A module multiplies $T _ { \pmb { \theta } ^ { ( i ) } } ^ { ( i ) }$ receives the symmetric factorization of the GGth the Jacobians with respect to the parameters th respect toand inputs tput, to p $ { \boldsymbol { z } } _ { n } ^ { ( i ) }$ , anduce a $\pmb \theta ^ { ( i ) }$ $z _ { n } ^ { ( i - 1 ) }$ ) rod symmetric factorization of the GGN with respect to the parameters and inputs, as shown in Fig. 5.
|
| 135 |
+
|
| 136 |
+
This propagation serves as the basis of the second-order extensions. If the full symmetric factorization is not wanted, for memory reasons, it is possible to extract more specific information such as the diagonal. If $\textbf { { B } }$ is the symmetric factorization for a GGN block, the diagonal can be computed as $\begin{array} { r } { [ { B B ^ { \top } } ] _ { i i } = \sum _ { j } [ B ] _ { i j } ^ { 2 } } \end{array}$ , where $[ \cdot ] _ { i j }$ denotes the element in the ith row and $j$ th column.
|
| 137 |
+
|
| 138 |
+
This framework can be used to extract the main Kronecker factorizations of the GGN, KFAC and KFLR, which we extend to convolution using the approach of Grosse & Martens (2016). The important difference between the two methods is the initial matrix factorization $S _ { n }$ . Using a full symmetric factorization of the initial Hessian, $S _ { n } S _ { n } ^ { \top } = \nabla _ { f _ { n } } ^ { 2 } \ell _ { n }$ , yields the KFLR approximation. KFAC uses an MC-approximation by sampling a vector $s _ { n }$ such that $\mathbb { E } _ { \pmb { s } _ { n } } [ \pmb { s } _ { n } \pmb { s } _ { n } ^ { \top } ] = \dot { \nabla } _ { f _ { n } } ^ { 2 } \ell _ { n }$ . KFLR is therefore more precise but more expensive than KFAC, especially for networks with high-dimensional outputs, which is reflected in our benchmark on CIFAR-100 in Section 3. The technical details on how Kronecker factors are extracted and information is propagated for second-order BACKPACK extensions are documented in Appendix A.2.
|
| 139 |
+
|
| 140 |
+
# 3 EVALUATION AND BENCHMARKS
|
| 141 |
+
|
| 142 |
+
We benchmark the overhead of BACKPACK on the CIFAR-10 and CIFAR-100 datasets, using the 3C3D network3 provided by DEEPOBS (Schneider et al., 2019) and the ALL-CNN- $\mathrm { C } ^ { 4 }$ network of Springenberg et al. (2015). The results are shown in Fig. 6.
|
| 143 |
+
|
| 144 |
+
For first-order extensions, the computation of individual gradients from a mini-batch adds noticeable overhead due to the additional memory requirements of storing them. But more specific quantities such as the $\ell _ { 2 }$ norm, $2 ^ { \mathrm { n d } }$ moment and variance can be extracted efficiently. Regarding second-order extensions, the computation of the GGN can be expensive for networks with large outputs like CIFAR100, regardless of the approximation being diagonal of Kronecker-factored. Thankfully, the MC approximation used by KFAC, which we also implement for a diagonal approximation, can be computed at minimal overhead—much less than two backward passes. This last point is encouraging, as our optimization experiment in Section 4 suggest that this approximation is reasonably accurate.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 6: Overhead benchmark for computing the gradient and first- or second-order extensions on real networks, compared to just the gradient. Most quantities add little overhead. KFLR and DiagGGN propagate $1 0 0 \times$ more information than KFAC and DiagGGN-MC on CIFAR-100 and are two orders of magnitude slower. We report benchmarks on those, and the Hessian’s diagonal, in Appendix B.
|
| 148 |
+
|
| 149 |
+
# 4 EXPERIMENTS
|
| 150 |
+
|
| 151 |
+
To illustrate the utility of BACKPACK, we implement preconditioned gradient descent optimizers using diagonal and Kronecker approximations of the GGN. To our knowledge, and despite their apparent simplicity, results using diagonal approximations or the na¨ıve damping update rule we chose have not been reported in publications so far. However, this section is not meant to introduce a bona-fide new optimizer. Our goal is to show that BACKPACK can enable research of this kind. The update rule we implement uses a curvature matrix $G ( \theta _ { t } ^ { ( i ) } )$ , which could be a diagonal or Kronecker factorization of the GGN blocks, and a damping parameter $\lambda$ to precondition the gradient:
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\pmb { \theta } _ { t + 1 } ^ { ( i ) } = \pmb { \theta } _ { t } ^ { ( i ) } - \alpha ( \pmb { G } ( \pmb { \theta } _ { t } ^ { ( i ) } ) + \lambda \pmb { I } ) ^ { - 1 } \nabla \pmb { \mathcal { L } } ( \pmb { \theta } _ { t } ^ { ( i ) } ) , \qquad i = 1 , \dots , L .
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
We run the update rule with the following approximations of the generalized Gauss-Newton: the exact diagonal (DiagGGN) and an MC estimate (DiagGGN-MC), and the Kronecker factorizations KFAC (Martens & Grosse, 2015), KFLR and KFRA5(Botev et al., 2017). The inversion required by the update rule is straightforward for the diagonal curvature. For the Kronecker-factored quantities, we use the approximation introduced by Martens & Grosse (2015) (see Appendix C.3).
|
| 158 |
+
|
| 159 |
+
These curvature estimates are tested for the training of deep neural networks by running the corresponding optimizers on the main test problems of the benchmarking suite DEEPOBS (Schneider et al., 2019).6 We use the setup (batch size, number of training epochs) of DEEPOBS’ baselines, and tune the learning rate $\alpha$ and damping parameter $\lambda$ with a grid search for each optimizer (details in Appendix C.2). The best hyperparameter settings is chosen according to the final accuracy on a validation set. We report the median and quartiles of the performance for ten random seeds.
|
| 160 |
+
|
| 161 |
+
Fig. 7a shows the results for the 3C3D network trained on CIFAR-10. The optimizers that leverage Kronecker-factored curvature approximations beat the baseline performance in terms of per-iteration progress on the training loss, training and test accuracy. Using the same hyperparameters, there is little difference between KFAC and KFLR, or DiagGGN and DiagGGN-MC. Given that the quantities based on MC-sampling are considerably cheaper, this experiment suggests it being an important technique for reducing the computational burden of curvature approximations.
|
| 162 |
+
|
| 163 |
+
Fig. 7b shows benchmarks for the ALL-CNN-C network trained on CIFAR-100. Due to the highdimensional output, the curvatures using a full matrix propagation rather than an MC sample cannot be run on this problem due to memory issues. Both DiagGGN-MC and KFAC can compete with the baselines in terms of progress per iteration. As the update rule we implemented is simplistic on purpose, this is promising for future applications of second-order methods that can more efficiently use the additional information given by curvature approximations.
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 7: Median performance with shaded quartiles of the DEEPOBS benchmark for (a) 3C3D network (895,210 parameters) on CIFAR-10 and (b) ALL-CNN-C network (1,387,108 parameters) on CIFAR-100. Solid lines show baselines of momentum SGD and Adam provided by DEEPOBS.
|
| 167 |
+
|
| 168 |
+
# 5 CONCLUSION
|
| 169 |
+
|
| 170 |
+
Machine learning’s coming-of-age has been accompanied, and in part driven, by a maturing of the software ecosystem. This has drastically simplified the lives of developers and researchers alike, but has also crystallized parts of the algorithmic landscape. This has dampened research in cutting-edge areas that are far from mature, like second-order optimization for deep neural networks. To ensure that good ideas can bear fruit, researchers must be able to compute new quantities without an overwhelming software development burden. To support research and development in optimization for deep learning, we have introduced BACKPACK, an efficient implementation in PYTORCH of recent conceptual advances and extensions to backpropagation (Tab. 1 lists all features). BACKPACK enriches the syntax of automatic differentiation packages to offer additional observables to optimizers beyond the batch-averaged gradient. Our experiments demonstrate that BACKPACK’s implementation offers drastic efficiency gains over the kind of na¨ıve implementation within reach of the typical researcher. As a demonstrative example, we “invented” a few optimization routines that, without BACKPACK, would require demanding implementation work and can now be tested with ease. We hope that studies like this allow BACKPACK to help mature the ML software ecosystem further.
|
| 171 |
+
|
| 172 |
+
# ACKNOWLEDGMENTS
|
| 173 |
+
|
| 174 |
+
The authors would like to thank Aaron Bahde, Ludwig Bald, and Frank Schneider for their help with DEEPOBS and Lukas Balles, Simon Bartels, Filip de Roos, Tim Fischer, Nicolas Kramer, Agustinus ¨ Kristiadi, Frank Schneider, Jonathan Wenger, and Matthias Werner for constructive feedback.
|
| 175 |
+
|
| 176 |
+
The authors gratefully acknowledge financial support by the European Research Council through ERC StG Action 757275 / PANAMA; the DFG Cluster of Excellence “Machine Learning - New
|
| 177 |
+
|
| 178 |
+
Table 1: Overview of the features supported in the first release of BACKPACK.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Feature</td><td>Details</td></tr><tr><td>Individual gradients</td><td>NVθ(ω)ln(0), n=1,.,N</td></tr><tr><td>Batch variance</td><td>1Vn(0)-(0)</td></tr><tr><td>2nd moment</td><td>N∑n=10oen(0)],,5=1,,a(.</td></tr><tr><td>Indiv. gradient l2 norm</td><td>/∀θ(i)len(θ)ll², n=1,.,N</td></tr><tr><td>DiagGGN</td><td>diag (G(0(i)))</td></tr><tr><td>DiagGGN-MC</td><td>diag (G(0())</td></tr><tr><td>Hessian diagonal</td><td>diag (V²() L(θ))</td></tr><tr><td>KFAC</td><td>G(0(i)) ~ A(i) </td></tr><tr><td>KFLR</td><td></td></tr><tr><td>KFRA</td><td>G(0(@)~ A BRA (i)</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Perspectives for Science”, EXC 2064/1, project number 390727645; the German Federal Ministry of Education and Research (BMBF) through the Tubingen AI Center (FKZ: 01IS18039A); and funds ¨ from the Ministry of Science, Research and Arts of the State of Baden-Wurttemberg. F. D. is grateful ¨ to the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for support.
|
| 183 |
+
|
| 184 |
+
# REFERENCES
|
| 185 |
+
|
| 186 |
+
Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, Manjunath Kudlur, Josh Levenberg, Rajat Monga, Sherry Moore, Derek Gordon Murray, Benoit Steiner, Paul A. Tucker, Vijay Vasudevan, Pete Warden, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. Tensorflow: A system for large-scale machine learning. In 12th USENIX Symposium on Operating Systems Design and Implementation, 2016.
|
| 187 |
+
|
| 188 |
+
Shun-ichi Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2), 1998.
|
| 189 |
+
|
| 190 |
+
Lukas Balles and Philipp Hennig. Dissecting Adam: The sign, magnitude and variance of stochastic gradients. In Proceedings of the 35th International Conference on Machine Learning, 2018.
|
| 191 |
+
|
| 192 |
+
Lukas Balles, Javier Romero, and Philipp Hennig. Coupling adaptive batch sizes with learning rates. In Proceedings of the 33rd Conference on Uncertainty in Artificial Intelligence, 2017.
|
| 193 |
+
|
| 194 |
+
Atilim Gunes Baydin, Barak A. Pearlmutter, Alexey Andreyevich Radul, and Jeffrey Mark Siskind. Automatic differentiation in machine learning: A survey. Journal of Machine Learning Research, 18(153), 2018.
|
| 195 |
+
|
| 196 |
+
Sue Becker and Yann Le Cun. Improving the convergence of back-propagation learning with second order methods. In Proceedings of the 1988 Connectionist Models Summer School, 1989.
|
| 197 |
+
|
| 198 |
+
Antoine Bordes, Leon Bottou, and Patrick Gallinari. SGD-QN: careful quasi-Newton stochastic gradient de-´ scent. J. Mach. Learn. Res., 10, 2009.
|
| 199 |
+
|
| 200 |
+
Aleksandar Botev, Hippolyt Ritter, and David Barber. Practical Gauss-Newton optimisation for deep learning. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, 2017.
|
| 201 |
+
|
| 202 |
+
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne. JAX: Composable transformations of Python+NumPy programs, 2018.
|
| 203 |
+
|
| 204 |
+
Tianqi Chen, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang. MXNet: A flexible and efficient machine learning library for heterogeneous distributed systems. In 31st Conference on Neural Information Processing Systems, Workshop on Machine Learning Systems, 2015.
|
| 205 |
+
|
| 206 |
+
Felix Dangel, Stefan Harmeling, and Philipp Hennig. A modular approach to block-diagonal Hessian approximations for second-order optimization methods. CoRR, abs/1902.01813, 2019.
|
| 207 |
+
|
| 208 |
+
Thomas George, Cesar Laurent, Xavier Bouthillier, Nicolas Ballas, and Pascal Vincent. Fast approximate ´ natural gradient descent in a Kronecker-factored eigenbasis. 2018.
|
| 209 |
+
|
| 210 |
+
Ian J. Goodfellow. Efficient per-example gradient computations. CoRR, abs/1510.01799, 2015.
|
| 211 |
+
|
| 212 |
+
Roger B. Grosse and James Martens. A Kronecker-factored approximate Fisher matrix for convolution layers. In Proceedings of the 33rd International Conference on Machine Learning, volume 48 of JMLR Workshop and Conference Proceedings, 2016.
|
| 213 |
+
|
| 214 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 215 |
+
|
| 216 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8), 1997.
|
| 217 |
+
|
| 218 |
+
Michael Innes. Flux: Elegant machine learning with Julia. Journal of Open Source Software, 3(25), 2018a.
|
| 219 |
+
|
| 220 |
+
Michael Innes. Don’t unroll adjoint: Differentiating SSA-form programs. CoRR, abs/1810.07951, 2018b.
|
| 221 |
+
|
| 222 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning, volume 37 of JMLR Workshop and Conference Proceedings, 2015.
|
| 223 |
+
|
| 224 |
+
Angelos Katharopoulos and Franc¸ois Fleuret. Not all samples are created equal: Deep learning with importance sampling. In Proceedings of the 35th International Conference on Machine Learning, 2018.
|
| 225 |
+
|
| 226 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, 2015.
|
| 227 |
+
|
| 228 |
+
Frederik Kunstner, Lukas Balles, and Philipp Hennig. Limitations of the empirical Fisher approximatiom. In Advances in Neural Information Processing Systems 32, 2019.
|
| 229 |
+
|
| 230 |
+
Nicolas Le Roux, Pierre-Antoine Manzagol, and Yoshua Bengio. Topmoumoute online natural gradient algorithm. In Advances in Neural Information Processing Systems 20, 2007.
|
| 231 |
+
|
| 232 |
+
Maren Mahsereci and Philipp Hennig. Probabilistic line searches for stochastic optimization. Journal of Machine Learning Research, 18, 2017.
|
| 233 |
+
|
| 234 |
+
James Martens. New perspectives on the natural gradient method. CoRR, abs/1412.1193, 2014.
|
| 235 |
+
|
| 236 |
+
James Martens and Roger B. Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. In Proceedings of the 32nd International Conference on Machine Learning, volume 37 of JMLR Workshop and Conference Proceedings, 2015.
|
| 237 |
+
|
| 238 |
+
James Martens, Jimmy Ba, and Matt Johnson. Kronecker-factored curvature approximations for recurrent neural networks. In 6th International Conference on Learning Representations, 2018.
|
| 239 |
+
|
| 240 |
+
Eiji Mizutani and Stuart E. Dreyfus. Second-order stagewise backpropagation for Hessian-matrix analyses and investigation of negative curvature. Neural Networks, 21(2-3), 2008.
|
| 241 |
+
|
| 242 |
+
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32. 2019.
|
| 243 |
+
|
| 244 |
+
Frank Schneider, Lukas Balles, and Philipp Hennig. DeepOBS: A deep learning optimizer benchmark suite. In 7th International Conference on Learning Representations, 2019.
|
| 245 |
+
|
| 246 |
+
Nicol N. Schraudolph. Fast curvature matrix-vector products for second-order gradient descent. Neural Computation, 14(7), 2002.
|
| 247 |
+
|
| 248 |
+
Jost Tobias Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin A. Riedmiller. Striving for simplicity: The all convolutional net. In 3rd International Conference on Learning Representations, 2015.
|
| 249 |
+
|
| 250 |
+
Seiya Tokui, Kenta Oono, Shohei Hido, and Justin Clayton. Chainer: A next-generation open source framework for deep learning. In 29th Conference on Neural Information Processing Systems, Workshop on Machine Learning Systems, 2015.
|
| 251 |
+
|
| 252 |
+
Yohei Tsuji, Kazuki Osawa, Yuichiro Ueno, Akira Naruse, Rio Yokota, and Satoshi Matsuoka. Performance optimizations and analysis of distributed deep learning with approximated second-order optimization method. In 48th International Conference on Parallel Processing, Workshop Proceedings, 2019.
|
| 253 |
+
|
| 254 |
+
# BACKPACK: PACKING MORE INTO BACKPROPSUPPLEMENTARY MATERIAL
|
| 255 |
+
|
| 256 |
+
# Table of Content
|
| 257 |
+
|
| 258 |
+
– $\ S \mathbf { A }$ : BACKPACK extensions – $\ S \mathrm { A } . 1$ : First-order quantities – $\ S \mathrm { A } . 2$ : Second-order quantities based on the generalized Gauss-Newton – $\ S \mathrm { A } . 3$ : The exact Hessian diagonal
|
| 259 |
+
$- \ \ S \mathbf { B }$ : Additional details on benchmarks
|
| 260 |
+
$- ~ \ S C$ : Additional details on experiments
|
| 261 |
+
$- ~ \mathrm { \ 8 D }$ : BACKPACK cheat sheet
|
| 262 |
+
|
| 263 |
+
# A BACKPACK EXTENSIONS
|
| 264 |
+
|
| 265 |
+
This section provides more technical details on the additional quantities extracted by BACKPACK.
|
| 266 |
+
|
| 267 |
+
Notation: Consider an arbitrary module $T _ { \pmb { \theta } ^ { ( i ) } } ^ { ( i ) }$ of a network $i = 1 , \ldots , L$ , parameterized by $\pmb \theta ^ { ( i ) }$ . It transforms the output of its parent layer for sample $n$ , $z _ { n } ^ { ( i - 1 ) }$ , to its output $ { \boldsymbol { z } } _ { n } ^ { ( i ) }$ , i.e.
|
| 268 |
+
|
| 269 |
+
$$
|
| 270 |
+
z _ { n } ^ { ( i ) } = T _ { \theta ^ { ( i ) } } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) , \qquad n = 1 , \dots , N ,
|
| 271 |
+
$$
|
| 272 |
+
|
| 273 |
+
where $N$ is the number of samples. In particular, $z _ { n } ^ { ( 0 ) } = \pmb { x } _ { n }$ and $z _ { n } ^ { ( L ) } ( \pmb { \theta } ) = f ( \pmb { x } _ { n } , \pmb { \theta } )$ , where $f$ is the transformation of the whole network. The dimension of the hidden layer $i$ ’s output $ { \boldsymbol { z } } _ { n } ^ { ( i ) }$ is written $\it { { h ^ { ( i ) } } }$ and $\pmb \theta ^ { ( i ) }$ is of dimension $\boldsymbol { d } ^ { ( i ) }$ . The dimension of the network output, the prediction $z ^ { ( L ) }$ , is $h ^ { ( L ) } = C$ . For an image classification task, $C$ corresponds to the number of classes.
|
| 274 |
+
|
| 275 |
+
All quantities are assumed to be vector-shaped. For image-processing transformations that usually act on tensor-shaped inputs, we can reduce to the vector scenario by vectorizing all quantities; this discussion does not rely on a specific flattening scheme. However, for an efficient implementation, vectorization should match the layout of the memory of the underlying arrays.
|
| 276 |
+
|
| 277 |
+
Jacobian: The Jacobian matrix $\operatorname { J } _ { a } b$ of an arbitrary vector $\pmb { b } \in \mathbb { R } ^ { B }$ with respect to another vector $\mathbf { \pmb { a } } \in \mathbb { R } ^ { A }$ is an $[ A \times B ]$ matrix of partial derivatives, $\left[ \mathrm { J } _ { \pmb { a } } \pmb { b } \right] _ { i j } = \partial \left[ \pmb { b } \right] _ { i } / \partial \left[ \pmb { a } \right] _ { j }$ .
|
| 278 |
+
|
| 279 |
+
# A.1 FIRST-ORDER QUANTITIES
|
| 280 |
+
|
| 281 |
+
The basis for the extraction of additional information about first-order derivatives is given by Eq. 3, which we state again for multiple samples,
|
| 282 |
+
|
| 283 |
+
$$
|
| 284 |
+
\nabla _ { \pmb { \theta } ^ { ( i ) } } \mathscr { L } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) ) .
|
| 285 |
+
$$
|
| 286 |
+
|
| 287 |
+
During the backpropagation step of module $i$ , we have access to $\nabla _ { z _ { n } ^ { ( i ) } } \ell ( \pmb \theta ) , i = 1 , \ldots , N .$ . To extract more quantities involving the gradient, we use additional information about the transformation T (i)θ(i) within our custom implementation of the Jacobian $\mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } \pmb { z } _ { n } ^ { ( i ) }$ and transposed Jacobian $( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top }$ .
|
| 288 |
+
|
| 289 |
+
Individual gradients: The contribution of each sample to the overall gradient, $\frac { 1 } { N } \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } )$ , is computed by application of the transposed Jacobian,
|
| 290 |
+
|
| 291 |
+
$$
|
| 292 |
+
\frac { 1 } { N } \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) = \frac { 1 } { N } ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) ) , \qquad n = 1 , \dots , N .
|
| 293 |
+
$$
|
| 294 |
+
|
| 295 |
+
For each parameter $\pmb \theta ^ { ( i ) }$ the individual gradients are of size $[ N \times d ^ { ( i ) } ]$ .
|
| 296 |
+
|
| 297 |
+
Individual gradient $\ell _ { 2 }$ norm: The quantity $\begin{array} { r l } { \Big \| \frac { 1 } { N } \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) \Big \| _ { 2 } ^ { 2 } } & { { } } \end{array}$ , for $n = 1 , . . . , N$ , could be extracted from the individual gradients (Eq. 9) as
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\left\| \frac { 1 } { N } \nabla _ { \theta ^ { ( i ) } } \ell _ { n } ( \theta ) \right\| _ { 2 } ^ { 2 } = \left[ \frac { 1 } { N } ( \mathrm { J } _ { \theta ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \theta ) ) \right] ^ { \top } \left[ \frac { 1 } { N } ( \mathrm { J } _ { \theta ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } \ell _ { n } ( \theta ) ) \right] ,
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
which is an $N$ -dimensional object for each parameter $\pmb \theta ^ { ( i ) }$ . However, this is not memory efficient as the individual gradients are an $[ N \times d ^ { ( i ) } ]$ tensor. To circumvent this problem, BACKPACK uses the structure of the Jacobian whenever possible.
|
| 304 |
+
|
| 305 |
+
For a specific example, take a linear layer with parameters $\pmb \theta$ as an $[ A \times B ]$ matrix. The layer transforms the inputs $z _ { n } ^ { ( i - 1 ) }$ , an $[ N \times A ]$ matrix which we will now refer to as $\pmb { A }$ . During the backward pass, it receives the gradient of the individual losses with respect to its output, $\{ \textstyle { \frac { 1 } { N } } \check { \nabla _ { z _ { n } ^ { ( i ) } } } \ell _ { n } \} _ { n = 1 } ^ { N }$ , as an $[ N \times B ]$ matrix which we will refer to as $\textbf { { B } }$ . The overall gradient, an $[ A \times B ]$ matrix, can be computed as $\mathring { A } ^ { \top } B$ , and the individual gradients are a set of $N$ $[ A \times B ]$ matrices, $\{ \mathbf { \bar { A } } [ n , : ] B [ n , : ] ^ { \top } \} _ { n = 1 } ^ { N }$ . We want to avoid storing that information. To reduce the memory requirement, note that the individual gradient norm can be written as
|
| 306 |
+
|
| 307 |
+
$$
|
| 308 |
+
\left\| \frac { 1 } { N } \nabla _ { \pmb { \theta } } \ell _ { n } \right\| ^ { 2 } = \sum _ { i } \sum _ { j } ( \pmb { A } [ n , i ] \pmb { B } [ n , j ] ) ^ { 2 } ,
|
| 309 |
+
$$
|
| 310 |
+
|
| 311 |
+
and that the summation can be done independently for each matrix, as $\begin{array} { r } { \sum _ { i } \sum _ { j } ( { \cal A } [ n , i ] { \cal B } [ n , j ] ) ^ { 2 } = } \end{array}$ $\begin{array} { r l } { ( \sum _ { i } A [ n , i ] ) ^ { 2 } ( \sum _ { j } B [ n , j ] ^ { 2 } ) } & { { } } \end{array}$ . Therefore, we can square each matrix (element-wise) and sum over non-batch dimensions. This yields vectors $\mathbf { \delta } _ { a , b }$ of $N$ elements, where $\begin{array} { r } { { \bf { a } } [ n ] = \sum _ { i } { \bf { A } } [ n , i ] ^ { 2 } } \end{array}$ . The individual gradients’ $\ell _ { 2 }$ norm is then given by $\mathbf { \Pi } _ \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Omega } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf { \Sigma } \mathbf \Sigma { \Sigma } \mathbf \mathbf { \Sigma } \mathbf { \Sigma \Sigma } \mathbf \mathbf { \Sigma } \mathbf { \Sigma \Sigma } \mathbf \mathbf { \Sigma \Sigma } \mathbf \Sigma \mathbf { \Sigma } \mathbf \Sigma \Sigma \Sigma \mathbf { \Sigma \Sigma } \mathbf \Sigma \mathbf \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \mathbf \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma \Sigma$ where $\circ$ is element-wise multiplication.
|
| 312 |
+
|
| 313 |
+
Second moment: The gradient second moment (or more specifically, the diagonal of the second moment) is the sum of the squared elements of the individual gradients in a mini-batch, i.e.
|
| 314 |
+
|
| 315 |
+
$$
|
| 316 |
+
\frac { 1 } { N } \sum _ { n = 1 } ^ { N } \left[ \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) \right] _ { j } ^ { 2 } , \qquad j = 1 , \ldots , d ^ { ( i ) } .
|
| 317 |
+
$$
|
| 318 |
+
|
| 319 |
+
It can be used to evaluate the variance of individual elements of the gradient (see below). The second moment is of dimension $\boldsymbol { d } ^ { ( i ) }$ , the same dimension as the layer parameter $\pmb \theta ^ { ( i ) }$ . Similarly to the $\ell _ { 2 }$ norm, it can be computed from individual gradients, but is more efficiently computed implicitly.
|
| 320 |
+
|
| 321 |
+
Revisiting the example of the linear layer from the individual $\ell _ { 2 }$ norm computation, the second moment of the parameters $\theta [ i , j ]$ is given by $\textstyle \sum _ { n } ( A [ n , i ] B [ n , j ] ) ^ { 2 }$ , which can be directly computed by taking the element-wise square of $\pmb { A }$ and $\textbf { { B } }$ element-wise, $A ^ { 2 } , B ^ { 2 }$ , and computing $A ^ { 2 \top } B ^ { 2 }$ .
|
| 322 |
+
|
| 323 |
+
Variance: Gradient variances over a mini-batch (or more precisely, the diagonal of the covariance) can be computed using the second moment and the gradient itself,
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
\frac { 1 } { N } \sum _ { n = 1 } ^ { N } \left[ \nabla _ { \pmb { \theta } ^ { ( i ) } } \ell _ { n } ( \pmb { \theta } ) \right] _ { j } ^ { 2 } - \left[ \nabla _ { \pmb { \theta } ^ { ( i ) } } \mathcal { L } ( \pmb { \theta } ) \right] _ { j } ^ { 2 } , \qquad j = 1 , \dots , d ^ { ( i ) } .
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
The element-wise gradient variance of same dimension as the layer parameter $\pmb \theta ^ { ( i ) }$ , i.e. $\boldsymbol d ^ { ( i ) }$ .
|
| 330 |
+
|
| 331 |
+
# A.2 SECOND-ORDER QUANTITIES BASED ON THE GENERALIZED GAUSS-NEWTON
|
| 332 |
+
|
| 333 |
+
The computation of quantities that originate from the approximations of the Hessian require an additional backward pass (see Dangel et al. (2019)). Most curvature approximations supported by BACKPACK rely on the generalized Gauss-Newton (GGN) matrix (Schraudolph, 2002)
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
\boldsymbol { G } ( \boldsymbol { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { \boldsymbol { \theta } } f ( \mathbf { x } _ { n } , \boldsymbol { \theta } ) ) ^ { \top } \nabla _ { f } ^ { 2 } \ell ( f ( \mathbf { x } _ { n } , \boldsymbol { \theta } ) , y _ { n } ) ( \mathrm { J } _ { \boldsymbol { \theta } } f ( \mathbf { x } _ { n } , \boldsymbol { \theta } ) ) .
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
One interpretation of the GGN is that it corresponds to the empirical risk Hessian when the model $f$ is approximated with its first-order Taylor expansion, i.e. by linearizing the network and ignoring
|
| 340 |
+
|
| 341 |
+
second-order effects. Hence, the effect of module curvature in the recursive scheme of Eq. 4 can be ignored to obtain the simpler expression
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\begin{array} { l } { { \displaystyle { \cal G } ( \pmb { \theta } ^ { ( i ) } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } { f } ) ^ { \top } \nabla _ { f } ^ { 2 } \ell ( f ( \pmb { x } _ { n } , \pmb { \theta } ) , \pmb { y } _ { n } ) ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } { f } ) } \ ~ } \\ { { \displaystyle ~ = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } { \pmb { G } } ( z _ { n } ^ { ( i ) } ) ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) } } \end{array}
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
for the exact block diagonal of the full GGN. In analogy to $G ( \pmb \theta ^ { ( i ) } )$ we have introduced the $[ d ^ { ( i ) } \times$ $d ^ { ( i ) } ]$ -dimensional quantity
|
| 348 |
+
|
| 349 |
+
$$
|
| 350 |
+
\begin{array} { r } { \pmb { G } ( z _ { n } ^ { ( i ) } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i ) } } f ) ^ { \top } \nabla _ { f } ^ { 2 } \ell ( f ( \pmb { x } _ { n } , \pmb { \theta } ) , \pmb { y } _ { n } ) ( \mathrm { J } _ { z _ { n } ^ { ( i ) } } f ) } \end{array}
|
| 351 |
+
$$
|
| 352 |
+
|
| 353 |
+
that needs to be backpropagated. The curvature backpropagation also follows from Eq. 4 as
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
\begin{array} { r } { G ( z _ { n } ^ { ( i - 1 ) } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) ^ { \top } G ( z _ { n } ^ { ( i ) } ) ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) , \qquad i = 1 , \dots , L , } \end{array}
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
and is initialized with the Hessian of the loss function with respect to the network prediction, i.e.
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array} { r } { \pmb { G } ( \pmb { z } _ { n } ^ { ( L ) } ) = \nabla _ { f } ^ { 2 } \ell ( f ( \pmb { x } _ { n } , \pmb { \theta } ) , \pmb { y } _ { n } ) . } \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
Although this scheme is exact, it is computationally infeasible as it requires the backpropagation of $N \ [ h ^ { ( i ) } \times h ^ { ( i ) } ]$ matrices between module $i + 1$ and $i$ . Even for small $N$ , this is not possible for networks containing large convolutions.
|
| 366 |
+
|
| 367 |
+
As an example, the first layer of the ALL-CNN-C network outputs $2 9 \times 2 9$ images with 96 channels, which already gives $h ^ { ( i ) } \stackrel { \cdot } { = } 8 0 \sqrt { 3 6 }$ , which leads to half a Gigabyte per sample. Moreover, storing all the $[ d ^ { ( i ) } \times d ^ { ( i ) } ]$ -dimensional blocks $G ( \pmb \theta ^ { ( i ) } )$ is not possible. BACKPACK implements different approximation strategies, developed by Martens & Grosse (2015) and Botev et al. (2017) that address both of these complexity issues from different perspectives.
|
| 368 |
+
|
| 369 |
+
Symmetric factorization scheme: One way to improve the memory footprint of the backpropagated matrices in the case where the model prediction’s dimension $C$ (the number of classes in an image classification task) is small compared to all hidden features $\it { h ^ { ( i ) } }$ is to propagate a symmetric factorization of the GGN instead. It relies on the observation that if the loss function itself is convex, even though its composition with the network might not be, its Hessian with respect to the network output can be decomposed as
|
| 370 |
+
|
| 371 |
+
$$
|
| 372 |
+
\nabla _ { f } ^ { 2 } \ell ( f ( \pmb { x } _ { n } , \pmb { \theta } ) , \pmb { y } _ { n } ) = \pmb { S } ( \pmb { z } _ { n } ^ { ( L ) } ) \pmb { S } ( \pmb { z } _ { n } ^ { ( L ) } ) ^ { \top }
|
| 373 |
+
$$
|
| 374 |
+
|
| 375 |
+
with the $\left[ C \times C \right]$ -dimensional matrix factorization of the loss Hessian, ${ \cal S } ( z _ { n } ^ { ( L ) } )$ , for sample $n$ . Consequently, the GGN in Eq. 12 reduces to an outer product,
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
G ( \pmb \theta ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \left[ ( \mathrm { J } _ { \pmb \theta } f ) ^ { \top } \pmb S ( z _ { n } ^ { ( L ) } ) \right] \left[ ( \mathrm { J } _ { \pmb \theta } f ) ^ { \top } \pmb S ( z _ { n } ^ { ( L ) } ) \right] ^ { \top } .
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
The analogue for diagonal blocks follows from Eq. 13 and reads
|
| 382 |
+
|
| 383 |
+
$$
|
| 384 |
+
\pmb { G } ( \pmb { \theta } ^ { ( i ) } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \left[ ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } \pmb { z } _ { n } ^ { ( i ) } ) ^ { \top } \pmb { S } ( \pmb { z } _ { n } ^ { ( i ) } ) \right] \left[ ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } \pmb { z } _ { n } ^ { ( i ) } ) ^ { \top } \pmb { S } ( \pmb { z } _ { n } ^ { ( i ) } ) \right] ^ { \top } ,
|
| 385 |
+
$$
|
| 386 |
+
|
| 387 |
+
where we defined the $[ h ^ { ( i ) } \times C ]$ -dimensional matrix square root $S ( z _ { n } ^ { ( i ) } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i ) } } f ) ^ { \top } S ( z _ { n } ^ { ( L ) } )$ . Instead of having layer $i$ backpropagate $N$ objects of shape $[ h ^ { ( i ) } \times h ^ { ( i ) } ]$ according to Eq. 14, we instead backpropagate the matrix square root via
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
\begin{array} { r } { S ( z _ { n } ^ { ( i - 1 ) } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) ^ { \top } S ( z _ { n } ^ { ( i ) } ) ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) , \qquad i = 1 , \dots , L , } \end{array}
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
starting with Eq. 15. This reduces the backpropagated matrix of layer $i$ to $[ h ^ { ( i ) } \times C ]$ for each sample.
|
| 394 |
+
|
| 395 |
+
# A.2.1 DIAGONAL CURVATURE APPROXIMATIONS
|
| 396 |
+
|
| 397 |
+
Diagonal of the GGN (DiagGGN): The factorization trick for the loss Hessian reduces the size of the backpropagated quantities, but does not address the intractable size of the GGN diagonal blocks $G ( \pmb \theta ^ { \bar { ( } i ) } )$ . In BACKPACK, we can extract diag $\left( G ( \pmb \theta ^ { ( i ) } ) \right)$ given the backpropagated quantities ${ \cal S } ( z _ { n } ^ { ( i ) } ) , i = 1 , . . . , N$ , without building up the matrix representation of Eq. 17. In particular, we compute
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\mathrm { d i a g } \left( G ( \pmb { \theta } ^ { ( i ) } ) \right) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathrm { d i a g } \left( \left[ \big ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } \big ) ^ { \top } S ( z _ { n } ^ { ( i ) } ) \right] \left[ \big ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } \big ) ^ { \top } S ( z _ { n } ^ { ( i ) } ) \right] ^ { \top } \right) .
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
Diagonal of the GGN with MC sampled loss Hessian (DiagGGN-MC): We use the same backpropagation strategy of Eq. 18, replacing the symmetric factorization of Eq. 15 with an approximation by a smaller matrix $\tilde { \pmb { S } } ( z _ { n } ^ { ( L ) } )$ of size $[ C \times \tilde { C } ]$ and $\tilde { C } < C$ ,
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\begin{array} { r } { \nabla _ { f } ^ { 2 } \ell ( f ( { \pmb x } _ { n } , \pmb \theta ) , { \pmb y } _ { n } ) \approx \tilde { \pmb S } ( { \pmb z } _ { n } ^ { ( L ) } ) \left( \tilde { \pmb S } ( { \pmb z } _ { n } ^ { ( L ) } ) \right) ^ { \top } . } \end{array}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
This further reduces the size of backpropagated curvature quantities. Martens $\&$ Grosse (2015) introduced such a sampling scheme with KFAC based on the connection between the GGN and the Fisher. Most loss functions used in machine learning have a probabilistic interpretation as negative log-likelihood of a probabilistic model. The squarred error of regression is equivalent to a Gaussian noise assumption and the cross-entropy is linked to the categorical distribution. In this case, the loss Hessian with respect to the network output is equal, in expectation, to the outer products of gradients if the output of the network is sampled according to a particular distribution, $p _ { f } ( { \pmb x } )$ , defined by the network output $f ( { \pmb x } )$ . Sampling outputs $\hat { y } \sim p$ , we have that
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\begin{array} { r } { \mathbb { E } _ { \hat { y } \sim p _ { f ( \mathbf { x } ) } } \left[ \nabla _ { \theta } \ell ( f ( \boldsymbol { x } , \theta ) , \hat { y } ) \nabla _ { \theta } \ell ( f ( \boldsymbol { x } , \theta ) , \hat { y } ) ^ { \top } \right] = \nabla _ { \theta } ^ { 2 } \ell ( f ( \boldsymbol { x } , \theta ) , y ) . } \end{array}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
Sampling one such gradient leads to a rank-1 MC approximation of the loss Hessian. With the substitution $S \tilde { S }$ , we compute an MC approximation of the GGN diagonal in BACKPACK as
|
| 416 |
+
|
| 417 |
+
$$
|
| 418 |
+
\mathrm { d i a g } \left( G ( \pmb { \theta } ^ { ( i ) } ) \right) \approx \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathrm { d i a g } \left( \left[ \left( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } \right) ^ { \top } \tilde { \pmb { S } } ( z _ { n } ^ { ( i ) } ) \right] \left[ \left( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } \right) ^ { \top } \tilde { \pmb { S } } ( z _ { n } ^ { ( i ) } ) \right] ^ { \top } \right) .
|
| 419 |
+
$$
|
| 420 |
+
|
| 421 |
+
# A.2.2 KRONECKER-FACTORED CURVATURE APPROXIMATIONS
|
| 422 |
+
|
| 423 |
+
A different approach to reduce memory complexity of the GGN blocks $G ( \pmb \theta ^ { ( i ) } )$ , apart from diagonal curvature approximations, is representing them as Kronecker products (KFAC for linear and convolution layers by Martens $\&$ Grosse (2015); Grosse $\&$ Martens (2016) KFLR and KFRA for linear layers by Botev et al. (2017)),
|
| 424 |
+
|
| 425 |
+
$$
|
| 426 |
+
\begin{array} { r } { G ( \pmb \theta ^ { ( i ) } ) = \pmb A ^ { ( i ) } \otimes \pmb B ^ { ( i ) } . } \end{array}
|
| 427 |
+
$$
|
| 428 |
+
|
| 429 |
+
For both linear and convolution layers, the first Kronecker factor $\boldsymbol { A } ^ { ( i ) }$ is obtained from the inputs $z _ { n } ^ { ( i - 1 ) }$ to layer $i$ . Instead of repeating the technical details of the aforementioned references, we will focus on how they differ in (i) the backpropagated quantities and (ii) the backpropagation strategy. As a result, we will be able to extend KFLR and KFRA to convolutional neural networks7.
|
| 430 |
+
|
| 431 |
+
KFAC and KFLR: KFAC uses an MC-sampled estimate of the loss Hessian with a square root factorization $\tilde { \cal S } ( z _ { n } ^ { ( L ) } )$ like in Eq. 20. The backpropagation is equivalent to the computation of the GGN diagonal. For the GGN of the weights of a linear layer $i$ , the second Kronecker term is given by
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\boldsymbol { B } _ { \mathrm { K F A C } } ^ { ( i ) } = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \tilde { \boldsymbol { S } } ( \boldsymbol { z } _ { n } ^ { ( i ) } ) \left( \tilde { \boldsymbol { S } } ( \boldsymbol { z } _ { n } ^ { ( i ) } ) \right) ^ { \top } ,
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
which at the same time corresponds to the GGN of the layer’s bias8.
|
| 438 |
+
|
| 439 |
+
In contrast to KFAC, the KFLR approximation backpropagates the exact square root factorization $S ( z _ { n } ^ { ( L ) } )$ , i.e. for the weights of a linear layer8 (see Botev et al. (2017) for more details)
|
| 440 |
+
|
| 441 |
+
$$
|
| 442 |
+
B _ { \mathrm { K F L R } } ^ { ( i ) } = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } S ( z _ { n } ^ { ( i ) } ) \left( S ( z _ { n } ^ { ( i ) } ) \right) ^ { \top } .
|
| 443 |
+
$$
|
| 444 |
+
|
| 445 |
+
KFRA: The backpropagation strategy for KFRA eliminates the scaling of the backpropagated curvature quantities with the batch size $N$ in Eq. 14. Instead of having layer $i$ receive the $N$ exact $[ h ^ { ( i ) } \times h ^ { ( i ) } ]$ matrices $G ( z _ { n } ^ { ( i ) } )$ , $n = 1 , \ldots , N$ , only a single averaged object, denoted $\overline { { \boldsymbol { G } } } ^ { ( i ) }$ , is used as an approximation. In particular, the recursion changes to
|
| 446 |
+
|
| 447 |
+
$$
|
| 448 |
+
\overline { { G } } ^ { ( i - 1 ) } = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) ^ { \top } \overline { { G } } ^ { ( i ) } ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) , \qquad i = 1 , \dots , L ,
|
| 449 |
+
$$
|
| 450 |
+
|
| 451 |
+
and is initialized with the batch-averaged loss Hessian
|
| 452 |
+
|
| 453 |
+
$$
|
| 454 |
+
\overline { { \pmb { G } } } ^ { ( L ) } = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \nabla _ { f } ^ { 2 } \ell ( f ( \pmb { x } _ { n } , \pmb { \theta } ) , \pmb { y } _ { n } ) .
|
| 455 |
+
$$
|
| 456 |
+
|
| 457 |
+
For a linear layer, KFRA uses8 (see Botev et al. (2017) for more details)
|
| 458 |
+
|
| 459 |
+
$$
|
| 460 |
+
B _ { \mathrm { K F R A } } ^ { ( i ) } = \overline { { \mathbf { G } } } ^ { ( i ) } .
|
| 461 |
+
$$
|
| 462 |
+
|
| 463 |
+
# A.3 THE EXACT HESSIAN DIAGONAL
|
| 464 |
+
|
| 465 |
+
For neural networks consisting only of piecewise linear activation functions, computing the diagonal of the Hessian is equivalent to computing the GGN diagonal. This is because for these activations the second term in the Hessian backpropagation recursion (Eq. 4) vanishes.
|
| 466 |
+
|
| 467 |
+
However, for activation functions with non-vanishing second derivative, these residual terms have to be accounted for in the backpropagation. The Hessian backpropagation for module $i$ reads
|
| 468 |
+
|
| 469 |
+
$$
|
| 470 |
+
\begin{array} { r l } & { \quad \nabla _ { \pmb { \theta } ^ { ( i ) } } ^ { 2 } \ell ( \pmb { \theta } ) = ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } ^ { 2 } \ell ( \pmb { \theta } ) ) ( \mathrm { J } _ { \pmb { \theta } ^ { ( i ) } } z _ { n } ^ { ( i ) } ) + \pmb { R } _ { n } ^ { ( i ) } ( \pmb { \theta } ^ { ( i ) } ) , } \\ & { \nabla _ { z _ { n } ^ { ( i - 1 ) } } ^ { 2 } \ell ( \pmb { \theta } ) = ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) ^ { \top } ( \nabla _ { z _ { n } ^ { ( i ) } } ^ { 2 } \ell ( \pmb { \theta } ) ) ( \mathrm { J } _ { z _ { n } ^ { ( i - 1 ) } } z _ { n } ^ { ( i ) } ) + \pmb { R } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) , } \end{array}
|
| 471 |
+
$$
|
| 472 |
+
|
| 473 |
+
for $n = 1 , \ldots , N$ . Those $[ h ^ { ( i ) } \times h ^ { ( i ) } ]$ -dimensional residual terms are defined as
|
| 474 |
+
|
| 475 |
+
$$
|
| 476 |
+
\begin{array} { r l r } & { } & { \pmb { R } _ { n } ^ { ( i ) } ( \pmb { \theta } ^ { ( i ) } ) = \displaystyle \sum _ { j } \left( \nabla _ { \pmb { \theta } ^ { ( i ) } } ^ { 2 } [ z _ { n } ^ { ( i ) } ] _ { j } \right) \left[ \nabla _ { z _ { n } ^ { ( i ) } } \ell ( \pmb { \theta } ) \right] _ { j } , } \\ & { } & { \pmb { R } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) = \displaystyle \sum _ { j } \left( \nabla _ { z _ { n } ^ { ( i - 1 ) } } ^ { 2 } [ z _ { n } ^ { ( i ) } ] _ { j } \right) \left[ \nabla _ { z _ { n } ^ { ( i ) } } \ell ( \pmb { \theta } ) \right] _ { j } , } \end{array}
|
| 477 |
+
$$
|
| 478 |
+
|
| 479 |
+
For common parameterized layers, such as linear and convolution transformations, ${ \pmb R } _ { n } ^ { ( i ) } ( { \pmb \theta } ^ { ( i ) } ) = 0$ If the activation function is applied element-wise, $\pmb { R } _ { n } ^ { ( i ) } ( \pmb { z } _ { n } ^ { ( i - 1 ) } )$ are diagonal matrices.
|
| 480 |
+
|
| 481 |
+
Storing these quantities becomes very memory-intensive for high-dimensional nonlinear activation layers. In BACKPACK, this complexity is reduced by application of the aforementioned matrix square root factorization trick. To do so, we express the symmetric factorization of $\pmb { R } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } )$ as
|
| 482 |
+
|
| 483 |
+
$$
|
| 484 |
+
\begin{array} { r } { \pmb { R } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) = \pmb { P } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) \left( \pmb { P } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) \right) ^ { \top } - \pmb { N } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) \left( \pmb { N } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) \right) ^ { \top } , } \end{array}
|
| 485 |
+
$$
|
| 486 |
+
|
| 487 |
+
where $P _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) , N _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } )$ represent the matrix square root of $\pmb { R } _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } )$ projected on its positive and negative eigenspace, respectively.
|
| 488 |
+
|
| 489 |
+
This composition allows for the extension of the GGN backpropagation: In addition to $S ( z _ { n } ^ { ( i ) } )$ , the decompositions $P _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) , N _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } )$ (z(i−1)n ) for the residual parts also have to be backpropagated according to Eq. 18. All diagonals are extracted from the backpropagated matrix square roots (see Eq. 19). All diagonals stemming from decompositions in the negative residual eigenspace have to be weighted by a factor of $- 1$ before summation.
|
| 490 |
+
|
| 491 |
+
In terms of complexity, one backpropagation for $R _ { n } ^ { ( i ) } ( z ^ { ( i - 1 ) } )$ changes the dimensionality as follows
|
| 492 |
+
|
| 493 |
+
$$
|
| 494 |
+
{ \cal R } _ { n } ^ { ( i ) } ( z ^ { ( i - 1 ) } ) : \quad \quad [ { h } ^ { ( i ) } \times { h } ^ { ( i ) } ] [ { h } ^ { ( i - 1 ) } \times { h } ^ { ( i - 1 ) } ] [ { h } ^ { ( i - 2 ) } \times { h } ^ { ( i - 2 ) } ] . . . .
|
| 495 |
+
$$
|
| 496 |
+
|
| 497 |
+
With the square root factorization, one instead obtains
|
| 498 |
+
|
| 499 |
+
$$
|
| 500 |
+
\begin{array} { r l } { P _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) : } & { \quad [ h ^ { ( i ) } \times h ^ { ( i ) } ] \to [ h ^ { ( i - 1 ) } \times h ^ { ( i ) } ] \to [ h ^ { ( i - 2 ) } \times h ^ { ( i ) } ] \to \dots , } \\ { N _ { n } ^ { ( i ) } ( z _ { n } ^ { ( i - 1 ) } ) : } & { \quad [ h ^ { ( i ) } \times h ^ { ( i ) } ] \to [ h ^ { ( i - 1 ) } \times h ^ { ( i ) } ] \to [ h ^ { ( i - 2 ) } \times h ^ { ( i ) } ] \to \dots . } \end{array}
|
| 501 |
+
$$
|
| 502 |
+
|
| 503 |
+
Roughly speaking, this scheme is more efficient whenever the hidden dimension of a nonlinear activation layer deceeds the largest hidden dimension of the network.
|
| 504 |
+
|
| 505 |
+
Example: Consider one backpropagation step of module $i$ . Assume $R _ { n } ^ { ( i ) } ( { \pmb \theta } ^ { ( i ) } ) = 0$ , i.e. a linear, convolution, or non-parameterized layer. Then the following computations are performed in the protocol for the diagonal Hessian:
|
| 506 |
+
|
| 507 |
+
• Receive the following quantities from the child module $i + 1$ (for $n = 1 , \ldots , N )$
|
| 508 |
+
|
| 509 |
+
$$
|
| 510 |
+
\begin{array} { r l } & { \Phi = \Big \{ S ( z _ { n } ^ { ( i ) } ) , } \\ & { \qquad P _ { n } ^ { ( i + 1 ) } ( z _ { n } ^ { ( i ) } ) , } \\ & { \qquad N _ { n } ^ { ( i + 1 ) } ( z _ { n } ^ { ( i ) } ) , } \\ & { \qquad ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i ) } } z _ { n } ^ { ( i + 1 ) } ) ^ { \top } P _ { n } ^ { ( i + 2 ) } ( z _ { n } ^ { ( i + 1 ) } ) , } \\ & { \qquad ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i ) } } z _ { n } ^ { ( i + 1 ) } ) ^ { \top } N _ { n } ^ { ( i + 2 ) } ( z _ { n } ^ { ( i + 1 ) } ) , } \\ & { \qquad \cdots } \\ & { \qquad ( \boldsymbol { \mathrm { J } } _ { z ^ { ( i ) } } z _ { n } ^ { ( i + 1 ) } ) ^ { \top } ( \boldsymbol { \mathrm { J } } _ { z ^ { ( i + 1 ) } } z _ { n } ^ { ( i + 2 ) } ) ^ { \top } \cdots \cdot ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i - 3 ) } } z _ { n } ^ { ( i - 2 ) } ) ^ { \top } P _ { n } ^ { ( i - 1 ) } ( z _ { n } ^ { ( i - 2 ) } ) , } \\ & { \qquad ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i ) } } z _ { n } ^ { ( i + 1 ) } ) ^ { \top } ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i + 1 ) } } z _ { n } ^ { ( i + 2 ) } ) ^ { \top } \cdots \cdot ( \boldsymbol { \mathrm { J } } _ { z _ { n } ^ { ( i - 3 ) } } z _ { n } ^ { ( i - 2 ) } ) ^ { \top } N _ { n } ^ { ( i - 1 ) } ( z _ { n } ^ { ( i - 2 ) } ) \Big \} } \end{array}
|
| 511 |
+
$$
|
| 512 |
+
|
| 513 |
+
• Extract the module parameter Hessian diagonal, $\mathrm { d i a g } \left( \nabla _ { \pmb { \theta } ^ { ( i ) } } ^ { 2 } \mathcal { L } ( \pmb { \theta } ) \right)$
|
| 514 |
+
|
| 515 |
+
– For each quantity $A \in \Phi$ extract the diagonal from the square root factorization and sum over the samples, i.e. compute
|
| 516 |
+
|
| 517 |
+
$$
|
| 518 |
+
\frac { 1 } { N } \sum _ { n = 1 } ^ { N } \mathrm { d i a g } \left( \left[ \big ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } \pmb { z } _ { n } ^ { ( i ) } \big ) ^ { \top } \pmb { A } _ { n } \right] \left[ \big ( \mathbf { J } _ { \pmb { \theta } ^ { ( i ) } } \pmb { z } _ { n } ^ { ( i ) } \big ) ^ { \top } \pmb { A } _ { n } \right] ^ { \top } \right) .
|
| 519 |
+
$$
|
| 520 |
+
|
| 521 |
+
Multiply the expression by $- 1$ if $\pmb { A }$ stems from backpropagation of a residual’s negative eigenspace’s factorization.
|
| 522 |
+
|
| 523 |
+
– Sum all expressions to obtain the block Hessian’s diagonal diag $\left( \nabla _ { \pmb { \theta } ^ { ( i ) } } ^ { 2 } \mathcal { L } ( \pmb { \theta } ) \right)$
|
| 524 |
+
|
| 525 |
+
• Backpropagate the received quantities to the parent module $i - 1$ – For each quantity $A _ { n } \in \Phi$ , apply $( \mathrm { J } _ { \pmb { z } _ { n } ^ { ( i - 1 ) } } \pmb { z } _ { n } ^ { ( i ) } ) ^ { \top } \pmb { A } _ { n }$ – Append $P _ { n } ^ { ( i + 1 ) } ( z _ { n } ^ { ( i ) } )$ and $N _ { n } ^ { ( i + 1 ) } ( z _ { n } ^ { ( i ) } )$ to $\Phi$
|
| 526 |
+
|
| 527 |
+
# B ADDITIONAL DETAILS ON BENCHMARKS
|
| 528 |
+
|
| 529 |
+
KFAC vs. KFLR: As the KFLR of Botev et al. (2017) is orders of magnitude more expensive to compute than the KFAC of Martens $\&$ Grosse (2015) on CIFAR-100, it was not included in the main plot. This is not an implementation error; it follows from the definition of those methods. To approximate the GGN, $\begin{array} { r } { \dot { G } ( \dot { \theta ) = } \sum _ { n } [ \mathrm { J } _ { \theta } f _ { n } ] ^ { \top } \nabla _ { f _ { n } } ^ { 2 } \ell _ { n } \left[ \mathrm { J } _ { \theta } f _ { n } \right] , } \end{array}$ , KFAC uses a rank-1 approximation for each of the inner Hessian $\nabla _ { f _ { n } } ^ { 2 } \ell _ { n } = \mathbf { { s } } _ { n } \mathbf { { s } } _ { n } ^ { \top }$ , and needs to propagate a vector through the computation graph for each sample. KFLR uses the complete inner Hessian instead. For CIFAR-100, the network has 100 output nodes—one for each class—and the inner Hessians are $[ 1 0 0 \times 1 0 0 ]$ matrices. KFLR needs to propagate a matrix through the computation graph for each sample, which is $1 0 0 \times$ more expensive as shown in Fig. 8.
|
| 530 |
+
|
| 531 |
+

|
| 532 |
+
Figure 8: KFLR and DiagGGN are more expensive to run on large networks. The gradient takes less than $2 0 \mathrm { m s }$ to compute, but KFLR and DiagGGN are approximately $1 0 0 \times$ more expensive.
|
| 533 |
+
|
| 534 |
+
Diagonal of the GGN vs. Diagonal of the Hessian: Most networks used in deep learning use ReLU activation functions. ReLU functions have no curvature as they are piecewise linear. Because of this, the diagonal of the GGN is equivalent to the diagonal of the Hessian (Martens, 2014). However, for networks that use non piecewise linear activation functions like sigmoids or tanh, computing the Hessian diagonal can be much more expensive than the GGN diagonal. To illustrate this point, we modify the smaller network used in our benchmarks to include a single sigmoid activation function before the last classification layer. The results in Fig. 9 show that the computation of the diagonal of the Hessian is already an order of magnitude more expensive than for the GGN.
|
| 535 |
+
|
| 536 |
+

|
| 537 |
+
Figure 9: Diagonal of the Hessian vs. the GGN. If the network contains a single sigmoid activation function, the diagonal of the Hessian is an order of magnitude more computationally intensive than the diagonal of the GGN.
|
| 538 |
+
|
| 539 |
+
# C ADDITIONAL DETAILS ON EXPERIMENTS
|
| 540 |
+
|
| 541 |
+
# C.1 PROTOCOL
|
| 542 |
+
|
| 543 |
+
The optimizer experiments are performed according to the protocol suggested by DEEPOBS:
|
| 544 |
+
|
| 545 |
+
• Train the neural network with the investigated optimizer and vary its hyperparameters on a specified grid. This training is performed for a single random seed only. DEEPOBS evaluates metrics during the training procedure. From all runs of the grid search, it selects the best run automatically. The results shown in this work were obtained with the default strategy, favoring highest final accuracy on the validation set. For a better understanding of the optimizer performance with respect to randomized routines in the training process, DEEPOBS reruns the best hyperparameter setting for ten different random seeds. The results show mean values over these repeated runs, with standard deviations as uncertainty indicators. Along with the benchmarked optimizers, we show the DEEPOBS base line performances for Adam and momentum SGD (Momentum). They are provided by DEEPOBS.
|
| 546 |
+
|
| 547 |
+
The optimizers built upon BACKPACK’s curvature estimates were benchmarked on the DEEPOBS image classification problems summarized in Table 2.
|
| 548 |
+
|
| 549 |
+
Table 2: Test problems considered from the DEEPOBS library (Schneider et al., 2019).
|
| 550 |
+
|
| 551 |
+
<table><tr><td>Codename</td><td>Description</td><td>Dataset</td><td>#Parameters</td></tr><tr><td>LOGREG</td><td>Linear model</td><td>MNIST</td><td>7,850</td></tr><tr><td>2C2D</td><td>2 convolutional and 2 dense linear layers</td><td>FASHION-MNIST</td><td>3,274,634</td></tr><tr><td>3C3D</td><td>3convolutional and 3 dense linear layers</td><td>CIFAR-10</td><td>895,210</td></tr><tr><td>ALL-CNN-C</td><td>9 convolutional layers (Springenberg et al.,2015)</td><td>CIFAR-100</td><td>1,387,108</td></tr></table>
|
| 552 |
+
|
| 553 |
+
# C.2 GRID SEARCH AND BEST HYPERPARAMETER SETTING
|
| 554 |
+
|
| 555 |
+
Both the learning rate $\alpha$ and damping $\lambda$ are tuned over the grid
|
| 556 |
+
|
| 557 |
+
$$
|
| 558 |
+
\alpha \in \left\{ 1 0 ^ { - 4 } , 1 0 ^ { - 3 } , 1 0 ^ { - 2 } , 1 0 ^ { - 1 } , 1 \right\} , \quad \lambda \in \left\{ 1 0 ^ { - 4 } , 1 0 ^ { - 3 } , 1 0 ^ { - 2 } , 1 0 ^ { - 1 } , 1 , 1 0 \right\} .
|
| 559 |
+
$$
|
| 560 |
+
|
| 561 |
+
We use the same batch size $N = 1 2 8$ for all problems, except $N = 2 5 6$ for ALL-CNN-C on CIFAR-100) as the base lines and the optimizers run for the identical number of epochs.
|
| 562 |
+
|
| 563 |
+
The best hyperparameter settings are summarized in Table 3.
|
| 564 |
+
|
| 565 |
+
# C.3 UPDATE RULE
|
| 566 |
+
|
| 567 |
+
We use a simple update rule with a constant damping parameter $\lambda$ . Consider the parameters $\pmb \theta$ of a single module in a neural network with $\ell _ { 2 }$ -regularization of strength $\eta$ . Let $G ( \theta _ { t } )$ denote the curvature matrix and $\nabla _ { \pmb { \theta } } \mathcal { L } ( \pmb { \theta } _ { t } )$ the gradient at step $t$ . One iteration of the optimizer applies
|
| 568 |
+
|
| 569 |
+
$$
|
| 570 |
+
\pmb \theta _ { t + 1 } \gets \pmb \theta _ { t } + \left[ \pmb { G } ( \pmb \theta _ { t } ) + ( \lambda + \eta ) \pmb { I } ) \right] ^ { - 1 } \left[ \nabla _ { \theta } \mathcal { L } ( \pmb \theta _ { t } ) + \eta \pmb \theta _ { t } \right] .
|
| 571 |
+
$$
|
| 572 |
+
|
| 573 |
+
The inverse cannot be computed exactly (in reasonable time) for the Kronecker-factored curvatures KFAC, KFLR, and KFRA. We use the scheme of Martens $\&$ Grosse (2015) to approximately invert $G ( \pmb { \theta } _ { t } ) \mathrel { + } ( \lambda \mathrm { + } \eta ) \pmb { I }$ if $G ( \theta _ { t } )$ is Kronecker-factored; $G ( \pmb { \theta } _ { t } ) = A ( \pmb { \theta } _ { t } ) { \otimes } B ( \pmb { \theta } _ { t } )$ . It replaces the expression $( \lambda + \theta ) I$ by diagonal terms added to each Kronecker factor. In summary, this replaces
|
| 574 |
+
|
| 575 |
+
$$
|
| 576 |
+
\left[ A ( \pmb \theta _ { t } ) \otimes B ( \pmb \theta _ { t } ) + ( \lambda + \eta ) \pmb { I } \right] ^ { - 1 } \mathrm { b y } \left[ A ( \pmb \theta _ { t } ) + \pi _ { t } \sqrt { \lambda + \eta } \pmb I \right] ^ { - 1 } \otimes \left[ B ( \pmb \theta _ { t } ) + \frac { 1 } { \pi _ { t } } \sqrt { \lambda + \eta } \pmb I \right] ^ { - 1 }
|
| 577 |
+
$$
|
| 578 |
+
|
| 579 |
+
A principled choice for the parameter $\pi _ { t }$ is given by $\pi _ { t } = \sqrt { \frac { \lVert A ( \pmb \theta _ { t } ) \otimes { \pmb I } _ { B } \rVert } { \lVert { \pmb I } _ { A } \otimes { \pmb B } ( \pmb \theta _ { t } ) \rVert } }$ for an arbitrary matrix norm $\lVert \cdot \rVert$ . We follow Martens & Grosse (2015) and choose the trace norm,
|
| 580 |
+
|
| 581 |
+
$$
|
| 582 |
+
\pi _ { t } = \sqrt { \frac { \operatorname { t r } ( A ( \pmb \theta _ { t } ) ) \operatorname { d i m } ( \pmb B ) } { \operatorname { d i m } ( A ) \otimes \operatorname { t r } ( \pmb B ( \pmb \theta _ { t } ) ) } } .
|
| 583 |
+
$$
|
| 584 |
+
|
| 585 |
+
Table 3: Best hyperparameter settings for optimizers and baselines shown in this work. In the Momentum baselines, the momentum was fixed to 0.9. Parameters for computation of the running averages in Adam use the default values $( \beta _ { 1 } , \beta _ { 2 } ) = ( 0 . 9 , 0 . 9 9 9 )$ . The symbols $\checkmark$ and $\pmb { \chi }$ denote whether the hyperparameter setting is an interior point of the grid or not, respectively.
|
| 586 |
+
|
| 587 |
+
<table><tr><td rowspan="2">Curvature</td><td colspan="3">mnist-logreg</td><td colspan="3">fmnist_2c2d</td><td colspan="3">cifar10-3c3d</td><td colspan="3">cifar100_allcnnc</td></tr><tr><td>α</td><td>入</td><td>int</td><td>α</td><td>入</td><td>int</td><td>α</td><td>入</td><td>int</td><td>α</td><td>入</td><td>int</td></tr><tr><td>DiagGGN</td><td>10-3</td><td>10-3</td><td>√</td><td>10-4</td><td>10-4</td><td>X</td><td>10-3</td><td>10-2</td><td>√</td><td>-</td><td>1</td><td>-</td></tr><tr><td>DiagGGN-MC</td><td>10-3</td><td>10-3</td><td>√</td><td>10-4</td><td>10-4</td><td>X</td><td>10-3</td><td>10-2</td><td>√</td><td>10-3</td><td>10-3</td><td>√</td></tr><tr><td>KFAC</td><td>10-2</td><td>10-2</td><td>√</td><td>10-3</td><td>10-3</td><td>√</td><td>1</td><td>10</td><td>X</td><td>1</td><td>1</td><td>√</td></tr><tr><td>KFLR</td><td>10-2</td><td>10-2</td><td>√</td><td>10-2</td><td>10-3</td><td>√</td><td>1</td><td>10</td><td>X</td><td>1</td><td>1</td><td>1</td></tr><tr><td>KFRA</td><td>10-2</td><td>10-2</td><td>√</td><td>-</td><td>1</td><td>-</td><td>1</td><td>=</td><td>-</td><td>=</td><td>-</td><td>=</td></tr><tr><td>Baseline</td><td colspan="3">a</td><td colspan="3">α</td><td colspan="3">α</td><td colspan="3">α</td></tr><tr><td>Momentum</td><td colspan="3">~2.07:10-2</td><td colspan="3">~2.07:10-2</td><td colspan="3">~3.79.10-3</td><td colspan="3">~4.83:10-1</td></tr><tr><td>Adam</td><td colspan="3">~2.98.10-4</td><td colspan="3">≈1.27·10-4</td><td colspan="3">~2.98:10-4</td><td colspan="3">~6.95:10-4</td></tr></table>
|
| 588 |
+
|
| 589 |
+
# C.4 ADDITIONAL RESULTS
|
| 590 |
+
|
| 591 |
+
This section presents the results for MNIST using a logistic regression in Fig. 10 and FASHIONMNIST using the 2C2D network, composed of two convolution and two linear layers, in Fig. 11.
|
| 592 |
+
|
| 593 |
+

|
| 594 |
+
Figure 10: Median performance with shaded quartiles of the best hyperparameter settings chosen by DEEPOBS for logistic regression (7,850 parameters) on MNIST. Solid lines show well-tuned baselines of momentum SGD and Adam that are provided by DEEPOBS.
|
| 595 |
+
|
| 596 |
+

|
| 597 |
+
Figure 11: Median performance with shaded quartiles of the best hyperparameter settings chosen by DEEPOBS for the 2C2D network (3,274,634 parameters) on FASHION-MNIST. Solid lines show well-tuned baselines of momentum SGD and Adam that are provided by DEEPOBS.
|
| 598 |
+
|
| 599 |
+
# D BACKPACK CHEAT SHEET
|
| 600 |
+
|
| 601 |
+
• Assumptions – Feedforward network $z _ { n } ^ { ( 0 ) } \xrightarrow { T _ { \theta ^ { ( 1 ) } } ^ { ( 1 ) } ( z _ { n } ^ { ( 0 ) } ) } z _ { n } ^ { ( 1 ) } \xrightarrow { T _ { \theta ^ { ( 2 ) } } ^ { ( 2 ) } ( z _ { n } ^ { ( 1 ) } ) } . . . \xrightarrow { T _ { \theta ^ { ( L ) } } ^ { ( L ) } ( z _ { n } ^ { ( L - 1 ) } ) } z ^ { ( L ) } \xrightarrow { \ell ( z _ { n } ^ { ( L ) } , y ) } \ell ( \theta )$ – $\boldsymbol d ^ { ( i ) }$ : Dimension of parameter $\pmb \theta ^ { ( i ) }$ – Empirical risk $\begin{array} { r } { \mathcal { L } ( \pmb { \theta } ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \ell ( f ( \pmb { \theta } , \pmb { x } _ { n } ) , \pmb { y } _ { n } ) } \end{array}$
|
| 602 |
+
|
| 603 |
+
• Shorthands
|
| 604 |
+
|
| 605 |
+
$$
|
| 606 |
+
\begin{array} { r l } & { \ell _ { n } ( \pmb \theta ) = \ell ( f ( \pmb \theta , \pmb x _ { n } ) , \pmb y _ { n } ) , \qquad n = 1 , \dots , N , } \\ & { f _ { n } ( \pmb \theta ) = f ( \pmb \theta , \pmb x _ { n } ) = z _ { n } ^ { ( L ) } ( \pmb \theta ) , \qquad n = 1 , \dots , N } \end{array}
|
| 607 |
+
$$
|
| 608 |
+
|
| 609 |
+
• Generalized Gauss-Newton matrix
|
| 610 |
+
|
| 611 |
+
$$
|
| 612 |
+
\boldsymbol { G } ( \theta ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { \theta } f _ { n } ) ^ { \top } \nabla _ { f _ { n } } ^ { 2 } \ell _ { n } ( \theta ) ( \mathrm { J } _ { \theta } f _ { n } )
|
| 613 |
+
$$
|
| 614 |
+
|
| 615 |
+
• Approximative GGN via MC sampling
|
| 616 |
+
|
| 617 |
+
$$
|
| 618 |
+
\tilde { G } ( \theta ) = \frac { 1 } { N } \sum _ { n = 1 } ^ { N } ( \mathrm { J } _ { \theta } f _ { n } ) ^ { \top } \left[ \nabla _ { \theta } \ell ( f _ { n } ( \theta ) , \hat { y } ) \nabla _ { \theta } \ell ( f _ { n } ( \theta ) , \hat { y } _ { n } ) ^ { \top } \right] _ { \hat { y } _ { n } \sim p _ { f _ { n } ( \mathbf { x } _ { n } ) } } ( \mathrm { J } _ { \theta } f _ { n } )
|
| 619 |
+
$$
|
| 620 |
+
|
| 621 |
+
Table 4: Overview of the features supported in the first release of BACKPACK. The quantities are computed separately for all module parameters, i.e. $i = 1 , \ldots , L$ .
|
| 622 |
+
|
| 623 |
+
<table><tr><td>Feature</td><td>Details</td></tr><tr><td>Individual gradients</td><td>NVen(0), n=1..,N</td></tr><tr><td>Batch variance</td><td>j=1.,...,d(i)</td></tr><tr><td>2nd moment</td><td>N≥m1N0oen(0)l,j=1do).</td></tr><tr><td>Indiv. gradient l2 norm</td><td>|/∀θ(i)len(0)l², n =1,...,N</td></tr><tr><td>DiagGGN</td><td>diag (G(0())</td></tr><tr><td>DiagGGN-MC</td><td>diag(G(0())</td></tr><tr><td>Hessian diagonal</td><td>diag(V() C(0))</td></tr><tr><td>KFAC</td><td>G(0(i)~Ai) B KFAC</td></tr><tr><td>KFLR</td><td>G(0(𝑖)) ≈ A(i) 区 B KFLR (i)</td></tr><tr><td>KFRA</td><td>G(0(i)) ~ Ai1 B KFRA</td></tr></table>
|
md/train/BJlxmAKlg/BJlxmAKlg.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# REASONET: LEARNING TO STOP READING IN MACHINE COMPREHENSION
|
| 2 |
+
|
| 3 |
+
Yelong Shen, Po-Sen Huang, Jianfeng Gao, Weizhu Chen Microsoft Research, Redmond, WA, USA {yeshen,pshuang,jfgao,wzchen}@microsoft.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Teaching a computer to read a document and answer general questions pertaining to the document is a challenging yet unsolved problem. In this paper, we describe a novel neural network architecture called the Reasoning Network (ReasoNet) for machine comprehension tasks. ReasoNets make use of multiple turns to effectively exploit and then reason over the relation among queries, documents, and answers. Different from previous approaches using a fixed number of turns during inference, ReasoNets introduce a termination state to relax this constraint on the reasoning depth. With the use of reinforcement learning, ReasoNets can dynamically determine whether to continue the comprehension process after digesting intermediate results, or to terminate reading when it concludes that existing information is adequate to produce an answer. ReasoNets have achieved state-of-the-art performance in machine comprehension datasets, including unstructured CNN and Daily Mail datasets, and a structured Graph Reachability dataset.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Teaching machines to read, process, and comprehend natural language documents is a coveted goal for artificial intelligence (Bottou, 2014; Richardson et al., 2013; Hermann et al., 2015). Genuine reading comprehension is extremely challenging, since effective comprehension involves thorough understanding of documents and performing sophisticated inference. Toward solving this machine reading comprehension problem, in recent years, several work has collected various datasets, in the form of question, passage, and answer, to test machine on answering a question based on the provided passage (Richardson et al., 2013; Hermann et al., 2015; Hill et al., 2016; Rajpurkar et al., 2016). Some large-scale cloze-style datasets (Hermann et al., 2015; Hill et al., 2016) have gained significant attention along with powerful deep learning models.
|
| 12 |
+
|
| 13 |
+
Recent approaches on cloze-style datasets can be separated into two categories: single-turn and multiturn reasoning. Single turn reasoning models utilize attention mechanisms (Bahdanau et al., 2015) with deep learning models to emphasize specific parts of the document which are relevant to the query. These attention models subsequently calculate the relevance between a query and the corresponding weighted representations of document subunits (e.g. sentences or words) to score target candidates (Hill et al., 2016; Hermann et al., 2015; Kadlec et al., 2016). However, considering the sophistication of the problem, after a single-turn comprehension, readers often revisit some specific passage or the question to grasp a better understanding of the problem. With this motivation, recent advances in reading comprehension have made use of multiple turns to infer the relation between query, document and answer (Hill et al., 2016; Dhingra et al., 2016; Trischler et al., 2016; Sordoni et al., 2016). By repeatedly processing the document and question after digesting intermediate information, multi-turn reasoning can generally produce a better answer and all existing work has demonstrated its superior performance consistently.
|
| 14 |
+
|
| 15 |
+
Existing multi-turn models have a fixed number of hops or iterations in their inference, i.e., with predetermined reasoning depth, without regard to the complexity of each individual query or document. However, when a human reads a document with a question in mind, we often decide whether we want to stop reading if we believe the observed information is adequate already to answer the question, or continue reading after digesting intermediate information until we can answer the question with confidence. This behavior generally varies from document to document, or question to question because it is related to the sophistication of the document or the difficulty of the question. Meanwhile, the analysis in Chen et al. (2016) also illustrates the huge variations in the difficulty level with respect to questions in the CNN/Daily Mail datasets (Hermann et al., 2015). For a significant part of the datasets, this analysis shows that the problem cannot be solved without appropriate reasoning on both its query and document.
|
| 16 |
+
|
| 17 |
+
With this motivation, we propose a novel neural network architecture called Reasoning Network (ReasoNet). ReasoNets try to mimic the inference process of human readers. With a question in mind, ReasoNets read a document repeatedly, each time focusing on different parts of the document until a satisfying answer is found or formed. This reminds us of a Chinese proverb: “The meaning of a book will become clear if you read it hundreds of times.”. Moreover, unlike previous approaches using fixed number of hops or iterations, ReasoNets introduce a termination state in the inference. This state can decide whether to continue the inference to next turn after digesting intermediate information, or to terminate the whole inference when it concludes that existing information is sufficient to yield an answer. This number of turns in the inference is dynamically modeled by both the document and the query, and can be learned automatically according to the difficulty of the problem.
|
| 18 |
+
|
| 19 |
+
One of the significant challenges ReasoNets face is how to design an efficient training method, since the termination state is discrete and not connected to the final output. This prohibits canonical backpropagation method being directly applied to train ReasoNets. Inspired by Williams (1992); Mnih et al. (2014), we tackle this challenge by proposing a novel deep reinforcement learning method called Contrastive Reward (CR) to successfully train ReasoNets. Unlike traditional reinforcement learning optimization methods using a global variable to capture rewards, CR utilizes an instance-based reward baseline assignment. Experiments show the superiority of CR in both training speed and accuracy. Finally, by accounting for a dynamic termination state during inference and applying proposed deep reinforcement learning optimization method, ReasoNets achieve the state-of-the-art results in machine comprehension datasets when the paper is first publicly available in arXiv1, including unstructured CNN and Daily Mail datasets, and a proposed structured Graph Reachability dataset.
|
| 20 |
+
|
| 21 |
+
This paper is organized as follows. In Section 2, we review and compare recent work on machine reading comprehension tasks. In Section 3, we introduce our proposed ReasoNet model architecture and training objectives. Section 4 presents the experimental setting and results on unstructured and structured machine reading comprehension tasks .
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Recently, with large-scale datasets available and the impressive advance of various statistical models, machine reading comprehension tasks have attracted much attention. Here we mainly focus on the related work in cloze-style datasets (Hermann et al., 2015; Hill et al., 2016). Based on how they perform the inference, we can classify their models into two categories: single-turn and multi-turn reasoning.
|
| 26 |
+
|
| 27 |
+
Single-turn reasoning Single turn reasoning models utilize an attention mechanism to emphasis some sections of a document which are relevant to a query. This can be thought of as treating some parts unimportant while focusing on other important ones to find the most probable answer. Hermann et al. (2015) propose the attentive reader and the impatient reader models using neural networks with an attention over passages to predict candidates. Hill et al. (2016) use attention over window-based memory, which encodes a window of words around entity candidates, by leveraging an end-to-end memory network (Sukhbaatar et al., 2015). Meanwhile, given the same entity candidate can appear multiple times in a passage, Kadlec et al. (2016) propose the attention-sum reader to sum up all the attention scores for the same entity. This score captures the relevance between a query and a candidate. Chen et al. (2016) propose using a bilinear term similarity function to calculate attention scores with pretrained word embedding. Trischler et al. (2016) propose the EpiReader which uses two neural network structures: one extracts candidates using the attention-sum reader; the other reranks candidates based on a bilinear term similarity score calculated from query and passage representations.
|
| 28 |
+
|
| 29 |
+
Multi-turn reasoning For complex passages and complex queries, human readers often revisit the given document in order to perform deeper inference after reading a document. Several recent studies try to simulate this revisit by combining the information in the query with the new information digested from previous iterations (Hill et al., 2016; Dhingra et al., 2016; Sordoni et al., 2016; Weissenborn, 2016; Kumar et al., 2016). Hill et al. (2016) use multiple hops memory network to augment the query with new information from the previous hop. Gated Attention reader (Dhingra et al., 2016) is an extension of the attention-sum reader with multiple iterations by pushing the query encoding into an attention-based gate in each iteration. Iterative Alternative (IA) reader (Sordoni et al., 2016) produces a new query glimpse and document glimpse in each iteration and utilizes them alternatively in the next iteration. Cui et al. (2016) further propose to extend the query-specific attention to both query-to-document attention and document-to-query attention, which is built from the intermediate results in the query-specific attention. By reading documents and enriching the query in an iterative fashion, multi-turn reasoning has demonstrated their superior performance consistently.
|
| 30 |
+
|
| 31 |
+
Algorithm 1: Stochastic Inference in a ReasoNet
|
| 32 |
+
|
| 33 |
+
<table><tr><td></td><td>Input:Memory M; Initial state s1; Step t =1; Maximum Step Tmax Output:Termination Step T,Answer aT Sample t from the distribution p(*Iftg(St; 0tg));</td></tr></table>
|
| 34 |
+
|
| 35 |
+
Our proposed approach explores the idea of using both attention-sum to aggregate candidate attention scores and multiple turns to attain a better reasoning capability. Unlike previous approaches using fixed number of hops or iterations, motivated by Nogueira & Cho (2016); Mnih et al. (2014), we propose a termination module in the inference. The termination module can decide whether to continue to infer the next turn after digesting intermediate information, or to terminate the whole inference process when it concludes existing information is sufficient to yield an answer. The number of turns in the inference is dynamically modeled by both a document and a query, and is generally related to the complexity of the document and the query.
|
| 36 |
+
|
| 37 |
+
# 3 REASONING NETWORKS
|
| 38 |
+
|
| 39 |
+
ReasoNets are devised to mimic the inference process of human readers. ReasoNets read a document repeatedly, with attention on different parts each time until a satisfying answer is found. As shown in Figure 1, a ReasoNet is composed of the following components:
|
| 40 |
+
|
| 41 |
+
Internal State: The internal state is denoted as $S$ which is a vector representation of the question state. Typically, the initial state $s _ { 1 }$ is the last-word vector representation of query by an RNN. The $t$ -th time step of the internal state is represented by $s _ { t }$ . The sequence of internal state is modeled by an RNN: $s _ { t + 1 } = \mathrm { R N N } ( s _ { t } , x _ { t } ; \theta _ { s } )$ ;
|
| 42 |
+
|
| 43 |
+
Memory: The external memory is denoted as $M$ . It is a list of word vectors, $M = \{ m _ { i } \} _ { i = 1 \dots D }$ , where $m _ { i }$ is a fixed dimensional vector. In machine comprehensive tasks, $m _ { i }$ is the vector representation of each word in the doc by a bidirectional-RNN.
|
| 44 |
+
|
| 45 |
+
Attention: Attention vector $x _ { t }$ is generated based on the current internal state $s _ { t }$ and the external memory $M \colon x _ { t } = f _ { a t t } \bigl ( s _ { t } , M ; \theta _ { x } \bigr )$ ;
|
| 46 |
+
|
| 47 |
+
Termination Gate: Termination gate generates a stochastic random variable according to the current internal state; $t _ { t } \sim p ( \cdot | f _ { t g } ( s _ { t } ; \theta _ { t g } \bar { ) } ) )$ . $t _ { t }$ is a binary random variable. If $t _ { t }$ is true, the ReasoNet stops, and the answer module executes at time step $t$ ; otherwise the ReasoNet generates an attention vector $x _ { t + 1 }$ , and feed into the state network to update the next internal state $s _ { t + 1 }$ .
|
| 48 |
+
|
| 49 |
+
Answer: The action of answer module is triggered when the termination gate variable is true: $a _ { t } \sim p ( \cdot | f _ { a } ( s _ { t } ; \theta _ { a } ) )$ .
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 1: A ReasoNet Architecture.
|
| 53 |
+
|
| 54 |
+
In Algorithm 1, we describe the stochastic inference process of a ReasoNet. The process can be considered as a Partially Observable Markov Decision Process (POMDP) (Kaelbling et al., 1998) in the reinforcement learning (RL) literature. The state sequence $s _ { 1 : T }$ is hidden and dynamic, controlled by an RNN sequence model. The ReasoNet performs an answer action $a _ { T }$ at the $T$ -th step, which implies that the termination gate variables $t _ { 1 : T } = ( t _ { 1 } = 0 , t _ { 2 } = 0 , . . . , t _ { T - 1 } = 0 , t _ { T } = 1 )$ . The ReasoNet learns a stochastic policy $\pi ( ( t _ { t } , a _ { t } ) | s _ { t } ; \theta )$ with parameters $\theta$ to get a distribution over termination actions, to continue reading or to stop, and over answer actions if the model decides to stop at the current step. The termination step $T$ varies from instance to instance.
|
| 55 |
+
|
| 56 |
+
The parameters $\theta$ of the ReasoNet are given by the parameters of the embedding matrices $W$ , attention network $\theta _ { x }$ , the state RNN network $\theta _ { s }$ , the answer action network $\theta _ { a }$ , and the termination gate network $\theta _ { t g }$ . The parameters $\theta = \{ W , \theta _ { x } , \theta _ { s } , \theta _ { a } , \theta _ { t g } \}$ are trained by maximizing the total expect reward. The expected reward for an instance is defined as:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
J ( \theta ) = \mathbb { E } _ { \pi ( t _ { 1 : T } , a _ { T } ; \theta ) } \left[ \sum _ { t = 1 } ^ { T } r _ { t } \right]
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
The reward can only be received at the final termination step when an answer action $a _ { T }$ is performed. We define $r _ { T } = 1$ if $t _ { T } = 1$ and the answer is correct, and $r _ { T } = 0$ otherwise. The rewards on intermediate steps are zeros, $\{ r _ { t } = 0 \} _ { t = 1 \dots T - 1 }$ . $J$ can be maximized by directly applying gradient based optimization methods. The gradient of $J$ is given by:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\nabla _ { \theta } J ( \theta ) = \mathbb { E } _ { \pi ( t _ { 1 : T } , a _ { T } ; \theta ) } \left[ \nabla _ { \theta } \mathrm { l o g } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) r _ { T } \right]
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
We apply the REINFORCE algorithm (Williams, 1992) to compute $\nabla _ { \boldsymbol { \theta } } J ( \boldsymbol { \theta } )$ :
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\tilde { \mathbf { L } } _ { \pi ( t _ { 1 : T } , a _ { T } ; \theta ) } \left[ \nabla _ { \theta } \mathrm { l o g } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) r _ { T } \right] = \sum _ { ( t _ { 1 : T } , a _ { T } ) \in \mathbb { A } ^ { \dagger } } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) \left[ \nabla _ { \theta } \mathrm { l o g } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) ( r _ { T } - b _ { T } ) \right]
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\mathbb { A } ^ { \dagger }$ is all the possible episodes, $T , t _ { 1 : T } , a _ { T }$ and $r _ { T }$ are the termination step, termination action, answer action, and reward, respectively, for the $( t _ { 1 : T } , a _ { T } )$ episode. $b _ { T }$ is called the reward baseline in the RL literature to lower variance (Sutton, 1984). It is common to select $b _ { T } = \mathbb { E } _ { \pi } \left[ r _ { T } \right]$ (Sutton et al., 1999), and can be updated via an online moving average approach : $b _ { T } = \lambda b _ { T } + ( \bar { 1 } - \lambda ) r _ { T }$ .
|
| 75 |
+
|
| 76 |
+
However, we empirically find that above approach leads to slow convergence in training ReasoNets. Intuitively, the average baselines $\{ b _ { T } ; T = 1 . . T _ { \mathrm { m a x } } \}$ are global variables independent of instances. It is hard for these baselines to capture the dynamic termination behavior of ReasoNets. In other words, ReasoNets may stop at different time steps for different instances. The adoption of a global variable without considering the dynamic variance in each instance is inappropriate. To resolve this weakness in traditional methods and account for the dynamic characteristic of ReasoNets, we propose an instance-based baseline method called “Contrastive Reward” (CR) to calculate $\nabla _ { \boldsymbol { \theta } } J ( \boldsymbol { \theta } )$ . The basic idea of CR is to utilize an instance-based baseline assignment. We will elaborate its implementation details in Section 3.1. Empirical results show that the proposed reward schema has produced better results compared to the baseline approach.
|
| 77 |
+
|
| 78 |
+
# 3.1 TRAINING DETAILS
|
| 79 |
+
|
| 80 |
+
In the machine reading comprehension tasks, a training dataset can be simplified as a collection of triplets of query q, passage $\mathbf { p }$ , and answer a. Say $\left. q _ { n } , p _ { n } , a _ { n } \right.$ is the $n$ -th training instance.
|
| 81 |
+
|
| 82 |
+
The first step is to extract memory $M$ from $p _ { n }$ by mapping each symbolic in the passage to a contextual representation given by the concatenation of forward and backward RNN hidden states, i.e., $m _ { k } = [ \bar { \vec { p _ { n } } } ^ { k } , \overleftarrow { \vec { p _ { n } } } ^ { | p _ { n } | - k + 1 } ]$ , and extract initial state $s _ { 1 }$ from $q _ { n }$ by assigning $s _ { 1 } = [ \overrightarrow { q _ { n } } ^ { | q _ { n } | } , \overleftarrow { q _ { n } } ^ { 1 } ]$ Given $M$ and $s _ { 1 }$ for the $n$ -th training instance, a ReasoNet executes $| \dot { \mathbb { A } } ^ { \dagger } |$ episodes, where all possible episodes $\mathbb { A } ^ { \dagger }$ can be enumerated by setting a maximum step. Each episode generates actions and a reward from the last step: h(t1:T , aT ), rT i(t1:T ,aT )∈A† .
|
| 83 |
+
|
| 84 |
+
Therefore, the gradient of $J$ can be rewritten as:
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\nabla _ { \theta } J ( \theta ) = \sum _ { ( t _ { 1 : T } , a _ { T } ) \in \mathbb { A } ^ { \dagger } } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) \left[ \nabla _ { \theta } \mathrm { l o g } \pi ( t _ { 1 : T } , a _ { T } ; \theta ) ( r _ { T } - b ) \right]
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where the baseline $\begin{array} { r } { b = \sum _ { ( t _ { 1 : T } , a _ { T } ) \in \mathbb { A } ^ { \dagger } } \pi \big ( t _ { 1 : T } , a _ { T } ; \theta \big ) r _ { T } } \end{array}$ is the average reward on the $| \mathbb { A } ^ { \dagger } |$ episodes for the $n$ -th training instance. It allows different baselines for different training instances. This can be beneficial since the complexity of training instances varies significantly. Since the sum of the proposed rewards over $\left| \mathbb { A } ^ { \dagger } \right|$ episodes is zero, $\sum _ { ( t _ { 1 : T } , a _ { T } ) \in \mathbb { A } ^ { \dagger } } \pi \big ( \hat { t _ { 1 : T } } , a _ { T } ; \theta \big ) \big ( r _ { T } - b \big ) = 0$ , we call it Contrastive Reward in this work. In experiments, we empirically find using $\left( \frac { r _ { T } } { b } - 1 \right)$ in replace of $\left( r _ { T } - b \right)$ can lead to a faster convergence. Therefore, we adopt this approach to train ReasoNets in the experiments.
|
| 91 |
+
|
| 92 |
+
# 4 EXPERIMENTS
|
| 93 |
+
|
| 94 |
+
# 4.1 CNN AND DAILY MAIL DATASETS
|
| 95 |
+
|
| 96 |
+
We evaluate the performance of ReasoNets on CNN and Daily Mail datasets.2 The detailed settings of the ReasoNet model are as follows.
|
| 97 |
+
|
| 98 |
+
Vocab Size: For training our ReasoNet, we keep the most frequent $| V | = 1 0 1 k$ words (not including 584 entities and 1 placeholder marker) in the CNN dataset, and $| V | = 1 5 1 k$ words (not including 530 entities and 1 placeholder marker) in the Daily Mail dataset.
|
| 99 |
+
|
| 100 |
+
Embedding Layer: We choose word embedding size $d \ : = \ : 3 0 0$ , and use the 300 dimensional pretrained Glove word embeddings (Pennington et al., 2014) for initialization. We also apply dropout with probability 0.2 to the embedding layer.
|
| 101 |
+
|
| 102 |
+
Bi-GRU Encoder: We apply bi-directional GRU for encoding query and passage into vector representations. We set the number of hidden units to be 256 and 384 for the CNN and Daily Mail datasets, respectively. The recurrent weights of GRUs are initialized with random orthogonal matrices. The other weights in GRU cell are initialized from a uniform distribution between $- 0 . 0 1$ and 0.01. We use a shared GRU model for both query and passage.
|
| 103 |
+
|
| 104 |
+
Memory and Attention: The memory of the ReasoNet on CNN and Daily Mail dataset is composed of query memory and passage memory. $M = ( M ^ { q u e r y } , M ^ { d o c } )$ , where $M ^ { q u e r y }$ and $M ^ { d \bar { o c } }$ are extracted from query bidirectional-GRU encoder and passage bidirectional-GRU encoder respectively. We choose projected cosine similarity function as the attention module.
|
| 105 |
+
|
| 106 |
+
# Query: passenger @placeholder , 36 , died at the scene 1 1
|
| 107 |
+
|
| 108 |
+
Passage: ( $@$ entity0 ) what was supposed to be a fantasy sports car ride at $@$ entity3 turned deadly when a @entity4 crashed into a guardrail . the crash took place sunday at the $@$ entity8 , which bills itself as a chance to drive your dream car on a racetrack . the @entity4 's passenger , 36 - year - old @entity14 of @entity15 , @entity16 , died at the scene ,3 $@$ entity13 said . the driver of the $@$ entity4 , 24 - year - old @entity18 of @entity19 , $@$ entity16 , lost control of the vehicle , the $@$ entity13 said . he was hospitalized with minor injuries . @entity24 , which operates the $@$ entity8 at @entity3 , released a statement sunday night about the crash . " on behalf of everyone in the organization , it is with a very heavy heart that we extend our deepest sympathies to those involved in today 's tragic accident in @entity36 , " the company said . @entity24 also operates the @entity3 -- a chance to drive or ride in $@$ entity39 race cars named for the winningest driver in the sport 's history . @entity0 's @entity43 and $@$ entity44 contributed to this report .
|
| 109 |
+
|
| 110 |
+
<table><tr><td rowspan=1 colspan=1>Step</td><td rowspan=1 colspan=1>TerminationProbability</td><td rowspan=1 colspan=1>AttentionSum</td></tr><tr><td rowspan=2 colspan=1>12</td><td rowspan=1 colspan=1>0.0011</td><td rowspan=1 colspan=1>0.4916</td></tr><tr><td rowspan=1 colspan=1>0.5747</td><td rowspan=1 colspan=1>0.5486</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>0.9178</td><td rowspan=1 colspan=1>0.5577</td></tr></table>
|
| 111 |
+
|
| 112 |
+
Answer: @entity14
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 2: Results of a test example 69e1f777e41bf67d5a22b7c69ae76f0ae873cf43.story from the CNN dataset. The numbers next to the underline bars indicate the rank of the attention scores. The corresponding termination probability and the sum of attention scores for the answer entity are shown in the table on the right.
|
| 116 |
+
|
| 117 |
+
The attention score adoct,i on memory $m _ { i } ^ { d o c }$ given the state $s _ { t }$ is computed as follows: $a _ { t , i } ^ { d o c } ~ =$ sof $\mathrm { t m a x } _ { i = 1 , \dots , | M ^ { d o c } | } \gamma \cos ( W _ { 1 } ^ { d o c } m _ { i } ^ { d o c } , W _ { 2 } ^ { d o c } s _ { t } )$ , where $\gamma$ is set to 10. $W _ { 1 } ^ { d o c }$ and $W _ { 2 } ^ { d o c }$ are weight vectors associated with $m _ { i } ^ { d o c }$ and $s _ { t }$ , respectively, and are joint trained in the ReasoNet. Thus, attention vector on passage is given by $\begin{array} { r } { x _ { t } ^ { d o c } = \sum _ { i } ^ { | M | } a _ { t , i } m _ { i } ^ { d o c } } \end{array}$ . The final attention vector is the concatenation of the query attention vector and the passage attention vector $x _ { t } = ( x _ { t } ^ { q u e r y } , x _ { t } ^ { d o c } )$ = (xquet ry , xdoct ). The attention module is parameterized by $\theta _ { x } = ( W _ { 1 } ^ { q u e \hat { r } y } , \bar { W _ { 2 } ^ { q u e r y } } , W _ { 1 } ^ { d o c } , W _ { 2 } ^ { d o c } )$ ;
|
| 118 |
+
|
| 119 |
+
Internal State Controller: We choose GRU model as the internal state controller. The number of hidden units in the GRU state controller is 256 for CNN and 384 for Daily Mail. The initial state of the GRU controller is set to be the last-word of the query representation by a bidirectional-GRU encoder.
|
| 120 |
+
|
| 121 |
+
Termination Module: We adopt a logistical regression to model the termination variable at each time step : $f _ { t g } ( s _ { t } ; \theta _ { t g } ) = \mathrm { s i g m o i d } ( \bar { W _ { t g } } s _ { t } + b _ { t g } ) \dot { ; } \theta _ { t g } = ( \bar { W _ { t g } } , b _ { t g } )$
|
| 122 |
+
|
| 123 |
+
Answer Module: We apply a linear projection from GRU outputs and make predictions on the entity candidates. Following the settings in AS Reader (Kadlec et al., 2016), we sum up scores from the same candidate and make a prediction. Thus, AS Reader can be viewed as a special case of ReasoNets with $T _ { \mathrm { m a x } } = 1$ .
|
| 124 |
+
|
| 125 |
+
Other Details: The maximum reasoning step, $T _ { \mathrm { m a x } }$ is set to 5 in experiments on both CNN and Daily Mail datasets. We use ADAM optimizer (Kingma & Ba, 2015) for parameter optimization with an initial learning rate of 0.0005, $\beta _ { 1 } = 0 . 9$ and $\beta _ { 2 } = 0 . 9 9 9$ ; The absolute value of gradient on each parameter is clipped within 0.001. The batch size is 64 for both CNN and Daily Mail datasets. For each batch of the CNN and Daily Mail datasets we randomly reshuffle the assignment of named entities (Hermann et al., 2015). This forces the model to treat the named entities as semantically meaningless labels. In the prediction of test cases, we randomly reshuffle named entities up to 4 times, and report the averaged answer. Models are trained on GTX TitanX 12GB. It takes 7 hours per epoch to train on the Daily Mail dataset and 3 hours per epoch to train on the CNN dataset. The models are usually converged within 6 epochs on both CNN and Daily Mail datasets.
|
| 126 |
+
|
| 127 |
+
Table 1 shows the performance of all the existing single model baselines and our proposed ReasoNet. By capturing multi-turn reasoning and learning to stop reading a paragraph, we have achieved the state-of-the-art results in both CNN and Daily Mail datasets. To further understand the inference process of the ReasoNet, Figure 2 shows a test example of the CNN dataset. The model initially focuses on wrong entities with low termination probability. In the second and third steps, the model focuses on the right clue with higher termination probability. Interestingly, we also find that query attention focuses on the placeholder token throughout all the steps.
|
| 128 |
+
|
| 129 |
+
Table 1: The performance of Reasoning Network on CNN and Daily Mail dataset.
|
| 130 |
+
|
| 131 |
+
<table><tr><td></td><td colspan="2">CNN</td><td colspan="2">Daily Mail</td></tr><tr><td></td><td>valid</td><td>test</td><td>valid</td><td>test</td></tr><tr><td>Deep LSTMReader (Hermann etal.,2015)</td><td>55.0</td><td>57.0</td><td>63.3</td><td>62.2</td></tr><tr><td>Attentive Reader (Hermann et al., 2015)</td><td>61.6</td><td>63.0</td><td>70.5</td><td>69.0</td></tr><tr><td>MemNets (Hill et al.,2016)</td><td>63.4</td><td>66.8</td><td>-</td><td>=</td></tr><tr><td>ASReader (Kadlec et al., 2016)</td><td>68.6</td><td>69.5</td><td>75.0</td><td>73.9</td></tr><tr><td>Stanford AR (Chen et al.,2016)</td><td>72.2</td><td>72.4</td><td>76.9</td><td>75.8</td></tr><tr><td>DER Network (Kobayashi et al., 2016)</td><td>71.3</td><td>72.9</td><td>1</td><td>-</td></tr><tr><td>Iterative Attention Reader (Sordoni et al.,2016)</td><td>72.6</td><td>73.3</td><td>=</td><td>=</td></tr><tr><td>EpiReader (Trischler et al.,2016)</td><td>73.4</td><td>74.0</td><td>=</td><td>=</td></tr><tr><td>GA Reader (Dhingra et al.,2016)</td><td>73.0</td><td>73.8</td><td>76.7</td><td>75.7</td></tr><tr><td>AoA Reader (Cui et al., 2016)</td><td>73.1</td><td>74.4</td><td>=</td><td></td></tr><tr><td>ReasoNet</td><td>72.9</td><td>74.7</td><td>77.6</td><td>76.6</td></tr></table>
|
| 132 |
+
|
| 133 |
+
Table 2: Reachability statistics of the Graph Reachability dataset.
|
| 134 |
+
|
| 135 |
+
<table><tr><td></td><td colspan="4">Small Graph</td><td colspan="4">Large Graph</td></tr><tr><td>Reachable Step</td><td>No Reach</td><td>1-3</td><td>4-6</td><td>7-9</td><td>No Reach</td><td>1-3</td><td>4-6</td><td>7-13</td></tr><tr><td>Train (%)</td><td>44.16</td><td>42.06</td><td>13.51</td><td>0.27</td><td>49.02</td><td>25.57</td><td>21.92</td><td>3.49</td></tr><tr><td>Test (%)</td><td>45.00</td><td>41.35</td><td>13.44</td><td>0.21</td><td>49.27</td><td>25.46</td><td>21.74</td><td>3.53</td></tr></table>
|
| 136 |
+
|
| 137 |
+
# 4.2 GRAPH REACHABILITY TASK
|
| 138 |
+
|
| 139 |
+
Recent analysis and results (Chen et al., 2016) on the cloze-style machine comprehension tasks have suggested some simple models without multi-turn reasoning can achieve reasonable performance. Based on these results, we construct a synthetic structured Graph Reachability dataset3 to evaluate longer range machine inference and reasoning capability, since we expect ReasoNets have the capability to handle long range relationships.
|
| 140 |
+
|
| 141 |
+
We generate two synthetic datasets: a small graph dataset and a large graph dataset. In the small graph dataset, it contains $5 0 0 K$ small graphs, where each graph contains 9 nodes, and 16 direct edges to randomly connect pairs of nodes. The large graph dataset contains $5 0 0 K$ graphs, where each graph contains 18 nodes, and 32 random direct edges. Duplicated edges are removed. Table 2 shows the graph reachability statistics on the two datasets.
|
| 142 |
+
|
| 143 |
+
In Table 3, we show examples of a small graph and a large graph in the synthetic dataset. Both graph and query are represented by a sequence of symbols. In the experiment, we use a 100-dimensional embedding vector for each symbol, and bidirectional-LSTM with 128 and 256 cells for query and graph embedding in the small and the large graph datasets, respectively. The last states of bidirectionalLSTM on query are concatenated to be the initial internal state $s _ { 1 } \overline { { \mathop { = } } } \left[ \overrightarrow { q } ^ { | q | } , \overleftarrow { q } ^ { 1 } \right]$ in the ReasoNet. Another bidirectional-LSTM on graph description maps each symbol $g ^ { i }$ to a contextual representation given by the concatenation of forward and backward LSTM hidden states $m _ { i } = [ \vec { g } ^ { i } , \overleftarrow { g } | \dot { g } | - i + 1 ]$ . The final answer is either “Yes” or “No” and hence logistical regression is used as the answer module: $a _ { t } = \sigma ( W _ { a } s _ { t } + b _ { a } )$ ; $\theta _ { a } = ( W _ { a } , b _ { a } )$ . We apply another logistical regression as the termination gate module: $t _ { t } = \sigma ( W _ { t g } s _ { t } + b _ { t g } )$ . The maximum reasoning step $T _ { \mathrm { m a x } }$ is set to 15 and 25 for the small graph and large graph dataset, respectively.
|
| 144 |
+
|
| 145 |
+
We denote “ReasoNet” as the standard ReasoNet with termination gate, as described in Section 3.1. To study the effectiveness of the termination gate in ReasoNets, we remove the termination gate and use the prediction from the last state, $\hat { a } = a _ { T _ { \mathrm { m a x } } }$ $\mathcal { T } _ { \mathrm { m a x } }$ is the maximum reasoning step), denoted as “ReasoNet-Last”. To study the effectiveness of multi-turn reasoning, we choose “ReasoNet $- T _ { \mathrm { m a x } } = 2 ^ { , , }$ , which only has single-turn reasoning. We compare ReasoNets with a two layer deep LSTM model (Hermann et al., 2015) with 128 hidden units, denoted as “Deep LSTM Reader”, as a baseline. Table 4 shows the performance of these models on the graph reachability dataset. Deep LSTM Reader achieves $9 0 . 9 2 \%$ and $7 1 . 5 5 \%$ accuracy in the small and large graph dataset, respectively, which indicates the graph reachibility task is not trivial. The results of ReasoNet $- T _ { \mathrm { m a x } } = 2$ are comparable with the results of Deep LSTM Reader, since both Deep LSTM Reader and ReasoNet $- T _ { \mathrm { m a x } } = 2$ perform single-turn reasoning. The ReasoNet-Last model achieves $1 0 0 \%$ accuracy on the small graph dataset, while the ReasoNet-Last model achieves only $7 8 . 9 5 \%$ accuracy on the large graph dataset, as the task becomes more challenging. Meanwhile, the ReasoNet model converges faster than the ReasoNet-Last model. The ReasoNet model converges in 20 epochs in the small graph dataset, and 40 epochs in the large graph dataset, while the ReasoNet-Last model converges around 40 epochs in the small graph dataset, and 70 epochs in the large graph dataset. The results suggest that the termination gate variable in the ReasoNet is helpful when training with sophisticated examples, and makes models converge faster. Both the ReasoNet and ReasoNet-Last models perform better than the ReasoNet $- T _ { \mathrm { m a x } } = 2$ model, which demonstrates the importance of multi-turn reasoning.
|
| 146 |
+
|
| 147 |
+
Table 3: Small and large random graph in the Graph Reachability dataset. Note that “ $A B ^ { \prime }$ represents an edge connected from $A$ to $B$ and the $\#$ symbol is used as a delimiter between different edges.
|
| 148 |
+
|
| 149 |
+
<table><tr><td></td><td>Small Graph</td><td>Large Graph</td></tr><tr><td>Graph Description</td><td>0→0#0→2#1→→2#2→1# 3→2#3→3#3-6#37# 4→0#4→1#44#57# 6→0#6→1#7→0#</td><td>0→17#1→3#1→→14#1→6# 2→11#2→13#2→15#3→7# 5→0#5→7#6→10#6→5# 7→15#7-→7#8-→11#87# 10 →9#10→6#10→7#12→1# 12 →12#12→6#13-11#14→17# 14→14#15→10#16→2#17→4#</td></tr><tr><td>Query</td><td>7→4</td><td>17→7# 10→17</td></tr><tr><td>Answer</td><td>No</td><td>Yes</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 4: The performance of Reasoning Network on the Graph Reachability dataset.
|
| 152 |
+
|
| 153 |
+
<table><tr><td></td><td colspan="3">Small Graph</td><td colspan="3">Large Graph</td></tr><tr><td></td><td>ROC-AUC</td><td>PR-AUC</td><td>Accuracy</td><td>ROC-AUC</td><td>PR-AUC</td><td>Accuracy</td></tr><tr><td>Deep LSTM Reader</td><td>0.9619</td><td>0.9565</td><td>0.9092</td><td>0.7988</td><td>0.7887</td><td>0.7155</td></tr><tr><td>ReasoNet-Tmax = 2</td><td>0.9638</td><td>0.9677</td><td>0.8961</td><td>0.8477</td><td>0.8388</td><td>0.7607</td></tr><tr><td>ReasoNet-Last</td><td>1</td><td>1</td><td>1</td><td>0.8836</td><td>0.8742</td><td>0.7895</td></tr><tr><td>ReasoNet</td><td>1</td><td>1</td><td>1</td><td>0.9988</td><td>0.9989</td><td>0.9821</td></tr></table>
|
| 154 |
+
|
| 155 |
+
To further understand the inference process in ReasoNets, Figures 3 and 4 show test examples of the large graph dataset. In Figure 3, we can observe that the model does not make a firm prediction till step 9. The highest attention word at each step shows the reasoning process of the model. Interestingly, the model starts from the end node (17), traverses backward till finding the starting node (10) in step 9, and makes a firm termination prediction. On the other hand, in Figure 4, the model learns to stop in step 2. In step 1, the model looks for neighbor nodes (12, 6, 16) to 4 and 9. Then, the model gives up in step 2 and predict “No". All of these demonstrate the dynamic termination characteristic and potential reasoning capability of ReasoNets.
|
| 156 |
+
|
| 157 |
+
We show the distribution of termination steps in ReasoNets on the test set in Appendix A. The termination step is chosen with the maximum termination probability $\begin{array} { r } { p ( k ) = t _ { k } \prod _ { i = 1 } ^ { k - 1 } \left( 1 - t _ { i } \right) } \end{array}$ , where $t _ { i }$ is the termination probability at step $i$ .
|
| 158 |
+
|
| 159 |
+
# 5 CONCLUSION
|
| 160 |
+
|
| 161 |
+
In this paper, we propose ReasoNets that dynamically decide whether to continue or to terminate the inference process in machine comprehension tasks. Using reinforcement learning with the proposed contractive reward, our proposed model achieves the start-of-the-art results in machine comprehension datasets, including unstructured CNN and Daily Mail datasets, and a proposed structured Graph
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 3: An example of graph reachability result, given a query $^ { \cdot } 1 0 1 7 ^ { \cdot \cdot }$ (Answer: Yes). The red circles highlight the nodes/edges which have the highest attention in each step. The corresponding termination probability and prediction results are shown in the table. The model terminates at step 10.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 4: An example of graph reachability result, given a query $" 4 9 "$ (Answer: No). The numbers next to the underline bars indicate the rank of the attention scores. The corresponding termination probability and prediction results are shown in the table.
|
| 168 |
+
|
| 169 |
+
Reachability dataset. For future work, ReasoNets can be generalized to other tasks that requires reasoning capability, such as question answering and knowledge graph inference.
|
| 170 |
+
|
| 171 |
+
# ACKNOWLEDGMENTS
|
| 172 |
+
|
| 173 |
+
We thank Ming-Wei Chang, Li Deng, Lihong Li, and Xiaodong Liu for their thoughtful feedback and discussions.
|
| 174 |
+
|
| 175 |
+
# REFERENCES
|
| 176 |
+
|
| 177 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proceedings of the International Conference on Learning Representations, 2015.
|
| 178 |
+
|
| 179 |
+
Léon Bottou. From machine learning to machine reasoning. Machine Learning, 94(2):133–149, 2014.
|
| 180 |
+
|
| 181 |
+
Danqi Chen, Jason Bolton, and Christopher D Manning. A thorough examination of the CNN / Daily Mail reading comprehension task. In ACL, 2016.
|
| 182 |
+
|
| 183 |
+
Yiming Cui, Zhipeng Chen, Si Wei, Shijin Wang, Ting Liu, and Guoping Hu. Attention-over-attention neural networks for reading comprehension. CoRR, abs/1607.04423, 2016.
|
| 184 |
+
|
| 185 |
+
Bhuwan Dhingra, Hanxiao Liu, William W. Cohen, and Ruslan Salakhutdinov. Gated-attention readers for text comprehension. CoRR, abs/1606.01549, 2016.
|
| 186 |
+
|
| 187 |
+
Karm Moritz Hermann, Tomáš Kociský, 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.
|
| 188 |
+
|
| 189 |
+
Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. The Goldilocks principle: Reading children’s books with explicit memory representations. In Proceedings of the International Conference on Learning Representations, 2016.
|
| 190 |
+
|
| 191 |
+
Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. Text understanding with the attention sum reader network. arXiv:1603.01547v1 [cs.CL], 2016.
|
| 192 |
+
|
| 193 |
+
Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra. Planning and acting in partially observable stochastic domains. Artificial Intelligence, 101:99–134, 1998.
|
| 194 |
+
|
| 195 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations, 2015.
|
| 196 |
+
|
| 197 |
+
Sosuke Kobayashi, Ran Tian, Naoaki Okazaki, and Kentaro Inui. Dynamic entity representation with maxpooling improves machine reading. In Proceedings of the North American Chapter of the Association for Computational Linguistics and Human Language Technologies (NAACL-HLT), 2016.
|
| 198 |
+
|
| 199 |
+
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. In Proceedings of the International Conference on Machine Learning, 2016.
|
| 200 |
+
|
| 201 |
+
Volodymyr Mnih, Nicolas Heess, Alex Graves, et al. Recurrent models of visual attention. In Advances in Neural Information Processing Systems, pp. 2204–2212, 2014.
|
| 202 |
+
|
| 203 |
+
Rodrigo Nogueira and Kyunghyun Cho. Webnav: A new large-scale task for natural language based sequential decision making. In Advances in Neural Information Processing Systems, 2016.
|
| 204 |
+
|
| 205 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, 2014.
|
| 206 |
+
|
| 207 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100, $0 0 0 +$ questions for machine comprehension of text. In EMNLP, 2016.
|
| 208 |
+
|
| 209 |
+
Matthew Richardson, Christopher JC Burges, and Erin Renshaw. MCTest: A challenge dataset for the opendomain machine comprehension of text. In EMNLP, 2013.
|
| 210 |
+
|
| 211 |
+
Alessandro Sordoni, Phillip Bachman, and Yoshua Bengio. Iterative alternating neural attention for machine reading. CoRR, abs/1606.02245, 2016.
|
| 212 |
+
|
| 213 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015.
|
| 214 |
+
|
| 215 |
+
Richard S. Sutton, David McAllester, Satinder Singh, and Yishay Mansour. Policy gradient methods for reinforcement learning with function approximation. In Advances in Neural Information Processing Systems, 1999.
|
| 216 |
+
|
| 217 |
+
Richard Stuart Sutton. Temporal Credit Assignment in Reinforcement Learning. PhD thesis, 1984.
|
| 218 |
+
|
| 219 |
+
Adam Trischler, Zheng Ye, Xingdi Yuan, and Kaheer Suleman. Natural language comprehension with the EpiReader. In EMNLP, 2016.
|
| 220 |
+
|
| 221 |
+
Dirk Weissenborn. Separating answers from queries for neural reading comprehension. CoRR, abs/1607.03316, 2016.
|
| 222 |
+
|
| 223 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3-4):229–256, 1992.
|
| 224 |
+
|
| 225 |
+
# A THE TERMINATION STEP DISTRIBUTION IN REASONETS
|
| 226 |
+
|
| 227 |
+
In this section, we present the termination step distribution of ReasoNets. Figure 5 and Figure 6 show the termination step distribution of ReasoNets in the CNN dataset and the graph reachability dataset, respectively. The distributions spread out across different steps and there are a large number of instances that terminate in the last step. We study the correlation between the termination steps and the complexity of test instances in Figure 7. We use Breadth-First Search (BFS) algorithm over the target graph given the query to analyze the complexity of test instances. For example, BFS-Step $= 2$ indicates that there are two intermediate nodes in the shortest reachability path. Test instances with larger BFS-Steps are more challenging. We denote ${ \bf B } \mathrm { F S - S t e p = - 1 }$ as there is no reachable path for the given query. Figure 7 shows that test instances with larger BFS-Steps require more reasoning steps.
|
| 228 |
+
|
| 229 |
+

|
| 230 |
+
Figure 5: The termination step distribution of a ReasoNet $T _ { m a x } = 5$ ) in the CNN dataset.
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
Figure 6: Termination step distribution of ReasoNets in the graph reachability dataset, where $T _ { m a x }$ is set to 15 and 25 in the small graph and large graph dataset, respectively.
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Figure 7: The correlation between BFS steps and ReasoNet termination steps in the graph reachability dataset, where $T _ { m a x }$ is set to 15 and 25 in the small graph and large graph dataset, respectively, and BFS-Step $\ c = - 1$ denotes unreachable cases. The value indicates the number of instances in each case.
|
md/train/BJlzm64tDH/BJlzm64tDH.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PRETRAINED ENCYCLOPEDIA: WEAKLY SUPERVISED KNOWLEDGE-PRETRAINED LANGUAGE MODEL
|
| 2 |
+
|
| 3 |
+
Wenhan Xiong†, Jingfei $\mathbf { D } \mathbf { u } ^ { \mathrm { S } }$ , William Yang Wang†, Veselin Stoyanov§,
|
| 4 |
+
|
| 5 |
+
† University of California, Santa Barbara § Facebook AI {xwhan, william}@cs.ucsb.edu, {jingfeidu, ves}@fb.com
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Recent breakthroughs of pretrained language models have shown the effectiveness of self-supervised learning for a wide range of natural language processing (NLP) tasks. In addition to standard syntactic and semantic NLP tasks, pretrained models achieve strong improvements on tasks that involve real-world knowledge, suggesting that large-scale language modeling could be an implicit method to capture knowledge. In this work, we further investigate the extent to which pretrained models such as BERT capture knowledge using a zero-shot fact completion task. Moreover, we propose a simple yet effective weakly supervised pretraining objective, which explicitly forces the model to incorporate knowledge about real-world entities. Models trained with our new objective yield significant improvements on the fact completion task. When applied to downstream tasks, our model consistently outperforms BERT on four entity-related question answering datasets (i.e., WebQuestions, TriviaQA, SearchQA and Quasar-T) with an average $2 . 7 \ \mathrm { F 1 }$ improvements and a standard fine-grained entity typing dataset (i.e., FIGER) with 5.7 accuracy gains.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Language models pretrained on a large amount of text such as ELMo (Peters et al., 2018a)), BERT (Devlin et al., 2019) and XLNet (Yang et al., 2019c) have established new state of the art on a wide variety of NLP tasks. Researchers ascertain that pretraining allows models to learn syntactic and semantic information of language that is then transferred on other tasks (Peters et al., 2018b; Clark et al., 2019). Interestingly, pretrained models also perform well on tasks that require grounding language and reasoning about the real world. For instance, the new state-of-the-art for WNLI (Wang et al., 2019a), ReCoRD (Zhang et al., 2018) and SWAG (Zellers et al., 2018) is achieved by pretrained models. These tasks are carefully designed so that the text input alone does not convey the complete information for accurate predictions – external knowledge is required to fill the gap. These results suggest that large-scale pretrained models implicitly capture real-world knowledge. Logan et al. (2019) and Petroni et al. (2019) further validate this hypothesis through a zero-shot fact completion task that involves single-token entities, showing that pretrained models achieve much better performance than random guessing and can be on par with specifically-trained relation extraction models.
|
| 14 |
+
|
| 15 |
+
As unstructured text encodes a great deal of information about the world, large-scale pretraining over text data holds the promise of simultaneously learning syntax, semantics and connecting them with knowledge about the real world within a single model. However, existing pretraining objectives are usually defined at the token level and do not explicitly model entity-centric knowledge. In this work, we investigate whether we can further enforce pretrained models to focus on encyclopedic knowledge about real-world entities, so that they can better capture entity information from natural language and be applied to improving entity-related NLP tasks. We evaluate the extent to which a pretrained model represents such knowledge by extending an existing fact completion evaluation to a cloze ranking setting that allows us to deal with a large number of multi-token entity names without manual judgments. Our experiments on 10 common Wikidata (Vrandeciˇ c & Kr ´ otzsch, 2014) ¨ relations reveal that existing pretrained models encode entity-level knowledge only to a limited degree. Thus, we propose a new weakly supervised knowledge learning objective that requires the model to distinguish between true and false knowledge expressed in natural language. Specifically, we replace entity mentions in the original documents with names of other entities of the same type and train the models to distinguish the correct entity mention from randomly chosen ones. Models trained with this objective demonstrates much stronger fact completion performance for most relations we test on. Compared with previous work (Zhang et al., 2019; Peters et al., 2019) that utilizes an external knowledge base to incorporate entity knowledge, our method is able to directly derive real-world knowledge from unstructured text. Moreover, our method requires no additional data processing, memory or modifications to the BERT model when fine-tuning for downstream tasks.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Type-Constrained Entity Replacements for Knowledge Learning.
|
| 19 |
+
|
| 20 |
+
We test our model on two practical NLP problems that require entity knowledge: Question Answering (QA) and fine-grained Entity Typing. We use four previously published datasets for open-domain QA and observe that questions in these datasets often concern entities. The Entity Typing task requires the model to recognize fine-grained types of specified entity mentions given short contexts. On three of the QA datasets, our pretrained model outperforms all previous methods that do not rely on memory-consuming inter-passage normalizations1. On the FIGER entity-typing dataset, our model sets a new state of the art. Through ablation analysis, we show that the new entity-centric training objective is instrumental for achieving state-of-the-art results.
|
| 21 |
+
|
| 22 |
+
In summary, this paper makes the following contributions: 1) We extend existing fact completion evaluation settings to test pretrained models’ ability on encoding knowledge of common real-world entities; 2) We propose a new weakly supervised pretraining method which results in models that better capture knowledge about real-world entities from natural language text; 3) The model trained with our knowledge learning objective establishes new state of the art on three entity-related QA datasets and a standard fine-grained entity typing dataset.
|
| 23 |
+
|
| 24 |
+
We begin by introducing our weakly supervised method for knowledge learning (§2) and then discuss experiment settings and evaluation protocols, compare our model to previously published work and perform ablation analysis. Finally, we review related work in §4 and conclude in §5.
|
| 25 |
+
|
| 26 |
+
# 2 ENTITY REPLACEMENT TRAINING
|
| 27 |
+
|
| 28 |
+
We design an entity-centric training objective that utilizes weakly supervised training signals to explicitly encourage knowledge learning during pretraining. Given an input document, we first recognize the entity mentions and link them to Wikipedia entities2. We consider the original texts as positive knowledge statements and create negative statements by randomly replacing the entity mentions $( { \mathcal { E } } ^ { + } )$ with the names of other random entities $( { \mathcal { E } } ^ { - } )$ that have the same entity type as the mentioned entity. This setup is similar in spirit to the type-constrained negative sampling technique used to train knowledge base representations (Bordes et al., 2013). The latter technique creates negative triples by replacing the subject or object entity with random entities of the same type. Instead of knowledge base triples, we treat unstructured texts as factual statements. For a certain entity $e$ mentioned in a context $\mathcal { C }$ , we train the model to make a binary prediction indicating whether the entity has been replaced:
|
| 29 |
+
|
| 30 |
+
$$
|
| 31 |
+
J _ { e , \mathcal { C } } = \mathbb { 1 } _ { e \in \mathcal { E } ^ { + } } \log P ( e | \mathcal { C } ) + ( 1 - \mathbb { 1 } _ { e \in \mathcal { E } ^ { + } } ) \log ( 1 - P ( e | \mathcal { C } ) ) .
|
| 32 |
+
$$
|
| 33 |
+
|
| 34 |
+
Compared to the language modeling objective, entity replacement is defined at the entity level and introduces stronger negative signals. When we enforce entities to be of the same type, we preserve the linguistic correctness of the original sentence while the system needs to learn to perform judgment based on the factual aspect of the sentence.
|
| 35 |
+
|
| 36 |
+
We describe the implementation in more detail in the following paragraphs.
|
| 37 |
+
|
| 38 |
+
Data Preparation We use the whole English Wikipedia dump as training data and rely on all Wikipedia entities3. Entities in documents are recognized based on Wikipedia anchor links and entity alias from Wikidata. That is, we first retrieve the entities annotated by anchor links and then find other mentions of these entities by string matching their Wikidata alias. We split each document into multiple text chunks with the same size (512 tokens). Although our experiments rely on the Wikipedia corpus, this setup can be easily extended to larger corpora with off-the-shelf entity linking tools. We leave the larger scope of the experiments to future work.
|
| 39 |
+
|
| 40 |
+
Replacement Strategy When replacing entities, we first lookup type information4 from Wikidata and then randomly select other entities with the same type. We do not replace adjacent entities. In other words, there must be at least one unreplaced entity between any two replaced ones. This reduces cases where we replace all entities in the same sentence and the resulting sentences happen to introduce correct entities by chance. For replacement, we randomly sample a string from the entities’ alias set. For each text chunk, we replicate it 10 times with different negative entities for each replacement location. We show an illustration of the entity replacement method in Figure 1.
|
| 41 |
+
|
| 42 |
+
Model Architecture We use the Transformer (Vaswani et al., 2017) model used by BERT (Devlin et al., 2019). We use the same architecture as BERT base: 12 Transformer layers, each with hidden dimension 768. We initialize the transformer with a model pretrained based on our own BERT reimplementations5. For each entity, we use the final representations of its boundary words (words before and after the entity mention) to make predictions. We simply concatenate the boundary words’ representations and add a linear layer for prediction. During training, we use 0.05 dropout at the final layer.
|
| 43 |
+
|
| 44 |
+
Training Objectives Masked language model pretraining has been proven to be effective for downstream tasks. While training for entity replacement we also train with the masked language model objective in a multi-task set-up. When masking tokens, we restrict the masks to be outside the entity spans. We use a masking ratio of $5 \%$ instead of $1 5 \%$ in the original BERT to avoid masking out too much of the context. We train the model for approximately 1 million updates using a batch size of 128.
|
| 45 |
+
|
| 46 |
+
# 3 EXPERIMENTS
|
| 47 |
+
|
| 48 |
+
We first test our model on a fact completion task. This task resembles traditional knowledge base completion: it requires the model to complete missing entities in factual triples. We further test on two real-world downstream tasks that require entity-level knowledge – question answering and fine-grained entity typing. We describe the hyperparameter and training settings of all experiments in the appendix.
|
| 49 |
+
|
| 50 |
+
# 3.1 ZERO-SHOT FACT COMPLETION
|
| 51 |
+
|
| 52 |
+
In traditional knowledge base completion tasks models have access to a set of training triples. Instead, we utilize a zero-shot test to examine the model’s ability to automatically derive relational knowledge from natural language.
|
| 53 |
+
|
| 54 |
+
Dataset We rely on factual triples from Wikidata. Each triple describes the relationship between two certain entities, e.g., {Paris, CapitalOf, France $\}$ . Following recent practices (Bosselut et al., 2019; Logan et al., 2019) that decode structured knowledge from language models, we first manually create templates to convert triples of 10 common relations into natural language expressions ({Paris, CapitalOf, France $\} $ the capital of France is Paris). We then create queries by removing the object entity in the expression and use pre-trained models to predict the missing entities, e.g., the capital of France is ?. We create 1000 cloze examples6 for each of the 10 relations.
|
| 55 |
+
|
| 56 |
+
Evaluation Metrics Previous work (Logan et al., 2019; Petroni et al., 2019) either relies on human evaluation or only considers single-token entities for fact completion. In contrast, we consider an entity-ranking setup and create a set of candidate entities for each relation. This setting allows us to automatically evaluate a large number of queries that usually involve multi-token entities. We test pretrained models on their ability to recover the correct object entity from the candidate set. To create the negative choices, we select from the set of all object entities in the particular relation, which generally have the same type as the groundtruth and are more challenging to distinguish than entities with different types. Our evaluation strategy is similar to previous work on knowledge base completion (Nickel et al., 2011; Bordes et al., 2013; Xiong et al., 2017). We follow these studies and use Hits $@ 1 0$ as the evaluation metric.
|
| 57 |
+
|
| 58 |
+
Baselines We compare our model with two pretrained language models BERT (Devlin et al., 2019) (both base and large) and GPT-2 (Radford et al., 2019). We make use of their output token probabilities to rank candidate entities. For BERT, we feed in the masked queries (e.g., $Q _ { m a s k e d } = \pm \mathrm { h e }$ capital of France is [MASK]). For multi-token candidates, we use the same number of [MASK] tokens in the query inputs. We use the average log probability of masked tokens for ranking. Given a multi-token entity $E _ { i } = [ e _ { i } ^ { 1 } , e _ { i } ^ { 2 } , . . . , e _ { i } ^ { | E _ { i } | } ]$ e|Ei|i ], the ranking score from BERT is calculated as
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
S _ { E _ { i } } = \frac { 1 } { | E _ { i } | } \sum _ { k } \log P ( e _ { i } ^ { k } | Q _ { m a s k e d } ) .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
For GPT-2, we feed in the original query without the answer entity and use the first-token probability of candidate entities for ranking, which performs better than using average log probabilities. As our model learns to predict a plausible probability $( P ( e | \mathcal { C } ) )$ for each entity mention during entity replacement training, we can directly use these predicted probabilities to rank the candidates.
|
| 65 |
+
|
| 66 |
+
Results Table 1 shows the fact completion results for all relations. We denote our method WKLM for (Weakly Supervised Knowledge-Pretrained Language Model). Overall, WKLM achieves the best results on 8 of the 10 relations. We also observe that GPT-2 outperforms BERT on average. We think this is because the fact completion task requires models to predict the missing entities using only a short context on the left, while BERT pretraining incorporates context from both directions. Interestingly, BERT achieves good performance on several geographical relations such as PlaceOfBirth, LocatedIn and PlaceOfDeath. We conjecture that this is because location entities usually appear at sentence ends in Wikipedia articles, e.g., Obama was born in
|
| 67 |
+
|
| 68 |
+
Honolulu, Hawaii.. This sentence pattern is similar to our templates and BERT may learn to rely mostly on the left context to make predictions. For most relations that include answers that are person names, BERT lags behind both GPT-2 and our model.
|
| 69 |
+
|
| 70 |
+
Comparing the top and bottom five relations, we observe that BERT’s performance is correlated with the size of the candidate set, while WKLM and GPT-2 are less sensitive to this number. A similar pattern exists between models’ performance and the cardinality of groundtruth answers, i.e., our model achieves similar performance on both single-answer and multiple-answer queries while BERT is usually better at single-answer queries. WKLM both outperforms BERT and GPT-2 and achieves robust performance across relations with different properties. Visualization of correlations between relation properties and model performance can be found in the appendix.
|
| 71 |
+
|
| 72 |
+
Table 1: Zero-Shot Fact Completion Results.
|
| 73 |
+
|
| 74 |
+
<table><tr><td>Relation Name</td><td>#of Candidates</td><td>#of Answers</td><td>BERT-base</td><td>Model BERT-large</td><td>GPT-2</td><td>Ours</td></tr><tr><td>HASCHILD (P40)</td><td>906</td><td>3.8</td><td>9.00</td><td>6.00</td><td>20.5</td><td>63.5</td></tr><tr><td>NOTABLEWORK (P800)</td><td>901</td><td>5.2</td><td>1.88</td><td>2.56</td><td>2.39</td><td>4.10</td></tr><tr><td>CAPITALOF (P36)</td><td>820</td><td>2.2</td><td>1.87</td><td>1.55</td><td>15.8</td><td>49.1</td></tr><tr><td>FOUNDEDBY (P112)</td><td>798</td><td>3.7</td><td>2.44</td><td>1.93</td><td>8.65</td><td>24.2</td></tr><tr><td>CREATOR (P170)</td><td>536</td><td>3.6</td><td>4.57</td><td>4.57</td><td>7.27</td><td>9.84</td></tr><tr><td>PLACEOFBIRTH (P19)</td><td>497</td><td>1.8</td><td>19.2</td><td>30.9</td><td>8.95</td><td>23.2</td></tr><tr><td>LOCATEDIN (P131))</td><td>382</td><td>1.9</td><td>13.2</td><td>52.5</td><td>21.0</td><td>61.1</td></tr><tr><td>EDUCATEDAT (P69)</td><td>374</td><td>4.1</td><td>9.10</td><td>7.93</td><td>11.0</td><td>16.9</td></tr><tr><td>PLACEOFDEATH (P20)</td><td>313</td><td>1.7</td><td>43.0</td><td>42.6</td><td>8.83</td><td>26.5</td></tr><tr><td>OCCUPATION (P106)</td><td>190</td><td>1.4</td><td>8.58</td><td>10.7</td><td>9.17</td><td>10.7</td></tr><tr><td>Average Hits @ 10</td><td>1</td><td>-</td><td>11.3</td><td>16.1</td><td>16.3</td><td>28.9</td></tr></table>
|
| 75 |
+
|
| 76 |
+
# 3.2 DOWNSTREAM TASKS
|
| 77 |
+
|
| 78 |
+
Background knowledge is important for language understanding. We expect our pretraining approach to be beneficial to NLP applications where entity-level knowledge is essential. We consider two such applications: question answering and entity-typing. We find that a large portion of the questions in existing QA datasets are about entities and involve entity relations. In a way, our pretraining objective is analogous to question answering in a multiple-choice setting (Hermann et al., 2015). The entity-typing task requires the model to predict a set of correct types of entity mentions in a short context. The context itself can be insufficient and the training data for this task is small and noisy. We believe a model that encodes background entity knowledge can help in both cases.
|
| 79 |
+
|
| 80 |
+
# 3.2.1 QUESTION ANSWERING
|
| 81 |
+
|
| 82 |
+
Datasets We consider four question answering datasets:
|
| 83 |
+
|
| 84 |
+
• WebQuestions (Berant et al., 2013) is originally a dataset for knowledge base question answering. The questions are collected using Google Suggest API and are all asking about simple relational facts of Freebase entities.
|
| 85 |
+
TriviaQA7 (Joshi et al., 2017) includes questions from trivia and quiz-league websites. Apart from a small portion of questions to which the answers are numbers and free texts, $9 2 . 8 5 \%$ of the answers are Wikipedia entities. Quasar-T (Dhingra et al., 2017) is another dataset that includes trivia questions. Most of the answers in this dataset are none phrases. According to our manual analysis on random samples, $8 8 \%$ of the answers are real-world entities8.
|
| 86 |
+
SearchQA (Dunn et al., 2017) uses questions from the television quiz show Jeopardy! and we also find that almost all of the answers are real-world entities.
|
| 87 |
+
|
| 88 |
+
Questions in all three datasets are created without the context of a paragraph, which resembles the scenario of practical question answering applications. All the questions except WebQuestions are written by humans. This indicates that humans are generally interested to ask questions to seek information about entities. We show the statistics and example questions in Table 2. We split the training data (created by distant supervision) of WebQuestions with a ratio (9:1) for training and development. Since our model is based on our own BERT implementations, in addition to the aforementioned entity-related datasets, we first use the standard SQuAD (Rajpurkar et al., 2016) benchmark to validate our model’s answer extraction performance.
|
| 89 |
+
|
| 90 |
+
Table 2: Properties of the QA Datasets.
|
| 91 |
+
|
| 92 |
+
<table><tr><td>Dataset</td><td>Train</td><td>Valid</td><td>Test</td><td>Example Questions</td></tr><tr><td>WebQuestions</td><td>3778</td><td></td><td>2032</td><td>Who plays Stewie Griffn on Family Guy?</td></tr><tr><td>TriviaQA</td><td>87291</td><td>11274</td><td>10790</td><td>What is the Japanese share index called?</td></tr><tr><td>SearchQA</td><td>99811</td><td>13893</td><td>27247</td><td>Hero several books 11 discover's wizard?</td></tr><tr><td>Quasar-T</td><td>37012</td><td>3000</td><td>3000</td><td>Which vegetable isa Welsh emblem?</td></tr></table>
|
| 93 |
+
|
| 94 |
+
Settings We adopt the fine-tuning approach to extract answer spans with pretrained models. We add linear layers over the last hidden states of the pretrained models to predict the start and end positions of the answer. Unlike $\mathrm { S Q u A D }$ , questions in the datasets we use are not paired with paragraphs that contain the answer. We follow previous work (Chen et al., 2017; Wang et al., 2018a) and retrieve context paragraphs with information retrieval systems. Details of the context retrieval process for each dataset can be found in the appendix. Reader models are trained with distantly supervised data, i.e., we treat any text span in any retrieved paragraph as ground truth as long as it matches the original answers. Since the reader model needs to read multiple paragraphs to predict a single answer at inference time, we also train a BERT based paragraph ranker with distant-supervised data to assign each paragraph a relevance score. The paragraph ranker takes question and paragraph pairs and predicts a score in the range [0, 1] for each pair. During inference, for each question and its evidence paragraph set, we first use the paragraph reader to extract the best answer from each paragraph. These answers are then ranked based on a linear combination of the answer extraction score (a log sum of the answer start and end scores) and the paragraph relevance score. We also evaluate model performance without using the relevance scores.
|
| 95 |
+
|
| 96 |
+
Open-Domain QA Baselines We compare our QA model with the following systems:
|
| 97 |
+
|
| 98 |
+
• DrQA (Chen et al., 2017) is an open-domain QA system which uses TF-IDF with bigram features for ranking and a simple attentive reader for answer extraction.
|
| 99 |
+
$\mathbf { R } ^ { 3 }$ (Wang et al., 2018a) is a reinforcement learning based system which jointly trains a paragraph ranker and a document reader. DSQA (Lin et al., 2018) uses RNN-based paragraph ranker and jointly trains the paragraph ranker and attentive paragraph ranker with a multi-task loss. Evidence Aggregation (Wang et al., 2018b) uses a hybrid answer reranking module to aggregate answer information from multiple paragraphs and rerank the answers extracted from multiple paragraphs. BERTserini (Yang et al., 2019a) is a BERT-based open-domain QA system, which uses BM25-based retriever to retrieve 100 paragraphs and a BERT-based reader to extract answers. The paragraph reader is either trained with SQuAD (Rajpurkar et al., 2016) data or distant-supervision data (Yang et al., 2019b) ORQA (Lee et al., 2019) replaces the traditional BM25 ranking with a BERT-based ranker. The ranker model is pretrained on the whole Wikipedia corpus with an inverse cloze task which simulates the matching between questions and paragraphs. All text blocks in Wikipedia are be pre-encoded as vectors and retrieved with Locality Sensitive Hashing.
|
| 100 |
+
|
| 101 |
+
Results Table 3 shows the SQuAD results and Table 4 shows the open-domain results on the four datasets that are highly entity-related. From the SQuAD results, we observe that our BERT reimplementation performs better than the original model this is due to the fact that it is trained for twice as many updates: 2 million vs. 1 million for the original BERT. Although lots of the answers in SQuAD are non-entity spans, the WKLM model we propose achieves better performance than BERT. We believe the improvement is due to both the masked language model and entity replacement objectives. Ablation experiments on the training objectives will be discussed in $\ S 3 . 2 . 3$ .
|
| 102 |
+
|
| 103 |
+
Having established that our BERT re-implementation performs better than the original model, we compare with only our own BERT for the following experiments. From Table 4, we see that our model produces consistent improvements across different datasets. Compared to the $0 . 8 \ : \mathrm { F 1 }$ improvements over BERT on SQuAD, we achieve an average of $2 . 7 ~ \mathrm { F 1 }$ improvements over BERT on entity-related datasets when the ranking scores are not used. On TriviaQA and Quasar-T, WKLM outperforms our BERT even when it uses ranking scores. Improvements in natural language question datasets (WebQuestions, TriviaQA, and Quasar-T) are more significant than SearchQA where the questions are informal queries. When we utilize ranking scores from a simple BERT based ranker, we are able to achieve the state-of-the-art on three of the four datasets.
|
| 104 |
+
|
| 105 |
+
Table 3: SQuAD Dev Results.
|
| 106 |
+
|
| 107 |
+
<table><tr><td>Model</td><td>EM</td><td>F1</td></tr><tr><td>Google's BERT-base</td><td>80.8</td><td>88.5</td></tr><tr><td>Google's BERT-large</td><td>84.1</td><td>90.9</td></tr><tr><td>Our BERT-base</td><td>83.4</td><td>90.5</td></tr><tr><td>WKLM (base)</td><td>84.3</td><td>91.3</td></tr></table>
|
| 108 |
+
|
| 109 |
+
Table 4: Open-domain QA Results.
|
| 110 |
+
|
| 111 |
+
<table><tr><td>Model</td><td>WebQuestions EM</td><td>F1</td><td>TriviaQA EM</td><td>F1</td><td>Quasar-T EM</td><td>F1</td><td>SearchQA EM</td><td>F1</td></tr><tr><td>DrQA (Chen et al., 2017)</td><td>20.7</td><td>1</td><td>-</td><td>1</td><td>-</td><td>-</td><td>-</td><td>1</td></tr><tr><td>R (Wang et al.,2018a)</td><td>-</td><td>1</td><td>50.6</td><td>57.3</td><td>42.3</td><td>49.6</td><td>57.0</td><td>63.2</td></tr><tr><td>DSQA (Lin et al., 2018)</td><td>18.5</td><td>25.6</td><td>48.7</td><td>56.3</td><td>42.2</td><td>49.3</td><td>49.0</td><td>55.3</td></tr><tr><td>Evidence Agg. (Wang et al.,2018b)</td><td>1</td><td>1</td><td>50.6</td><td>57.3</td><td>42.3</td><td>49.6</td><td>57.0</td><td>63.2</td></tr><tr><td>BERTserini (Yang et al.,2019a)</td><td>-</td><td>-</td><td>51.0</td><td>56.3</td><td>1</td><td>-</td><td>1</td><td>1</td></tr><tr><td>BERTserini+DS (Yang et al., 2019b)</td><td>=</td><td>=</td><td>54.4</td><td>60.2</td><td>1</td><td>=</td><td>-</td><td>1</td></tr><tr><td>ORQA (Lee et al., 2019)</td><td>36.4</td><td>1</td><td>45.0</td><td>-</td><td>-</td><td>-</td><td>-</td><td>1</td></tr><tr><td>Our BERT</td><td>29.2</td><td>35.5</td><td>48.7</td><td>53.2</td><td>40.4</td><td>46.1</td><td>57.1</td><td>61.9</td></tr><tr><td>Our BERT +Ranking score</td><td>32.2</td><td>38.9</td><td>52.1</td><td>56.5</td><td>43.2</td><td>49.2</td><td>60.6</td><td>65.9</td></tr><tr><td>WKLM</td><td>30.8</td><td>37.9</td><td>52.2</td><td>56.7</td><td>43.7</td><td>49.9</td><td>58.7</td><td>63.3</td></tr><tr><td>WKLM + Ranking score</td><td>34.6</td><td>41.8</td><td>58.1</td><td>63.1</td><td>45.8</td><td>52.2</td><td>61.7</td><td>66.7</td></tr></table>
|
| 112 |
+
|
| 113 |
+
# 3.2.2 ENTITY TYPING
|
| 114 |
+
|
| 115 |
+
To compare with an existing study (Zhang et al., 2019) that also attempts to incorporate entity knowledge into language models, we consider an additional entity typing task using the large FIGER dataset (Ling & Weld, 2012). The task is to assign a fine-grained type to entity mentions. We do that by adding two special tokens before and after the entity span to mark the entity position. We use the final representation of the start token ([CLS]) to predict the entity types. The model is fine-tuned on weakly-supervised training data with binary cross-entropy loss. We evaluate the models using strict accuracy, loose micro, and macro F1 scores.
|
| 116 |
+
|
| 117 |
+
We show the results in Table 5. We compare our model with two non-BERT neural baselines (Inui et al., 2017) that integrate a set of hand-crafted features: LSTM $^ +$ Hand-crafted and Attentive $^ +$
|
| 118 |
+
|
| 119 |
+
Table 5: Fine-grained Entity Typing Results on the FIGER dataset.
|
| 120 |
+
|
| 121 |
+
<table><tr><td>Model</td><td>Acc</td><td>Ma-F1</td><td>Mi-F1</td></tr><tr><td>LSTM+ Hand-crafted (Inui et al.,2017)</td><td>57.02</td><td>76.98</td><td>73.94</td></tr><tr><td>Attentive + Hand-crafted (Inui et al.,2017) BERT baseline (Zhang et al.,2019)</td><td>59.68 52.04</td><td>78.97 75.16</td><td>75.36 71.63</td></tr><tr><td>ERNIE (Zhang et al., 2019)</td><td>57.19</td><td>75.61</td><td>73.39</td></tr><tr><td>Our BERT</td><td>54.53</td><td></td><td></td></tr><tr><td>WKLM</td><td>60.21</td><td>79.57 81.99</td><td>74.74 77.00</td></tr></table>
|
| 122 |
+
|
| 123 |
+
Hand-crafted; a vanilla BERT baseline and the ERNIE model (Zhang et al., 2019) that enhances BERT with knowledge base embeddings.
|
| 124 |
+
|
| 125 |
+
First, we see that naively applying BERT is less effective than simple models combined with sparse hand-crafted features. Although the ERNIE model can improve over BERT by 5.15 points, its performance still lags behind models that make good use of hand-crafted features. In contrast, although based on a stronger BERT model, our model achieves larger absolute improvements (5.68 points) and sets a new state-of-the-art for this task. Given the larger improvement margin, we believe our model that directly learn knowledge from text is more effective than the ERNIE method.
|
| 126 |
+
|
| 127 |
+
# 3.2.3 ABLATION STUDY: THE EFFECT OF MASKED LANGUAGE MODEL LOSS
|
| 128 |
+
|
| 129 |
+
In view of a recent study (Liu et al., 2019b) showing simply extending the training time of BERT leads to stronger performance on various downstream tasks, we conduct further analysis to differentiate the effects of entity replacement training and masked language modeling. We compare our model with three variants: a model pretrained only with the knowledge learning objective (WKLM without MLM), a model trained with both knowledge learning and masked language modeling with more masked words (WKLM with $1 5 \%$ MLM) and a BERT model trained with additional 1 million updates on English Wikipedia $\mathbf { \left( B E R T + 1 M \right) }$ MLM updates) and no knowledge learning.
|
| 130 |
+
|
| 131 |
+
The ablation results are shown in Table 6. The results of WKLM without MLM validate that adding the language model objective is essential for downstream performance. We also find that masking out too many words (i.e., $1 5 \%$ masking ratio as in the original BERT) leads to worse results. We conjecture that too many masked words outside entity mentions break parts of the context information and introduce noisy signals to knowledge learning. Results of continued BERT training show that more MLM updates are often beneficial, especially for SQuAD. However, on tasks that are more entity-centric, continued MLM training is less effective than our WKLM method. This suggests that our WKLM method could serve as an effective complementary recipe to masked language modeling when applied to entity-related NLP tasks.
|
| 132 |
+
|
| 133 |
+
Table 6: Ablation Studies on Masked Language Model and Masking Ratios.
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Model</td><td colspan="2">SQuAD EM F1</td><td colspan="2">TriviaQA EM F1</td><td colspan="2">Quasar-T EM F1</td><td>FIGER Acc</td></tr><tr><td>Our BERT</td><td>83.4</td><td>90.5</td><td>48.7</td><td>53.2</td><td>40.4</td><td>46.1</td><td>54.53</td></tr><tr><td>WKLM</td><td>84.3</td><td>91.3</td><td>52.2</td><td>56.7</td><td>43.7</td><td>49.9</td><td>60.21</td></tr><tr><td>WKLM without MLM</td><td>80.5</td><td>87.6</td><td>48.2</td><td>52.5</td><td>42.2</td><td>48.1</td><td>58.44</td></tr><tr><td>WKLM with 15% masking</td><td>84.1</td><td>91.0</td><td>51.0</td><td>55.3</td><td>42.9</td><td>49.0</td><td>59.68</td></tr><tr><td>Our BERT + 1MMLMupdates</td><td>84.4</td><td>91.1</td><td>52.0</td><td>56.3</td><td>42.3</td><td>48.2</td><td>54.17</td></tr></table>
|
| 136 |
+
|
| 137 |
+
# 4 RELATED WORK
|
| 138 |
+
|
| 139 |
+
Pretrained Language Representations Early research on language representations focused on static unsupervised word representations (Mikolov et al., 2013; Pennington et al., 2014). Word embeddings leverage co-occurrences to learn latent word vectors that approximately reflect word semantics. Given that words can have different meanings in different contexts, more recent studies (McCann et al., 2017; Peters et al., 2018a) show that contextual language representations can be more powerful than static word embeddings in downstream tasks. This direction has been further explored at a larger scale with efficient Transformer architectures (Radford et al., 2019; Devlin et al., 2019; Yang et al., 2019c). Our WKLM method is based on these techniques and we focus on improving the knowledge ability of pretrained models.
|
| 140 |
+
|
| 141 |
+
Knowledge-Enhanced NLP Models Background knowledge has been considered an indispensable part of language understanding (Fillmore et al., 1976; Minsky, 1988). As standard language encoders usually do not explicitly model knowledge, recent studies (Ahn et al., 2016; Yang & Mitchell, 2017; Logan et al., 2019; Liu et al., 2019a) have explored methods to incorporate external knowledge into NLP models. Most of these methods rely on additional inputs such as entity representations from structured knowledge bases. With the breakthrough of large-scale pretrained language encoders (Devlin et al., 2019), Zhang et al. (2019) and Peters et al. (2019) adopt similar ideas and propose entity-level knowledge enhancement training objectives to incorporate knowledge into pretrained models. Other recent studies (Mihaylov & Frank, 2018; Xiong et al., 2019) leverage external knowledge bases to enhance text-based question answering models. In contrast to these methods, our method utilizes minimal external entity information and does not require additional memory or architectural changes when applied to downstream tasks.
|
| 142 |
+
|
| 143 |
+
# 5 CONCLUSION
|
| 144 |
+
|
| 145 |
+
We introduce a weakly supervised method to encourage pretrained language models to learn entitylevel knowledge. Our method uses minimal entity information during pretraining and does not introduce additional computation, memory or architectural overhead for downstream task fine-tuning. The trained model demonstrates strong performance on a probing fact completion task and two entity-related NLP tasks. Together, our results show the potential of directly learning entity-level knowledge from unstructured natural language and the benefits of large-scale knowledge-aware pretraining for downstream NLP tasks.
|
| 146 |
+
|
| 147 |
+
# REFERENCES
|
| 148 |
+
|
| 149 |
+
Sungjin Ahn, Heeyoul Choi, Tanel Parnamaa, and Yoshua Bengio. A neural knowledge language ¨ model. arXiv preprint arXiv:1608.00318, 2016.
|
| 150 |
+
|
| 151 |
+
Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. Semantic parsing on freebase from question-answer pairs. In EMNLP, pp. 1533–1544. ACL, 2013.
|
| 152 |
+
|
| 153 |
+
Antoine Bordes, Nicolas Usunier, Alberto Garc´ıa-Duran, Jason Weston, and Oksana Yakhnenko. ´ Translating embeddings for modeling multi-relational data. In NIPS, pp. 2787–2795, 2013.
|
| 154 |
+
|
| 155 |
+
Antoine Bosselut, Hannah Rashkin, Maarten Sap, Chaitanya Malaviya, Asli C¸ elikyilmaz, and Yejin Choi. COMET: commonsense transformers for automatic knowledge graph construction. In ACL (1), pp. 4762–4779. Association for Computational Linguistics, 2019.
|
| 156 |
+
|
| 157 |
+
Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading wikipedia to answer opendomain questions. In ACL (1), pp. 1870–1879. ACL, 2017.
|
| 158 |
+
|
| 159 |
+
Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D Manning. What does bert look at? an analysis of bert’s attention. arXiv preprint arXiv:1906.04341, 2019.
|
| 160 |
+
|
| 161 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. In NAACL-HLT (1), pp. 4171–4186. ACL, 2019.
|
| 162 |
+
|
| 163 |
+
Bhuwan Dhingra, Kathryn Mazaitis, and William W Cohen. Quasar: Datasets for question answering by search and reading. arXiv preprint arXiv:1707.03904, 2017.
|
| 164 |
+
|
| 165 |
+
Matthew Dunn, Levent Sagun, Mike Higgins, V Ugur Guney, Volkan Cirik, and Kyunghyun Cho. Searchqa: A new q&a dataset augmented with context from a search engine. arXiv preprint arXiv:1704.05179, 2017.
|
| 166 |
+
|
| 167 |
+
Charles J Fillmore et al. Frame semantics and the nature of language. In Annals of the New York Academy of Sciences: Conference on the origin and development of language and speech, volume 280, pp. 20–32, 1976.
|
| 168 |
+
|
| 169 |
+
Karl Moritz Hermann, Tomas Kocisk ´ y, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa ´ Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In NIPS, pp. 1693– 1701, 2015.
|
| 170 |
+
|
| 171 |
+
Kentaro Inui, Sebastian Riedel, Pontus Stenetorp, and Sonse Shimaoka. Neural architectures for fine-grained entity type classification. In EACL (1), pp. 1271–1280. Association for Computational Linguistics, 2017.
|
| 172 |
+
|
| 173 |
+
Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. In ACL (1), pp. 1601–1611. Association for Computational Linguistics, 2017.
|
| 174 |
+
|
| 175 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 176 |
+
|
| 177 |
+
Kenton Lee, Ming-Wei Chang, and Kristina Toutanova. Latent retrieval for weakly supervised open domain question answering. In ACL (1), pp. 6086–6096. Association for Computational Linguistics, 2019.
|
| 178 |
+
|
| 179 |
+
Yankai Lin, Haozhe Ji, Zhiyuan Liu, and Maosong Sun. Denoising distantly supervised opendomain question answering. In ACL (1), pp. 1736–1745. Association for Computational Linguistics, 2018.
|
| 180 |
+
|
| 181 |
+
Xiao Ling and Daniel S. Weld. Fine-grained entity recognition. In AAAI. AAAI Press, 2012.
|
| 182 |
+
|
| 183 |
+
Angli Liu, Jingfei Du, and Veselin Stoyanov. Knowledge-augmented language model and its application to unsupervised named-entity recognition. In NAACL-HLT (1), pp. 1142–1150. Association for Computational Linguistics, 2019a.
|
| 184 |
+
|
| 185 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019b.
|
| 186 |
+
|
| 187 |
+
Robert Logan, Nelson F. Liu, Matthew E. Peters, Matt Gardner, and Sameer Singh. Barack’s wife hillary: Using knowledge graphs for fact-aware language modeling. In ACL, pp. 5962–5971. ACL, 2019.
|
| 188 |
+
|
| 189 |
+
Bryan McCann, James Bradbury, Caiming Xiong, and Richard Socher. Learned in translation: Contextualized word vectors. In NIPS, pp. 6294–6305, 2017.
|
| 190 |
+
|
| 191 |
+
Todor Mihaylov and Anette Frank. Knowledgeable reader: Enhancing cloze-style reading comprehension with external commonsense knowledge. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 821–832, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1076.
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
Marvin Minsky. Society of mind. Simon and Schuster, 1988.
|
| 196 |
+
|
| 197 |
+
Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. A three-way model for collective learning on multi-relational data. In ICML, volume 11, pp. 809–816, 2011.
|
| 198 |
+
|
| 199 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019.
|
| 200 |
+
|
| 201 |
+
Jeffrey Pennington, Richard Socher, and Christopher D. Manning. Glove: Global vectors for word representation. In EMNLP, pp. 1532–1543. ACL, 2014.
|
| 202 |
+
|
| 203 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. arXiv preprint arXiv:1802.05365, 2018a.
|
| 204 |
+
|
| 205 |
+
Matthew E. Peters, Mark Neumann, Luke Zettlemoyer, and Wen-tau Yih. Dissecting contextual word embeddings: Architecture and representation. In EMNLP, pp. 1499–1509. Association for Computational Linguistics, 2018b.
|
| 206 |
+
|
| 207 |
+
Matthew E Peters, Mark Neumann, IV Logan, L Robert, Roy Schwartz, Vidur Joshi, Sameer Singh, and Noah A Smith. Knowledge enhanced contextual word representations. EMNLP, 2019.
|
| 208 |
+
|
| 209 |
+
Fabio Petroni, Tim Rocktaschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H. Miller, ¨ and Sebastian Riedel. Language models as knowledge bases? EMNLP, 2019.
|
| 210 |
+
|
| 211 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8), 2019.
|
| 212 |
+
|
| 213 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100, $0 0 0 +$ questions for machine comprehension of text. In EMNLP, pp. 2383–2392. The Association for Computational Linguistics, 2016.
|
| 214 |
+
|
| 215 |
+
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, pp. 5998–6008, 2017.
|
| 216 |
+
|
| 217 |
+
Denny Vrandeciˇ c and Markus Kr ´ otzsch. Wikidata: a free collaborative knowledge base. 2014. ¨
|
| 218 |
+
|
| 219 |
+
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In ICLR, 2019a.
|
| 220 |
+
|
| 221 |
+
Shuohang Wang, Mo Yu, Xiaoxiao Guo, Zhiguo Wang, Tim Klinger, Wei Zhang, Shiyu Chang, Gerry Tesauro, Bowen Zhou, and Jing Jiang. $\mathtt { R } ^ { 3 }$ : Reinforced ranker-reader for open-domain question answering. In AAAI, pp. 5981–5988. AAAI Press, 2018a.
|
| 222 |
+
|
| 223 |
+
Shuohang Wang, Mo Yu, Jing Jiang, Wei Zhang, Xiaoxiao Guo, Shiyu Chang, Zhiguo Wang, Tim Klinger, Gerald Tesauro, and Murray Campbell. Evidence aggregation for answer re-ranking in open-domain question answering. In ICLR, 2018b.
|
| 224 |
+
|
| 225 |
+
Zhiguo Wang, Patrick $\mathrm { N g }$ , Xiaofei Ma, Ramesh Nallapati, and Bing Xiang. Multi-passage bert: A globally normalized bert model for open-domain question answering. arXiv preprint arXiv:1908.08167, 2019b.
|
| 226 |
+
|
| 227 |
+
Wenhan Xiong, Thien Hoang, and William Yang Wang. DeepPath: A reinforcement learning method for knowledge graph reasoning. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 564–573, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1060.
|
| 228 |
+
|
| 229 |
+
Wenhan Xiong, Mo Yu, Shiyu Chang, Xiaoxiao Guo, and William Yang Wang. Improving question answering over incomplete KBs with knowledge-aware reader. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1417.
|
| 230 |
+
|
| 231 |
+
Bishan Yang and Tom M. Mitchell. Leveraging knowledge bases in lstms for improving machine reading. In ACL (1), pp. 1436–1446. ACL, 2017.
|
| 232 |
+
|
| 233 |
+
Wei Yang, Yuqing Xie, Aileen Lin, Xingyu Li, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. End-to-end open-domain question answering with bertserini. arXiv preprint arXiv:1902.01718, 2019a.
|
| 234 |
+
|
| 235 |
+
Wei Yang, Yuqing Xie, Luchen Tan, Kun Xiong, Ming Li, and Jimmy Lin. Data augmentation for bert fine-tuning in open-domain question answering. arXiv preprint arXiv:1904.06652, 2019b.
|
| 236 |
+
|
| 237 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237, 2019c.
|
| 238 |
+
|
| 239 |
+
Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. SWAG: A large-scale adversarial dataset for grounded commonsense inference. In EMNLP, pp. 93–104. ACL, 2018.
|
| 240 |
+
|
| 241 |
+
Sheng Zhang, Xiaodong Liu, Jingjing Liu, Jianfeng Gao, Kevin Duh, and Benjamin Van Durme. Record: Bridging the gap between human and machine commonsense reading comprehension. arXiv preprint arXiv:1810.12885, 2018.
|
| 242 |
+
|
| 243 |
+
Zhengyan Zhang, Xu Han, Zhiyuan Liu, Xin Jiang, Maosong Sun, and Qun Liu. ERNIE: enhanced language representation with informative entities. In ACL (1), pp. 1441–1451. ACL, 2019.
|
| 244 |
+
|
| 245 |
+
Yukun Zhu, Ryan Kiros, Richard S. Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In ICCV, pp. 19–27. IEEE Computer Society, 2015.
|
| 246 |
+
|
| 247 |
+
# A APPENDIX
|
| 248 |
+
|
| 249 |
+
Implementation Details and Hyperparameters We implement our method using Fairseq Ott et al. (2019) and the fact completion baselines are implemented with Huggingface’s PytorchTransformers9. We pretrain the models with 32 V100 GPUs for 3 days. We use at most 2 GPUs for fine-tuning the paragraph reader, use 8 GPUs for fine-tuning the paragraph ranker. The entity-typing experiments require larger batch sizes and take 8 GPUs for training.
|
| 250 |
+
|
| 251 |
+
For the knowledge learning pretraining phase, we use the Adam optimizer (Kingma & Ba, 2014) with learning rate 1e-5, batch size 128 and weight decay 0.01. The model is pretrained on 32 V100 GPUs for 3 days. To train the paragraph reader for open-domain QA, we select the best learning rate from $\{ 1 \mathrm { e } { - } 6 , 5 \mathrm { e } { - } 6 , 1 \mathrm { e } { - } 5 , 2 \mathrm { e } { - } 5 \}$ and last layer dropout ratio from $\{ 0 . 1 , 0 . 2 \}$ . We set the maximum training epoch to be 10 and batch size to be 32. The maximal input sequence length is 512 for WebQuestions and 128 for the other three datasets that use sentence-level paragraphs. For the paragraph ranker, we choose learning rate from $\{ 1 \mathrm { e } { - } 5 , 2 \mathrm { e } { - } 5 , 5 \mathrm { e } { - } 6 \}$ , use dropout 0.1 and batch size 256. The maximal sequence length for each dataset is consistent with the one we used for training the paragraph reader. The linear combination of ranking and extraction scores is selected based on validation performance. For $\mathrm { S Q u A D }$ experiments, we select learning rate from {1e-5, 5e-6, 2e-5, 3e-5}, learning rate from $\{ 8 , 1 6 \}$ , last layer dropout ratio from $\{ 0 . \bar { 1 } , 0 . 2 \}$ . We set the maximal sequence length as 512 and the maximal training epoch as 5. For entity typing, we select learning rate from $\{ 1 \mathrm { e } { - } 5 , 2 \mathrm { e } { - } 5 , 3 \mathrm { e } { - } 5 , 5 \mathrm { e } { - } 5 \}$ and batch size from $\{ 1 2 8 , 2 5 6 \}$ . We set the maximal sequence length to be 256, the last layer dropout ratio to be 0.1. The model is fine-tuned for at most 3 epochs to prevent overfitting. The threshold for type prediction is selected on the validation set.
|
| 252 |
+
|
| 253 |
+
Context Collection for QA Datasets For WebQuestions, we collect evidence context using the document retriever of DrQA (Chen et al., 2017), which uses TF-IDF based metric to retrieve the top 5 Wikipedia articles. For Quasar-T, we use Lucene ranked paragraphs. For SearchQA and TriviaQA, we use paragraphs ranked by search engines. Following existing research (Wang et al., 2018b; Lin et al., 2018), we use sentence-level paragraphs for SearchQA (50 sentences), TriviaQA (100 sentences) and SearchQA (100 sentences).
|
| 254 |
+
|
| 255 |
+
Correlation between Fact Completion Results and Properties of Relations Figure 2 shows the fact completion results of BERT are unstable on different relations with different properties, i.e., BERT’s performance is strongly correlated with the size of candidate entity set and the number of groundtruth answers. Compared to BERT, WKLM is often less sensitive to these two factors.
|
| 256 |
+
|
| 257 |
+

|
| 258 |
+
Figure 2: Left: Correlation between candidate set size and hits $@ 1 0$ ; Right: Correlation between number of groundtruth answers and hits $@ 1 0$ .
|
md/train/Bk8BvDqex/Bk8BvDqex.md
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# METACONTROL FOR ADAPTIVE IMAGINATION-BASED OPTIMIZATION
|
| 2 |
+
|
| 3 |
+
Jessica B. Hamrick UC Berkeley & DeepMind jhamrick@berkeley.edu
|
| 4 |
+
|
| 5 |
+
Andrew J. Ballard DeepMind aybd@google.com
|
| 6 |
+
|
| 7 |
+
Razvan Pascanu DeepMind razp@google.com
|
| 8 |
+
|
| 9 |
+
Oriol Vinyals
|
| 10 |
+
DeepMind
|
| 11 |
+
vinyals@google.com
|
| 12 |
+
Nicolas Heess
|
| 13 |
+
DeepMind
|
| 14 |
+
heess@google.com
|
| 15 |
+
Peter W. Battaglia
|
| 16 |
+
DeepMind
|
| 17 |
+
peterbattaglia@google.com
|
| 18 |
+
|
| 19 |
+
# ABSTRACT
|
| 20 |
+
|
| 21 |
+
Many machine learning systems are built to solve the hardest examples of a particular task, which often makes them large and expensive to run—especially with respect to the easier examples, which might require much less computation. For an agent with a limited computational budget, this “one-size-fits-all” approach may result in the agent wasting valuable computation on easy examples, while not spending enough on hard examples. Rather than learning a single, fixed policy for solving all instances of a task, we introduce a metacontroller which learns to optimize a sequence of “imagined” internal simulations over predictive models of the world in order to construct a more informed, and more economical, solution. The metacontroller component is a model-free reinforcement learning agent, which decides both how many iterations of the optimization procedure to run, as well as which model to consult on each iteration. The models (which we call “experts”) can be state transition models, action-value functions, or any other mechanism that provides information useful for solving the task, and can be learned on-policy or off-policy in parallel with the metacontroller. When the metacontroller, controller, and experts were trained with “interaction networks” (Battaglia et al., 2016) as expert models, our approach was able to solve a challenging decision-making problem under complex non-linear dynamics. The metacontroller learned to adapt the amount of computation it performed to the difficulty of the task, and learned how to choose which experts to consult by factoring in both their reliability and individual computational resource costs. This allowed the metacontroller to achieve a lower overall cost (task loss plus computational cost) than more traditional fixed policy approaches. These results demonstrate that our approach is a powerful framework for using rich forward models for efficient model-based reinforcement learning.
|
| 22 |
+
|
| 23 |
+
# 1 INTRODUCTION
|
| 24 |
+
|
| 25 |
+
While there have been significant recent advances in deep reinforcement learning (Mnih et al., 2015; Silver et al., 2016) and control (Lillicrap et al., 2015; Levine et al., 2016), most efforts train a network that performs a fixed sequence of computations. Here we introduce an alternative in which an agent uses a metacontroller to choose which, and how many, computations to perform. It “imagines” the consequences of potential actions proposed by an actor module, and refines them internally, before executing them in the world. The metacontroller adaptively decides which expert models to use to evaluate candidate actions, and when it is time to stop imagining and act. The learned experts may be state transition models, action-value functions, or any other function that is relevant to the task, and can vary in their accuracy and computational costs. Our metacontroller’s learned policy can exploit the diversity of its pool of experts by trading off between their costs and reliability, allowing it to automatically identify which expert is most worthwhile.
|
| 26 |
+
|
| 27 |
+
We draw inspiration from research in cognitive science and neuroscience which has studied how people use a meta-level of reasoning in order to control the use of their internal models and allocation of their computational resources. Evidence suggests that humans rely on rich generative models of the world for planning (Glascher et al., 2010), control (Wolpert & Kawato, 1998), and reasoning ¨ (Hegarty, 2004; Johnson-Laird, 2010; Battaglia et al., 2013), that they adapt the amount of computation they perform with their model to the demands of the task (Hamrick et al., 2015), and that they trade off between multiple strategies of varying quality (Lee et al., 2014; Lieder et al., 2014; Lieder & Griffiths, in revision; Kool et al., in press).
|
| 28 |
+
|
| 29 |
+
Our imagination-based optimization approach is related to classic artificial intelligence research on bounded-rational metareasoning (Horvitz, 1988; Russell & Wefald, 1991; Hay et al., 2012), which formulates a meta-level MDP for selecting computations to perform, where the computations have a known cost. We also build on classic work by Schmidhuber (1990a;b), which used an RL controller with a recurrent neural network (RNN) world model to evaluate and improve upon candidate controls online.
|
| 30 |
+
|
| 31 |
+
Recently Andrychowicz et al. (2016) used a fully differentiable deep network to learn to perform gradient descent optimization, and Tamar et al. (2016) used a convolutional neural network for performing value iteration online in a deep learning setting. In other similar work, Fragkiadaki et al. (2015) made use of “visual imaginations” for action planning. Our work is also related to recent notions of “conditional computation” (Bengio, 2013; Bengio et al., 2015), which adaptively modifies network structure online, and “adaptive computation time” (Graves, 2016) which allows for variable numbers of internal “pondering” iterations to optimize computational cost.
|
| 32 |
+
|
| 33 |
+
Our work’s key contribution is a framework for learning to optimize via a metacontroller which manages an adaptive, imagination-based optimization loop. This represents a hybrid RL system where a model-free metacontroller constructs its decisions using an actor policy to manage model-free and model-based experts. Our experimental results demonstrate that a metacontroller can flexibly allocate its computational resources on a case-by-case basis to achieve greater performance than more rigid fixed policy approaches, using more computation when it is required by a more difficult task.
|
| 34 |
+
|
| 35 |
+
# 2 MODEL
|
| 36 |
+
|
| 37 |
+
We consider a class of fully observed, one-shot decision-making tasks (i.e., continuous, contextual bandits). The performance objective is to find a control $c \in { \mathcal { C } }$ which, given an initial state $x \in \mathcal { X }$ , minimizes some loss function $\mathcal { L }$ between a known future goal state $x ^ { * }$ and the result of a forward process, $f ( x , c )$ . The performance loss $L _ { P }$ is the (negative) utility of executing the control in the world, and is related to the optimal solution $c ^ { * } \in \mathcal { C }$ as follows:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { c } { { L _ { P } ( x ^ { * } , x , c ) = \mathcal { L } ( x ^ { * } , f ( x , c ) ) , } } \\ { { c ^ { * } = \arg \underset { c } { \operatorname* { m i n } } L _ { P } ( x ^ { * } , x , c ) . } } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
However, (2) defines only the optimal solution—not how to achieve it.
|
| 44 |
+
|
| 45 |
+
# 2.1 OPTIMIZING PERFORMANCE
|
| 46 |
+
|
| 47 |
+
We consider an iterative optimization procedure that takes $x ^ { * }$ and $x$ as input and returns an approximation of $c ^ { * }$ in order to minimize (1). The optimization procedure consists of a controller, which iteratively proposes controls, and an expert, which evaluates how good those controls are. On the $n ^ { \mathrm { t h } }$ iteration, the controller $\pi ^ { C } : \mathcal { X } \times \bar { \mathcal { X } } \times \mathcal { H } \mathcal { C }$ takes as input, $x ^ { * } , x$ , and information about the history of previously proposed controls and evaluations $h _ { n - 1 } \in \mathcal { H }$ , and returns a proposed control $c _ { n }$ that aims to improve on previously proposed controls. An expert $E : \mathcal { X } \times \mathcal { X } \times \mathcal { C } \mathcal { E }$ takes the proposed control and provides some information $e _ { n } \in \mathcal { E }$ about the quality of the control, which we call an opinion. This opinion is added to the history, which is passed back to the controller, and the loop continues for $N$ steps, after which a final control $c _ { N }$ is proposed.
|
| 48 |
+
|
| 49 |
+
Standard optimization methods use principled heuristics for proposing controls. In gradient descent, for example, controls are proposed by adjusting $c _ { n }$ in the direction of the gradient of the reward with respect to the control. In Bayesian optimization, controls are proposed based on selection criteria such as “probability of improvement”, or a meta-selection criterion for choosing among several basic selection criteria Hoffman et al. (2011); Shahriari et al. (2014). Rather than choosing one of several controllers, our work learns a single controller and instead focuses on selecting from multiple experts (see Sec. 2.2). In some cases $f$ is known and inexpensive to compute, and thus the optimization procedure sets $E \equiv f$ . However, in many real-world settings, $f$ is expensive or non-stationary and so it can be advantageous to use an approximation of $f$ (e.g., a state transition model), $L _ { P }$ (e.g., an action-value function), or any other quantity that gives some information about $f$ or $L _ { P }$ .
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 1: Metacontroller architecture and task. A: All components are part of the metacontroller agent (box) except the scene and the world, which are part of the agent’s environment. The manager takes the scene and history and determines which action to take (i.e., whether to execute or ponder, and with what expert to ponder with), denoted by the orange lines. The controller takes the scene and history and computes a control (e.g., the force to apply to a spaceship), denoted by the blue lines. The orange line ending with a circle at the switch reflects the fact that the manager’s action affects the behavior of the switch, which routes the controller’s control to either an expert (e.g., a simulation model of the spaceship’s trajectory, an action-value function, etc.) or the world. The outcome and reward from the expert, along with the history, action, and control, are fed into the memory, which produces the next history. The history is fed back to the controller on the next iteration in order to allow it to propose controls based on what it has already tried. B-C: Scenes consisted of a number of planets (depicted here by colored circles) of different masses as well as a spaceship (also with a variable mass). The task was to apply a force to the spaceship for one time step of simulation (depicted here as a solid red arrow) such that the resulting trajectory (dotted red arrow) would put the spaceship at a target (bullseye) after 11 steps of simulation. The white ring of the bullseye corresponds to a performance loss of 0.12-0.15, the black ring to a loss of 0.09-0.12, the blue ring to a loss of 0.06-0.09, the red ring to a loss of 0.03-0.06, and the yellow center to a loss of 0.03 or less. B depicts an easy, 1-planet scene, while C depicts a very difficult 5-planet scene.
|
| 53 |
+
|
| 54 |
+
# 2.2 OPTIMIZING COMPUTATIONAL COST
|
| 55 |
+
|
| 56 |
+
Given a controller and one or more experts, there are two important decisions to be made. First, how many optimization iterations should be performed? The approximate solution usually improves with more iterations, but each iteration costs computational resources. However, most traditional optimizers either ignore the cost of computation or select the number of iterations using simple heuristics. Because they do not balance the cost of computation against the performance loss, the overall effectiveness of these approaches is subject to the skill and preferences of the practitioners who use them. Second, which expert should be used on each step of the optimization? Some experts may be accurate but expensive to compute in terms of time, energy and/or money, while others may be crude, yet cheap. Moreover, the reliability of the experts may not be known a priori, further limiting the effectiveness of the optimization procedure. Our use of a metacontroller address these issues by jointly optimizing over the choices of how many steps to take and which experts to use.
|
| 57 |
+
|
| 58 |
+
We consider a family of optimizers which use the same controller, $\pi ^ { C }$ , but vary in their expert evaluators, $\{ E _ { 1 } , \ldots , E _ { K } \}$ . Assuming that the controller and experts are deterministic functions, the number of iterations $N$ and the sequences of experts ${ \bf k } = \left( k _ { 1 } , \ldots , k _ { N - 1 } \right)$ exactly determine the final control and performance loss $L _ { P }$ . This means we have transformed the performance optimization over $c$ into an optimization over $N$ and $\mathbf { k }$ : $\begin{array} { r } { ( N , { \mathbf k } ) ^ { * } = \arg \operatorname* { m i n } _ { k , n } L _ { P } ( x ^ { * } , x , c ( N , { \mathbf k } , x , \bar { x } ^ { * } ) ) } \end{array}$ , where the notation $c ( N , \mathbf { k } , x , x ^ { * } )$ is used to emphasize that the control is a function $N , \mathbf { k } , x$ , and $x ^ { * }$ .
|
| 59 |
+
|
| 60 |
+
If each optimizer has an associated computational cost $\tau _ { k }$ , then $N$ and $\mathbf { k }$ also exactly determine the computational resource loss of the optimization run, $\begin{array} { r } { L _ { R } ( N , \mathbf { k } ) = \sum _ { n = 1 } ^ { N - 1 } { \tau _ { k _ { n } } } . } \end{array}$ . The total loss is then the sum of $L _ { P }$ and $L _ { R }$ , each of which are functions of $N$ and $\mathbf { k }$ ,
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { l } { { \displaystyle { \cal L } _ { T } ( x ^ { * } , x , N , { \bf k } ) = { \cal L } _ { P } ( x ^ { * } , x , c ( N , { \bf k } , x , x ^ { * } ) ) + { \cal L } _ { R } ( N , { \bf k } ) } } \\ { { \displaystyle ~ = { \cal L } ( x ^ { * } , f ( x , \pi ^ { C } ( x ^ { * } , x , h _ { N - 1 } ) ) ) + \sum _ { n = 1 } ^ { N - 1 } \tau _ { k _ { n } } , } } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
and the optimal solution is defined as $( N , { \bf k } ) ^ { * } = \arg \operatorname* { m i n } _ { N , { \bf k } } L _ { T } ( x ^ { * } , x , N , { \bf k } )$ . Optimizing $L _ { T }$ is difficult because of the recursive dependency on the history, $h _ { N - 1 }$ , and because the discrete choices of $N$ and $\mathbf { k }$ mean $L _ { T }$ is not differentiable.
|
| 67 |
+
|
| 68 |
+
To optimize $L _ { T }$ we recast it as an RL problem where the objective is to jointly optimize task performance and computational cost. As shown in Figure 1a, the metacontroller agent $a ^ { M }$ is comprised of a controller $\bar { \pi } ^ { C }$ , a pool of experts $\{ E _ { 1 } , \ldots , E _ { K } \}$ , a manager $\pi ^ { M }$ , and a memory $\mu$ . The manager is a meta-level policy (Russell & Wefald, 1991; Hay et al., 2012) over actions indexed by $k$ , which determine whether to terminate the optimization procedure $k = 0$ ) or to perform another iteration of the optimization procedure with the $k ^ { \mathrm { { t h } } }$ expert. Specifically, on the $n ^ { \mathrm { { \hat { t } h } } }$ iteration the controller produces a new control $c _ { n }$ based on the history of controls, experts, and evaluations. The manager, also relying on this history, independently decides whether to end the optimization procedure (i.e., to execute the control in the world) or to perform another iteration and evaluate the proposed control with the $k _ { n } ^ { \mathrm { t h } }$ expert (i.e., to ponder, after Graves (2016)). The memory then updates the history $h _ { n }$ by concatenating $k$ , $c _ { n }$ , and $e _ { n }$ with the previous history $h _ { n - 1 }$ . Coming back to the notion of imagination-based optimization, we suggest that this iterative optimization process is analogous to imagining what will happen (using one or more approximate world models) before actually executing that action in the world. For further details, see Appendix A, and for an algorithmic illustration of the metacontroller agent, see Algorithm 1 in the appendix.
|
| 69 |
+
|
| 70 |
+
We also define two special cases of the metacontroller for baseline comparisons. The iterative agent $a ^ { I }$ does not have a manager and uses only a single expert. Its number of iterations are pre-set to a single $N$ . The reactive agent, $a ^ { 0 }$ , is a special case of the iterative agent, where the number of iterations is fixed to $N = 0$ . This implies that proposed controls are executed immediately in the world, and are not evaluated by an expert. For algorithmic illustrations of the iterative and reactive agents, see Algorithms 2 and 3 in the appendix.
|
| 71 |
+
|
| 72 |
+
# 2.3 NEURAL NETWORK IMPLEMENTATION
|
| 73 |
+
|
| 74 |
+
We use standard deep learning building blocks, e.g., multi-layer perceptrons (MLPs), RNNs, etc., to implement the controller, experts, manager, and memory, because they are effective at approximating complex functions via gradient-based and reinforcement learning, but other approaches could be used as well. In particular, we constructed our implementation to be able to make control decisions in complex dynamical systems, such as controlling the movement of a spaceship (Figure 1b-c), though we note that our approach is not limited to such physical reasoning tasks. Here we used mean-squared error (MSE) for our $\mathcal { L }$ and Adam (Kingma & Ba, 2014) as the training optimizer.
|
| 75 |
+
|
| 76 |
+
Experts We implemented the experts as MLPs and “interaction networks” (INs) (Battaglia et al., 2016), which are well-suited to predicting complex dynamical systems like those in our experiments below. Each expert has parameters $\theta ^ { E _ { k } }$ , i.e. $\overset { \cdot } { e } _ { n } = \overset { \cdot } { E } _ { k } \left( x ^ { * } , x , \overset { \cdot } { c } _ { n } ; \theta ^ { E _ { k } } \right)$ , and may be trained either on-policy using the outputs of the controller (as is the case in this paper), or off-policy by any data that pairs states and controls with future states or reward outcomes. The objective $L _ { E _ { k } }$ for each expert may be different depending on what the expert outputs. For example, the objective could be the loss between the goal and future states, ${ L _ { E _ { k } } } ^ { \setminus } = \mathcal { L } \left( \hat { f } ( x , c ) , E _ { k } ( x ^ { \ast } , \overset { \cdot } { x } , c ; \theta ^ { E _ { k } } ) \right)$ , which is what we use in our experiments. Or, it could be the loss between $L _ { P }$ and an action-value function that predicts $L _ { P }$ directly, $L _ { E _ { k } } = \mathcal { L } \left( L _ { P } ( x ^ { * } , x , c ) , E _ { k } ( x ^ { * } , x , c ; \theta ^ { E _ { k } } ) \right)$ . See Appendix B.1 for details.
|
| 77 |
+
|
| 78 |
+
Controller and Memory We implemented the controller as an MLP with parameters $\theta ^ { C }$ , i.e. $c _ { n } =$ $\pi ^ { C } ( x ^ { * } , x , h _ { n - 1 } ; \theta ^ { C } )$ , and we implemented the memory as a Long Short-Term Memory (LSTM) (Hochreiter & Schmidhuber, 1997) with parameters $\theta ^ { \mu }$ . The memory embeds the history as a fixedlength vector, i.e. $h _ { n } \ = \ \mu ( h _ { n - 1 } , k _ { n } , c _ { n } , E _ { k _ { n } } ( x ^ { * } , x , c _ { n } ) ; \theta ^ { \mu } )$ . The controller and memory were trained jointly to optimize (1). However, this objective includes $f$ , which is often unknown or not differentiable. We overcame this by approximating $L _ { P }$ with a differentiable critic analogous to those used in policy gradient methods (e.g. Silver et al., 2014; Lillicrap et al., 2015; Heess et al., 2015). See Appendices B.2 and B.3 for details.
|
| 79 |
+
|
| 80 |
+
Manager We implemented the manager as a stochastic policy that samples from a categorical distribution whose weights are produced by an MLP with parameters $\theta ^ { M }$ , i.e. $k _ { n } ~ \sim$ Categorical $( k ; \pi ^ { M } ( x ^ { * } , x , h _ { n - 1 } ; \theta ^ { M } ) )$ . We trained the manager to minimize (3) using REINFORCE (Williams, 1992), but other deep RL algorithms could be used instead. See Appendix B.4 for details.
|
| 81 |
+
|
| 82 |
+
# 3 EXPERIMENTS
|
| 83 |
+
|
| 84 |
+
To evaluate our metacontroller agent, we measured its ability to learn to solve a class of physicsbased tasks that are surprisingly challenging. Each episode consisted of a scene which contained a spaceship and multiple planets (Figure 1b-c). The spaceship’s goal was to rendezvous with its mothership near the center of the system in exactly 11 time steps, but it only had enough fuel to fire its thrusters once. The planets were static but the gravitational force they exerted on the spacecraft induced complex non-linear dynamics on the motion over the 11 steps. The spacecraft’s action space was continuous, up to some maximum magnitude, and represented the instantaneous Cartesian velocity vector imparted by its thrusters. Further details are in Appendix C.
|
| 85 |
+
|
| 86 |
+
We trained the reactive, iterative, and metacontroller agents on five versions of the spaceship task involving different numbers of planets.1 The iterative agent was trained to take anywhere from zero (i.e., the reactive agent) to ten ponder steps. The metacontroller was allowed to take a maximum of ten ponder steps. We considered three different experts which were all differentiable: an MLP expert which used an MLP to predict the final location of the spaceship, an IN expert which used an interaction network (Battaglia et al., 2016) to predict the full trajectory of the spaceship, and a true simulation expert which was the same as the world model. In some conditions the metacontroller could use exactly one expert and in others it was allowed to select between the MLP and IN experts. For experiments with the true simulation expert, we used it to backpropagate gradients to the controller and memory. For experiments with an MLP as the only expert, we used a learned IN as the critic. For experiments with an IN as one of its experts, the critic was an IN with shared parameters. We trained the metacontroller on a range of different ponder costs, $\tau _ { k }$ , for the different experts. Further details of the training procedure are available in Appendix D.
|
| 87 |
+
|
| 88 |
+
# 3.1 REACTIVE AND ITERATIVE AGENTS
|
| 89 |
+
|
| 90 |
+
Figure 2 shows the performance on the test set of the reactive and iterative agents for different numbers of ponder steps. The reactive agent performed poorly on the task, especially when the task was more difficult. With the five planets dataset, it was only able to achieve a performance loss of 0.583 on average (see Figure 1 for a depiction of the magnitude of the loss). In contrast, the iterative agent with the true simulation expert performed much better, reaching ceiling performance on the datasets with one and two planets, and achieving a performance loss of 0.0683 on the five planets dataset. The IN and MLP experts also improve over the reactive agent, with a minimum performance loss of 0.117 and 0.375 on the five planets dataset, respectively.
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 2: Test performance of the reactive and iterative agents. Each line corresponds to the performance of an iterative agent (either the true simulation expert, the MLP expert, or the interaction net expert) trained for a fixed number of ponder steps on one of the five datasets; the line color indicates which dataset the controller was trained on. In all cases, performance refers to the performance loss, $L _ { P }$ . Left: the MLP expert struggles with the task due to its limited expressivity, but still benefits from pondering. Middle: the IN expert performs almost as well as the true simulation expert, even though it is not a perfect model. Right: The true simulation expert does quite well on the task, especially with multiple ponder steps.
|
| 94 |
+
|
| 95 |
+
Figure 2 also highlights how important the choice of expert is. When using the true simulation and IN experts, the iterative agent performs well. With the MLP expert, however, performance is substantially diminished. But despite the poor performance of the MLP expert, there is still some benefit of pondering with it. With even just a few steps, the MLP iterative agent outperforms its reactive counterpart. However comparing the reactive agent with the $N \ = \ 1$ iterative agent is somewhat unfair because the iterative agent has more parameters due to the expert and the memory. However, given that there tends to also be an increase in performance between one and two ponder steps (and beyond), it is clear that pondering—even with a highly inaccurate model—can still lead to better performance than a model-free reactive approach.
|
| 96 |
+
|
| 97 |
+
# 3.2 METACONTROLLER WITH ONE EXPERT
|
| 98 |
+
|
| 99 |
+
Though the iterative agents achieve impressive results, they expend more computation than necessary. For example, in the one and two planet conditions, the performances of the IN and true simulation iterative agents received little performance benefit from pondering more than two or three steps, while for the four and five planet conditions they required at least five to eight steps before their performance converged. When computational resources have no cost, the number of steps are of no concern, but when they have some cost it is important to be economical.
|
| 100 |
+
|
| 101 |
+
Because the metacontroller learns to choose its number of pondering steps, it can balance its performance loss against the cost of computation. Figure 3 (top row, middle and right subplots) shows that the IN and true simulation expert metacontroller take fewer ponder steps as $\tau$ increases, tracking closely the minimum of the iterative agent’s cost curve (i.e., the metacontroller points are always near the iterative agent curves’ minima). This adaptive behavior emerges automatically from the manager’s learned policy, and avoids the need to perform a hyperparameter search to find the best number of iterations for a given $\tau$ .
|
| 102 |
+
|
| 103 |
+
The metacontroller does not simply choose an average number of ponder steps to take per episode: it actually tailors this choice to the difficulty of each episode. Figure 4 shows how the number of ponder steps the IN metacontroller chooses in each episode depends on that episode’s difficulty, as measured by the episode’s loss under the reactive agent. For more difficult episodes, the metacontroller tends to take more ponder steps, as indicated by the positive slopes of the best fit lines, and this proportionality persists across the different levels of $\tau$ in each subplot.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 3: Test performance of the metacontroller with a single expert on the five planets dataset. Each column corresponds to a different experts. The lines indicate the performance of the iterative agents for different numbers of ponder steps. The points indicate the performance of the metacontroller, with each point corresponding to a different value of $\tau$ . The $x$ -coordinate of each point is an average across the number of ponder steps, and the $y$ -coordinate is the average loss. Top row: Here we show total cost rather than just performance on the task (i.e., including computation cost). Different colors show the result for different $\tau$ , with the different lines showing the cost for the same iterative controller under different values of $\tau$ . The error bars (for the metacontroller) indicate $2 . 5 \%$ and $9 7 . 5 \%$ confidence intervals. When the point is below its corresponding curve, it means that the metacontroller was able to achieve a better speed-accuracy trade-off than that achievable by the iterative agent. Line colors of increasing brightness correspond to increasing $\tau$ , with $\tau$ values taken from [0, 0.0134, 0.0354, 0.0576, 0.0934, 0.152, 0.246]. Bottom row: Here we show just the performance loss (i.e., without computational cost). Each point corresponds to a different value of $\tau$ . The fact that the points are below the curve means the metacontroller agent learns to perform better than the iterative agent with the equivalent number of ponder steps.
|
| 107 |
+
|
| 108 |
+
The ability to adapt its choice of number of ponder steps on a per-episode basis is very valuable because it allows the metacontroller to spend additional computation only on those episodes which require it. The total costs of the IN and true simulation metacontrollers’ are $11 \%$ and $15 \%$ lower (median) than the best achievable costs of their corresponding iterative agents, respectively, across the range of $\tau$ values we tested (see Figure 7 in the Appendix for details).
|
| 109 |
+
|
| 110 |
+
There can even be a benefit to using a metacontroller when there are no computational resource costs. Consider the rightmost points in Figure 3 (bottom row, middle and right subplots), which show the performance loss for the IN and true simulation metacontrollers when $\tau$ is low. Remarkably, these points still outperform the best achievable iterative agents. This suggests that there can be an advantage to stopping pondering once a good solution is found, and more generally demonstrates that the metacontroller’s learning process can lead to strategies that are superior to those available to less flexible agents.
|
| 111 |
+
|
| 112 |
+
The metacontroller with the MLP expert had very poor average performance and high variance on the five planet condition (Figure 3, top left subplot), which is why we restricted our focus in this section to how the metacontrollers with IN and true simulation experts behaved. The MLP’s poor performance is crucial, however, for the following section (3.3) which analyzes how a multipleexpert metacontroller manages experts which vary greater in their reliability.
|
| 113 |
+
|
| 114 |
+
# 3.3 METACONTROLLER WITH TWO EXPERTS
|
| 115 |
+
|
| 116 |
+
When we allow the manager to additionally choose between two experts, rather than only relying on a single expert, we find a similar pattern of results in terms of the number of ponder steps (Figure 5, left). Additionally, the metacontroller is successfully able to identify the more reliable IN network and consequently uses it a majority of the time, except in a few cases where the cost of the IN network is extremely high relative to the cost of the MLP network (Figure 5, right). This pattern of results makes sense given the good performance (described in the previous section) of the metacontroller with the IN expert compared to the poor performance of the metacontroller with the MLP expert. The manager should not generally rely on the MLP expert because it is simply not a reliable source of information.
|
| 117 |
+
|
| 118 |
+
However, the metacontroller has more difficulty finding an optimal balance between the two experts on a step-by-step basis: the addition of a second expert did not yield much of an improvement over the single-expert metacontroller, with only $9 \%$ of the different versions (trained with different $\tau$ values for the two experts) achieving a lower loss than the best iterative controller. We believe the mixed performance of the metacontroller with multiple experts is partially due to an entropy term which we used to encourage the manager’s policy to be non-deterministic (see Appendix B.4). In particular, for high values of $\tau$ , the optimal thing to do is to always execute immediately without pondering. However, because of the entropy term, the manager is encourage to have a non-deterministic policy and therefore is likely to ponder more than it should—and to use experts that are more unreliable— even when this is suboptimal in terms of the total loss (3).
|
| 119 |
+
|
| 120 |
+
Despite the fact that the metacontroller with multiple experts does not result in a substantial improvement over that which uses a single expert, we emphasize that the manager is able to identify and use the more reliable expert the majority of the time. And, it is still able to choose a variable number of steps according to how difficult the task is (Figure 5, left). This, in and of itself, is an improvement over more traditional optimization methods which would require that the expert is hand-picked ahead of time and that the number of steps are determined heuristically.
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 4: Relationship between the number of ponder steps and per-episode difficulty for the IN metacontroller. Each subplot’s $x$ -axis represents the episode difficulty, as measured by the reactive controller’s loss. Each $y$ -axis represents the number of ponder steps the metacontroller took. The points are individual episodes, and the line is the best fit regression line and $9 5 \%$ confidence intervals. The different subplots show different values of $\tau$ (labeled in the title). In each case, there is a clear positive relationship between the difficulty of the task and the number of ponder steps, suggesting that the metacontroller learns to spend more time on hard problems and less time on easier problems. At the bottom of each plot are the fitted slope and correlation coefficient values, along with their $9 5 \%$ confidence intervals in brackets.
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 5: Test performance of the metacontroller with multiple experts on the five planets dataset. Left: The average number of total ponder steps, for different values of $\tau$ . As with the single-expert metacontrollers, fewer ponder steps are taken when the cost is very high, and more are taken when the cost is low. Right: The fraction of ponder steps taken by the MLP expert relative to the IN expert. In the majority of cases, the metacontroller favors using the IN expert as it is much more reliable. The few exceptions (red squares) are cases when the cost of the IN expert is much higher relative to the cost of the MLP expert.
|
| 127 |
+
|
| 128 |
+
# 4 DISCUSSION
|
| 129 |
+
|
| 130 |
+
In this paper, we have presented an approach to adaptive, imagination-based optimization in neural networks. Our approach is able to flexibly choose which computations to perform as well as how many computations need to be performed, approximately solving a speed-accuracy trade-off that depends on the difficulty of the task. In this way, our approach learns to rely on whatever source of information is most useful and most efficient. Additionally, by consulting the experts on-the-fly, our approach allows agents to test out actions to ensure that their consequences are not disastrous before actually executing them.
|
| 131 |
+
|
| 132 |
+
While the experiments in this paper involve a one-shot decision task, our approach lays a foundation that can be built upon to support more complex situations. For example, rather than applying a force only on the first time step, we could turn the problem into one of trajectory optimization for continuous control by asking the controller to produce a sequence of forces. In the case of planning, our approach could potentially be combined with methods like Monte Carlo Tree-Search (MCTS) (Coulom, 2006), where our experts would be akin to having several different rollout policies to choose from, and our controller would be akin to the tree policy. While most MCTS implementations will run rollouts until a fixed amount of time has passed, our approach would allow the manager to adaptively choose the number of rollouts to perform and which policies to perform the rollouts with. Our method could also be used to naturally augment existing model-free approaches such as DQN (Mnih et al., 2015) with online model-based optimization by using the model-free policy as a controller and adding additional experts in the form of state-transition models. An interesting extension would be to compare our metacontroller architecture with a na¨ıve model-based controller that performs gradient-based optimization to produce the final control. We expect our metacontroller architecture might require fewer model evaluations and to be more robust to model inaccuracies compared to the gradient-based method, because our method has access to the full history of proposed controls and evaluations whereas traditional gradient-based methods do not.
|
| 133 |
+
|
| 134 |
+
Although we rely on differentiable experts in our metacontroller architecture, we do not utilize the gradient information from these experts. An interesting extension to our work would be to pass this gradient information through to the manager and controller (as in Andrychowicz et al. (2016)), which would likely improve performance further, especially in the more complex situations discussed here. Another possibility is to train some or all of the experts inline with the controller and metacontroller, rather than independently, which could allow their learned functionality to be more tightly integrated with the rest of the optimization loop, at the expense of their generality and ability to be repurposed for other uses.
|
| 135 |
+
|
| 136 |
+
To conclude, we have demonstrated how neural network-based agents can use metareasoning to adaptively choose what to think about, how to think about it, and for how long to think for. Our method is directly inspired by human cognition and suggests a way to make agents much more flexible and adaptive than they currently are, both in decision making tasks such as the one described here, as well as in planning and control settings more broadly.
|
| 137 |
+
|
| 138 |
+
# ACKNOWLEDGMENTS
|
| 139 |
+
|
| 140 |
+
We would like to thank Matt Hoffman, Andrea Tacchetti, Tom Erez, Nando de Freitas, Guillaume Desjardins, Joseph Modayil, Hubert Soyer, Alex Graves, David Reichert, Theo Weber, Jon Scholz, Will Dabney, and others on the DeepMind team for helpful discussions and feedback.
|
| 141 |
+
|
| 142 |
+
# REFERENCES
|
| 143 |
+
|
| 144 |
+
Marcin Andrychowicz, Misha Denil, Sergio Gomez, Matthew W Hoffman, David Pfau, Tom Schaul, and Nando de Freitas. Learning to learn by gradient descent by gradient descent. arXiv:1606.04474, 2016.
|
| 145 |
+
Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, and Koray Kavukcuoglu. Interaction networks for learning about objects, relations and physics. Advances in Neural Information Processing Systems, 2016.
|
| 146 |
+
Peter W. Battaglia, Jessica B. Hamrick, and Joshua B. Tenenbaum. Simulation as an engine of physical scene understanding. Proceedings of the National Academy of Sciences, 110(45):18327–18332, 2013.
|
| 147 |
+
Emmanuel Bengio, Pierre-Luc Bacon, Joelle Pineau, and Doina Precup. Conditional computation in neural networks for faster models. arXiv:1511.06297, 2015.
|
| 148 |
+
Yoshua Bengio. Deep learning of representations: Looking forward. arXiv:1305.0445, 2013.
|
| 149 |
+
Remi Coulom. Efficient selectivity and backup operators in monte-carlo tree search. In ´ International Conference on Computers and Games, pp. 72–83. Springer, 2006.
|
| 150 |
+
Katerina Fragkiadaki, Pulkit Agrawal, Sergey Levine, and Jitendra Malik. Learning Visual Predictive Models of Physics for Playing Billiards. Proceedings of the International Conference on Learning Representations (ICLR 2016), pp. 1–12, 2015. URL http://arxiv.org/abs/1511.07404.
|
| 151 |
+
Jan Glascher, Nathaniel Daw, Peter Dayan, and John P. O’Doherty. States versus rewards: Dissociable neural ¨ prediction error signals underlying model-based and model-free reinforcement learning. Neuron, 66(4):585 – 595, 2010.
|
| 152 |
+
Alex Graves. Adaptive computation time for recurrent neural networks. arXiv:1603.08983, 2016.
|
| 153 |
+
Jessica B. Hamrick, Kevin A. Smith, Thomas L. Griffiths, and Edward Vul. Think again? the amount of mental simulation tracks uncertainty in the outcome. In Proceedings of the 37th Annual Conference of the Cognitive Science Society, 2015.
|
| 154 |
+
Nicholas Hay, Stuart J. Russell, David Tolpin, and Solomon Eyal Shimony. Selecting computations: Theory and applications. Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, 2012.
|
| 155 |
+
Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. Advances in Neural Information Processing Systems, 2015.
|
| 156 |
+
Mary Hegarty. Mechanical reasoning by mental simulation. Trends in Cognitive Sciences, 8(6):280 – 285, 2004.
|
| 157 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8):1735–1780, 1997.
|
| 158 |
+
Matthew W Hoffman, Eric Brochu, and Nando de Freitas. Portfolio allocation for Bayesian optimization. In Proceedings of the 27th Conference on Uncertainty in Artificial Intelligence, pp. 327–336, 2011.
|
| 159 |
+
Eric J. Horvitz. Reasoning about beliefs and actions under computational resource constraints. In Uncertainty in Artificial Intelligence, Vol. 3, 1988.
|
| 160 |
+
Philip N Johnson-Laird. Mental models and human reasoning. Proceedings of the National Academy of Sciences, 107(43):18243–18250, 2010.
|
| 161 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014.
|
| 162 |
+
Wouter Kool, Fiery A. Cushman, and Samuel J. Gershman. When does model-based control pay off? PLOS Computational Biology, in press.
|
| 163 |
+
Sang Wan Lee, Shinsuke Shimojo, and John P. O’Doherty. Neural computations underlying arbitration between model-based and model-free learning. Neuron, 81:687–699, 2014.
|
| 164 |
+
Sergey Levine, Chelsea Finn, Trevor Darrell, and Pieter Abbeel. End-to-end training of deep visuomotor policies. Journal of Machine Learning Research, 17:1–40, 2016.
|
| 165 |
+
Falk Lieder and Thomas L. Griffiths. Strategy selection as rational metareasoning. in revision.
|
| 166 |
+
Falk Lieder, Dillon Plunkett, Jessica B. Hamrick, Stuart J. Russell, Nicholas J. Hay, and Thomas L. Griffiths. Algorithm selection by rational metareasoning as a model of human strategy selection. 27:2870–2878, 2014.
|
| 167 |
+
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:1509.02971, 2015.
|
| 168 |
+
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–533, 2015.
|
| 169 |
+
Stuart Russell and Eric Wefald. Principles of metareasoning. Artificial Intelligence, 49(1):361 – 395, 1991.
|
| 170 |
+
Jurgen Schmidhuber. An on-line algorithm for dynamic reinforcement learning and planning in reactive envi-¨ ronments. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), 1990a.
|
| 171 |
+
Jurgen Schmidhuber. Reinforcement learning in Markovian and non-Markovian environments. ¨ Advances in Neural Information Processing Systems, 1990b.
|
| 172 |
+
Bobak Shahriari, Ziyu Wang, Matthew W Hoffman, Alexandre Bouchard-Cotˆ e, and Nando de Freitas. An ´ entropy search portfolio for Bayesian optimization. arXiv:1406.4625, 2014.
|
| 173 |
+
David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. Proceedings of the 31st International Conference on Machine Learning, 2014.
|
| 174 |
+
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.
|
| 175 |
+
Aviv Tamar, Sergey Levine, and Pieter Abbeel. Value Iteration Networks. Advances in Neural Information Processing Systems, 2016. URL http://arxiv.org/abs/1602.02867.
|
| 176 |
+
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3-4):229–256, 1992.
|
| 177 |
+
D.M. Wolpert and M. Kawato. Multiple paired forward and inverse models for motor control. Neural Networks, 11(78):1317 – 1329, 1998.
|
| 178 |
+
|
| 179 |
+
# A METACONTROLLER DETAILS
|
| 180 |
+
|
| 181 |
+
Here, we give the precise definitions of the metacontroller agent. As described in the main text, the iterative and reactive agents are special cases of the metacontroller agent, and are therefore not discussed here.
|
| 182 |
+
|
| 183 |
+
The metacontroller agent $a ^ { M }$ is comprised of the following components:
|
| 184 |
+
|
| 185 |
+
• A history-sensitive controller, $\pi ^ { C } : \mathcal { X } \times \mathcal { X } \times \mathcal { H } \mathcal { C }$ , which is a policy that maps goal and initial states, and a history, $h \in \mathcal H$ , to controls, whose aim is to minimize (1).
|
| 186 |
+
• A pool of experts $\{ E _ { 1 } , \ldots , E _ { K } \}$ . Each expert $E : \mathcal { X } \times \mathcal { X } \times \mathcal { C } \mathcal { E }$ maps goal states, input states, and actions to opinions. Opinions can be either states-only $( { \mathcal { E } } = { \mathcal { X } } $ ), states and rewards ${ \mathcal { E } } =$ $\mathcal { X } \times \mathbb { R } )$ ), or rewards-only $( { \mathcal { E } } = \mathbb { R }$ ). The expert corresponds to the evaluator for the optimization routine, i.e., an approximation of the forward process $f$ .
|
| 187 |
+
• A manager, $\pi ^ { M } : { \mathcal { X } } \times { \mathcal { X } } \times { \mathcal { H } } _ { n } \to \{ 0 , \dots , K \}$ , which is a policy which decides whether to send a proposed control to the world $k = 0$ ) or to the $k ^ { \mathrm { t h } }$ expert for evaluation, in order to minimize (3). This formulation is based on that used by metareasoning systems (Russell & Wefald, 1991; Hay et al., 2012). Details on the corresponding MDP are given in Appendix A.1.
|
| 188 |
+
• A memory, $\mu : { \mathcal { H } } _ { n - 1 } \times { \mathcal { Z } } \to { \mathcal { H } } _ { n }$ , which is a function that maps the prior history $h _ { n - 1 } \in \mathcal { H } _ { n - 1 }$ , as well as the most recent manager choice, proposed control, and expert evaluation $( k , c , e ) \in$ $\{ 0 , \dots , K \} \times { \mathcal { C } } \times { \mathcal { E } } = { \mathcal { Z } }$ , to an updated history $\boldsymbol { h _ { n } } ~ \in ~ \mathcal { H } _ { n }$ , which is then made available to the manager and controller on subsequent iterations. The history at step $n$ is a recursively defined tuple which is the concatenation of the prior history with the most recently proposed control, expert evaluation, and expert identity: $h _ { n } \ = \ h _ { n - 1 } \cap \left( \left( k _ { n } , c _ { n } , E _ { k _ { n } } ( x ^ { * } , x , c _ { n } ) \right) \right) \ =$ $( ( k _ { 1 } , c _ { 1 } , E _ { k _ { 1 } } ( x ^ { * } , x , c _ { 1 } ) ) , \ldots , ( k _ { n } , { \bar { c _ { n } } } , E _ { k _ { n } } ( x ^ { * } , x , c _ { n } ) ) )$ ) where $h _ { 0 } = \mathrm { ( ) }$ represents an empty initial history. Similarly, the finite set of histories up to step $n$ is: $\mathcal { H } _ { n } = \mathcal { H } _ { n - 1 } \times \mathcal { Z } = \mathcal { Z } ^ { n }$ where $\mathcal { H } _ { 0 } = \left\{ \left( \begin{array} { l } \right) \right\} \end{array}$ .
|
| 189 |
+
|
| 190 |
+
The metacontroller produces:
|
| 191 |
+
|
| 192 |
+
$$
|
| 193 |
+
a ^ { M } ( x ^ { * } , x ) = \pi ^ { C } ( x ^ { * } , x , h _ { N - 1 } ) = c _ { N }
|
| 194 |
+
$$
|
| 195 |
+
|
| 196 |
+
where $N = n$ s.t. $k _ { n } = 0$ . This function is summarized in Algorithm 1. The other agents (iterative and reactive), as mentioned in the main text, are simpler versions of the metacontroller agent and are summarized in Algorithms 2 and 3.
|
| 197 |
+
|
| 198 |
+
# A.1 META-LEVEL MDP
|
| 199 |
+
|
| 200 |
+
To implement the manager for the metacontroller agent, we draw inspiration from the metareasoning literature (Russell & Wefald, 1991; Hay et al., 2012) and formulate the problem as a finite-horizon Markov Decision Process (MDP) $\langle S , A , P , R \rangle$ over the decision of whether to perform another iteration of the optimization procedure or to execute a control in the world.
|
| 201 |
+
|
| 202 |
+
• The state space $s$ consists of goal states, external states, and internal histories, $S = \mathcal { X } \times \mathcal { X } \times \mathcal { H }$ . • The action space $\mathcal { A }$ contains $K + 1$ discrete actions, $\{ 0 , \ldots , K \}$ , which correspond to execute $k = 0$ ) and ponder $( k \in \{ 1 , \ldots , K \} )$ , where ponder (after Graves (2016)) refers to performing an iteration of the optimization procedure with the $k ^ { \mathrm { t h } }$ expert.
|
| 203 |
+
|
| 204 |
+
• The (deterministic) state transition model $P : \mathcal { S } \times \mathcal { C } \times \mathcal { S } [ 0 , 1 ]$ is,
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
P ( x ^ { \prime } , h _ { n } | x ^ { * } , x , h _ { n - 1 } , k ) = { \left\{ \begin{array} { l l } { P ( x ^ { \prime } | x ^ { * } , x , h _ { n - 1 } , k ) } & { { \mathrm { ~ i f ~ } } k = 0 } \\ { P ( h _ { n } | x ^ { * } , x , h _ { n - 1 } , k ) } & { { \mathrm { ~ o t h e r w i s e } } } \end{array} \right. }
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
where $x ^ { \prime } = f ( x , c )$ and $c = \pi ^ { C } ( x ^ { * } , x , h _ { n - 1 } )$ and,
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\begin{array} { r l } & { P ( x ^ { \prime } | x ^ { * } , x , h _ { n - 1 } , k ) = \left\{ \begin{array} { l l } { 1 } & { \mathrm { ~ i f ~ } x ^ { \prime } = f ( x , c ) } \\ { 0 } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right. } \\ & { P ( h _ { n } | x ^ { * } , x , h _ { n - 1 } , k ) = \left\{ \begin{array} { l l } { 1 } & { \mathrm { ~ i f ~ } h _ { n } = h _ { n - 1 } \cup \left\{ ( k , c , E _ { k } ( x ^ { * } , x , c ) ) \right\} } \\ { 0 } & { \mathrm { ~ o t h e r w i s e } } \end{array} \right. } \end{array}
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
Algorithm 1 Metacontroller agent. $x$ is the scene and $x ^ { * }$ is the target.
|
| 217 |
+
|
| 218 |
+
<table><tr><td colspan="2">1: function aM(x,x*)</td></tr><tr><td>2: ho←(),</td><td>Initial empty history</td></tr><tr><td>k0←πM(x,x*,h0) 3:</td><td>Get an action from the manager</td></tr><tr><td>4: C0 ←π℃(x,x*,h)</td><td>>Propose a control with the controller</td></tr><tr><td>5: n←0</td><td></td></tr><tr><td>6: while kn /0 do</td><td>When k ≠ O, ponder with an expert</td></tr><tr><td>7: en←Ekn(x,x*,Cn)</td><td>>Get an expert's opinion</td></tr><tr><td>8: hn+1 ←μ(hn,kn,Cn,en)</td><td> Update the history</td></tr><tr><td>9: n↑n+1</td><td></td></tr><tr><td>10: kn←πM(x,x*,hn)</td><td> Choose the next action</td></tr><tr><td>11: Cn ←πC(x,x*,hn)</td><td>>Propose the next control</td></tr><tr><td></td><td></td></tr><tr><td>12: end while</td><td></td></tr><tr><td>13: return Cn</td><td></td></tr><tr><td>14: end function</td><td></td></tr></table>
|
| 219 |
+
|
| 220 |
+
Algorithm 2 Iterative agent. $x$ is the scene, $x ^ { * }$ is the target, and $N$ is the number of ponder steps.
|
| 221 |
+
|
| 222 |
+
<table><tr><td colspan="3">1: function a(x,x*, N)</td></tr><tr><td>2:</td><td>ho←()</td><td> Initial empty history</td></tr><tr><td>3:</td><td>C0←π℃(x,x*,h0)</td><td>>Propose a control with the controller</td></tr><tr><td>4:</td><td>n←0</td><td></td></tr><tr><td>5:</td><td>whilen<Ndo</td><td> Ponder with an expert for N steps</td></tr><tr><td>6:</td><td>en←E(x,x*,Cn)</td><td>Get the expert's opinion</td></tr><tr><td>7:</td><td>hn+1 ←μ(hn,kn,Cn,en)</td><td>Update the history</td></tr><tr><td>8:</td><td>n←n+1</td><td></td></tr><tr><td>9:</td><td>Cn ←πC(x,x*,hn)</td><td>>Propose the next control</td></tr><tr><td>10:</td><td>end while</td><td></td></tr><tr><td>11:</td><td>return Cn</td><td></td></tr><tr><td colspan="3">12: end function</td></tr><tr><td colspan="3"></td></tr></table>
|
| 223 |
+
|
| 224 |
+
Algorithm 3 Reactive agent. $x$ is the scene and $x ^ { * }$ is the target.
|
| 225 |
+
|
| 226 |
+
1: function $a ^ { 0 } ( x , x ^ { * } )$
|
| 227 |
+
2: c0 ← πC (x, x∗, ())
|
| 228 |
+
3: return c0
|
| 229 |
+
4: end function
|
| 230 |
+
|
| 231 |
+
• The (deterministic) reward function $R : S \times \mathcal { A } \times \mathcal { S } \mathbb { R }$ maps the current state, current action, and next state to real-valued loss:
|
| 232 |
+
|
| 233 |
+
$$
|
| 234 |
+
R ( x ^ { * } , x , h _ { n - 1 } , k , x ^ { \prime } ) = { \left\{ \begin{array} { l l } { { \mathcal { L } } ( x ^ { * } , x ^ { \prime } ) } & { { \mathrm { i f ~ } } k = 0 { \mathrm { ~ ( s e e ~ E q . ~ 1 ) ~ } } } \\ { \tau _ { k } } & { { \mathrm { o t h e r w i s e ~ ( s e e ~ E q . ~ 3 ) } } } \end{array} \right. }
|
| 235 |
+
$$
|
| 236 |
+
|
| 237 |
+
where $x ^ { \prime } = f \left( x , \pi ^ { C } ( x ^ { * } , x , h _ { n - 1 } ) \right)$ .
|
| 238 |
+
|
| 239 |
+
We approximate the solution to this MDP with a stochastic manager policy $\pi ^ { M }$ . The manager chooses actions proportional to the immediate reward for taking action $k$ in state $s _ { n }$ plus the expected sum of future rewards. This construction imposes a trade-off between accuracy and resources, incentivizing the agent to ponder longer and with more accurate (and potentially expensive) experts when the problem is harder.
|
| 240 |
+
|
| 241 |
+

|
| 242 |
+
Figure 6: Training each part of the network. In each subplot, red arrows depict gradients. Dotted arrows indicate backward connections that are not part of the forward pass. Colored nodes indicate weights that are being updated. All backpropagation occurs at the very end of a full forward pass (i.e., after the control has been executed in the world). A: Training the controller and memory with backpropagation-through-time (BPTT), beginning with the critic, and flowing to the controller, through the memory, through the relevant expert, through the controller again, and so on. B: Training the manager using REINFORCE (Williams, 1992). C: Training the experts (note that each expert may have a different loss with respect to the outcome from the world). D: Training the critic.
|
| 243 |
+
|
| 244 |
+
# B GRADIENTS
|
| 245 |
+
|
| 246 |
+
# B.1 EXPERTS
|
| 247 |
+
|
| 248 |
+
Training the experts is a straightforward supervised learning problem (Figure 6c). The gradient is:
|
| 249 |
+
|
| 250 |
+
$$
|
| 251 |
+
\frac { \partial \mathcal { L } ^ { E _ { k } } } { \partial \theta ^ { E _ { k } } } = \frac { \partial \mathcal { L } ^ { E _ { k } } } { \partial E _ { k } } \frac { \partial E _ { k } } { \partial \theta ^ { E _ { k } } } ,
|
| 252 |
+
$$
|
| 253 |
+
|
| 254 |
+
where $E _ { k }$ is the $k ^ { \mathrm { t h } }$ expert and $\mathcal { L } ^ { E _ { k } }$ is the loss function for the $k ^ { \mathrm { t h } }$ expert. For example, in the case of an action-value function expert, this loss function might be $\mathcal { L } ^ { E _ { k } } ( f , E _ { k } ) \ =$ $\Big | \Big | \mathcal { L } \big ( x ^ { * } , f ( x , c ) \big ) - E _ { k } \big ( x ^ { * } , x , c ; \theta ^ { E _ { k } } \big ) \Big | \Big | _ { 2 }$ . In the case of an expert that predicts the final state using a model of the system dynamics, it might be $\mathcal { L } ^ { E _ { k } } ( f , E _ { k } ) = \left| \left| f ( x , c ) - E _ { k } ( x ^ { * } , x , c ; \theta ^ { E _ { k } } ) \right| \right| _ { 2 }$ .
|
| 255 |
+
|
| 256 |
+
# B.2 CRITIC
|
| 257 |
+
|
| 258 |
+
The critic, $\hat { L } _ { P }$ , is an approximate model of the performance loss, $L _ { P }$ , (1), which is used to backpropagate gradients to the controller and memory. This means the critic can either be an action-value function, which approximates $\hat { L } _ { P } = E _ { 0 } \approx L _ { P }$ directly, or a model of the system dynamics composed with a known loss function between the goal and future states, $\hat { L } _ { P } = \mathcal { L } \circ E _ { 0 } \approx \mathcal { L } \circ f .$ . We train the critic, $E _ { 0 } : \mathcal { X } \times \mathcal { X } \times \mathcal { C } \mathbb { R }$ , using the same procedure as the experts are trained (Figure 6d). A good expert may even be used as the critic.
|
| 259 |
+
|
| 260 |
+
# B.3 CONTROLLER AND MEMORY
|
| 261 |
+
|
| 262 |
+
As shown in Figure 6a, we trained the controller and memory using backpropagation through time (BPTT) with an actor-critic architecture. Specifically, rather than assuming $f$ is known and differentiable, we use a critic and backpropagate through it (Heess et al., 2015):
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
\frac { \partial \mathcal { L } } { \partial \theta ^ { C } } = \frac { \partial \mathcal { L } } { \partial E _ { * } } \frac { \partial E _ { * } } { \partial \pi _ { n } ^ { C } } \frac { \partial \pi _ { n } ^ { C } } { \partial \mu _ { n } } \frac { \partial ^ { + } \mu _ { n } } { \partial \pi _ { n - 1 } ^ { C } } \cdot \cdot \cdot \frac { \partial \pi _ { 0 } ^ { C } } { \partial \theta ^ { C } } , \quad \quad \frac { \partial \mathcal { L } } { \partial \theta ^ { \mu } } = \frac { \partial \mathcal { L } } { \partial E _ { * } } \frac { \partial E _ { * } } { \partial \pi _ { n } ^ { C } } \frac { \partial \pi _ { n } ^ { C } } { \partial \mu _ { n } } \frac { \partial ^ { + } \mu _ { n } } { \partial \mu _ { n - 1 } } \cdot \cdot \cdot \frac { \partial \mu _ { 0 } } { \partial \theta ^ { \mu } }
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
where $E _ { * }$ is the critic, $n$ is the maximum number of iterations the controller can use, and:
|
| 269 |
+
|
| 270 |
+
$$
|
| 271 |
+
\frac { \partial ^ { + } \mu _ { n } } { \partial \pi _ { n - 1 } ^ { C } } = \frac { \partial \mu _ { n } } { \partial E _ { k _ { n - 1 } } } \frac { \partial E _ { k _ { n - 1 } } } { \partial \pi _ { n - 1 } ^ { C } } + \frac { \partial \mu _ { n } } { \partial \pi _ { n - 1 } ^ { C } } , \quad \quad \quad \quad \frac { \partial ^ { + } \mu _ { n } } { \partial \mu _ { n - 1 } } = \frac { \partial ^ { + } \mu _ { n } } { \partial \pi _ { n - 1 } ^ { C } } + \frac { \partial \mu _ { n } } { \partial \mu _ { n - 1 } }
|
| 272 |
+
$$
|
| 273 |
+
|
| 274 |
+
where we are using the $\partial ^ { + }$ notation to indicate summed gradients, following Pascanu et al. (2013). Since $k _ { n }$ has already been produced by the manager it can be treated as a constant and will produce an unbiased estimate of the gradient. This is convenient because it allows for training the controller and manager separately, or testing the controller’s behavior with arbitrary actions post-training.
|
| 275 |
+
|
| 276 |
+
# B.4 MANAGER
|
| 277 |
+
|
| 278 |
+
As discussed in the main text, we used the REINFORCE algorithm Williams (1992) to train the manager (Figure 6b). One potential issue, however, is that when training the controller and manager simultaneously, the controller will result in high cost early on in training and thus the manager will learn to always choose the execute action. To discourage the manager from learning what is an essentially deterministic policy, we included a regularization term based on the entropy, $L _ { H }$ (Williams & Peng, 1991; Mnih et al., 2016):
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\begin{array} { r l } & { { \cal L } _ { H } ( \cdot ; \theta ^ { M } ) = \lambda \mathbb { E } _ { \pi ^ { M } } [ \log \pi ^ { M } ( \cdot ; \theta ^ { M } ) ] } \\ & { \quad \frac { \partial \mathbb { E } _ { \pi ^ { M } } [ r ] } { \partial \theta ^ { M } } = \left( r - { \cal L } _ { H } ( \cdot ; \theta ^ { M } ) \right) \displaystyle \frac { \partial } { \partial \theta ^ { M } } \log \pi ^ { M } ( \cdot ; \theta ^ { M } ) , } \end{array}
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
$r$ is the full return given by (3) and $\lambda$ is the strength of the regularization term.
|
| 285 |
+
|
| 286 |
+
# C SPACESHIP TASK
|
| 287 |
+
|
| 288 |
+
# C.1 DATASETS
|
| 289 |
+
|
| 290 |
+
We generated five datasets, each containing scenes with a different number of planets (ranging from a single planet to five planets). Each dataset consisted of 100,000 training scenes and 1,000 testing scenes. The target in each scene was always located at the origin, and each scene always had a sun with a mass of 100 units. The sun was located between 100 and 200 distance units away from the target, with this distance sampled uniformly at random. The other planets had a mass between 20 and 50 units, and were located 100 to 250 distance units away from the target, sampled uniformly at random. The spaceship had a mass between 1 and 9 units, and was located 150 to 250 distance units away from the target. The planets were always fixed (i.e., they could not move), and the spaceship always started at the beginning of each episode with zero velocity.
|
| 291 |
+
|
| 292 |
+
# C.2 ENVIRONMENT
|
| 293 |
+
|
| 294 |
+
We simulated our scenes using a physical simulation of gravitational dynamics. The planets were always stationary (i.e., they were not acted upon by any of the objects in the scene) but acted upon the spaceship with a force of:
|
| 295 |
+
|
| 296 |
+
$$
|
| 297 |
+
\mathbf { F } _ { p } = G \frac { m _ { p } m _ { s } } { r ^ { 3 } } ( \mathbf { x } _ { p } - \mathbf { x } _ { s } ) ,
|
| 298 |
+
$$
|
| 299 |
+
|
| 300 |
+
where $\mathbf { F } _ { p }$ is the force vector of the planet on the spaceship, $G = 1 0 0 0 0 0 0$ is a gravitational constant, $m _ { p }$ is the mass of the planet, $m _ { s }$ is the mass of the spaceship, $r$ is the distance between the centers of masses of the planet and the spaceship, $\mathbf { x } _ { p }$ is the location of the planet, and $\mathbf { x } _ { s }$ is the location of the spaceship. We simulated this environment using the Euler method, i.e.:
|
| 301 |
+
|
| 302 |
+
$$
|
| 303 |
+
\mathbf { a } _ { s } = \frac { ( \sum _ { p } \mathbf { F } _ { p } ) - d \mathbf { v } _ { s } + \mathbf { c } } { m _ { s } } \qquad \mathbf { x } _ { s } ^ { \prime } = \mathbf { x } _ { s } + \epsilon \mathbf { v } _ { s } \qquad \mathbf { v } _ { s } ^ { \prime } = \mathbf { v } _ { s } + \epsilon \mathbf { a } _ { s }
|
| 304 |
+
$$
|
| 305 |
+
|
| 306 |
+
where $\mathbf { a } _ { s } , \ \mathbf { v } _ { s }$ , and $\mathbf { x } _ { s }$ are the acceleration, velocity, and position of the spaceship, respectively;
|
| 307 |
+
$d = 0 . 1$ is a damping constant; $\mathbf { c }$ is the control force applied to the spaceship; and $\epsilon$ is the step size.
|
| 308 |
+
Note that we set c to zero for all timesteps except the first.
|
| 309 |
+
|
| 310 |
+
# D IMPLEMENTATION DETAILS
|
| 311 |
+
|
| 312 |
+
We used TensorFlow (Abadi et al., 2015) to implement and train all versions of the model.
|
| 313 |
+
|
| 314 |
+
# D.1 ARCHITECTURE
|
| 315 |
+
|
| 316 |
+
In our implementation of the controller, we used a two-layer MLP each with 100 units. The first layer used ReLU activations and the second layer used a multiplicative interaction similar to van den Oord et al. (2016), which we found to work better in practice. In our implementation of the memory, we used a single LSTM layer of size 100. In our implementation of the manager, we used a MLP of two fully connected layers of 100 units each, with ReLU nonlinearities.
|
| 317 |
+
|
| 318 |
+
We constructed three different experts to test the various controllers. The true simulation expert was the same as the world model, and consisted of a simulation for 11 timesteps with $\epsilon = 0 . 0 5$ (see Appendix C). The IN expert was an interaction network (Battaglia et al., 2016), which has previously been shown to be able to learn to predict $n$ -body dynamics accurately for simple systems. The IN consists of a relational module and an object module. In our case, the relational module was composed of 4 hidden layers of 150 nodes each, outputting “effects” encodings of size 100. These effects, together with the relational model input are then used as input to the object model, which contained a single hidden layer of 100 nodes. The object model outputs the velocity of the spaceship and we trained it to predict the velocity on every timestep of the spaceship’s trajectory. The MLP expert was a MLP that predicted the final location of the spaceship and had the same architecture as the controller.
|
| 319 |
+
|
| 320 |
+
As discussed in Appendix B, we used a critic to train the controller and memory. We always used the IN expert as the critic, except in the case when the true simulation expert was used, in which case we also used the true simulation as the critic.
|
| 321 |
+
|
| 322 |
+
# D.2 TRAINING PROCEDURE
|
| 323 |
+
|
| 324 |
+
All weights were initialized uniformly at random between 0 and 0.01. An iteration of training consisted of gradient updates over a minibatch of size 1000; in total, we ran training for 100,000 iterations. We additionally used a waterfall schedule for each of the learning rates during training, such that after 1000 iterations, if the loss was not decreasing, we would decay the step size by $5 \%$ .
|
| 325 |
+
|
| 326 |
+
We trained the controller and memory together using the Adam optimizer (Kingma & Ba, 2014) with gradients clipped to a maximum global norm of 10 (Pascanu et al., 2013). The manager was trained simultaneously, but using a different learning rate than the controller and memory. The IN and MLP experts were also trained simultaneously, but again with different learning rates. Learning rates were determined using a grid search over a small number of values, and are given in Table 1 for the iterative agent, in Table 2 for the metacontroller with one expert, and in Table 3 for the metacontroller with two experts.
|
| 327 |
+
|
| 328 |
+
The iterative agent was trained to take a fixed number of ponder steps, ranging from 0 (i.e., the reactive agent) to 10. The metacontrollers were allowed to take a variable number of ponder steps up to a maximum of 10. For the metacontroller with a single expert, we trained the manager using $\tau = 0$ and 20 additional values of $\tau$ spaced logarithmically between 0.00004 and 0.4 (inclusive). For the metacontroller with multiple experts, we trained the manager on a grid of pairs of $\tau$ values, where each expert could have $\tau = 0$ or one of 6 values spaced logarithmically between 0.00004 and 0.2 (inclusive). In all cases, the entropy penalty for the metacontroller was $\lambda = 0 . 2$ .
|
| 329 |
+
|
| 330 |
+
# D.3 CONVERGENCE
|
| 331 |
+
|
| 332 |
+
Reactive agent. Training for the reactive agents was straightforward and converged reliably on all datasets.
|
| 333 |
+
|
| 334 |
+
Iterative agent. For the iterative agent with the interaction network or true simulation experts, convergence was also reliable for small numbers of ponder steps. Convergence was somewhat less reliable for larger numbers of ponder steps. We believe this is because for some scenes, a larger number of ponder steps was more than necessary to solve the task (as is evidenced by the plateauing performance in Figure 2). So, the iterative agent had to effectively “remember” what the best control was while it took the last few ponder steps, which is a more complicated and difficult task to perform.
|
| 335 |
+
|
| 336 |
+
For the iterative agent with the MLP expert, convergence was more variable especially when the task was harder, as can be seen in the variable performance on the five planets dataset in Figure 2 (left). We believe this is because the MLP agent was so poor, and that convergence would have been more reliable with a better agent.
|
| 337 |
+
|
| 338 |
+
Metacontroller with a single expert. The metacontroller agent with a single expert converged more reliably than the corresponding iterative agent (see the bottom row of Figure 3). As mentioned in the previous paragraph, the iterative agent had to take more steps than actually necessary, causing it to perform less well for larger numbers of ponder steps, whereas the metacontroller agent had the flexibility of stopping when it had found a good control. On the other hand, we found that the metacontroller agent sometimes performed too many ponder steps for large values of $\tau$ (see Figures 3 and 7). We believe this is due to the entropy term $( \lambda )$ added to the REINFORCE loss. This is because when then ponder cost is very high, the optimal thing to do is to behave deterministically and always execute (never ponder); however, the entropy term encouraged the policy to be nondeterministic. We plan to explore different training regimes in future work to alleviate this problem, for example by annealing the entropy term to zero over the course of training.
|
| 339 |
+
|
| 340 |
+
Metacontroller with multiple experts. The metacontroller agent with multiple experts was somewhat more difficult to train, especially for high ponder cost of the interaction network expert. For example, note how the proportion of steps using the MLP expert does not decrease monotonically in Figure 5 (right) with increasing cost for the MLP expert. We believe this is also an unexpected result of using the entropy term: in all of these cases, the optimal thing to do actually is to rely on the MLP expert $100 \%$ of the time, yet the entropy term encourages the policy to be non-deterministic. Future work will explore these difficulties further by using experts that complement each other better (i.e., so there is not one that is wholly better than the other).
|
| 341 |
+
|
| 342 |
+
Experts. The experts themselves always converged quickly and reliably, and trained much faster than the rest of the network.
|
| 343 |
+
|
| 344 |
+
# REFERENCES
|
| 345 |
+
|
| 346 |
+
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 systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org. Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, and Koray Kavukcuoglu. Interaction networks for learning about objects, relations and physics. Advances in Neural Information Processing Systems, 2016. Alex Graves. Adaptive computation time for recurrent neural networks. arXiv:1603.08983, 2016.
|
| 347 |
+
|
| 348 |
+
Table 1: Hyperparameter values for the iterative controller. $\alpha _ { c }$ refers to the learning rate for the controller and memory, while $\alpha _ { E _ { \mathrm { I N } } }$ refers to the learning rate for the IN expert, and $\alpha _ { E _ { \mathrm { M L P } } }$ refers to the learning rate for the MLP expert.
|
| 349 |
+
|
| 350 |
+
<table><tr><td colspan="9">True sim.</td></tr><tr><td colspan="9"></td></tr><tr><td>Dataset</td><td># Ponder Steps</td><td>αc</td><td>αc</td><td>MLP QEIN</td><td>QEMLP</td><td>αc</td><td>IN QEIN</td></tr><tr><td> one planet</td><td>0</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>one planet</td><td>1</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>2</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>3</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>4</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>5</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td> one planet</td><td>6</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>7</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>8</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td> one planet</td><td>9</td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td>one planet</td><td>10</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>two planets</td><td>0</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>3e-03</td><td>3e-03</td></tr><tr><td> two planets</td><td>1</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>two planets</td><td>2</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td> two planets</td><td>3</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>two planets</td><td>4</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>two planets</td><td>5</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>two planets</td><td>6</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td> two planets</td><td>7</td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td>two planets</td><td>8</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td> two planets</td><td>9</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>3e-03</td><td>3e-03</td></tr><tr><td> two planets</td><td>10</td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>1e-03</td></tr><tr><td> three planets</td><td>0</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>3e-03</td></tr><tr><td>three planets</td><td>1</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>three planets</td><td>2</td><td>1e-03</td><td>5e-04</td><td>3e-03 1e-03</td><td>1e-03 5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>three planets</td><td>3</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03 1e-03</td><td>1e-03</td></tr><tr><td> three planets</td><td>4</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td> three planets</td><td>5 6</td><td>1e-03 1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03 1e-03</td></tr><tr><td> three planets</td><td>7</td><td></td><td>5e-04</td><td></td><td>1e-03</td><td>1e-03</td><td></td></tr><tr><td> three planets</td><td></td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td></td><td>1e-03</td></tr><tr><td>three planets</td><td>8 9</td><td>1e-03 1e-03</td><td>1e-03 1e-03</td><td>3e-03 3e-03</td><td>5e-04</td><td>5e-04 1e-03</td><td>1e-03 1e-03</td></tr><tr><td>three planets</td><td>10</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>three planets</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>four planets</td><td>0</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>5e-04 1e-03</td><td>1e-03 1e-03</td><td>1e-03</td></tr><tr><td>four planets</td><td>1</td><td>1e-03 1e-03</td><td>5e-04</td><td>3e-03 3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03 1e-03</td></tr><tr><td>four planets</td><td>2</td><td>1e-03</td><td>5e-04 1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>four planets</td><td>3</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>four planets</td><td>4</td><td></td><td></td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>four planets</td><td>5</td><td>1e-03</td><td>1e-03</td><td></td><td></td><td></td><td></td></tr><tr><td>four planets</td><td>6</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03 1e-03</td></tr><tr><td>four planets</td><td>7</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td></td></tr><tr><td>four planets</td><td>8</td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>four planets</td><td>9</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>1e-03</td></tr><tr><td>four planets</td><td>10</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>1e-03</td></tr><tr><td>five planets</td><td>0</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>3e-03</td></tr><tr><td>five planets</td><td>1 2</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04 5e-04</td><td>1e-03</td><td>1e-03 1e-03</td></tr><tr><td>five planets</td><td></td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td></td><td>1e-03</td><td>1e-03</td></tr><tr><td>five planets five planets</td><td>3 4</td><td>1e-03 5e-04</td><td>1e-03 1e-03</td><td>3e-03 3e-03</td><td>1e-03 5e-04</td><td>1e-03 1e-03 1e-03</td></table>
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 7: Cost of the best iterative controller compared to the managed controller. Each point represents the total cost of the best iterative agent under a particular value of $\tau$ $x$ -axis) versus the total cost achieved by the metacontroller trained with the same value of $\tau$ ( $y$ -axis). The best iterative agent was chosen by computing the cost for all the different number of ponder steps, and then choosing the whichever number of ponder stpes yielded the lowest cost (i.e., finding the minimum of the curves in Figure 3, top row). In almost all cases, the managed controller achieves a lower loss than the iterative controller: for the metacontroller with the IN expert, the cost is $11 \%$ lower than the iterative controller on average, and for the metacontroller with the true simulation expert, it is $15 \%$ lower on average.
|
| 354 |
+
|
| 355 |
+
Nicholas Hay, Stuart J. Russell, David Tolpin, and Solomon Eyal Shimony. Selecting computations: Theory and applications. Proceedings of the 28th Conference on Uncertainty in Artificial Intelligence, 2012.
|
| 356 |
+
Nicolas Heess, Gregory Wayne, David Silver, Tim Lillicrap, Tom Erez, and Yuval Tassa. Learning continuous control policies by stochastic value gradients. Advances in Neural Information Processing Systems, 2015.
|
| 357 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014.
|
| 358 |
+
Volodymyr Mnih, Adria Puigdom \` enech Badia, Mehdi Mirza, Alex Graves, Timothy P. Lillicrap, Tim Harley, \` David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. Proceedings of the 33rd International Conference on Machine Learning, 2016.
|
| 359 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. Proceedings of the 27st International Conference on Machine Learning, pp. 1310–1318, 2013.
|
| 360 |
+
Stuart Russell and Eric Wefald. Principles of metareasoning. Artificial Intelligence, 49(1):361 – 395, 1991.
|
| 361 |
+
Aaron van den Oord, Nal Kalchbrenner, Oriol Vinyals, Lasse Espeholt, Alex Graves, and Koray Kavukcuoglu. ¨ Conditional image generation with PixelCNN decoders. arXiv:1606.05328, 2016.
|
| 362 |
+
Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8(3-4):229–256, 1992.
|
| 363 |
+
Ronald J. Williams and Jing Peng. Function optimization using connectionist reinforcement learning algorithms. Connection Science, 3(3):241–268, 1991.
|
| 364 |
+
|
| 365 |
+
<table><tr><td></td><td colspan="2">True sim.</td><td colspan="4">MLP</td><td colspan="3">IN</td></tr><tr><td>T</td><td>αc</td><td>αm</td><td>αc</td><td>αm</td><td>QEIN</td><td>QEMLP</td><td>αc</td><td>αm</td><td>QEIN</td></tr><tr><td>0.00000</td><td>5e-04</td><td>5e-04</td><td>5e-04</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.00004</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>5e-05</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00006</td><td>5e-04</td><td>5e-05</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00011</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-04</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td>0.00017</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00028</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>5e-04</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00045</td><td>1e-03</td><td>1e-03</td><td>5e-04</td><td>1e-04</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00073</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-04</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00119</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-04</td><td>5e-04</td><td>1e-03</td><td>5e-04</td><td>5e-04</td><td>1e-03</td></tr><tr><td>0.00193</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>5e-05</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00314</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-04</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.00510</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>5e-05</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.00828</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.01344</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>5e-05</td><td>3e-03</td><td>5e-04</td><td>5e-04</td><td>5e-05</td><td>1e-03</td></tr><tr><td>0.02182</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-04</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.03543</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-04</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.05754</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.09343</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>5e-05</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.15171</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>5e-04</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-04</td><td>1e-03</td></tr><tr><td>0.24634</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>3e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr></table>
|
| 366 |
+
|
| 367 |
+
Table 2: Hyperparameter values for the metacontroller with a single expert. $\tau$ refers to the ponder cost, $\alpha _ { c }$ refers to the learning rate for the controller and memory, $\alpha _ { m }$ refers to the learning rate for the manager, $\alpha _ { E _ { \mathrm { I N } } }$ refers to the learning rate for the IN expert, and $\alpha _ { E _ { \mathrm { M L P } } }$ refers to the learning rate for the MLP expert.
|
| 368 |
+
|
| 369 |
+
Table 3: Hyperparameter values for the metacontroller with two experts. $\tau _ { \mathrm { I N } }$ refers to the ponder cost for the interaction network expert, $\tau _ { \mathrm { M L P } }$ refers to the ponder cost for the MLP expert, $\alpha _ { c }$ refers to the learning rate for the controller and memory, $\alpha _ { m }$ refers to the learning rate for the manager, $\alpha _ { E _ { \mathrm { I N } } }$ refers to the learning rate for the IN expert, and $\alpha _ { E _ { \mathrm { M L P } } }$ refers to the learning rate for the MLP expert.
|
| 370 |
+
|
| 371 |
+
<table><tr><td colspan="2"></td><td colspan="4">IN + MLP</td></tr><tr><td>TIN</td><td>TMLP</td><td>αc</td><td>am</td><td>QEIN</td><td>QEMLP</td></tr><tr><td>0.00000</td><td>0.00000</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.00121</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.00663</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.03641</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.20000</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.30000</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00000</td><td>0.40000</td><td>5e-04</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.00000</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.00121</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.00663</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.03641</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.20000</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.30000</td><td>5e-04</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00121</td><td>0.40000</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.00000</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.00121</td><td>5e-04</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.00663</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.03641</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.20000</td><td>5e-04</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.30000</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.00663</td><td>0.40000</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.00000</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.00121</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.00663</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.03641</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.20000</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.30000</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.03641</td><td>0.40000</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.00000</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.00121</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.00663</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.03641</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.20000</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.30000</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.20000</td><td>0.40000</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.00000</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.00121</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.00663</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.03641</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.20000</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.30000</td><td>1e-03</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.30000</td><td>0.40000</td><td>1e-03</td><td>5e-05</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.00000</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.00121</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.00663</td><td>1e-03</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.03641</td><td>5e-04</td><td>1e-04</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.20000</td><td>1e-03</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.30000</td><td>5e-04</td><td>1e-03</td><td>1e-03</td><td>1e-03</td></tr><tr><td>0.40000</td><td>0.40000</td><td>5e-04</td><td>5e-04</td><td>1e-03</td><td>1e-03</td></tr></table>
|
md/train/BkJ3ibb0-/BkJ3ibb0-.md
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DEFENSE-GAN: PROTECTING CLASSIFIERSAGAINST ADVERSARIAL ATTACKS USINGGENERATIVE MODELS
|
| 2 |
+
|
| 3 |
+
Pouya Samangouei∗, Maya Kabkab∗, and Rama Chellappa
|
| 4 |
+
|
| 5 |
+
Department of Electrical and Computer Engineering University of Maryland Institute for Advanced Computer Studies University of Maryland, College Park, MD 20742 {pouya, mayak, rama}@umiacs.umd.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
In recent years, deep neural network approaches have been widely adopted for machine learning tasks, including classification. However, they were shown to be vulnerable to adversarial perturbations: carefully crafted small perturbations can cause misclassification of legitimate images. We propose Defense-GAN, a new framework leveraging the expressive capability of generative models to defend deep neural networks against such attacks. Defense-GAN is trained to model the distribution of unperturbed images. At inference time, it finds a close output to a given image which does not contain the adversarial changes. This output is then fed to the classifier. Our proposed method can be used with any classification model and does not modify the classifier structure or training procedure. It can also be used as a defense against any attack as it does not assume knowledge of the process for generating the adversarial examples. We empirically show that Defense-GAN is consistently effective against different attack methods and improves on existing defense strategies.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Despite their outstanding performance on several machine learning tasks, deep neural networks have been shown to be susceptible to adversarial attacks (Szegedy et al., 2014; Goodfellow et al., 2015). These attacks come in the form of adversarial examples: carefully crafted perturbations added to a legitimate input sample. In the context of classification, these perturbations cause the legitimate sample to be misclassified at inference time (Szegedy et al., 2014; Goodfellow et al., 2015; Papernot et al., 2016b; Liu et al., 2017). Such perturbations are often small in magnitude and do not affect human recognition but can drastically change the output of the classifier.
|
| 14 |
+
|
| 15 |
+
Recent literature has considered two types of threat models: black-box and white-box attacks. Under the black-box attack model, the attacker does not have access to the classification model parameters; whereas in the white-box attack model, the attacker has complete access to the model architecture and parameters, including potential defense mechanisms (Papernot et al., 2017; Tramer et al., 2017; \` Carlini & Wagner, 2017).
|
| 16 |
+
|
| 17 |
+
Various defenses have been proposed to mitigate the effect of adversarial attacks. These defenses can be grouped under three different approaches: (1) modifying the training data to make the classifier more robust against attacks, e.g., adversarial training which augments the training data of the classifier with adversarial examples (Szegedy et al., 2014; Goodfellow et al., 2015), (2) modifying the training procedure of the classifier to reduce the magnitude of gradients, e.g., defensive distillation (Papernot et al., 2016d), and (3) attempting to remove the adversarial noise from the input samples (Hendrycks & Gimpel, 2017; Meng & Chen, 2017). All of these approaches have limitations in the sense that they are effective against either white-box attacks or black-box attacks, but not both (Tramer et al., 2017; Meng & Chen, 2017). Furthermore, some of these defenses are devised \` with specific attack models in mind and are not effective against new attacks.
|
| 18 |
+
|
| 19 |
+
In this paper, we propose a novel defense mechanism which is effective against both white-box and black-box attacks. We propose to leverage the representative power of Generative Adversarial Networks (GAN) (Goodfellow et al., 2014) to diminish the effect of the adversarial perturbation, by “projecting” input images onto the range of the GAN’s generator prior to feeding them to the classifier. In the GAN framework, two models are trained simultaneously in an adversarial setting: a generative model that emulates the data distribution, and a discriminative model that predicts whether a certain input came from real data or was artificially created. The generative model learns a mapping $G$ from a low-dimensional vector $\mathbf { z } \in \mathbb { R } ^ { k }$ to the high-dimensional input sample space $\mathbb { R } ^ { n }$ . During training of the GAN, $G$ is encouraged to generate samples which resemble the training data. It is, therefore, expected that legitimate samples will be close to some point in the range of $G$ , whereas adversarial samples will be further away from the range of $G$ . Furthermore, “projecting” the adversarial examples onto the range of the generator $G$ can have the desirable effect of reducing the adversarial perturbation. The projected output, computed using Gradient Descent (GD), is fed into the classifier instead of the original (potentially adversarially modified) image. We empirically demonstrate that this is an effective defense against both black-box and white-box attacks on two benchmark image datasets.
|
| 20 |
+
|
| 21 |
+
The rest of the paper is organized as follows. We introduce the necessary background regarding known attack models, defense mechanisms, and GANs in Section 2. Our defense mechanism, which we call Defense-GAN, is formally motivated and introduced in Section 3. Finally, experimental results, under different threat models, as well as comparisons to other defenses are presented in Section 4.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK AND BACKGROUND INFORMATION
|
| 24 |
+
|
| 25 |
+
In this work, we propose to use GANs for the purpose of defending against adversarial attacks in classification problems. Before detailing our approach in the next section, we explain related work in three parts. First, we discuss different attack models employed in the literature. We, then, go over related defense mechanisms against these attacks and discuss their strengths and shortcomings. Lastly, we explain necessary background information regarding GANs.
|
| 26 |
+
|
| 27 |
+
# 2.1 ATTACK MODELS AND ALGORITHMS
|
| 28 |
+
|
| 29 |
+
Various attack models and algorithms have been used to target classifiers. All attack models we consider aim to find a perturbation $\delta$ to be added to a (legitimate) input $\mathbf { x } \in \mathbb { R } ^ { n }$ , resulting in the adversarial example $\tilde { \mathbf { x } } = \mathbf { x } + \delta$ . The $\ell _ { \infty }$ -norm of the perturbation is denoted by $\epsilon$ (Goodfellow et al., 2015) and is chosen to be small enough so as to remain undetectable. We consider two threat levels: black- and white-box attacks.
|
| 30 |
+
|
| 31 |
+
# 2.1.1 WHITE-BOX ATTACK MODELS
|
| 32 |
+
|
| 33 |
+
White-box models assume that the attacker has complete knowledge of all the classifier parameters, i.e., network architecture and weights, as well as the details of any defense mechanism. Given an input image $\mathbf { x }$ and its associated ground-truth label $y$ , the attacker thus has access to the loss function $J ( \mathbf { x } , y )$ used to train the network, and uses it to compute the adversarial perturbation $\pmb { \delta }$ . Attacks can be targeted, in that they attempt to cause the perturbed image to be misclassified to a specific target class, or untargeted when no target class is specified.
|
| 34 |
+
|
| 35 |
+
In this work, we focus on untargeted white-box attacks computed using the Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015), the Randomized Fast Gradient Sign Method (RAND $+$ FGSM) (Tramer et al., 2017), and the Carlini-Wagner (CW) attack (Carlini & Wagner, \` 2017). Although other attack models exist, such as the Iterative FGSM (Kurakin et al., 2017), the Jacobian-based Saliency Map Attack (JSMA) (Papernot et al., 2016b), and Deepfool (MoosaviDezfooli et al., 2016), we focus on these three models as they cover a good breadth of attack algorthims. FGSM is a very simple and fast attack algorithm which makes it extremely amenable to real-time attack deployment. On the other hand, RAND+FGSM, an equally simple attack, increases the power of FGSM for white-box attacks (Tramer et al., 2017), and finally, the CW attack is one of \` the most powerful white-box attacks to-date (Carlini & Wagner, 2017).
|
| 36 |
+
|
| 37 |
+
Fast Gradient Sign Method (FGSM) Given an image $\mathbf { x }$ and its corresponding true label $y$ , the FGSM attack sets the perturbation $\pmb { \delta }$ to:
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\pmb { \delta } = \epsilon \cdot \mathrm { s i g n } ( \nabla _ { \mathbf { x } } J ( \mathbf { x } , y ) ) .
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
FGSM (Goodfellow et al., 2015) was designed to be extremely fast rather than optimal. It simply uses the sign of the gradient at every pixel to determine the direction with which to change the corresponding pixel value.
|
| 44 |
+
|
| 45 |
+
Randomized Fast Gradient Sign Method (RAND+FGSM) The RAND $^ +$ FGSM (Tramer et al., \` 2017) attack is a simple yet effective method to increase the power of FGSM against models which were adversarially trained. The idea is to first apply a small random perturbation before using FGSM. More explicitly, for $\alpha < \epsilon$ , random noise is first added to the legitimate image x:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\mathbf { x } ^ { \prime } = \mathbf { x } + { \boldsymbol { \alpha } } \cdot \mathrm { s i g n } ( { \mathcal { N } } ( \mathbf { 0 } ^ { n } , \mathbf { I } ^ { n } ) ) .
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
Then, the FGSM attack is computed on $\mathbf { x } ^ { \prime }$ , resulting in
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\tilde { \mathbf { x } } = \mathbf { x } ^ { \prime } + ( \epsilon - \alpha ) \cdot \mathrm { s i g n } \big ( \nabla _ { \mathbf { x } ^ { \prime } } J ( \mathbf { x } ^ { \prime } , y ) \big ) .
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
The Carlini-Wagner (CW) attack The CW attack is an effective optimization-based attack model (Carlini & Wagner, 2017). In many cases, it can reduce the classifier accuracy to almost $0 \%$ (Carlini & Wagner, 2017; Meng & Chen, 2017). The perturbation $\pmb { \delta }$ is found by solving an optimization problem of the form:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r l } { \underset { \delta \in \mathbb { R } ^ { n } } { \operatorname* { m i n } } } & { \quad | | \pmb { \delta } | | _ { p } + c \cdot f ( \mathbf { x } + \pmb { \delta } ) } \\ { \mathrm { s . t . } } & { \quad \mathbf { x } + \pmb { \delta } \in [ 0 , 1 ] ^ { n } , } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $f$ is an objective function that drives the example $\mathbf { x }$ to be misclassified, and $c > 0$ is a suitably chosen constant. The $\ell _ { 2 } , \ell _ { 0 }$ , and $\ell _ { \infty }$ norms are considered. We refer the reader to (Carlini & Wagner, 2017) for details regarding the approach to solving (4) and setting the constant $c$ .
|
| 64 |
+
|
| 65 |
+
# 2.1.2 BLACK-BOX ATTACK MODELS
|
| 66 |
+
|
| 67 |
+
For black-box attacks we consider untargeted FGSM attacks computed on a substitute model (Papernot et al., 2017). As previously mentioned, black-box adversaries have no access to the classifier or defense parameters. It is further assumed that they do not have access to a large training dataset but can query the targeted DNN as a black-box, i.e., access labels produced by the classifier for specific query images. The adversary trains a model, called substitute, which has a (potentially) different architecture than the targeted classifier, using a very small dataset augmented by synthetic images labeled by querying the classifier. Adversarial examples are then found by applying any attack method on the substitute network. It was found that such examples designed to fool the substitute often end up being misclassified by the targeted classifier (Szegedy et al., 2014; Papernot et al., 2017). In other words, black-box attacks are easily transferrable from one model to the other.
|
| 68 |
+
|
| 69 |
+
# 2.2 DEFENSE MECHANISMS
|
| 70 |
+
|
| 71 |
+
Various defense mechanisms have been employed to combat the threat from adversarial attacks. In what follows, we describe one representative defense strategy from each of the three general groups of defenses.
|
| 72 |
+
|
| 73 |
+
# 2.2.1 ADVERSARIAL TRAINING
|
| 74 |
+
|
| 75 |
+
A popular approach to defend against adversarial noise is to augment the training dataset with adversarial examples (Szegedy et al., 2014; Goodfellow et al., 2015; Moosavi-Dezfooli et al., 2016). Adversarial examples are generated using one or more chosen attack models and added to the training set. This often results in increased robustness when the attack model used to generate the augmented training set is the same as that used by the attacker. However, adversarial training does not perform as well when a different attack strategy is used by the attacker. Additionally, it tends to make the model more robust to white-box attacks than to black-box attacks due to gradient masking (Papernot et al., 2016c; 2017; Tramer et al., 2017). \`
|
| 76 |
+
|
| 77 |
+
# 2.2.2 DEFENSIVE DISTILLATION
|
| 78 |
+
|
| 79 |
+
Defensive distillation (Papernot et al., 2016d) trains the classifier in two rounds using a variant of the distillation (Hinton et al., 2014) method. This has the desirable effect of learning a smoother network and reducing the amplitude of gradients around input points, making it difficult for attackers to generate adversarial examples (Papernot et al., 2016d). It was, however, shown that, while defensive distillation is effective against white-box attacks, it fails to adequately protect against black-box attacks transferred from other networks (Carlini & Wagner, 2017).
|
| 80 |
+
|
| 81 |
+
# 2.2.3 MAGNET
|
| 82 |
+
|
| 83 |
+
Recently, Meng & Chen (2017) introduced MagNet as an effective defense strategy. It trains a reformer network (which is an auto-encoder or a collection of auto-encoders) to move adversarial examples closer to the manifold of legitimate, or natural, examples. When using a collection of auto-encoders, one reformer network is chosen at random at test time, thus strengthening the defense. It was shown to be an effective defense against gray-box attacks where the attacker knows everything about the network and defense, except the parameters. MagNet is the closest defense to our approach, as it attempts to reform an adversarial sample using a learnt auto-encoder. The main differences between MagNet and our approach are: (1) we use GANs instead of auto-encoders, and, most importantly, (2) we use GD minimization to find latent codes as opposed to a feedforward encoder network. This makes Defense-GAN more robust, especially against white-box attacks.
|
| 84 |
+
|
| 85 |
+
# 2.3 GENERATIVE ADVERSARIAL NETWORKS (GANS)
|
| 86 |
+
|
| 87 |
+
GANs, originally introduced by Goodfellow et al. (2014), consist of two neural networks, $G$ and $D . G : \mathbb { R } ^ { k } \mathbb { R } ^ { n }$ maps a low-dimensional latent space to the high dimensional sample space of $\mathbf { x }$ . $D$ is a binary neural network classifier. In the training phase, $G$ and $D$ are typically learned in an adversarial fashion using actual input data samples $\mathbf { x }$ and random vectors $\mathbf { z }$ . An isotropic Gaussian prior is usually assumed on $\mathbf { z }$ . While $G$ learns to generate outputs $G ( \mathbf { z } )$ that have a distribution similar to that of $\mathbf { x }$ , $D$ learns to discriminate between “real” samples $\mathbf { x }$ and “fake” samples $G ( \mathbf { z } )$ . $D$ and $G$ are trained in an alternating fashion to minimize the following min-max loss (Goodfellow et al., 2014):
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\displaystyle \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( D , G ) = \mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } ( \mathbf { x } ) } [ \log D ( \mathbf { x } ) ] + \mathbb { E } _ { \mathbf { z } \sim p _ { \mathbf { z } } ( \mathbf { z } ) } [ \log ( 1 - D ( G ( \mathbf { z } ) ) ) ] .
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
It was shown that the optimal GAN is obtained when the resulting generator distribution $p _ { g } = p _ { \mathrm { d a t a } }$ (Goodfellow et al., 2014).
|
| 94 |
+
|
| 95 |
+
However, GANs turned out to be difficult to train in practice (Gulrajani et al., 2017), and alternative formulations have been proposed. Arjovsky et al. (2017) introduced Wasserstein GANs (WGANs) which are a variant of GANs that use the Wasserstein distance, resulting in a loss function with more desirable properties:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V _ { W } ( D , G ) = \mathbb { E } _ { { \mathbf { x } } \sim p _ { \mathrm { d a t a } } ( { \mathbf { x } } ) } [ D ( { \mathbf { x } } ) ] - \mathbb { E } _ { { \mathbf { z } } \sim p _ { \mathbf { z } } ( { \mathbf { z } } ) } [ D ( G ( { \mathbf { z } } ) ) ] .
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
In this work, we use WGANs as our generative model due to the stability of their training methods, especially using the approach in (Gulrajani et al., 2017).
|
| 102 |
+
|
| 103 |
+
# 3 PROPOSED DEFENSE-GAN
|
| 104 |
+
|
| 105 |
+
We propose a new defense strategy which uses a WGAN trained on legitimate (un-perturbed) training samples to “denoise” adversarial examples. At test time, prior to feeding an image $\mathbf { x }$ to the classifier, we project it onto the range of the generator by minimizing the reconstruction error $| | G ( \mathbf { z } ) - \mathbf { x } | | _ { 2 } ^ { 2 }$ , using $L$ steps of GD. The resulting reconstruction $G ( \mathbf { z } )$ is then given to the classifier. Since the generator was trained to model the unperturbed training data distribution, we expect this added step to result in a substantial reduction of any potential adversarial noise. We formally motivate this approach in the following section.
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
Figure 1: Overview of the Defense-GAN algorithm.
|
| 109 |
+
|
| 110 |
+
# 3.1 MOTIVATION
|
| 111 |
+
|
| 112 |
+
As mentioned in Section 2.3, the GAN min-max loss in (5) admits a global optimum when $p _ { g } = p _ { \mathrm { d a t a } }$ (Goodfellow et al., 2014). It can be similarly shown that WGAN admits an optimum to its own minmax loss in (6), when the set $\{ \mathbf { x } \mid p _ { g } ( \mathbf { x } ) \neq { \overline { { p _ { \mathrm { d a t a } } ( \mathbf { x } ) } } } \}$ has zero Lebesgue-measure. Formally,
|
| 113 |
+
|
| 114 |
+
Lemma 1 A generator distribution $p _ { g }$ is a global optimum for the WGAN min-max game defined in (6), if and only $i f p _ { g } ( \mathbf { x } ) = p _ { d a t a } ( \mathbf { x } ) \dot { }$ for all $\mathbf { x } \in \mathbb { R } ^ { n }$ , potentially except on a set of zero Lebesguemeasure.
|
| 115 |
+
|
| 116 |
+
A sketch of the proof can be found in Appendix A.
|
| 117 |
+
|
| 118 |
+
Additionally, it was shown that, if $G$ and $D$ have enough capacity to represent the data, and if the training algorithm is such that $p _ { g }$ converges to $p _ { \mathrm { d a t a } }$ , then
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbb { E } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } } \left[ \operatorname* { m i n } _ { \mathbf { z } } | | G _ { t } ( \mathbf { z } ) - \mathbf { x } | | _ { 2 } \right] \longrightarrow 0
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $G _ { t }$ is the generator of a GAN or $\mathbf { W G A N ^ { 1 } }$ after $t$ steps of its training algorithm (Kabkab et al., 2018).
|
| 125 |
+
|
| 126 |
+
This serves to show that, under ideal conditions, the addition of the GAN reconstruction loss minimization step should not affect the performance of the classifier on natural, legitimate samples, as such samples should be almost exactly recovered. Furthermore, we hypothesize that this step will help reduce the adversarial noise which follows a different distribution than that of the GAN training examples.
|
| 127 |
+
|
| 128 |
+
# 3.2 DEFENSE-GAN ALGORITHM
|
| 129 |
+
|
| 130 |
+
Defense-GAN is a defense strategy to combat both white-box and black-box adversarial attacks against classification networks. At inference time, given a trained GAN generator $G$ and an image $\mathbf { x }$ to be classified, $\mathbf { z } ^ { \ast }$ is first found so as to minimize
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\operatorname* { m i n } _ { \mathbf { z } } | | G ( \mathbf { z } ) - \mathbf { x } | | _ { 2 } ^ { 2 } .
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
$G ( \mathbf { z } ^ { * } )$ is then given as the input to the classifier. The algorithm is illustrated in Figure 1. As (8) is a highly non-convex minimization problem, we approximate it by doing a fixed number $L$ of GD steps using $R$ different random initializations of $\mathbf { z }$ (which we call random restarts), as shown in Figures 1 and 2.
|
| 137 |
+
|
| 138 |
+
The GAN is trained on the available classifier training dataset in an unsupervised manner. The classifier can be trained on the original training images, their reconstructions using the generator $G$ , or a combination of the two. As was discussed in Section 3.1, as long as the GAN is appropriately trained and has enough capacity to represent the data, original clean images and their reconstructions should not defer much. Therefore, these two classifier training strategies should, at least theoretically, not differ in performance.
|
| 139 |
+
|
| 140 |
+
Compared to existing defense mechanisms, our approach is different in the following aspects:
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 2: $L$ steps of Gradient Descent are used to estimate the projection of the image onto the range of the generator.
|
| 144 |
+
|
| 145 |
+
1. Defense-GAN can be used in conjunction with any classifier and does not modify the classifier structure itself. It can be seen as an add-on or pre-processing step prior to classification. 2. If the GAN is representative enough, re-training the classifier should not be necessary and any drop in performance due to the addition of Defense-GAN should not be significant. 3. Defense-GAN can be used as a defense to any attack: it does not assume an attack model, but simply leverages the generative power of GANs to reconstruct adversarial examples. 4. Defense-GAN is highly non-linear and white-box gradient-based attacks will be difficult to perform due to the GD loop. A detailed discussion about this can be found in Appendix B.
|
| 146 |
+
|
| 147 |
+
# 4 EXPERIMENTS
|
| 148 |
+
|
| 149 |
+
We assume three different attack threat levels:
|
| 150 |
+
|
| 151 |
+
1. Black-box attacks: the attacker does not have access to the details of the classifier and defense strategy. It therefore trains a substitute network to find adversarial examples.
|
| 152 |
+
2. White-box attacks: the attacker knows all the details of the classifier and defense strategy. It can compute gradients on the classifier and defense networks in order to find adversarial examples.
|
| 153 |
+
3. White-box attacks, revisited: in addition to the details of the architectures and parameters of the classifier and defense, the attacker has access to the random seed and random number generator. In the case of Defense-GAN, this means that the attacker knows all the random initializations { z 0 } Ri =1 .
|
| 154 |
+
|
| 155 |
+
We compare our method to adversarial training (Goodfellow et al., 2015) and MagNet (Meng & Chen, 2017) under the FGSM, RAND $^ +$ FGSM, and CW (with $\ell _ { 2 }$ norm) white-box attacks, as well as the FGSM black-box attack. Details of all network architectures used in this paper can be found in Appendix C. When the classifier is trained using the reconstructed images $( G ( \mathbf { z } ^ { * } ) )$ , we refer to our method as Defense-GAN-Rec, and we use Defense-GAN-Orig when the original images $\mathbf { \tau } ( \mathbf { x } )$ are used to train the classifier. Our GAN follows the WGAN training procedure in (Gulrajani et al., 2017), and details of the generator and discriminator network architectures are given in Table 6. The reformer network (encoder) for the MagNet baseline is provided in Table 7. Our implementation is based on TensorFlow (Abadi et al., 2015) and builds on open-source software: CleverHans by Papernot et al. (2016a) and improved WGAN training by Gulrajani et al. (2017). We use machines equipped with NVIDIA GeForce GTX TITAN X GPUs.
|
| 156 |
+
|
| 157 |
+
In our experiments, we use two different image datasets: the MNIST handwritten digits dataset (LeCun et al., 1998) and the Fashion-MNIST (F-MNIST) clothing articles dataset (Xiao et al., 2017). Both datasets consist of 60, 000 training images and $1 0 , 0 0 0$ testing images. We split the training images into a training set of 50, 000 images and hold-out a validation set containing 10, 000 images. For white-box attacks, the testing set is kept the same (10, 000 samples). For black-box attacks, the testing set is divided into a small hold-out set of 150 samples reserved for adversary substitute training, as was done in (Papernot et al., 2017), and the remaining 9, 850 samples are used for testing the different methods.
|
| 158 |
+
|
| 159 |
+
# 4.1 RESULTS ON BLACK-BOX ATTACKS
|
| 160 |
+
|
| 161 |
+
In this section, we present experimental results on FGSM black-box attacks. As previously mentioned, the attacker trains a substitute model, which could differ in architecture from the targeted model, using a limited dataset consisting of 150 legitimate images augmented with synthetic images labeled using the target classifier. The classifier and substitute model architectures used and referred to throughout this section are described in Table 5 in the Appendix.
|
| 162 |
+
|
| 163 |
+
In Tables 1 and 2, we present our classification accuracy results and compare to other defense methods. As can be seen, FGSM black-box attacks were successful at reducing the classifier accuracy by up to $7 0 \%$ . All considered defense mechanisms are relatively successful at diminishing the effect of the attacks. We note that, as expected, the performance of Defense-GAN-Rec and that of Defense-GAN-Orig are very close. In addition, they both perform consistently well across different classifier and substitute model combinations. MagNet also performs in a consistent manner, but achieves lower accuracy than Defense-GAN. Two adversarial training defenses are presented: the first one obtains the adversarial examples assuming the same attack $\epsilon = 0 . 3$ , and the second assumes a different $\epsilon = 0 . 1 5$ . With incorrect knowledge of $\epsilon$ , the performance of adversarial training generally decreases. In addition, the classification performance of this defense method has very large variance across the different architectures. It is worth noting that adversarial training defense is only fit against FGSM attacks, because the adversarially augmented data, even with a different $\epsilon$ , is generated using the same method as the black-box attack (FGSM). In contrast, Defense-GAN and MagNet are general defense mechanisms which do not assume a specific attack model.
|
| 164 |
+
|
| 165 |
+
The performances of defenses on the F-MNIST dataset, shown in Table 2, are noticeably lower than on MNIST. This is due to the large $\epsilon = 0 . 3$ in the FGSM attack. Please see Appendix D for qualitative examples showing that $\epsilon = 0 . 3$ represents very high noise, which makes F-MNIST images difficult to classify, even by a human.
|
| 166 |
+
|
| 167 |
+
In addition, the Defense-GAN parameters used in this experiment were kept the same for both Tables, in order to study the effect of dataset complexity, and can be further optimized as investigated in the next section.
|
| 168 |
+
|
| 169 |
+
Table 1: Classification accuracies of different classifier and substitute model combinations using various defense strategies on the MNIST dataset, under FGSM black-box attacks with $\epsilon = 0 . 3$ . Defense-GAN has $L = 2 0 0$ and $R = 1 0$ .
|
| 170 |
+
|
| 171 |
+
<table><tr><td>Classifier/ Substitute</td><td>No Attack</td><td>No Defense</td><td>Defense- GAN-Rec</td><td>Defense- GAN-Orig</td><td>MagNet</td><td>Adv. Tr. ∈= 0.3</td><td>Adv. Tr. ∈= 0.15</td></tr><tr><td>A/B</td><td>0.9970</td><td>0.6343</td><td>0.9312</td><td>0.9282</td><td>0.6937</td><td>0.9654</td><td>0.6223</td></tr><tr><td>A/E</td><td>0.9970</td><td>0.5432</td><td>0.9139</td><td>0.9221</td><td>0.6710</td><td>0.9668</td><td>0.9327</td></tr><tr><td>B/B</td><td>0.9618</td><td>0.2816</td><td>0.9057</td><td>0.9105</td><td>0.5687</td><td>0.2092</td><td>0.3441</td></tr><tr><td>B/E</td><td>0.9618</td><td>0.2128</td><td>0.8841</td><td>0.8892</td><td>0.4627</td><td>0.1120</td><td>0.3354</td></tr><tr><td>C/B</td><td>0.9959</td><td>0.6648</td><td>0.9357</td><td>0.9322</td><td>0.7571</td><td>0.9834</td><td>0.9208</td></tr><tr><td>C/E</td><td>0.9959</td><td>0.8050</td><td>0.9223</td><td>0.9182</td><td>0.6760</td><td>0.9843</td><td>0.9755</td></tr><tr><td>D/B</td><td>0.9920</td><td>0.4641</td><td>0.9272</td><td>0.9323</td><td>0.6817</td><td>0.7667</td><td>0.8514</td></tr><tr><td>D/E</td><td>0.9920</td><td>0.3931</td><td>0.9164</td><td>0.9155</td><td>0.6073</td><td>0.7676</td><td>0.7129</td></tr></table>
|
| 172 |
+
|
| 173 |
+
4.1.1 EFFECT OF NUMBER OF GD ITERATIONS $L$ AND RANDOM RESTARTS $R$
|
| 174 |
+
|
| 175 |
+
Figure 3 shows the effect of varying the number of GD iterations $L$ as well as the random restarts $R$ used to compute the GAN reconstructions of input images. Across different $L$ and $R$ values, Defense-GAN-Rec and Defense-GAN-Orig have comparable performance. Increasing $L$ has the expected effect of improving performance when no attack is present. Interestingly, with an FGSM attack, the classification performance decreases after a certain $L$ value. With too many GD iterations on the mean squared error (MSE) $| | G ( \mathbf { z } ) - ( \mathbf { x } + \pmb { \delta } ) | | _ { 2 } ^ { 2 }$ , some of the adversarial noise components are retained. In the right Figure, the effect of varying $R$ is shown to be extremely pronounced. This is due to the non-convex nature of the MSE, and increasing $R$ enables us to sample different local minima.
|
| 176 |
+
|
| 177 |
+
Table 2: Classification accuracies of different classifier and substitute model combinations using various defense strategies on the F-MNIST dataset, under FGSM black-box attacks with $\epsilon = 0 . 3$ . Defense-GAN has $L = 2 0 0$ and $R = 1 0$ .
|
| 178 |
+
|
| 179 |
+
<table><tr><td rowspan=1 colspan=8>Classifier/ No No Defense- Defense- Adv. Tr. Adv. Tr.GAN-Orig MagNetSubstituteAttackDefenseGAN-Rec ∈= 0.3 ∈= 0.15</td></tr><tr><td rowspan=1 colspan=1>A/B</td><td rowspan=1 colspan=1>0.9346</td><td rowspan=1 colspan=1>0.5131</td><td rowspan=1 colspan=1>0.586</td><td rowspan=1 colspan=1>0.5803</td><td rowspan=1 colspan=1>0.5404</td><td rowspan=1 colspan=1>0.7393</td><td rowspan=1 colspan=1>0.6600</td></tr><tr><td rowspan=7 colspan=1>A/EB/BB/EC/BC/ED/BD/E</td><td rowspan=1 colspan=1>0.9346</td><td rowspan=1 colspan=1>0.3653</td><td rowspan=1 colspan=1>0.4790</td><td rowspan=1 colspan=1>0.4616</td><td rowspan=1 colspan=1>0.3311</td><td rowspan=1 colspan=1>0.6945</td><td rowspan=1 colspan=1>0.5638</td></tr><tr><td rowspan=1 colspan=1>0.7470</td><td rowspan=1 colspan=1>0.4017</td><td rowspan=1 colspan=1>0.4940</td><td rowspan=1 colspan=1>0.5530</td><td rowspan=1 colspan=1>0.3812</td><td rowspan=1 colspan=1>0.3177</td><td rowspan=1 colspan=1>0.3560</td></tr><tr><td rowspan=1 colspan=1>0.7470</td><td rowspan=1 colspan=1>0.3123</td><td rowspan=1 colspan=1>0.3720</td><td rowspan=1 colspan=1>0.4187</td><td rowspan=1 colspan=1>0.3119</td><td rowspan=1 colspan=1>0.2617</td><td rowspan=1 colspan=1>0.2453</td></tr><tr><td rowspan=1 colspan=1>0.9334</td><td rowspan=1 colspan=1>0.2635</td><td rowspan=1 colspan=1>0.5289</td><td rowspan=1 colspan=1>0.6079</td><td rowspan=1 colspan=1>0.4664</td><td rowspan=1 colspan=1>0.7791</td><td rowspan=1 colspan=1>0.6838</td></tr><tr><td rowspan=1 colspan=1>0.9334</td><td rowspan=1 colspan=1>0.2066</td><td rowspan=1 colspan=1>0.4871</td><td rowspan=1 colspan=1>0.4625</td><td rowspan=1 colspan=1>0.3016</td><td rowspan=1 colspan=1>0.7504</td><td rowspan=1 colspan=1>0.6655</td></tr><tr><td rowspan=1 colspan=1>0.8923</td><td rowspan=1 colspan=1>0.4541</td><td rowspan=1 colspan=1>0.5779</td><td rowspan=1 colspan=1>0.5853</td><td rowspan=1 colspan=1>0.5478</td><td rowspan=1 colspan=1>0.6172</td><td rowspan=1 colspan=1>0.6395</td></tr><tr><td rowspan=1 colspan=1>0.8923</td><td rowspan=1 colspan=1>0.2543</td><td rowspan=1 colspan=1>0.4007</td><td rowspan=1 colspan=1>0.4730</td><td rowspan=1 colspan=1>0.3396</td><td rowspan=1 colspan=1>0.5093</td><td rowspan=1 colspan=1>0.4962</td></tr></table>
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 3: Classification accuracy of Model F using Defense-GAN on the MNIST dataset, under FGSM black-box attacks with $\epsilon = 0 . 3$ and substitute Model E. Left: various number of iterations $L$ are used $R = 1 0$ ). Right: various number of random restarts $R$ are used $L = 1 0 0 _ { \rho }$ ).
|
| 183 |
+
|
| 184 |
+
# 4.1.2 EFFECT OF ADVERSARIAL NOISE NORM
|
| 185 |
+
|
| 186 |
+
We now investigate the effect of changing the attack $\epsilon$ in Table 3. As expected, with higher $\epsilon$ , the FGSM attack is more successful, especially on the F-MNIST dataset where the noise norm seems to have a more pronounced effect with nearly $3 7 \%$ drop in performance between $\epsilon = 0 . 1$ and 0.3. Figure 7 in Appendix D shows adversarial samples as well as their reconstructions with DefenseGAN at different values of $\epsilon$ . We can see that for large $\epsilon$ , the class is difficult to discern, even for the human eye.
|
| 187 |
+
|
| 188 |
+
Even though it seems that increasing $\epsilon$ is a desirable strategy for the attacker, this increases the likelihood that the adversarial noise is discernible and therefore the attack is detected. It is trivial for the attacker to provide adversarial images at very high $\epsilon$ , and a good measure of an attack’s strength is its ability to affect performance at low $\epsilon$ . In fact, in the next section, we discuss how Defense-GAN can be used to not only diminish the effect of attacks, but to also detect them.
|
| 189 |
+
|
| 190 |
+
# 4.1.3 ATTACK DETECTION
|
| 191 |
+
|
| 192 |
+
We intuitively expect that clean, unperturbed images will lie closer to the range of the Defense-GAN generator $G$ than adversarial examples. This is due to the fact that $G$ was trained to produce images which resemble the legitimate data. In light of this observation, we propose to use the MSE of an image with it is reconstruction from (8) as a “metric” to decide whether or not the image was adversarially manipulated. In order words, for a given threshold $\theta > 0$ , the hypothesis test is:
|
| 193 |
+
|
| 194 |
+
Table 3: Classification accuracy of Model F using Defense-GAN $L = 4 0 0$ , $R = 1 0$ ), under FGSM black-box attacks for various noise norms $\epsilon$ and substitute Model E.
|
| 195 |
+
|
| 196 |
+
<table><tr><td>E</td><td>Defense-GAN-Rec MNIST</td><td>Defense-GAN-Rec F-MNIST</td></tr><tr><td>0.10</td><td>0.9864± 0.0011</td><td>0.8844± 0.0017</td></tr><tr><td>0.15 0.20</td><td>0.9836 ± 0.0026</td><td>0.8267 ± 0.0065</td></tr><tr><td></td><td>0.9772 ± 0.0019</td><td>0.7492 ± 0.0170</td></tr><tr><td>0.25</td><td>0.9641 ± 0.0001</td><td>0.6384 ± 0.0159</td></tr><tr><td>0.30</td><td>0.9307 ± 0.0034</td><td>0.5126 ± 0.0096</td></tr></table>
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 4: ROC Curves when using Defense-GAN MSE for FGSM attack detections on the MNIST dataset (Classifier Model F, Substitute Model E). Left: Results for various number of GD iterations are shown with $R = 1 0$ , $\epsilon = 0 . 3 0$ . Middle: Results for various number of random restarts $R$ are shown with $L = 1 0 0$ , $\epsilon = 0 . 3 0$ . Right: Results for various $\epsilon$ are shown with $L = 4 0 0$ , $R = 1 0$ .
|
| 200 |
+
|
| 201 |
+
$$
|
| 202 |
+
| | G ( \mathbf { z } ^ { * } ) - \mathbf { x } | | _ { 2 } ^ { 2 } \qquad \mathbf { \geq } \qquad \theta .
|
| 203 |
+
$$
|
| 204 |
+
|
| 205 |
+
We compute the reconstruction MSEs for every image from the test dataset, and its adversarially manipulated version using FGSM. We show the Receiver Operating Characteristic (ROC) curves as well as the Area Under the Curve (AUC) metric for different Defense-GAN parameters and $\epsilon$ values in Figures 4 and 5. The results show that this attack detection strategy is effective especially when the number of GD iterations $L$ and random restarts $R$ are large. From the left and middle Figures, we can conclude that the number of random restarts plays a very important role in the detection false positive and true positive rates as was discussed in Section 4.1.1. Furthermore, when $\epsilon$ is very small, it becomes difficult to detect attacks at low false positive rates.
|
| 206 |
+
|
| 207 |
+
# 4.1.4 RESULTS ON WHITE-BOX ATTACKS
|
| 208 |
+
|
| 209 |
+
We now present results on white-box attacks using three different strategies: FGSM, RAND $+$ FGSM, and CW. We perform the CW attack for 100 iterations of projected GD, with learning rate 10.0, and use $c = 1 0 0$ in equation (4). Table 4 shows the classification performance of different classifier models across different attack and defense strategies. We note that Defense-GAN significantly outperforms the two other baseline defenses. We even give the adversarial attacker access to the random initializations of $\mathbf { z }$ . However, we noticed that the performance does not change much when the attacker does not know the initialization. Adversarial training was done using FGSM to generate the adversarial samples. It is interesting to mention that when CW attack is used, adversarial training performs extremely poorly. As previously discussed, adversarial training does not generalize well against different attack methods.
|
| 210 |
+
|
| 211 |
+
Due to the loop of $L$ steps of GD, Defense-GAN is resilient to GD-based white-box attacks, since the attacker needs to “un-roll” the GD loop and propagate the gradient of the loss all the way across $L$ steps. In fact, from Table 4, the performance of classifier A with Defense-GAN on the MNIST dataset drops less than $1 \%$ from 0.997 to 0.988 under FGSM. In comparison, from Figure 8, when
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 5: ROC Curves when using Defense-GAN MSE for FGSM attack detections on the F-MNIST dataset (Classifier Model F, Substitute Model E). Left: Results for various number of GD iterations are shown with $R = 1 0$ , $\epsilon = 0 . 3 0$ . Middle: Results for various number of random restarts $R$ are shown with $L = 1 0 0$ , $\epsilon = 0 . 3 0$ . Right: Results for various $\epsilon$ are shown with $L = 2 0 0$ , $R = 1 0$ .
|
| 215 |
+
|
| 216 |
+
$L = 2 5$ , the performance of the same network drops to 0.947 (more than $5 \%$ drop). This shows that using a larger $L$ significantly increases the robustness of Defense-GAN against GD-based whitebox attacks. This comes at the expense of increased inference time complexity. We present a more detailed discussion about the difficulty of GD-based white-box attacks in Appendix B and time complexity in Appendix G. Additional white-box experimental results on higher-dimensional images are reported in Appendix F.
|
| 217 |
+
|
| 218 |
+
Table 4: Classification accuracies of different classifier models using various defense strategies on the MNIST (top) and F-MNIST (bottom) datasets, under FGSM, RAND $+$ FGSM, and CW white-box attacks. Defense-GAN has $L = 2 0 0$ and $R = 1 0$ .
|
| 219 |
+
|
| 220 |
+
<table><tr><td rowspan=1 colspan=10>Classifier No No Defense- Adv. Tr.Attack MagNet ∈ = 0.3Model Attack Defense GAN-Rec</td></tr><tr><td rowspan=3 colspan=1>FGSM∈= 0.3</td><td rowspan=3 colspan=1>ABCD</td><td rowspan=1 colspan=1>0.9970.962</td><td rowspan=3 colspan=1>0.2170.0220.3310.038</td><td rowspan=3 colspan=2>0.9880.9560.9890.980</td><td rowspan=1 colspan=3>0.1910.082</td><td rowspan=1 colspan=1>0.6510.060</td></tr><tr><td rowspan=2 colspan=1>0.9960.992</td><td rowspan=1 colspan=3>0.163</td><td rowspan=1 colspan=1>0.786</td></tr><tr><td rowspan=1 colspan=3>0.094</td><td rowspan=1 colspan=1>0.732</td></tr><tr><td rowspan=6 colspan=1>RAND+FGSM∈ = 0.3,α = 0.05</td><td rowspan=6 colspan=1>ABCD</td><td rowspan=6 colspan=1>0.9970.9620.9960.992</td><td rowspan=6 colspan=1>0.1790.0170.1030.050</td><td rowspan=2 colspan=2>0.9880.944</td><td rowspan=1 colspan=3>0.171</td><td rowspan=1 colspan=1>0.774</td></tr><tr><td rowspan=1 colspan=3>0.091</td><td rowspan=1 colspan=1>0.138</td></tr><tr><td rowspan=4 colspan=2>0.9850.980</td><td rowspan=1 colspan=1></td><td></td><td></td><td></td></tr><tr><td rowspan=2 colspan=2>0.</td><td></td><td></td></tr><tr><td rowspan=1 colspan=2>0.151</td><td rowspan=1 colspan=1>0.907</td></tr><tr><td rowspan=1 colspan=3>0.115</td><td rowspan=1 colspan=1>0.539</td></tr><tr><td rowspan=3 colspan=1>CWl2 norm</td><td rowspan=3 colspan=1>ABCD</td><td rowspan=2 colspan=1>0.9970.962</td><td rowspan=2 colspan=1>0.1410.032</td><td rowspan=2 colspan=2>0.9890.916</td><td rowspan=1 colspan=3>0.038</td><td rowspan=1 colspan=1>0.077</td></tr><tr><td rowspan=1 colspan=1>0.032</td><td rowspan=1 colspan=1>0.916</td><td rowspan=1 colspan=3>0.034</td><td rowspan=1 colspan=1>0.280</td></tr><tr><td rowspan=1 colspan=1>0.9960.992</td><td rowspan=1 colspan=1>0.1260.032</td><td rowspan=1 colspan=2>0.9890.983</td><td rowspan=1 colspan=3>0.0250.021</td><td rowspan=1 colspan=1>0.0310.010</td></tr><tr><td rowspan=1 colspan=1>Attack</td><td rowspan=1 colspan=1>ClassifierModel</td><td rowspan=1 colspan=1>NoAttack</td><td rowspan=1 colspan=1>NoDefense</td><td rowspan=1 colspan=2>Defense-GAN-Rec</td><td rowspan=1 colspan=3>MagNet</td><td rowspan=1 colspan=1>Adv. Tr.∈= 0.3</td></tr><tr><td rowspan=4 colspan=1>FGSM∈= 0.3</td><td rowspan=4 colspan=1>ABCD</td><td rowspan=2 colspan=1>0.9340.747</td><td rowspan=1 colspan=1>0.102</td><td rowspan=1 colspan=2>0.879</td><td rowspan=1 colspan=3>0.089</td><td rowspan=3 colspan=1>0.7970.1360.804</td></tr><tr><td rowspan=2 colspan=1>0.1020.139</td><td rowspan=2 colspan=2>0.6290.896</td><td rowspan=1 colspan=3>0.168</td></tr><tr><td rowspan=1 colspan=1>0.933</td><td rowspan=1 colspan=3>0.110</td></tr><tr><td rowspan=1 colspan=1>0.892</td><td rowspan=1 colspan=1>0.082</td><td rowspan=1 colspan=2>0.875</td><td rowspan=1 colspan=3>0.099</td><td rowspan=1 colspan=1>0.698</td></tr><tr><td rowspan=3 colspan=1>RAND+FGSM∈ = 0.3,α = 0.05</td><td rowspan=3 colspan=1>ABCD</td><td rowspan=3 colspan=1>0.9340.7470.9330.892</td><td rowspan=1 colspan=1>0.102</td><td rowspan=1 colspan=2>0.888</td><td rowspan=1 colspan=3>0.096</td><td rowspan=2 colspan=1>0.4470.1190.699</td></tr><tr><td rowspan=2 colspan=1>0.1310.1050.091</td><td rowspan=1 colspan=2>0.6610.893</td><td rowspan=1 colspan=3>0.1610.112</td></tr><tr><td rowspan=1 colspan=2>0.862</td><td rowspan=1 colspan=3>0.104</td><td rowspan=1 colspan=1>0.626</td></tr><tr><td rowspan=4 colspan=1>CWl2 norm</td><td rowspan=4 colspan=1>ABCD</td><td rowspan=1 colspan=1>0.934</td><td rowspan=1 colspan=1>0.076</td><td rowspan=1 colspan=2>0.896</td><td rowspan=1 colspan=3>0.060</td><td rowspan=1 colspan=1>0.157</td></tr><tr><td rowspan=2 colspan=1>0.7470.933</td><td rowspan=1 colspan=1>0.172</td><td rowspan=1 colspan=2>0.656</td><td rowspan=1 colspan=3>0.131</td><td rowspan=1 colspan=1>0.118</td></tr><tr><td rowspan=1 colspan=1>0.063</td><td rowspan=1 colspan=2>0.896</td><td rowspan=1 colspan=3>0.084</td><td rowspan=1 colspan=1>0.107</td></tr><tr><td rowspan=1 colspan=1>0.892</td><td rowspan=1 colspan=1>0.090</td><td rowspan=1 colspan=2>0.875</td><td rowspan=1 colspan=3>0.069</td><td rowspan=1 colspan=1>0.149</td></tr></table>
|
| 221 |
+
|
| 222 |
+
# 5 CONCLUSION
|
| 223 |
+
|
| 224 |
+
In this paper, we proposed Defense-GAN, a novel defense strategy utilizing GANs to enhance the robustness of classification models against black-box and white-box adversarial attacks. Our method does not assume a particular attack model and was shown to be effective against most commonly considered attack strategies. We empirically show that Defense-GAN consistently provides adequate defense on two benchmark computer vision datasets, whereas other methods had many shortcomings on at least one type of attack.
|
| 225 |
+
|
| 226 |
+
It is worth mentioning that, although Defense-GAN was shown to be a feasible defense mechanism against adversarial attacks, one might come across practical difficulties while implementing and deploying this method. The success of Defense-GAN relies on the expressiveness and generative power of the GAN. However, training GANs is still a challenging task and an active area of research, and if the GAN is not properly trained and tuned, the performance of Defense-GAN will suffer on both original and adversarial examples. Moreover, the choice of hyper-parameters $L$ and $R$ is also critical to the effectiveness of the defense and it may be challenging to tune them without knowledge of the attack.
|
| 227 |
+
|
| 228 |
+
# ACKNOWLEDGMENT
|
| 229 |
+
|
| 230 |
+
This research is based upon work supported by the Office of the Director of National Intelligence (ODNI), Intelligence Advanced Research Projects Activity (IARPA), via IARPA R&D Contract No. 2014-14071600012. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the ODNI, IARPA, or the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon.
|
| 231 |
+
|
| 232 |
+
# REFERENCES
|
| 233 |
+
|
| 234 |
+
Mart´ın Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL http://tensorflow.org/. Software available from tensorflow.org.
|
| 235 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein GAN. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 236 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In IEEE Symposium on Security and Privacy, 2017.
|
| 237 |
+
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.
|
| 238 |
+
Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. International Conference on Learning Representations, 2015.
|
| 239 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of Wasserstein GANs. arXiv preprint arXiv:1704.00028, 2017.
|
| 240 |
+
Dan Hendrycks and Kevin Gimpel. Early methods for detecting adversarial images. International Conference on Learning Representations, Workshop Track, 2017.
|
| 241 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. 2014.
|
| 242 |
+
Maya Kabkab, Pouya Samangouei, and Rama Chellappa. Task-aware compressed sensing with generative models. In AAAI Conference on Artificial Intelligence, 2018.
|
| 243 |
+
Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. International Conference on Learning Representations, Workshop Track, 2017.
|
| 244 |
+
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.
|
| 245 |
+
|
| 246 |
+
Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. International Conference on Learning Representations, 2017.
|
| 247 |
+
|
| 248 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In IEEE International Conference on Computer Vision, 2015.
|
| 249 |
+
|
| 250 |
+
Dongyu Meng and Hao Chen. MagNet: a two-pronged defense against adversarial examples. arXiv preprint arXiv:1705.09064, 2017.
|
| 251 |
+
|
| 252 |
+
Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 253 |
+
|
| 254 |
+
Nicolas Papernot, Ian Goodfellow, Ryan Sheatsley, Reuben Feinman, and Patrick McDaniel. Cleverhans v1. 0.0: an adversarial machine learning library. arXiv preprint arXiv:1610.00768, 2016a.
|
| 255 |
+
|
| 256 |
+
Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In IEEE Symposium on Security and Privacy, 2016b.
|
| 257 |
+
|
| 258 |
+
Nicolas Papernot, Patrick McDaniel, Arunesh Sinha, and Michael Wellman. Towards the science of security and privacy in machine learning. arXiv preprint arXiv:1611.03814, 2016c.
|
| 259 |
+
|
| 260 |
+
Nicolas Papernot, Patrick McDaniel, Xi Wu, Somesh Jha, and Ananthram Swami. Distillation as a defense to adversarial perturbations against deep neural networks. In IEEE Symposium on Security and Privacy, 2016d.
|
| 261 |
+
|
| 262 |
+
Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In ACM Asia Conference on Computer and Communications Security, 2017.
|
| 263 |
+
|
| 264 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. International Conference on Learning Representations, Workshop Track, 2014.
|
| 265 |
+
|
| 266 |
+
Florian Tramer, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble \` adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017.
|
| 267 |
+
|
| 268 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 269 |
+
|
| 270 |
+
# Appendices
|
| 271 |
+
|
| 272 |
+
A OPTIMALITY OF $p _ { g } = p _ { \mathrm { D A T A } }$ FOR WGANS
|
| 273 |
+
|
| 274 |
+
Sketch of proof of Lemma 1: The WGAN min-max loss is given by:
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\begin{array} { l l l } { { \displaystyle V _ { W } ( D , G ) = \mathbb { E } _ { { \bf x } \sim p _ { \mathrm { d a t a } } ( { \bf x } ) } [ D ( { \bf x } ) ] - \mathbb { E } _ { { \bf z } \sim p _ { \bf z } ( { \bf z } ) } [ D ( G ( { \bf z } ) ) ] } \ ~ } \\ { { \displaystyle ~ = \int _ { { \bf x } } p _ { \mathrm { d a t a } } ( { \bf x } ) D ( { \bf x } ) d { \bf x } - \int _ { { \bf z } } p _ { { \bf z } } ( { \bf z } ) D ( G ( { \bf z } ) ) d { \bf z } } \ ~ } \\ { { \displaystyle ~ = \int _ { { \bf x } } \left( p _ { \mathrm { d a t a } } ( { \bf x } ) - p _ { g } ( { \bf x } ) \right) D ( { \bf x } ) d { \bf x } } } \end{array}
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
For a fixed $G$ , the optimal discriminator $D$ which maximizes $V _ { W } ( D , G )$ is such that:
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
D _ { G } ^ { * } ( \mathbf { x } ) = \left\{ { \begin{array} { l l } { 1 } & { \mathrm { i f } \ p _ { \mathrm { d a t a } } ( \mathbf { x } ) \geq p _ { g } ( \mathbf { x } ) } \\ { 0 } & { \mathrm { o t h e r w i s e } } \end{array} } \right.
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
Plugging $D _ { G } ^ { * }$ back into (12), we get:
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { l } { { \displaystyle V _ { W } ( D _ { G } ^ { * } , G ) = \int _ { \mathbf { x } } \left( p _ { \mathrm { d a t a } } ( \mathbf { x } ) - p _ { g } ( \mathbf { x } ) \right) D _ { G } ^ { * } ( \mathbf { x } ) d \mathbf { x } } \ ~ } \\ { { \displaystyle ~ = \int _ { \left\{ \mathbf { x } \mid p _ { \mathrm { d a t a } } ( \mathbf { x } ) \geq p _ { g } ( \mathbf { x } ) \right\} } \left( p _ { \mathrm { d a t a } } ( \mathbf { x } ) - p _ { g } ( \mathbf { x } ) \right) d \mathbf { x } } } \ ~ \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
Let $\mathcal { X } = \{ \mathbf { x } \mid p _ { \mathrm { d a t a } } ( \mathbf { x } ) \geq p _ { g } ( \mathbf { x } ) \}$ . Clearly, to minimize (15), we need to set $p _ { \mathrm { d a t a } } ( \mathbf { x } ) = p _ { g } ( \mathbf { x } )$ for $\mathbf { x } \in \mathcal { X }$ . Then, since both pdfs should integrate to 1,
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
\int _ { \mathcal { X } ^ { c } } p _ { g } ( \mathbf { x } ) d \mathbf { x } = \int _ { \mathcal { X } ^ { c } } p _ { \mathrm { d a t a } } ( \mathbf { x } ) d \mathbf { x }
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
However, this is a contradiction since $p _ { g } ( \mathbf { x } ) < p _ { \mathrm { d a t a } } ( \mathbf { x } )$ for $\mathbf { x } \in \mathcal { X } ^ { c }$ , unless $\mu ( \mathcal { X } ^ { c } ) = 0$ where $\mu$ is the Lebesgue measure. This concludes the proof.
|
| 299 |
+
|
| 300 |
+
# B DIFFICULTY OF GD-BASED WHITE-BOX ATTACKS ON DEFENSE-GAN
|
| 301 |
+
|
| 302 |
+
In order to perform a GD-based white-box attack on models using Defense-GAN, an attacker needs to compute the gradient of the output of the classifier with respect to the input. From Figure 1, the generator and the classifier can be seen as one, combined, feedforward network, through which it is easy to propagate gradients. The difficulty lies in the orange box of the GD optimization detailed in Figure 2.
|
| 303 |
+
|
| 304 |
+
For the sake of simplicity, let’s assume that $R = 1$ . Define $\mathcal { L } ( \mathbf { x } , \mathbf { z } ) = | | G ( \mathbf { z } ) - \mathbf { x } | | _ { 2 } ^ { 2 }$ . Then ${ \bf z } ^ { * } = { \bf z } _ { L }$ which is computed recursively as follows:
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r l } & { \mathbf { z } _ { 1 } = \mathbf { z } _ { 0 } + \eta _ { 0 } \left. \nabla _ { \mathbf { z } } \mathcal { L } ( \mathbf { x } , \mathbf { z } ) \right| _ { \mathbf { z } = \mathbf { z } _ { 0 } } } \\ & { \mathbf { z } _ { 2 } = \mathbf { z } _ { 1 } + \eta _ { 1 } \left. \nabla _ { \mathbf { z } } \mathcal { L } ( \mathbf { x } , \mathbf { z } ) \right| _ { \mathbf { z } = \mathbf { z } _ { 1 } } } \\ & { \quad = \mathbf { z } _ { 0 } + \eta _ { 0 } \left. \nabla _ { \mathbf { z } } \mathcal { L } ( \mathbf { x } , \mathbf { z } ) \right| _ { \mathbf { z } = \mathbf { z } _ { 0 } } + \eta _ { 1 } \left. \nabla _ { \mathbf { z } } \mathcal { L } ( \mathbf { x } , \mathbf { z } ) \right| _ { \mathbf { z } = \mathbf { z } _ { 0 } + \eta _ { 0 } \left. \nabla _ { \mathbf { z } } \mathcal { L } ( \mathbf { x } , \mathbf { z } ) \right| _ { \mathbf { z } = \mathbf { z } _ { 0 } } } } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
and so on. Therefore, computing the gradient of $\mathbf { z } ^ { \ast }$ with respect to $\mathbf { x }$ involves a large number $( L )$ of recursive chain rules and high-dimensional Jacobian tensors. This computation gets increasingly prohibitive for large $L$ .
|
| 311 |
+
|
| 312 |
+
# C NEURAL NETWORK ARCHITECTURES
|
| 313 |
+
|
| 314 |
+
We describe the neural network architectures used throughout the paper. The detail of models A through F used for classifier and substitute networks can be found in Table 5. In Table 6, the GAN architectures are described, and in Table 7, the encoder architecture for the MagNet baseline is given. In what follows:
|
| 315 |
+
|
| 316 |
+
• $\mathrm { C o n v } ( m , k \times k , s )$ refers to a convolutional layer with $m$ feature maps, filter size $k \times k$ , and stride $s$
|
| 317 |
+
• $\mathrm { C o n v T } ( m , \ k \times \ k )$ refers to the transpose (gradient) of Conv (sometimes referred to as “deconvolution”) with $m$ feature maps, filter size $k \times k$ , and stride $s$
|
| 318 |
+
• $\operatorname { F C } ( m )$ refers to a fully-connected layer with $m$ outputs
|
| 319 |
+
• Dropout $( p )$ refers to a dropout layer with probability $p$
|
| 320 |
+
• ReLU refers to the Rectified Linear Unit activation
|
| 321 |
+
• LeakyReLU $( \alpha )$ is the leaky version of the Rectified Linear Unit with parameter $\alpha$
|
| 322 |
+
|
| 323 |
+
Table 5: Neural network architectures used for classifiers and substitute models.
|
| 324 |
+
|
| 325 |
+
<table><tr><td>A</td><td>B,F*</td><td>C</td><td>D,E*</td></tr><tr><td>Conv(64,5 × 5,1) ReLU Conv(64,5 × 5,2) ReLU Dropout(0.25) FC(128) ReLU</td><td>Dropout(0.2) Conv(64,8 × 8,2) ReLU Conv(128,6 × 6,2) ReLU Conv(128,5 × 5,1)</td><td>Conv(128,3 × 3,1) ReLU Conv(64,3 × 3, 2) ReLU Dropout(0.25) FC(128)</td><td>FC(200) ReLU Dropout(0.5) FC(200) ReLU Dropout(0.5)</td></tr></table>
|
| 326 |
+
|
| 327 |
+
$[ \mathbf { \Psi } ^ { * } : \mathrm { F }$ (resp. E) shares the same architecture as B (resp. D) with the dropout layers removed ]
|
| 328 |
+
|
| 329 |
+
Table 6: Neural network architectures used for GANs.
|
| 330 |
+
|
| 331 |
+
<table><tr><td colspan="2">Generator Discriminator</td></tr><tr><td>FC(4096) ReLU ConvT(256,5 × 5,1)</td><td>Conv(64,5 × 5,2) LeakyReLU(0.2)</td></tr><tr><td>ReLU</td><td>Conv(128,5 × 5,2) LeakyReLU(0.2)</td></tr><tr><td>ConvT(128,5 × 5,1) ReLU</td><td>Conv(256,5 × 5,2)</td></tr><tr><td>ConvT(1, 5 × 5,1)</td><td>LeakyReLU(0.2) FC(1)</td></tr><tr><td>Sigmoid</td><td>Sigmoid</td></tr></table>
|
| 332 |
+
|
| 333 |
+
Table 7: Neural network architecture used for the MagNet encoder.
|
| 334 |
+
|
| 335 |
+
<table><tr><td>Encoder</td></tr><tr><td>Conv(64, 5 × 5, 2)</td></tr><tr><td>LeakyReLU(0.2)</td></tr><tr><td>Conv(128,5 × 5,2)</td></tr><tr><td>LeakyReLU(0.2)</td></tr><tr><td>Conv(256,5 × 5,2)</td></tr><tr><td>LeakyReLU(0.2) FC(128)+tanh</td></tr></table>
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 6: Examples from MNIST and F-MNIST. Left: Original, FGSM adversarial $\epsilon = 0 . 3$ , and reconstruction images for $R = 1$ and various $L$ are shown. Right: Original, FGSM adversarial $\epsilon = 0 . 3$ , and reconstruction images for $L = 2 5$ and various $R$ are shown.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 7: Examples from MNIST and F-MNIST: Original, FGSM adversarial and reconstruction images for $L = 5 0$ , $R = 1 5$ and various $\epsilon$ are shown.
|
| 342 |
+
|
| 343 |
+
# E ADDITIONAL RESULTS ON THE EFFECT OF VARYING THE NUMBER OF GD ITERATIONS $L$ AND RANDOM RESTARTS $R$
|
| 344 |
+
|
| 345 |
+
Table 8: Classification accuracy of Model F using Defense-GAN with various number of iterations $L$ $R = 1 0$ ), on the MNIST dataset, under FGSM black-box attack with $\epsilon = 0 . 3$ .
|
| 346 |
+
|
| 347 |
+
<table><tr><td>L</td><td>Defense-GAN-Rec No attack</td><td>Defense-GAN-Orig No attack</td><td>Defense-GAN-Rec Adversarial</td><td>Defense-GAN-Orig Adversarial</td></tr><tr><td>25</td><td>0.9273± 0.0215</td><td>0.9141± 0.0033</td><td>0.7955± 0.0045</td><td>0.7998± 0.0063</td></tr><tr><td>50</td><td>0.9567 ± 0.0203</td><td>0.9371 ± 0.0048</td><td>0.8516 ± 0.0078</td><td>0.8472 ± 0.0026</td></tr><tr><td>100</td><td>0.9728 ± 0.0164</td><td>0.9560 ± 0.0051</td><td>0.8953 ± 0.0027</td><td>0.8911 ± 0.0024</td></tr><tr><td>200</td><td>0.9860 ± 0.0010</td><td>0.9712 ± 0.0028</td><td>0.9210 ± 0.0023</td><td>0.9155 ± 0.0032</td></tr><tr><td>400</td><td>0.9869 ± 0.0082</td><td>0.9808 ± 0.0044</td><td>0.9332 ± 0.0027</td><td>0.9307 ± 0.0034</td></tr><tr><td>800</td><td>0.9934 ± 0.0009</td><td>0.9938 ± 0.0004</td><td>0.9319 ± 0.0038</td><td>0.9216 ± 0.0005</td></tr><tr><td>1600</td><td>0.9963 ± 0.0013</td><td>0.9967 ± 0.0005</td><td>0.9081 ± 0.0062</td><td>0.9008 ± 0.0095</td></tr></table>
|
| 348 |
+
|
| 349 |
+
Table 9: Classification accuracy of Model F using Defense-GAN with various number of iterations $L$ $( R = 1 0 )$ ), on the F-MNIST dataset, under FGSM black-box attack with $\epsilon = 0 . 3$ .
|
| 350 |
+
|
| 351 |
+
<table><tr><td rowspan=1 colspan=5>Defense-GAN-Rec Defense-GAN-Orig Defense-GAN-Rec Defense-GAN-OrigLNo attack No attack Adversarial Adversarial</td></tr><tr><td rowspan=1 colspan=1>25</td><td rowspan=1 colspan=1>0.8037± 0.0050</td><td rowspan=1 colspan=1>0.7595 ± 0.0009</td><td rowspan=1 colspan=1>0.4040± 0.0149</td><td rowspan=1 colspan=1>0.3910± 0.0119</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>0.8676 ± 0.0018</td><td rowspan=1 colspan=1>0.7898 ± 0.0016</td><td rowspan=1 colspan=1>0.4412 ± 0.0023</td><td rowspan=1 colspan=1>0.3980 ± 0.0114</td></tr><tr><td rowspan=1 colspan=1>100</td><td rowspan=1 colspan=1>0.9101 ± 0.0032</td><td rowspan=1 colspan=1>0.8190 ± 0.0043</td><td rowspan=1 colspan=1>0.4808 ± 0.0088</td><td rowspan=2 colspan=1>0.4221 ± 0.02550.4594 ± 0.0056</td></tr><tr><td rowspan=1 colspan=1>200</td><td rowspan=1 colspan=1>0.9145 ± 0.0014</td><td rowspan=1 colspan=1>0.8373 ± 0.0054</td><td rowspan=1 colspan=1>0.5119 ± 0.0038</td></tr><tr><td rowspan=1 colspan=1>400</td><td rowspan=1 colspan=1>0.9490 ± 0.0013</td><td rowspan=1 colspan=1>0.8557 ± 0.0049</td><td rowspan=1 colspan=1>0.5126 ± 0.0096</td><td rowspan=1 colspan=1>0.4754 ± 0.0102</td></tr><tr><td rowspan=1 colspan=1>800</td><td rowspan=1 colspan=1>0.9588 ± 0.0065</td><td rowspan=1 colspan=1>0.8832 ± 0.0042</td><td rowspan=1 colspan=1>0.5520 ± 0.0098</td><td rowspan=1 colspan=1>0.4644± 0.0092</td></tr><tr><td rowspan=1 colspan=1>1600</td><td rowspan=1 colspan=1>0.9640 ± 0.0010</td><td rowspan=1 colspan=1>0.9125 ± 0.0040</td><td rowspan=1 colspan=1>0.5335 ± 0.0226</td><td rowspan=1 colspan=1>0.4952 ± 0.0155</td></tr></table>
|
| 352 |
+
|
| 353 |
+
Table 10: Classification accuracy of Model F using Defense-GAN with various number of random restarts $R$ $L = 1 0 0$ ), on the MNIST dataset, under FGSM black-box attack with $\epsilon = 0 . 3$ .
|
| 354 |
+
|
| 355 |
+
<table><tr><td>R</td><td>Defense-GAN-Rec No attack</td><td>Defense-GAN-Orig No attack</td><td>Defense-GAN-Rec Adversarial</td><td>Defense-GAN-Orig Adversarial</td></tr><tr><td>1</td><td>0.7035± 0.0035</td><td>0.6436± 0.0017</td><td>0.5329±0.0094</td><td>0.5011 ± 0.0085</td></tr><tr><td>2</td><td>0.8619 ± 0.0010</td><td>0.8080 ± 0.0029</td><td>0.6722 ± 0.0041</td><td>0.6605 ± 0.0050</td></tr><tr><td>5</td><td>0.9523 ± 0.0006</td><td>0.9213 ± 0.0024</td><td>0.8199 ± 0.0097</td><td>0.8228 ± 0.0038</td></tr><tr><td>10</td><td>0.9810 ± 0.0015</td><td>0.9560 ± 0.0051</td><td>0.8956 ± 0.0032</td><td>0.8911 ± 0.0024</td></tr><tr><td>20</td><td>0.9966 ± 0.0009</td><td>0.9753 ± 0.0010</td><td>0.9456 ± 0.0031</td><td>0.9310 ± 0.0023</td></tr></table>
|
| 356 |
+
|
| 357 |
+
Table 11: Classification accuracy of Model F using Defense-GAN with various number of random restarts $R$ $L = 1 0 0 _ { , }$ ), on the F-MNIST dataset, under FGSM black-box attack with $\epsilon = 0 . 3$ .
|
| 358 |
+
Classification accuracy of different models using Defense-GAN and varying L.
|
| 359 |
+
|
| 360 |
+
<table><tr><td>R</td><td>Defense-GAN-Rec No attack</td><td>Defense-GAN-Orig No attack</td><td>Defense-GAN-Rec Adversarial</td><td>Defense-GAN-Orig Adversarial</td></tr><tr><td>1</td><td>0.8425 ± 0.0008</td><td>0.5597± 0.0015</td><td>0.3504 ± 0.0102</td><td>0.3380± 0.0043</td></tr><tr><td>2</td><td>0.8994 ± 0.0051</td><td>0.7793 ± 0.0023</td><td>0.4050 ± 0.0148</td><td>0.3508 ± 0.0167</td></tr><tr><td>5</td><td>0.9260 ± 0.0028</td><td>0.6726 ± 0.0006</td><td>0.4521 ± 0.0177</td><td>0.4024 ± 0.0085</td></tr><tr><td>10</td><td>0.9101 ± 0.0032</td><td>0.8190 ± 0.0043</td><td>0.4808 ± 0.0088</td><td>0.4221 ± 0.0255</td></tr></table>
|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
|
| 364 |
+
Figure 8: Classification accuracy of different models using Defense-GAN on the MNIST dataset, under FGSM white-box attack with $\epsilon = 0 . 3$ , for various number of iterations $L$ and $R = 1 0$ .
|
| 365 |
+
|
| 366 |
+
# F ADDITIONAL RESULTS ON WHITE-BOX ATTACKS
|
| 367 |
+
|
| 368 |
+
We report results on white-box attacks on the CelebFaces Attributes dataset (CelebA) (Liu et al., 2015) in Table 12. The CelebA dataset is a large-scale face dataset consisting of more than 200, 000 face images, split into training, validation, and testing sets. The RGB images were center-cropped
|
| 369 |
+
|
| 370 |
+
and resized to $6 4 \times 6 4$ . We performed the task of gender classification on this dataset. The GAN architecture is the same as that in Table 6, except for an additional ConvT(128, $5 \times 5 , 1$ ) layer in the generator network.
|
| 371 |
+
|
| 372 |
+
Table 12: Classification accuracies of different classifier models using various defense strategies on the CelebA gender classification task, under FGSM, RAND $+$ FGSM, and CW white-box attacks. Defense-GAN has $L = 2 0 0$ and $R = 2$ .
|
| 373 |
+
|
| 374 |
+
<table><tr><td rowspan=1 colspan=9>Classifier No No Defense- Adv. Tr.Attack MagNetModel Attack Defense GAN-Rec ∈ = 0.3</td></tr><tr><td rowspan=4 colspan=1>FGSM∈= 0.3</td><td rowspan=4 colspan=1>ABCD</td><td rowspan=1 colspan=3>0.9652</td><td rowspan=1 colspan=1>0.0870</td><td rowspan=1 colspan=1>0.9255</td><td rowspan=1 colspan=1>0.0985</td><td rowspan=1 colspan=1>0.1225</td></tr><tr><td rowspan=1 colspan=3>0.9468</td><td rowspan=2 colspan=1>0.09950.0460</td><td rowspan=2 colspan=1>0.91400.9255</td><td rowspan=1 colspan=1>0.0920</td><td rowspan=1 colspan=1>0.2345</td></tr><tr><td rowspan=2 colspan=3>0.94590.9476</td><td rowspan=1 colspan=2>0.9459</td><td rowspan=1 colspan=1>59</td><td rowspan=1 colspan=1>0.1085</td><td rowspan=1 colspan=1>0.1130</td></tr><tr><td rowspan=1 colspan=1>0.0605</td><td rowspan=1 colspan=1>0.9205</td><td rowspan=1 colspan=1>0.0975</td><td rowspan=1 colspan=1>0.7755</td></tr><tr><td rowspan=4 colspan=1>RAND+FGSM∈ = 0.3,α = 0.05</td><td rowspan=4 colspan=1>ABCD</td><td rowspan=4 colspan=3>0.96520.94680.94590.9476</td><td rowspan=4 colspan=1>0.05600.17850.04700.0665</td><td rowspan=1 colspan=1>0.9280</td><td rowspan=1 colspan=1>0.1105</td><td rowspan=1 colspan=1>0.0700</td></tr><tr><td rowspan=2 colspan=1>0.90300.9200</td><td rowspan=2 colspan=1>0.10150.1045</td><td rowspan=1 colspan=1>0.4515</td></tr><tr><td rowspan=1 colspan=1>0.1055</td></tr><tr><td rowspan=1 colspan=1>0.9165</td><td rowspan=1 colspan=1>0.1105</td><td rowspan=1 colspan=1>0.696</td></tr><tr><td rowspan=4 colspan=1>CWl2 norm</td><td rowspan=4 colspan=1>ABCD</td><td rowspan=1 colspan=3>0.9652</td><td rowspan=1 colspan=1>0.0460</td><td rowspan=1 colspan=1>0.8210</td><td rowspan=1 colspan=1>0.0985</td><td rowspan=1 colspan=1>0.5690</td></tr><tr><td rowspan=1 colspan=3>0.9468</td><td rowspan=2 colspan=1>0.05750.0435</td><td rowspan=2 colspan=1>0.74650.7985</td><td rowspan=1 colspan=1>0.0955</td><td rowspan=2 colspan=1>0.07250.2635</td></tr><tr><td rowspan=2 colspan=3>0.94590.9476</td><td rowspan=1 colspan=1>0.0985</td></tr><tr><td rowspan=1 colspan=1>0.0660</td><td rowspan=1 colspan=1>0.7740</td><td rowspan=1 colspan=1>0.1040</td><td rowspan=1 colspan=1>0.5010</td></tr></table>
|
| 375 |
+
|
| 376 |
+
# G TIME COMPLEXITY
|
| 377 |
+
|
| 378 |
+
The computational complexity of reconstructing an image using Defense-GAN is on the order of the number of GD iterations performed to estimate $\mathbf { z } ^ { \ast }$ , multiplied by the time to compute gradients. The number of random restarts $R$ has less effect on the running time, since random restarts are independent and can run in parallel if enough resources are available. Table 13 shows the average running time, in seconds, to find the reconstructions of MNIST and F-MNIST images on one NVIDIA GeForce GTX TITAN X GPU. For most applications, these running times are not prohibitive. We can see a tradeoff between running time and defense robustness as well as accuracy.
|
| 379 |
+
|
| 380 |
+
Table 13: Average time, in seconds, to compute reconstructions of MNIST/F-MNIST images for various values of $L$ and $R$ .
|
| 381 |
+
|
| 382 |
+
<table><tr><td></td><td>L=10</td><td>L = 25</td><td>L= 50</td><td>L=100</td><td>L= 200</td></tr><tr><td>R=1</td><td>0.043±0.027</td><td>0.070±0.003</td><td>0.137± 0.004</td><td>0.273±0.006</td><td>L= 0.543±0.017</td></tr><tr><td>R=2</td><td>0.042 ± 0.026</td><td>0.067 ± 0.002</td><td>0.131 ± 0.003</td><td>0.261 ± 0.006</td><td>L = 0.510± 0.006</td></tr><tr><td>R=5</td><td>0.043 ± 0.029</td><td>0.070 ± 0.002</td><td>0.136 ± 0.004</td><td>0.270 ± 0.004</td><td>L = 0.535 ± 0.008</td></tr><tr><td>R=10</td><td>0.051 ± 0.032</td><td>0.086 ± 0.001</td><td>0.170±0.002</td><td>0.338 ± 0.008</td><td>L = 0.675 ± 0.016</td></tr><tr><td>R=20</td><td>0.060 ± 0.035</td><td>0.105 ± 0.003</td><td>0.209 ±0.006</td><td>0.414 ± 0.012</td><td>L = 0.825 ± 0.022</td></tr></table>
|
md/train/BkeStsCcKQ/BkeStsCcKQ.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CRITICAL LEARNING PERIODS IN DEEP NETWORKS
|
| 2 |
+
|
| 3 |
+
Alessandro Achille ∗ Department of Computer Science University of California, Los Angeles achille@cs.ucla.edu
|
| 4 |
+
|
| 5 |
+
Matteo Rovere ∗
|
| 6 |
+
Ann Romney Center for Neurologic Diseases
|
| 7 |
+
Brigham and Women’s Hospital and Harvard Medical School
|
| 8 |
+
mrovere@bwh.harvard.edu
|
| 9 |
+
|
| 10 |
+
# Stefano Soatto
|
| 11 |
+
|
| 12 |
+
Department of Computer Science University of California, Los Angeles soatto@cs.ucla.edu
|
| 13 |
+
|
| 14 |
+
# ABSTRACT
|
| 15 |
+
|
| 16 |
+
Similar to humans and animals, deep artificial neural networks exhibit critical periods during which a temporary stimulus deficit can impair the development of a skill. The extent of the impairment depends on the onset and length of the deficit window, as in animal models, and on the size of the neural network. Deficits that do not affect low-level statistics, such as vertical flipping of the images, have no lasting effect on performance and can be overcome with further training. To better understand this phenomenon, we use the Fisher Information of the weights to measure the effective connectivity between layers of a network during training. Counterintuitively, information rises rapidly in the early phases of training, and then decreases, preventing redistribution of information resources in a phenomenon we refer to as a loss of “Information Plasticity”. Our analysis suggests that the first few epochs are critical for the creation of strong connections that are optimal relative to the input data distribution. Once such strong connections are created, they do not appear to change during additional training. These findings suggest that the initial learning transient, under-scrutinized compared to asymptotic behavior, plays a key role in determining the outcome of the training process. Our findings, combined with recent theoretical results in the literature, also suggest that forgetting (decrease of information in the weights) is critical to achieving invariance and disentanglement in representation learning. Finally, critical periods are not restricted to biological systems, but can emerge naturally in learning systems, whether biological or artificial, due to fundamental constrains arising from learning dynamics and information processing.
|
| 17 |
+
|
| 18 |
+
# 1 INTRODUCTION
|
| 19 |
+
|
| 20 |
+
Critical periods are time windows of early post-natal development during which sensory deficits can lead to permanent skill impairment (Kandel et al., 2013). Researchers have documented critical periods affecting a range of species and systems, from visual acuity in kittens (Wiesel & Hubel, 1963b; Wiesel, 1982) to song learning in birds (Konishi, 1985). Uncorrected eye defects (e.g., strabismus, cataracts) during the critical period for visual development lead to amblyopia in one in fifty adults.
|
| 21 |
+
|
| 22 |
+
The cause of critical periods is ascribed to the biochemical modulation of windows of neuronal plasticity (Hensch, 2004). In this paper, however, we show that deep neural networks (DNNs), while completely devoid of such regulations, respond to sensory deficits in ways similar to those observed in humans and animal models. This surprising result suggests that critical periods may arise from information processing, rather than biochemical, phenomena.
|
| 23 |
+
|
| 24 |
+
We propose using the information in the weights, measured by an efficient approximation of the Fisher Information, to study critical period phenomena in DNNs. We show that, counterintuitively, the information in the weights does not increase monotonically during training. Instead, a rapid growth in information (“memorization phase”) is followed by a reduction of information (“reorganization” or “forgetting” phase), even as classification performance keeps increasing. This behavior is consistent across different tasks and network architectures. Critical periods are centered in the memorization phase.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1: Final accuracy achieved by a CNN trained with acritical period for this deficit in the ANN: if the blur is not removed within tFigure 1: DNNs exhibit critical periods. (A) Final accuracy achieved by a CNN trained with final performance is sa cataract-like deficit as a function of the training epoch $N$ rely decreased when compared to the baseline (fromat which the deficit is removed (solid Performance is permanently impaired if the deficit is not corrected early enough, regardless of howabsence of a deficit, to more than 18% when the blur is present over 140 epochline). Performance is permanently impaired if the deficit is not corrected early enough, regardless The profile of the curve is also strikingly similar to the one obtained in kittensof how much additional training is performed. As in animal models, critical periods coincide with learning phase during which test accuracy would rapidly increase in the absence of deficits (dashed).from near birth and whose visual acuity upon eye-opening was tested and ploof the deficit window (Mitchell, 1988). Just like in humans and animal mthe early learning phase during which, in the absence of deficits, test accuracy would rapidly inFor comparison, we report acuity for kittens monocularly deprived since birth and tested at theperiods are characteristic of early development), the critical period in the Dcrease (dashed). (B) For comparison, we report acuity for kittens monocularly deprived since birth time of eye-opening (solid), and normal development visual acuity in kittens as a function of agethe initial rapid learning phase. At this stage, the network is quickly learningand tested at the time of eye-opening (solid), and normal visual acuity development (in kittens) (dashed) (Giffin & Mitchell, 1978; Mitchell, 1988).test error plateaus and the longer asymptotic convergence phase begins.as a function of their age (dashed) (Giffin & Mitchell, 1978; Mitchell, 1988). Sensitivity during Sensitivity to deficit. To quantify more accurately the sensitivity of the Alearning: (C) Final test accuracy of a DNN as a function of the onset of a short 40-epoch deficit. throughout its early learning phase, we introduced the deficit in a short constanThe decrease in the final performance can be used to measure the sensitivity to deficits. The most artificial neural networks (ANNs) are only loosely inspired by biological systems (Hassabis et al.,starting at different epochs, and then measured the decrease in the ANN’s fisensitive epochs corresponds to the early rapid learning phase, before the test error (dashed line) 2017). onset of the deficit. We observe that the network’s sensitivity to blurring peakbegins to plateau. Afterwards, the network is largely unaffected by the temporary deficit. (D) This the early rapid learning phase (around 30 epochs), while later deficits produccan be compared with changes in the degree of functional disconnection (normalized numbers of Most studies to date have focused either on the behavior of networks at convergence (Representationsimilar experiment was also performed on kittens by Olson and Freeman, usiV1 monocular cells disconnected from the contralateral eye) as a function of the kittens’ age at the Learning) or on the asymptotic properties of the numerical scheme used to get there (Optimization). onset of a 10-12-day deficit window (Olson & Freeman, 1980). Dashed lines are as in A and B The role of the initial transient, especially itrespectively, up to a re-scaling of the y-axis.
|
| 28 |
+
|
| 29 |
+
1 We employed this method, instead of a simpler Gaussian blur, since it has a veryOur findings, described in Section 2, indicate that the early transient is critical in determining the the quantification of information loss clearer.final solution of the optimization associated with training an artificial neural network. In particular, the effects of sensory deficits during a critical period cannot be overcome, no matter how much 3additional training is performed. Yet most theoretical studies have focused on the network behavior In animals, sensory deficits introduced during critical periods induce changes in the architectureafter convergence (Representation Learning) or on the asymptotic properties of the optimization of the corresponding areas (Dascheme used for training (SGD).
|
| 30 |
+
|
| 31 |
+
the weights of the network as a proxy to measure its “effective connectivity”, that is, the density ofTo study this early phase, in Section 3, we use the Fisher Information to quantify the effective connections that are effectively used by the network in order to solve the task. Like others before usconnectivity of a network during training, and introduce the notion of Information Plasticity in (Shwartz-Ziv & Tishby, 2017), we observe two distinct phases during the training, first a “learninglearning. Information Plasticity is maximal during the memorization phase, and decreases in the phase” in which the Fisher Information of the weights increases as the network learns from the data,reorganization phase. We show that deficit sensitivity during critical periods correlates strongly followed by a “consolidation”with the effective connectivity.
|
| 32 |
+
|
| 33 |
+
and stabilizes. Sensitivity to critical-period-inducing deficits is maximal exactly when the FisherIn Section 4 we discuss our contribution in relation to previous work. When considered in conjuncInformation peaks.tion with recent results on representation learning (Achille & Soatto, 2018), our findings indicate A layer-wise analysis of the network’s effective connectivity shows that, in the tasks and deficitsthat forgetting (reducing information in the weights) is critical to achieving invariance to nuisance we consider, the hierarchy of low-level and high-level features in the training data is a key aspectvariability as well as independence of the components of the representation, but comes at the price of behind the observed phenomena. In particular, our experiments suggest that the existence of criticalreduced adaptability later in the training. We also hypothesize that the loss of physical connectivity periods in deep neural networks depends on the inability of the network to change its effectivein biology (neural plasticity) could be a consequence, rather than a cause, of the loss of Informaconnectivity pattern in order to process different information (in response to deficit removal). Wetion Plasticity, which depends on how the information is distributed throughout a network during call this phenomenon, which is not mediated by any external factors, a loss of the “Informationthe early stages of learning. These results also shed light on the common practice of pre-training Plasticity” of the network.a model on a task and then fine-tune it for another, one of the most rudimentary forms of transfer learning. Our experiments show that, rather than helpful, pre-training can be detrimental, even if the tasks are similar (e.g., same labels, slightly blurred images).
|
| 34 |
+
|
| 35 |
+
# 3 DEEP ARTIFIC2 EXPERIMENTS
|
| 36 |
+
|
| 37 |
+
A notable example of critical period-inducing deficit, which also commonly affects humans, is am-A notable example of critical period-related deficit, commonly affecting humans, is amblyopia (reblyopia (reduced visual acuity in one eye) caused unilateral cataracts during infancy or childhoodduced visual acuity in one eye) caused by cataracts during infancy or childhood (Taylor et al., 1979;
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 2: (Left) High-level perturbations do not induce a critical period. When the deficit only affects high-level features (vertical flip of the image) or the last layer of the CNN (label permutation), the network does not exhibit critical periods (test accuracy remains largely flat). On the other hand, a sensory deprivation-like deficit (image is replaced by random noise) does cause a deficit, but the effect is less severe than in the case of image blur. (Right) Dependence of the critical period profile on the network’s depth. Adding more convolutional layers increases the effect of the deficit during its critical period (shown here is the decrease in test accuracy due to the deficit with respect to the test accuracy reached without deficits).
|
| 41 |
+
|
| 42 |
+
von Noorden, 1981). Even after surgical correction of cataracts, the ability of the patients to regain normal acuity in the affected eye depends both on the duration of the deficit and on its age of onset, with earlier and longer deficits causing more severe effects. In this section, we aim to study the effects of similar deficits in DNNs. To do so, we train a standard All-CNN architecture based on Springenberg et al. (2014) (see Appendix A) to classify objects in small $3 2 \times 3 2$ images from the CIFAR-10 dataset (Krizhevsky & Hinton, 2009). We train with SGD using an exponential annealing schedule for the learning rate. To simulate the effect of cataracts, for the first $t _ { 0 }$ epochs the images in the dataset are downsampled to $8 \times 8$ and then upsampled back to $3 2 \times 3 2$ using bilinear interpolation, in practice blurring the image and destroying small-scale details.1 After that, the training continues for 160 more epochs, giving the network time to converge and ensuring it is exposed to the same number of uncorrupted images as in the control $t _ { 0 } = 0$ ) experiment.
|
| 43 |
+
|
| 44 |
+
DNNs exhibit critical periods: In Figure 1, we plot the final performance of a network affected by the deficit as a function of the epoch $t _ { 0 }$ at which the deficit is corrected. We can readily observe the existence of a critical period: If the blur is not removed within the first 40-60 epochs, the final performance is severely decreased when compared to the baseline (up to a threefold increase in error). The decrease in performance follows trends commonly observed in animals, and may be qualitatively compared, for example, to the loss of visual acuity observed in kittens monocularly deprived from birth as a function of the length of the deficit (Mitchell, 1988).2
|
| 45 |
+
|
| 46 |
+
We can measure more accurately the sensitivity to a blur deficit during learning by introducing the deficit in a short window of constant length (40 epochs), starting at different epochs, and then measure the decrease in the DNN’s final performance compared to the baseline (Figure 1). Doing this, we observe that the sensitivity to the deficit peaks in the central part of the early rapid learning phase (at around 30 epochs), while introducing the deficit later produces little or no effect. A similar experiment performed on kittens, using a window of 10-12 days during which the animals are monocularly deprived, again shows a remarkable similarity between the profiles of the sensitivity curves (Olson & Freeman, 1980).
|
| 47 |
+
|
| 48 |
+
High-level deficits are not associated with a critical period: A natural question is whether any change in the input data distribution will have a corresponding critical period for learning. This is not the case for neuronal networks, which remain plastic enough to adapt to high-level changes in sensory processing (Daw, 2014). For example, it is well-reported that even adult humans can rapidly adapt to certain drastic changes, such as the inversion of the visual field (Stratton, 1896; Kohler, 1964). In Figure 2, we observe that DNNs are also largely unaffected by high-level deficits – such as vertical flipping of the image, or random permutation of the output labels: After deficit correction, the network quickly recovers its baseline performance. This hints at a finer interplay between the structure of the data distribution and the optimization algorithm, resulting in the existence of a critical period.
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 3: Critical periods in different DNN architectures and optimization schemes. (Left) Effect of an image blur deficit in a ResNet architecture trained on CIFAR-10 with learning rate annealing and (Center) in a deep fully-connected network trained on MNIST with a fixed learning rate. Different architectures, using different optimization methods and trained on different datasets, still exhibit qualitatively similar critical period behavior. (Right) Same experiment as in Figure 1, but using a fixed learning rate instead of an annealing scheme. Although the time scale of the critical period is longer, the trends are similar, supporting the notion that critical periods cannot be explained solely in terms of the loss landscape of the optimization. (Bottom Left) Networks trained without weight decay have shorter and sharper critical periods. Gradually increasing the weight decay makes the critical period longer, until the point where it stops training properly. (Bottom Right) Using a different optimization method (Adam) we observe a similar behavior to standard SGD.
|
| 52 |
+
|
| 53 |
+
Sensory deprivation: We now apply to the network a more drastic deficit, where each image is replaced by white noise. Figure 2 shows hows this extreme deficit exhibits a remarkably less severe effect than the one obtained by only blurring images: Training the network with white noise does not provide any information on the natural images, and results in milder effects than those caused by a deficit (e.g., image blur), which instead conveys some information, but leads the network to (incorrectly) learn that no fine structure is present in the images. A similar effect has been observed in animals, where a period of early sensory deprivation (dark-rearing) can lengthen the critical period and thus cause less severe effects than those documented in light-reared animals (Mower, 1991). We refer the reader to Appendix C for a more detailed comparison between sensory deprivation and training on white noise.
|
| 54 |
+
|
| 55 |
+
Architecture, depth, and learning rate annealing: Figure 3 shows that a fully-connected network trained on the MNIST digit classification dataset also shows a critical period for the image blur deficit. Therefore, the convolutional structure is not necessary, nor is the use of natural images. Similarly, a ResNet-18 trained on CIFAR-10 also has a critical period, which is also remarkably sharper than the one found in a standard convolutional network (Figure 1). This is especially interesting, since ResNets allow for easier backpropagation of gradients to the lower layers, thus suggesting that the critical period is not caused by vanishing gradients. However, Figure 2 (Right) shows that the presence of a critical period does indeed depend critically on the depth of the network. In Figure 3, we confirm that a critical period exists even when the network is trained with a constant learning rate, and therefore cannot be explained by an annealed learning rate in later epochs.
|
| 56 |
+
|
| 57 |
+
Optimization method and weight decay: Figure 3 (Bottom Right) shows that when using Adam as the optimization scheme, which renormalizes the gradients using a running mean of their first two moments, we still observe a critical period similar to that of standard SGD. However, changing the hyperparameters of the optimization can change the shape of the critical period: In Figure 3 (Bottom Left) we show that increasing weight decay makes critical periods longer and less sharp. This can be explained as it both slows the convergence of the network, and it limits the ability of higher layers to change to overcome the deficit, thus encouraging lower layers to also learn new features.
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 4: Critical periods in DNNs are traced back to changes in the Fisher Information. (Left) Trace of the Fisher Information of the network weights as a function of the training epoch (blue line), showing two distinct phases of training: First, information sharply increases, but once test performance starts to plateau (green line), the information in the weights decreases during a “consolidation” phase. Eventually less information is stored, yet test accuracy improves slightly (green line). The weights’ Fisher Information correlates strongly with the networks sensitivity to critical periods, computed as in Figure 1 using both a window size of 40 and 60, and fitted here to the Fisher Information using a simple exponential fit. (Center) Recalling the connection between FIM ad connectivity, we may compare it to synaptic density during development in the visual cortex of macaques (Rakic et al., 1986). Here too, a rapid increase in connectivity is followed by elimination of synapses (pruning) continuing throughout life. (Right) Effects of critical period-inducing blurring on the Fisher Information: The impaired network uses more information to solve the task, compared to training in the absence of a deficit, since it is forced to memorize the labels case by case.
|
| 61 |
+
|
| 62 |
+
# 3 FISHER INFORMATION ANALYSIS
|
| 63 |
+
|
| 64 |
+
We have established empirically that, in animals and DNNs alike, the initial phases of training are critical to the outcome of the training process. In animals, this strongly relates to changes in the brain architecture of the areas associated with the deficit (Daw, 2014). This is inevitably different in artificial networks, since their connectivity is formally fixed at all times during training. However, not all the connections are equally useful to the network: Consider a network encoding the approximate posterior distribution $p _ { w } ( y | x )$ , parameterized by the weights $w$ , of the task variable $y$ given an input image $x$ . The dependency of the final output from a specific connection can be estimated by perturbing the corresponding weight and looking at the magnitude of the change in the final distribution. Specifically, given a perturbation $w ^ { \prime } = w + \delta w$ of the weights, the discrepancy between the $p _ { w } ( y | x )$ and the perturbed network output $p _ { w ^ { \prime } } ( y | x )$ can be measured by their KullbackLeibler divergence, which, to second-order approximation, is given by:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r } { \mathbb { E } _ { x } \operatorname { K L } \big ( p _ { w ^ { \prime } } ( y | x ) \| p _ { w } ( y | x ) \big ) = \delta w \cdot F \delta w + o ( \delta w ^ { 2 } ) , } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where the expectation over $x$ is computed using the empirical data distribution $\hat { Q } ( x )$ given by the dataset, and
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
F : = \mathbb { E } _ { x \sim \hat { Q } ( x ) } \mathbb { E } _ { y \sim p _ { w } ( y | x ) } [ \nabla _ { w } \log p _ { w } ( y | x ) \nabla _ { w } \log p _ { w } ( y | x ) ^ { T } ]
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
is the Fisher Information Matrix (FIM). The FIM can thus be considered a local metric measuring how much the perturbation of a single weight (or a combination of weights) affects the output of the network (Amari $\&$ Nagaoka, 2000). In particular, weights with low Fisher Information can be changed or “pruned” with little effect on the network’s performance. This suggests that the Fisher Information can be used as a measure of the effective connectivity of a DNN, or, more generally, of the “synaptic strength” of a connection (Kirkpatrick et al., 2017). Finally, the FIM is also a semidefinite approximation of the Hessian of the loss function (Martens, 2014) and hence of the curvature of the loss landscape at a particular point $w$ during training, providing an elegant connection between the FIM and the optimization procedure (Amari & Nagaoka, 2000), which we will also employ later.
|
| 77 |
+
|
| 78 |
+
Unfortunately, the full FIM is too large to compute. Rather, we use its trace to measure the global or layer-wise connection strength, which we can compute efficiently using (Appendix A):
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathrm { t r } ( F ) = \mathbb { E } _ { \boldsymbol { x } \sim \hat { Q } ( \boldsymbol { x } ) } \mathbb { E } _ { \boldsymbol { y } \sim p _ { w } ( \boldsymbol { y } \vert \boldsymbol { x } ) } [ \Vert \nabla _ { w } \log p _ { w } ( \boldsymbol { y } \vert \boldsymbol { x } ) \Vert ^ { 2 } ] .
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
In order to capture the behavior of the off-diagonal terms, we also tried computing the logdeterminant of the full matrix using the Kronecker-Factorized approximation of Martens & Grosse (2015), but we observed the same qualitative trend as the trace. Since the FIM is a local measure, it is very sensitive to the irregularities of the loss landscape. Therefore, in this section we mainly use ResNets, which have a relatively smooth landscape (Li et al., 2018). For other architectures we use instead a more robust estimator of the FIM based on the injection of noise in the weights (Achille & Soatto, 2018), also described in Appendix A.
|
| 85 |
+
|
| 86 |
+
Two phases of learning: As its name suggests, the FIM can be thought as a measure of the quantity of information about the training data that is contained in the model (Fisher, 1925). Based on this, one would expect the overall strength of the connections to increase monotonically as we acquire information from experience. However, this is not the case: While during an initial phase the network acquires information about the data, which results in a large increase in the strength of the connections, once the performance in the task begins to plateau, the network starts decreasing the overall strength of its connections. However, this does not correspond to a reduction in performance, rather, performance keeps slowly improving. This can be seen as a “forgetting, or “compression” phase, during which redundant connections are eliminated and non-relevant variability in the data is discarded. It is well-established how the elimination (“pruning”) of unnecessary synapses is a fundamental process during learning and brain development (Rakic et al., 1986) (Figure 4, Center); in Figure 4 (Left) an analogous phenomenon is clearly and quantitatively shown for DNNs.
|
| 87 |
+
|
| 88 |
+
Strikingly, these changes in the connection strength are closely related to the sensitivity to criticalperiod-inducing deficits such as image blur, computed using the “sliding window” method as in Figure 1. In Figure 4 we see that the sensitivity closely follows the trend of the FIM. This is remarkable since the FIM is a local quantity computed at a single point during the training of a network in the absence of deficit, while sensitivity during a critical period is computed, using test data, at the end of the impaired network training. Figure 4 (Right) further emphasizes the effect of deficits on the FIM: in the presence of a deficit, the FIM grows and remains substantially higher even after the deficit is removed. This may be attributed to the fact that, when the data are so corrupted that classification is impossible, the network is forced to memorize the labels, therefore increasing the quantity of information needed to perform the same task.
|
| 89 |
+
|
| 90 |
+
Layer-wise effects of deficits: A layer-wise analysis of the FIM sheds further light on how the deficit affects the network. When the network (in this case All-CNN, which has a clearer division among layers than ResNet) is trained without deficits, the most important connections are in the intermediate layers (Figure 5, Left), which can process the input CIFAR-10 image at the most informative intermediate scale. However, if the network is initially trained on blurred data (Figure 5, top right), the strength of the connections is dominated by the top layer (Layer 6). This is to be expected, since the low-level and mid-level structures of the images are destroyed, making the lower layers ineffective. However, if the deficit is removed early in the training (Figure 5, top center), the network manages to “reorganize”, reducing the information contained in the last layer, and, at the same time, increasing the information in the intermediate layers. We refer to these phenomena as changes in “Information Plasticity”. If, however, the data change occurs after the consolidation phase, the network is unable to change its effective connectivity: The connection strength of each layer remains substantially constant. The network has lost its Information Plasticity and is past its critical period.
|
| 91 |
+
|
| 92 |
+
Critical periods as bottleneck crossings: The analysis of the FIM also sheds light on the geometry of the loss function and the learning dynamics. Since the FIM can be interpreted as the local curvature of the residual landscape, Fig. 4 shows that learning entails crossing bottlenecks: In the initial phase the network enters regions of high curvature (high Fisher Information), and once consolidation begins, the curvature decreases, allowing it to cross the bottleneck and enter the valley below. If the statistics change after crossing the bottleneck, the network is trapped. In this interpretation, the early phases of convergence are critical in leading the network towards the “right” final valley. The end of critical periods comes after the network has crossed all bottlenecks (and thus learned the features) and entered a wide valley (region of the weight space with low curvature, or low Fisher Information).
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 5: Normalized quantity of information contained in the weights of each layer as a function of the training epoch. (Top Left) In the absence of deficits, the network relies mostly on the middle layers (3-4-5) to solve the task. (Top Right) In the presence of an image blur deficit until epoch 100, more resources are allocated to the higher layers (6-7) rather than to the middle layers. The blur deficit destroys low- and mid-level features processed by those layers, leaving only the global features of the image, which are processed by the higher layers. Even if the deficit is removed, the middle layers remain underdeveloped. (Top Center) When the deficit is removed at an earlier epoch, the layers can partially reconfigure (notice, e.g., the fast loss of information of layer 6), resulting in less severe long-term consequences. We refer to the redistribution of information and the relative changes in effective connectivity as “Information Plasticity”. (Bottom row) Same plots, but using a vertical flip deficit, which does not induce a critical period. As expected, the quantity of information in the layers is not affected.
|
| 96 |
+
|
| 97 |
+
# 4 DISCUSSION AND RELATED WORK
|
| 98 |
+
|
| 99 |
+
Critical periods have thus far been considered an exclusively biological phenomenon. At the same time, the analysis of DNNs has focused on asymptotic properties and neglected the initial transient behavior. To the best of our knowledge, we are the first to show that artificial neural networks exhibit critical period phenomena, and to highlight the critical role of the transient in determining the asymptotic performance of the network. Inspired by the role of synaptic connectivity in modulating critical periods, we introduce the use of Fisher Information to study this initial phase. We show that the initial sensitivity to deficits closely follows changes in the FIM, both global, as the network first rapidly increases and then decreases the amount of stored information, and layer-wise, as the network “reorganizes” its effective connectivity in order to optimally process information.
|
| 100 |
+
|
| 101 |
+
Our work naturally relates to the extensive literature on critical periods in biology. Despite artificial networks being an extremely reductionist approximation of neuronal networks, they exhibit behaviors that are qualitatively similar to the critical periods observed in human and animal models. Our information analysis shows that the initial rapid memorization phase is followed by a loss of Information Plasticity which, counterintuitively, further improves the performance. On the other hand, when combined with the analysis of Achille & Soatto (2018) this suggests that a “forgetting” phase may be desirable, or even necessary, in order to learn robust, nuisance-invariant representations.
|
| 102 |
+
|
| 103 |
+
The existence of two distinct phases of training has been observed and discussed by Shwartz-Ziv & Tishby (2017), although their analysis builds on the (Shannon) information of the activations, rather than the (Fisher) information in the weights. On a multi-layer perceptron (MLP), Shwartz-Ziv & Tishby (2017) empirically link the two phases to a sudden increase in the gradients’ covariance. It may be tempting to compare these results with our Fisher Information analysis. However, it must be noted that the FIM is computed using the gradients with respect to the model prediction, not to the ground truth label, leading to important qualitative differences. In Figure 6, we show that the covariance and norm of the gradients exhibit no clear trends during training with and without deficits, and, therefore, unlike the FIM, do not correlate with the sensitivity to critical periods. However, a connection between our FIM analysis and the information in the activations can be established based on the work of Achille & Soatto (2018), which shows that the FIM of the weights can be used to bound the information in the activations. In fact, we may intuitively expect that pruning of connections naturally leads to loss of information in the corresponding activations. Thus, our analysis corroborates and expands on some of the claims of Shwartz-Ziv & Tishby (2017), while using an independent framework.
|
| 104 |
+
|
| 105 |
+
Aside from being more closely related to the deficit sensitivity during critical periods, Fisher’s Information also has a number of technical advantages: Its diagonal is simple to estimate, even on modern state-of-the-art architectures and compelling datasets, and it is less sensitive to the choice estimator of mutual information, avoiding some of the common criticisms to the use of information quantities in the analysis of deep learning models. Finally, the FIM allows us to probe fine changes in the effective connectivity across the layers of the network (Figure 5), which are not visible in Shwartz-Ziv & Tishby (2017).
|
| 106 |
+
|
| 107 |
+
A complete analysis of the activations should account not only for the amount of information (both task- and nuisance-related), but also for its accessibility, e.g., how easily task-related information can be extracted by a linear classifier. Following a similar idea, Montavon et al. (2011) aim to study the layer-wise, or “spatial” (but not temporal) evolution of the simplicity of the representation by performing a principal component analysis (PCA) of a radial basis function (RBF) kernel embedding of each layer representation. They show that, on a multi-layer perceptron, task-relevant information increasingly concentrate on the first principal components of the representation’s embedding, implying that they become more easily “accessible” layer after layer, while nuisance information (when it is codified at all) is encoded in the remaining components. In our work we instead focus on the temporal evolution of the weights. However, it’s important to notice that a network with simpler weights (as measured by the FIM) also requires a simpler smooth representation (as measured, e.g., by the RBF embedding) in order to operate properly, since it needs to be resistant to perturbations of the weights. Thus our analysis is wholly compatible with the intuitions of Montavon et al. (2011). It would also be interesting to study the joint spatio-temporal evolution of the network using both frameworks at once.
|
| 108 |
+
|
| 109 |
+
One advantage of focusing on the information of the weights rather than on the activations, or behavior of the network, is to have a readout of the “effective connectivity” during critical periods, which can be compared to similar readouts in animals. In fact, “behavioral” readouts upon deficit removal, both in artificial and neuronal networks, can potentially be confounded by deficit-coping changes at different levels of the visual pathways (Daw, 2014; Knudsen, 2004). On the other hand, deficits in deprived animals are mirrored by abnormalities in the circuitry of the visual pathways, which we characterize in DNNs using the FIM to study its “effective connectivity”, i.e., the connections that are actually employed by the network to solve the task. Sensitivity to critical periods and the trace of the Fisher Information peak at the same epochs, in accord with the evidence that skill development and critical periods in neuronal networks are modulated by changes (generally experience-dependent) in synaptic plasticity (Knudsen, 2004; Hensch, 2004). Our layer-wise analysis of the Fisher Information (Figure 5) also shows that visual deficits reinforce higher layers to the detriment of intermediate layers, leaving low-level layers virtually untouched. If the deficit is removed after the critical period ends, the network is not able to reverse these effects. Although the two systems are radically different, a similar response can be found in the visual pathways of animal models: Lower levels (e.g., retina, lateral geniculate nucleus) and higher-level visual areas (e.g., V2 and post-V2) show little remodeling upon deprivation, while most changes happen in different layers of V1 (Wiesel & Hubel, 1963a; Hendrickson et al., 1987).
|
| 110 |
+
|
| 111 |
+
An insightful interpretation of critical periods in animal models was proposed by Knudsen (2004): The initial connections of neuronal networks are unstable and easily modified (highly plastic), but as more “samples” are observed, they change and reach a more stable configuration which is difficult to modify. Learning can, however, still happen within the newly created connectivity pattern. This is largely compatible with our findings: Sensitivity to critical-period-inducing deficits peaks when connections are remodeled (Figure 4, Left), and different connectivity profiles are observed in networks trained with and without a deficit (Figure 5). Moreover, high-level deficits such as imageflipping and label permutation, which do not require restructuring of the network’s connections in order to be corrected, do not exhibit a critical period.
|
| 112 |
+
|
| 113 |
+
Applying a deficit at the beginning of the training may be compared to the common practice of pretraining, which is generally found to improve the performance of the network. Erhan et al. (2010) study the somewhat related, but now seldom used, practice of layer-wise unsupervised pre-training, and suggest that it may act as a regularizer by moving the weights of the network towards an area of the loss landscape closer to the attractors for good solutions, and that early examples have a stronger effect in steering the network towards particular solutions. Here, we have shown that pre-training on blurred data can have the opposite effect; i.e., it can severely decrease the final performance of the network. However, in our case, interpreting the deficits effect as moving the network close to a bad attractor is difficult to reconcile with the smooth transition observed in the critical periods, since the network would either converge to this attractor, and thus have low accuracy, or escape completely.
|
| 114 |
+
|
| 115 |
+
Instead, we reconcile our experiments with the geometry of the loss function by introducing a different explanation based on the interpretation of the FIM as an approximation of the local curvature. Figure 4 suggests that SGD encounters two different phases during the network training: At first, the network moves towards high-curvature regions of the loss landscape, while in the second phase the curvature decreases and the network eventually converges to a flat minimum (as observed in Keskar et al. (2017)). We can interpret these as the network crossing narrow bottlenecks during its training in order to learn useful features, before eventually entering a flat region of the loss surface once learning is completed and ending up trapped there. When combining this assumption with our deficit sensitivity analysis, we can hypothesize that the critical period occurs precisely upon crossing of this bottleneck. It is also worth noticing how there is evidence that convergence to flat minima (minima with low curvature) in a DNN correlates with a good generalization performance (Hochreiter & Schmidhuber, 1997; Li et al., 2018; Chaudhari et al., 2017; Keskar et al., 2017). Indeed, using this interpretation, Figure 4 (Right) tells us that networks more affected by the deficit converge to sharper minima. However, we have also found that the performance of the network is already mostly determined during the early “sensitive” phase. The final sharpness at convergence may therefore be an epiphenomenon, rather than the cause of good generalization.
|
| 116 |
+
|
| 117 |
+
# 5 CONCLUSION
|
| 118 |
+
|
| 119 |
+
Our goal in this paper is not so much to investigate the human (or animal) brain through artificial networks, as to understand fundamental information processing phenomena, both in their biological or artificial implementations. It is also not our goal to suggest that, since they both exhibit critical periods, DNNs are necessarily a valid model of neurobiological information processing, although recent work has emphasized this aspect. We engage in an “Artificial Neuroscience” exercise in part to address a technological need to develop “explainable” artificial intelligence systems whose behavior can be understood and predicted. While traditionally well-understood mathematical models were used by neuroscientists to study biological phenomena, information processing in modern artificial networks is often just as poorly understood as in biology, so we chose to exploit well-known biological phenomena as probes to study information processing in artificial networks.
|
| 120 |
+
|
| 121 |
+
Conversely, it would also be interesting to explore ways to test whether biological networks prune connections as a consequences of a loss of Information Plasticity, rather than as a cause. The mechanisms underlying network reconfiguration during learning and development might be an evolutionary outcome obtained under the pressure of fundamental information processing phenomena.
|
| 122 |
+
|
| 123 |
+
# ACKNOWLEDGEMENTS
|
| 124 |
+
|
| 125 |
+
We thank the anonymous reviewers for their thoughtful feedback, and for suggesting new experiments and relevant literature. Supported by ONR N00014-17-1-2072, ARO W911NF-17-1-0304, AFOSR FA9550-15-1-0229 and FA8650-11-1-7156.
|
| 126 |
+
|
| 127 |
+
# REFERENCES
|
| 128 |
+
|
| 129 |
+
Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations. Journal of Machine Learning Research, 19(1):1947–1980, 2018.
|
| 130 |
+
|
| 131 |
+
Shun-ichi Amari and Hiroshi Nagaoka. Methods of information geometry, volume 191 of Translations of Mathematical Monographs. American Mathematical Society and Oxford University Press, 2000.
|
| 132 |
+
|
| 133 |
+
Martin S Banks, Richard N Aslin, and Robert D Letson. Sensitive period for the development of human binocular vision. Science, 190(4215):675–677, 1975.
|
| 134 |
+
|
| 135 |
+
Pratik Chaudhari, Anna Choromanska, Stefano Soatto, Yann LeCun, Carlo Baldassi, Christian Borgs, Jennifer Chayes, Levent Sagun, and Riccardo Zecchina. Entropy-sgd: Biasing gradient descent into wide valleys. In Proceedings of the International Conference on Learning Representations, 2017.
|
| 136 |
+
|
| 137 |
+
Nigel W Daw. Visual Development. Springer, New York, NY, 3rd edition, 2014.
|
| 138 |
+
|
| 139 |
+
Dumitru Erhan, Yoshua Bengio, Aaron Courville, Pierre-Antoine Manzagol, Pascal Vincent, and Samy Bengio. Why does unsupervised pre-training help deep learning? Journal of Machine Learning Research, 11(Feb):625–660, 2010.
|
| 140 |
+
|
| 141 |
+
Ronald Aylmer Fisher. Theory of statistical estimation. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 22, pp. 700–725. Cambridge University Press, 1925.
|
| 142 |
+
|
| 143 |
+
Fred Giffin and Donald E Mitchell. The rate of recovery of vision after early monocular deprivation in kittens. The Journal of Physiology, 274(1):511–537, 1978.
|
| 144 |
+
|
| 145 |
+
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.
|
| 146 |
+
|
| 147 |
+
Anita E Hendrickson, JA Movshon, Howard M Eggers, Martin S Gizzi, RG Boothe, and Lynne Kiorpes. Effects of early unilateral blur on the macaque’s visual system. ii. anatomical observations. Journal of Neuroscience, 7(5):1327–1339, 1987.
|
| 148 |
+
|
| 149 |
+
Takao K Hensch. Critical period regulation. Annuual review of neuroscience, 27:549–579, 2004.
|
| 150 |
+
|
| 151 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997.
|
| 152 |
+
|
| 153 |
+
Eric R Kandel, James H Schwartz, Thomas M Jessell, Steven A Siegelbaum, and A James Hudspeth. Principles of Neural Science. McGraw-Hill, New York, NY, 5th edition, 2013.
|
| 154 |
+
|
| 155 |
+
Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In Proceedings of the International Conference on Learning Representations, 2017.
|
| 156 |
+
|
| 157 |
+
Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. In Advances in Neural Information Processing Systems, pp. 2575–2583, 2015.
|
| 158 |
+
|
| 159 |
+
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.
|
| 160 |
+
|
| 161 |
+
Eric I Knudsen. Sensitive periods in the development of the brain and behavior. Journal of cognitive neuroscience, 16(8):1412–1425, 2004.
|
| 162 |
+
|
| 163 |
+
Ivo Kohler. The formation and transformation of the perceptual world. Psychological Issues Monographs. International Universities Press, Inc., New York, NY, 1964.
|
| 164 |
+
|
| 165 |
+
Masakazu Konishi. Birdsong: from behavior to neuron. Annual review of neuroscience, 8(1):125– 170, 1985.
|
| 166 |
+
|
| 167 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 168 |
+
|
| 169 |
+
Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape of neural nets. In Advances in Neural Information Processing Systems, pp. 6391–6401, 2018.
|
| 170 |
+
|
| 171 |
+
James Martens. New insights and perspectives on the natural gradient method. arXiv preprint arXiv:1412.1193, 2014.
|
| 172 |
+
|
| 173 |
+
James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. Proceedings of International Conference on Machine Learning, 37:2408–2417, 2015.
|
| 174 |
+
Donald E Mitchell. The extent of visual recovery from early monocular or binocular visual deprivation in kittens. The Journal of physiology, 395(1):639–660, 1988.
|
| 175 |
+
Gregoire Montavon, Mikio L Braun, and Klaus-Robert M ´ uller. Kernel analysis of deep networks.¨ Journal of Machine Learning Research, 12(Sep):2563–2581, 2011.
|
| 176 |
+
George D Mower. The effect of dark rearing on the time course of the critical period in cat visual cortex. Developmental Brain Research, 58(2):151–158, 1991.
|
| 177 |
+
Carl R Olson and Ralph D Freeman. Profile of the sensitive period for monocular deprivation in kittens. Experimental Brain Research, 39(1):17–21, 1980.
|
| 178 |
+
Pasko Rakic, Jean-Pierre Bourgeois, Maryellen F Eckenhoff, Nada Zecevic, and Patricia S Goldman-Rakic. Concurrent overproduction of synapses in diverse regions of the primate cerebral cortex. Science, 232(4747):232–235, 1986.
|
| 179 |
+
Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
|
| 180 |
+
Jost T Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. arXiv preprint arXiv:1412.6806, 2014.
|
| 181 |
+
George M Stratton. Some preliminary experiments on vision without inversion of the retinal image. Psychological Review, 3(6):611–617, 1896.
|
| 182 |
+
David Taylor et al. Critical period for deprivation amblyopia in children. Transactions of the ophthalmological societies of the United Kingdom, 99(3):432–439, 1979.
|
| 183 |
+
Gunter K von Noorden. New clinical aspects of stimulus deprivation amblyopia. American journal of ophthalmology, 92(3):416–421, 1981.
|
| 184 |
+
Torsten N Wiesel. Postnatal development of the visual cortex and the influence of environment. Nature, 299(5884):583, 1982.
|
| 185 |
+
Torsten N Wiesel and David H Hubel. Single-cell responses in striate cortex of kittens deprived of vision in one eye. Journal of neurophysiology, 26(6):1003–1017, 1963a.
|
| 186 |
+
Torsten N Wiesel and David H Hubel. Effects of visual deprivation on morphology and physiology of cells in the cat’s lateral geniculate body. Journal of neurophysiology, 26(6):978–993, 1963b.
|
| 187 |
+
|
| 188 |
+
# A DETAILS OF THE EXPERIMENTS
|
| 189 |
+
|
| 190 |
+
# A.1 ARCHITECTURES AND TRAINING
|
| 191 |
+
|
| 192 |
+
In all of the experiments, unless otherwise stated, we use the following All-CNN architecture, adapted from Springenberg et al. (2014):
|
| 193 |
+
|
| 194 |
+
conv 96 - conv 96 - conv 192 s2 - conv 192 - conv 192 - conv 192 s2 - conv 192 - conv1 192 - conv1 10 - avg. pooling - softmax where each conv block consists of a $3 \times 3$ convolution, batch normalization and ReLU activations. conv1 denotes a $1 \times 1$ convolution. The network is trained with SGD, with a batch size of 128, learning rate starting from 0.05 and decaying smoothly by a factor of .97 at each epoch. We also use weight decay with coefficient 0.001. In the experiments with a fixed learning rate, we fix the learning rate to 0.001, which we find to allow convergence without excessive overfitting. For the ResNet experiments, we use the ResNet-18 architecture from He et al. (2016) with initial learning rate 0.1, learning rate decay .97 per epoch, and weight decay 0.0005. When training with Adam, we use a learning rate of 0.001 and weight decay 0.0001.
|
| 195 |
+
|
| 196 |
+
When experimenting with varying network depths, we use the following architecture:
|
| 197 |
+
|
| 198 |
+
In order to avoid interferences between the annealing scheme and the architecture, in these experiments we fix the learning rate to 0.001.
|
| 199 |
+
|
| 200 |
+
The Fully Connected network used for the MNIST experiments has hidden layers of size [2500, 2000, 1500, 1000, 500]. All hidden layers use batch normalization followed by ReLU activations. We fix the learning rate to 0.005. Weight decay is not used. We use data augmentation with random translations up to 4 pixels and random horizontal flipping. For MNIST, we pad the images with zeros to bring them to size $3 2 \times 3 2$ .
|
| 201 |
+
|
| 202 |
+
# A.2 APPROXIMATIONS OF THE FISHER INFORMATION MATRIX
|
| 203 |
+
|
| 204 |
+
To compute the trace of the Fisher Information Matrix, we use the following expression derived directly from the definition:
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
\begin{array} { r l } & { \mathrm { t r } ( F ) = \mathbb { E } _ { x \sim \hat { Q } ( x ) } \mathbb { E } _ { y \sim p _ { w } ( y \vert x ) } [ \mathrm { t r } ( \nabla _ { w } \log p _ { w } ( y \vert x ) \nabla _ { w } \log p _ { w } ( y \vert x ) ^ { T } ) ] } \\ & { \quad \quad \quad = \mathbb { E } _ { x \sim \hat { Q } ( x ) } \mathbb { E } _ { y \sim p _ { w } ( y \vert x ) } [ \Vert \nabla _ { w } \log p _ { w } ( y \vert x ) \Vert ^ { 2 } ] , } \end{array}
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
where the input image $x$ is sampled from the dataset, while the label $y$ is sampled from the output posterior. Expectations are approximated by Monte-Carlo sampling. Notice, however, that this expression depends only on the local gradients of the loss with respect to the weights at a point $w = w _ { 0 }$ , so it can be noisy when the loss landscape is highly irregular. This is not a problem for ResNets Li et al. (2018), but for other architectures we use instead a different technique, proposed in Achille & Soatto (2018). More in detail, let $L ( w )$ be the standard cross-entropy loss. Given the current weights $w _ { 0 }$ of the network, we find the diagonal matrix $\Sigma$ that minimizes:
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
L ^ { \prime } = \mathbb { E } _ { w \sim N ( w _ { 0 } , \Sigma ) } [ L ( w ) ] - \beta \log | \Sigma | ,
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
where $\beta$ is a parameter that controls the smoothness of the approximation. Notice that $L ^ { \prime }$ can be minimized efficiently using the method in Kingma et al. (2015). To see how this relates to the Fisher Information Matrix, assume that $L ( w )$ can be approximated locally in $w _ { 0 }$ as $L ( w ) =$ $L _ { 0 } + a \cdot w + w \cdot H w$ . We can then rewrite $L ^ { \prime }$ as
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\begin{array} { r } { L ^ { \prime } = L _ { 0 } + \mathrm { t r } ( \Sigma H ) - \beta \log | \Sigma | . } \end{array}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
Taking the derivative with respect to $\Sigma$ , and setting it to zero, we obtain $\Sigma _ { i i } = \beta / H _ { i i }$ . We can then use $\Sigma$ to estimate the trace of the Hessian, and hence of the Fisher information.
|
| 223 |
+
|
| 224 |
+
# A.3 CURVE FITTING
|
| 225 |
+
|
| 226 |
+
Fitting of sensitivity curves and synaptic density profiles from the literature was performed using:
|
| 227 |
+
|
| 228 |
+
$$
|
| 229 |
+
f ( t ) = \mathrm { e } ^ { - ( t - d ) / \tau _ { 1 } } - k \mathrm { e } ^ { - ( t - d ) / \tau _ { 2 } }
|
| 230 |
+
$$
|
| 231 |
+
|
| 232 |
+
as the fitting equation, where $t$ is the age at the time of sampling and $\tau _ { 1 } , \tau _ { 2 } , k$ and $d$ are unconstrained parameters (Banks et al., 1975).
|
| 233 |
+
|
| 234 |
+
The exponential fit of the sensitivity to the Fisher Information trace uses the expression
|
| 235 |
+
|
| 236 |
+
$$
|
| 237 |
+
F ( t ) = a \exp ( c S _ { k } ( t ) ) + b ,
|
| 238 |
+
$$
|
| 239 |
+
|
| 240 |
+
where $a$ , $b$ and $c$ are unconstrained parameters, $F ( t )$ is the Fisher Information trace at epoch $t$ of the training of a network without deficits and $S _ { k }$ is the sensitivity computed using a window of size $k$ . That is, $S _ { k } ( t )$ is the increase in the final test error over a baseline when the network is trained in the presence of a deficit between epochs $t$ and $t + k$ .
|
| 241 |
+
|
| 242 |
+
# B ADDITIONAL PLOTS
|
| 243 |
+
|
| 244 |
+

|
| 245 |
+
Figure 6: Log of the norm of the gradient means (solid line) and standard deviation (dashed line) during training when: (Left) No deficit is present, (Center) A blur deficit is present until epoch 70, and (Right) a deficit is present until the last epoch. Notice that the presence of a deficit does not decrease the magnitude of the gradients propagated to the first layers during the last epochs, rather it seems to increase it, suggesting that vanishing gradients are not the cause of the critical period for the blurring deficit.
|
| 246 |
+
|
| 247 |
+

|
| 248 |
+
Figure 7: Same plot as in Figure 5, but for a noise deficit. Unlike with blur, much more resources are allocated to the lower-layers rather than higher-layers. This may explain why it is easier for the network to reconfigure to solve the task after the deficit is removed.
|
| 249 |
+
|
| 250 |
+

|
| 251 |
+
Figure 8: Visualization of the filters of the first layer of the network used for the experiment in Figure 1. In absence of a deficit, the network learns high-frequency filters, as seen by the fact that many filters are not smooth (first picture). However, when a blurring deficit is present, the network learns only smooth filters corresponding to low-frequencies of the input (third picture). If the deficit is removed after the end of the critical period, the network does not manage to learn high-frequency filters (second picture).
|
| 252 |
+
|
| 253 |
+
# C EXPERIMENTAL DESIGN AND COMPARISON WITH ANIMAL MODELS
|
| 254 |
+
|
| 255 |
+
Critical periods are task- and deficit-specific. The specific task we address is visual acuity, but the performance is necessarily measured through different mechanisms in animals and Artificial Neural Networks. In animals, visual acuity is traditionally measured by testing the ability to discriminate between black-and-white contrast gratings (with varying spatial frequency) and a uniform gray field. The outcome of such tests generally correlates well with the ability of the animal to use the eye to solve other visual tasks relying on acuity. Convolutional Neural Networks, on the other hand, have a very different sensory processing mechanism (based on heavily quantized data), which may trivialize such a test. Rather, we directly measure the performance of the network on an high-level task, specifically image classification, for which CNNs are optimized.
|
| 256 |
+
|
| 257 |
+
We chose to simulate cataracts in our DNN experiments, a deficit which allows us to explore its complex interactions with the structure of the data and the architecture of the network. Unfortunately, while the overall trends of cataract-induced critical periods have been studied and understood in animal models, there is not enough data to confidently regress sensibility curves comparable to those obtained in DNNs. For this reason, in Figure 1 we compare the performance loss in a DNN trained in the presence of a cataract-like deficit with the results obtained from monocularly deprived kittens, which exhibit similar trends and are one of the most common experimental paradigms in the visual neurosciences.
|
| 258 |
+
|
| 259 |
+
Simulating complete visual deprivation in a neural network is not as simple as feeding a constant stimulus: a network presented with a constant blank input will rapidly become trivial and thus unable to train on new data. This is to be expected, since a blank input is a perfectly predictable stimulus and thus the network can quickly learn the (trivial) solution to the task. We instead wanted to model an uninformative stimulus, akin to noise. Moreover, even when the eyes are sutured or maintained in the darkness, there will be background excitation of photoreceptors that is best modeled as noise. To account for this, we simulate sensory deprivation by replacing the input images with a dataset composed of (uninformative) random Gaussian noise. This way the network is trained on solving the highly non-trivial task of memorizing the association between the finitely-many noise patterns and their corresponding labels.
|
md/train/BkfbpsAcF7/BkfbpsAcF7.md
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EXCESSIVE INVARIANCE CAUSES ADVERSARIAL VULNERABILITY
|
| 2 |
+
|
| 3 |
+
Jorn-Henrik Jacobsen ¨ 1∗, Jens Behrmann1,2, Richard Zemel1, Matthias Bethge3
|
| 4 |
+
|
| 5 |
+
1Vector Institute and University of Toronto 2University of Bremen, Center for Industrial Mathematics 3University of Tubingen ¨ ∗j.jacobsen@vectorinstitute.ai
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Despite their impressive performance, deep neural networks exhibit striking failures on out-of-distribution inputs. One core idea of adversarial example research is to reveal neural network errors under such distribution shifts. We decompose these errors into two complementary sources: sensitivity and invariance. We show deep networks are not only too sensitive to task-irrelevant changes of their input, as is well-known from $\epsilon$ -adversarial examples, but are also too invariant to a wide range of task-relevant changes, thus making vast regions in input space vulnerable to adversarial attacks. We show such excessive invariance occurs across various tasks and architecture types. On MNIST and ImageNet one can manipulate the class-specific content of almost any image without changing the hidden activations. We identify an insufficiency of the standard cross-entropy loss as a reason for these failures. Further, we extend this objective based on an informationtheoretic analysis so it encourages the model to consider all task-dependent features in its decision. This provides the first approach tailored explicitly to overcome excessive invariance and resulting vulnerabilities.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Top-1: Bullfrog Top-2:Acorn Top-3:Garter snake
|
| 15 |
+
Figure 1: All images shown cause a competitive ImageNet-trained network to output the exact same probabilities over all 1000 classes (logits shown above each image). The leftmost image is from the ImageNet validation set; all other images are constructed such that they match the non-class related information of images taken from other classes (for details see section 2.1). The excessive invariance revealed by this set of adversarial examples demonstrates that the logits contain only a small fraction of the information perceptually relevant to humans for discrimination between the classes.
|
| 16 |
+
|
| 17 |
+
Adversarial vulnerability is one of the most iconic failure cases of modern machine learning models (Szegedy et al., 2013) and a prime example of their weakness in out-of-distribution generalization. It is particularly striking that under i.i.d. settings deep networks show superhuman performance on many tasks (LeCun et al., 2015), while tiny targeted shifts of the input distribution can cause them to make unintuitive mistakes. The reason for these failures and how they may be avoided or at least mitigated is an active research area (Schmidt et al., 2018; Gilmer et al., 2018b; Bubeck et al., 2018).
|
| 18 |
+
|
| 19 |
+
So far, the study of adversarial examples has mostly been concerned with the setting of small perturbation, or $\epsilon$ -adversaries (Goodfellow et al., 2015; Madry et al., 2017; Raghunathan et al., 2018).
|
| 20 |
+
|
| 21 |
+
Perturbation-based adversarial examples are appealing because they allow to quantitatively measure notions of adversarial robustness (Brendel et al., 2018). However, recent work argued that the perturbation-based approach is unrealistically restrictive and called for the need of generalizing the concept of adversarial examples to the unrestricted case, including any input crafted to be misinterpreted by the learned model (Song et al., 2018; Brown et al., 2018). Yet, settings beyond $\epsilon$ -robustness are hard to formalize (Gilmer et al., 2018a).
|
| 22 |
+
|
| 23 |
+
We argue here for an alternative, complementary viewpoint on the problem of adversarial examples. Instead of focusing on transformations erroneously crossing the decision-boundary of classifiers, we focus on excessive invariance as a major cause for adversarial vulnerability. To this end, we introduce the concept of invariance-based adversarial examples and show that class-specific content of almost any input can be changed arbitrarily without changing activations of the network, as illustrated in figure 1 for ImageNet. This viewpoint opens up new directions to analyze and control crucial aspects underlying vulnerability to unrestricted adversarial examples.
|
| 24 |
+
|
| 25 |
+
The invariance perspective suggests that adversarial vulnerability is a consequence of narrow learning, yielding classifiers that rely only on few highly predictive features in their decisions. This has also been supported by the observation that deep networks strongly rely on spectral statistical regularities (Jo & Bengio, 2017), or stationary statistics (Gatys et al., 2017) to make their decisions, rather than more abstract features like shape and appearance. We hypothesize that a major reason for this excessive invariance can be understood from an information-theoretic viewpoint of crossentropy, which maximizes a bound on the mutual information between labels and representation, giving no incentive to explain all class-dependent aspects of the input. This may be desirable in some cases, but to achieve truly general understanding of a scene or an object, machine learning models have to learn to successfully separate essence from nuisance and subsequently generalize even under shifted input distributions.
|
| 26 |
+
|
| 27 |
+
Our contributions:
|
| 28 |
+
|
| 29 |
+
• We identify excessive invariance underlying striking failures in deep networks and formalize the connection to adversarial examples. We show invariance-based adversarial examples can be observed across various tasks and types of deep network architectures.
|
| 30 |
+
• We propose an invertible network architecture that gives explicit access to its decision space, enabling class-specific manipulations to images while leaving all dimensions of the representation seen by the final classifier invariant.
|
| 31 |
+
• From an information-theoretic viewpoint, we identify the cross-entropy objective as a major reason for the observed failures. Leveraging invertible networks, we propose an alternative objective that provably reduces excessive invariance and works well in practice.
|
| 32 |
+
|
| 33 |
+
# 2 TWO COMPLEMENTARY APPROACHES TO ADVERSARIAL EXAMPLES
|
| 34 |
+
|
| 35 |
+
In this section, we define pre-images and establish a link to adversarial examples.
|
| 36 |
+
|
| 37 |
+
Definition 1 (Pre-images / Invariance). Let $F : \mathbb { R } ^ { d } \mathbb { R } ^ { C }$ be a neural network, $F = f _ { L } \circ \cdot \cdot \cdot \circ f _ { 1 }$ with layers $f _ { i }$ and let $F _ { i }$ denote the network up to layer i. Further, let $D : \mathbb { R } ^ { d } \{ 1 , \dots , C \}$ be a classifier with $D = \arg \operatorname* { m a x } _ { k = 1 , \ldots , C } s o f t m a x ( F ( x ) ) _ { k }$ . Then, for input $\boldsymbol { x } \in \mathbb { R } ^ { d }$ , we define the following pre-images
|
| 38 |
+
|
| 39 |
+
(i) i-th Layer pre-image: $\{ x ^ { * } \in \mathbb { R } ^ { d } \mid F _ { i } ( x ^ { * } ) = F _ { i } ( x ) \}$ (ii) Logit pre-image: $\{ x ^ { * } \in \mathbb { R } ^ { d } \mid F ( x ^ { * } ) = F ( x ) \}$ (iii) Argmax pre-image: $\{ x ^ { * } \in \mathbb { R } ^ { d } \mid D ( x ^ { * } ) = D ( x ) \}$ , where $( i ) \subset ( i i ) \subset ( i i i )$ by the compositional nature of $D$ . Moreover, the (sub-)network is invariant to perturbations $\Delta x$ which satisfy $x ^ { * } = x + \Delta x$
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 2: Connection between (1) invariance-based (long pink arrow) and (2) perturbation-based adversarial examples (short orange arrow). Class distributions are shown in green and blue; dashed line is the decision-boundary of a classifier. All adversarial examples can be reached either by crossing the decision-boundary of the classifier via perturbations, or by moving within the pre-image of the classifier to mis-classified regions. The two viewpoints are complementary to one another and highlight that adversarial vulnerability is not only caused by excessive sensitivity to semantically meaningless perturbations, but also by excessive insensitivity to semantically meaningful transformations.
|
| 43 |
+
|
| 44 |
+
Non-trivial pre-images (pre-images containing more elements than input $x$ ) after the $i$ -th layer occur if the chain $f _ { i } \circ \cdots \circ f _ { 1 }$ is not injective, for instance due to subsampling or non-injective activation functions like ReLU (Behrmann et al., 2018a). This accumulated invariance can become problematic if not controlled properly, as we will show in the following.
|
| 45 |
+
|
| 46 |
+
We define perturbation-based adversarial examples by introducing the notion of an oracle (e.g., a human decision-maker or the unknown input-output function considered in learning theory):
|
| 47 |
+
|
| 48 |
+
Definition 2 (Perturbation-based Adversarial Examples). A Perturbation-based adversarial example $x ^ { * } \in \mathbb { R } ^ { d }$ of $x \in \mathbb { R } ^ { d }$ fulfills:
|
| 49 |
+
|
| 50 |
+
(i) Perturbation of decision: $D ( x ^ { * } ) \neq o ( x ^ { * } )$ and $D ( x ) \neq D ( x ^ { * } )$ , where $D : \mathbb { R } ^ { d } \{ 1 , \ldots , C \}$ is the classifier and $o : \mathbb { R } ^ { d } \{ 1 , . . . , C \}$ is the oracle.
|
| 51 |
+
|
| 52 |
+
(ii) Created by adversary: $x ^ { * } \in \mathbb { R } ^ { d }$ is created by an algorithm $\mathcal { A } : \mathbb { R } ^ { d } \mathbb { R } ^ { d }$ with $x \mapsto x ^ { * }$
|
| 53 |
+
|
| 54 |
+
Further, -bounded adversarial ex. $x ^ { * }$ of $x$ fulfill $\| x - x ^ { * } \| < \epsilon , \| \cdot \|$ a norm on $\mathbb { R } ^ { d }$ and $\epsilon > 0$ .
|
| 55 |
+
|
| 56 |
+
Usually, such examples are constructed as $\epsilon$ -bounded adversarial examples (Goodfellow et al., 2015). However, as our goal is to characterize general invariances of the network, we do not restrict ourselves to bounded perturbations.
|
| 57 |
+
|
| 58 |
+
Definition 3 (Invariance-based Adversarial Examples). Let $G$ denote the i-th layer, logits or the classifier (Definition 1) and let $x ^ { * } \neq x$ be in the $G$ pre-image of $x$ and and o an oracle (Definition 2). Then, an invariance-based adversarial example fulfills $o ( x ) \neq o ( x ^ { * } )$ , while $G ( x ) = G ( x ^ { * } )$ (and hence $D ( x ) = D ( x ^ { * } ) ,$ .
|
| 59 |
+
|
| 60 |
+
Intuitively, adversarial perturbations cause the output of the classifier to change while the oracle would still consider the new input $x ^ { * }$ as being from the original class. Hence in the context of $\epsilon$ - bounded perturbations, the classifier is too sensitive to task-irrelevant changes. On the other hand, movements in the pre-image leave the classifier invariant. If those movements induce a change in class as judged by the oracle, we call these invariance-based adversarial examples. In this case, however, the classifier is too insensitive to task-relevant changes. In conclusion, these two modes are complementary to each other, whereas both constitute failure modes of the learned classifier.
|
| 61 |
+
|
| 62 |
+
When not restricting to $\epsilon$ -perturbations, perturbation-based and invariance-based adversarial examples yield the same input $x ^ { * }$ via
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\begin{array} { r l } & { x ^ { * } = x _ { 1 } + \Delta x _ { 1 } , \quad D ( x ^ { * } ) \neq D ( x _ { 1 } ) , \quad o ( x ^ { * } ) = o ( x _ { 1 } ) } \\ & { x ^ { * } = x _ { 2 } + \Delta x _ { 2 } , \quad D ( x ^ { * } ) = D ( x _ { 2 } ) , \quad o ( x ^ { * } ) \neq o ( x _ { 2 } ) , } \end{array}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
with different reference points $x _ { 1 }$ and $x _ { 2 }$ , see Figure 2. Hence, the key difference is the change of reference, which allows us to approach these failure modes from different directions. To connect these failure modes with an intuitive understanding of variations in the data, we now introduce the notion of invariance to nuisance and semantic variations, see also (Achille & Soatto, 2018).
|
| 69 |
+
|
| 70 |
+
Definition 4 (Semantic/ Nuisance perturbation of an input). Let o be an oracle (Definition 2) and $\boldsymbol { x } \in \mathbb { R } ^ { d }$ . Then, a perturbation $\Delta x$ of an input $\boldsymbol { x } \in \mathbb { R } ^ { d }$ is called semantic, $i f o ( x ) \neq o ( x + \Delta x )$ and nuisance if $o ( x ) = o ( x + \Delta x )$ .
|
| 71 |
+
|
| 72 |
+
For example, such a nuisance perturbation could be a translation or occlusion in image classification. Further in Appendix A, we discuss the synthetic example called Adversarial Spheres from (Gilmer et al., 2018b), where nuisance and semantics can be explicitly formalized as rotation and norm scaling.
|
| 73 |
+
|
| 74 |
+
# 2.1 USING BIJECTIVE NETWORKS TO ANALYZE EXCESSIVE INVARIANCE
|
| 75 |
+
|
| 76 |
+
As invariance-based adversarial examples manifest themselves in changes which do not affect the output of the network $F$ , we need a generic approach that gives us access to the discarded nuisance variability. While feature nuisances are intractable to access for general architectures (see comment after Definition 1), invertible classifiers only remove nuisance variability in their final projection (Jacobsen et al., 2018). For $C < d$ , we denote the classifier as $D : \mathbb { R } ^ { d } \{ 1 , . . . , C \}$ . Our contributions in this section are: (1) Introduce an invertible architecture with a simplified readout structure, allowing to exactly visualize manipulations in the hidden-space, (2) Propose an analytic attack based on this architecture allowing to analyze its decision-making, (3) Reveal striking invariance-based vulnerability in competitive classifiers.
|
| 77 |
+
|
| 78 |
+
Bijective classifiers with simplified readout. We build deep networks that give access to their decision space by removing the final linear mapping onto the class probes in invertible RevNet-classifiers and call these networks fully invertible RevNets. The fully invertible RevNet classifier can be written as $\begin{array} { r l } { D _ { \theta } } & { { } = } \end{array}$ arg $\mathrm { m a x } _ { k = 1 , \ldots , C }$ sof tmax $( F _ { \theta } ( x ) _ { k } )$ , where $F _ { \theta }$ represents the bijective network. We denote $z = F _ { \theta } ( x )$ , $z _ { s } = z _ { 1 , . . . , C }$ as the logits (semantic variables) and $z _ { n } = z _ { C + 1 , \dots , d }$ as the nuisance variables ( $z _ { n }$ is not used for classification). In practice we choose the first C indices of the final $z$ tensor or apply a more sophiscticated DCT scheme (see appendix D) to set the subspace $z _ { s }$ , but other choices work as well. The architecture of the network is similar to iRevNets (Jacobsen et al., 2018) with some additional Glow components like actnorm (Kingma & Dhariwal, 2018), squeezing, dimension splitting and affine block structure (Dinh et al., 2017), see Figure 3 for a graphical description. As all components are common in the bijective network literature, we refer the reader to Appendix D for exact training and architecture details. Due to its simple readout structure, the resulting invertible network allows to qualitatively and quantitatively investigate the task-specific content in nuisance and logit variables. Despite this restriction, we achieve performance on par with commonly-used baselines on MNIST and ImageNet, see Table 1 and Appendix D.
|
| 79 |
+
|
| 80 |
+

|
| 81 |
+
Figure 3: The fully invertible RevNet, a hybrid of Glow and iRevNet with simple readout structure. $z _ { s }$ represents the logits and $z _ { n }$ the nuisance.
|
| 82 |
+
|
| 83 |
+
Table 1: The table shows error rates on the ILSVRC-2012 validation set of our proposed fully invertible RevNet compared to a VGG (Simonyan & Zisserman, 2014) and two ResNet (He et al., 2016) variants, as well as an iRevNet (Jacobsen et al., 2018) with a non-invertible final projection onto the logits. Our proposed fully invertible RevNet performs roughly on par with others.
|
| 84 |
+
|
| 85 |
+
<table><tr><td>% Error</td><td>fi-RevNet48(Ours)</td><td>VGG19</td><td>ResNet18</td><td>ResNet50</td><td>iRevNet300</td></tr><tr><td>ILSVRC2012 Val Top1</td><td>29.50</td><td>28.70</td><td>30.43</td><td>24.70</td><td>26.70</td></tr><tr><td>ILSVRC2012 Val Top5</td><td>11.30</td><td>9.90</td><td>10.80</td><td>7.89</td><td>1</td></tr></table>
|
| 86 |
+
|
| 87 |
+
Analytic attack. To analyze the trained models, we can sample elements from the logit pre-image by computing $x _ { m e t } = \dot { F } ^ { - 1 } ( z _ { s } , \tilde { z } _ { n } )$ , where $z _ { s }$ and $\tilde { z } _ { n }$ are taken from two different inputs. We term this heuristic metameric sampling. The samples would be from the true data distribution if the subspaces would be factorized as $P ( z _ { s } , z _ { n } ) = P ( z _ { s } ) P ( z _ { n } )$ . Experimentally we find that logit metamers are revealing adversarial subspaces and are visually close to natural images on ImageNet.
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 4: Left: Decision-boundaries in 2D subspace spanned by two random data points $x _ { 1 } , x _ { 2 }$ . Right: Decision-boundaries in 2D subspace spanned by random datapoint $x$ and metamer $x _ { m e t }$ .
|
| 91 |
+
|
| 92 |
+
Thus, metameric sampling gives us an analytic tool to inspect dependencies between semantic and nuisance variables without the need for expensive and approximate optimization procedures.
|
| 93 |
+
|
| 94 |
+
Attack on adversarial spheres. First, we evaluate our analytic attack on the synthetic spheres dataset, where the task is to classify samples as belonging to one out of two spheres with different radii. We choose the sphere dimensionality to be $d = 1 0 0$ and the radii: $R _ { 1 } = 1$ , $R _ { 2 } = 1 0$ . By training a fully-connected fully invertible RevNet, we obtain $100 \%$ accuracy. After training we visualize the decision-boundaries of the original classifier $D$ and a posthoc trained classifier on $z _ { n }$ (nuisance classifier), see Figure 4. We densely sample points in a 2D subspace, following Gilmer et al. (2018b), to visualize two cases: 1) the decision-boundary on a 2D plane spanned by two randomly chosen data points, 2) the decision-boundary spanned by metameric sample $x _ { m e t }$ and reference point $x$ . In the metameric sample subspace we identify excessive invariance of the classifier. Here, it is possible to move any point from the inner sphere to the outer sphere without changing the classifiers predictions. However, this is not possible for the classifier trained on $z _ { n }$ . Most notably, the visualized failure is not due to a lack of data seen during training, but rather due to excessive invariance of the original classifier $D$ on $z _ { s }$ . Thus, the nuisance classifier on $z _ { n }$ does not exhibit the same adversarial vulnerability in its subspace.
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 5: Each column shows three images belonging together. Top row are source images from which we sample the logits, middle row are logit metamers and bottom row images from which we sample the nuisances. Top row and middle row have the same (approximately for ResNets, exactly for fully invertible RevNets) logit activations. Thus, it is possible to change the image content completely without changing the 10- and 1000-dimensional logit vectors respectively. This highlights a striking failure of classifiers to capture all task-dependent variability.
|
| 98 |
+
|
| 99 |
+
Attack on MNIST and ImageNet. After validating its potential to uncover adversarial subspaces, we apply metameric sampling to fully invertible RevNets trained on MNIST and Imagenet, see Figure 5. The result is striking, as the nuisance variables $z _ { n }$ are dominating the visual appearance of the logit metamers, making it possible to attach any semantic content to any logit activation pattern. Note that the entire 1000-dimensional feature vector containing probabilities over all ImageNet classses remains unchanged by any of the transformations we apply. To show our findings are not a particular property of bijective networks, we attack an ImageNet trained ResNet152 with a gradientbased version of our metameric attack, also known as feature adversaries (Sabour et al., 2016). The attack minimizes the mean squared error between a given set of logits from one image to another image (see appendix B for details). The attack shows the same failures for non-bijective models. This result highlights the general relevance of our finding and poses the question of the origin of this excessive invariance, which we will analyze in the following section.
|
| 100 |
+
|
| 101 |
+
# 3 OVERCOMING INSUFFICIENCY OF CROSSENTROPY-BASED INFORMATION-MAXIMIZATION
|
| 102 |
+
|
| 103 |
+
In this section we identify why the cross-entropy objective does not necessarily encourage to explain all task-dependent variations of the data and propose a way to fix this. As shown in figure 4, the nuisance classifier on $z _ { n }$ uses task-relevant information not captured by the logit classifier $D _ { \theta }$ on $z _ { s }$ (evident by its superior performance in the adversarial subspace).
|
| 104 |
+
|
| 105 |
+
We leverage the simple readout-structure of our invertible network and turn this observation into a formal explanation framework using information theory: Let $( x , y ) \sim \mathcal { D }$ with labels $y \in \{ 0 , 1 \} ^ { C }$ . Then the goal of a classifier can be stated as maximizing the mutual information (Cover & Thomas, 2006) between semantic features $z _ { s }$ (logits) extracted by network $F _ { \theta }$ and labels $y$ , denoted by $I ( y ; z _ { s } )$ .
|
| 106 |
+
|
| 107 |
+
Adversarial distribution shift. As the previously discussed failures required to modify input data from distribution $\mathcal { D }$ , we introduce the concept of an adversarial distribution shift $\mathcal { D } _ { A d v } \neq \mathcal { D }$ to formalize these modifications. Our first assumptions for $\mathcal { D } _ { A d v }$ is $I _ { \mathcal { D } _ { A d v } } ( z _ { n } ; y ) \ \le \ I _ { \mathcal { D } } ( z _ { n } ; y )$ . Intuitively, the nuisance variables $z _ { n }$ of our network do not become more informative about $y$ . Thus, the distribution shift may reduce the predictiveness of features encoded in $z _ { s }$ , but does not introduce or increase the predictive value of variations captured in $z _ { n }$ . Second, we assume $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } | z _ { n } ) \leq$ $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } )$ , which corresponds to positive or zero interaction information, see e.g. (Ghassami & Kiyavash, 2017). While the information in $z _ { s }$ and $z _ { n }$ can be redundant in this assumption, synergetic effects where conditioning on $z _ { n }$ increase the mutual information between $y$ and $z _ { s }$ are excluded.
|
| 108 |
+
|
| 109 |
+
Bijective networks $F _ { \theta }$ capture all variations by design which translates to information preservation $I ( y ; x ) = I ( y ; F _ { \theta } ( x ) )$ , see (Kraskov et al., 2004). Consider the reformulation
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
I ( y ; x ) = I ( y ; F _ { \theta } ( x ) ) = I ( y ; z _ { s } , z _ { n } ) = I ( y ; z _ { s } ) + I ( y ; z _ { n } | z _ { s } ) = I ( y ; z _ { n } ) + I ( y ; z _ { s } | z _ { n } )
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
by the chain rule of mutual information (Cover & Thomas, 2006), where $I ( y ; z _ { n } | z _ { s } )$ denotes the conditional mutual information. Most strikingly, equation 5 offers two ways forward:
|
| 116 |
+
|
| 117 |
+
1. Direct increase of $I ( y ; z _ { s } )$
|
| 118 |
+
2. Indirect increase of $I ( y ; z _ { s } | z _ { n } )$ via decreasing $I ( y ; z _ { n } )$ .
|
| 119 |
+
|
| 120 |
+
Usually in a classification task, only $I ( y ; z _ { s } )$ is increased actively via training a classifier. While this approach is sufficient in most cases, expressed via high accuracies on training and test data, it may fail under $\mathcal { D } _ { A d v }$ . This highlights why cross-entropy training may not be sufficient to overcome excessive semantic invariance. However, by leveraging the bijection $F _ { \theta }$ we can minimize the unused information $I ( y ; z _ { n } )$ using the intuition of a nuisance classifier.
|
| 121 |
+
|
| 122 |
+
Definition 5 (Independence cross-entropy loss). Let $F _ { \theta } : \mathbb { R } ^ { d } \mathbb { R } ^ { d }$ a bijective network with parameters $\theta \in \mathbb { R } ^ { p _ { 1 } }$ and $\tilde { F } _ { \theta } ( x ) = s o f t m a x ( F _ { \theta } ( x ) _ { 1 , . . . , C } )$ . Furthermore, let $D _ { \theta _ { n c } } : \mathbb { R } ^ { d - C } [ 0 , 1 ] ^ { C }$ be the nuisance classifier with $\theta _ { n c } \in \mathbb { R } ^ { p _ { 2 } }$ . Then, the independence cross-entropy loss is defined as:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\operatorname* { m i n } _ { \theta } \operatorname* { m m a x } _ { \theta _ { n c } } \mathcal { L } _ { i C E } ( \theta , \theta _ { n c } ) = \underbrace { \sum _ { i = 1 } ^ { C } - y _ { i } \log \tilde { F } _ { \theta } ^ { z _ { s } } ( x ) } _ { = : \mathcal { L } _ { s C E } ( \theta ) } + \underbrace { \sum _ { i = 1 } ^ { C } y _ { i } \log D _ { \theta _ { n c } } ( F _ { \theta } ^ { z _ { n } } ( x ) ) _ { i } } _ { = : \mathcal { L } _ { n C E } ( \theta , \theta _ { n c } ) } .
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
The underlying principles of the nuisance classification loss $\mathcal { L } _ { n C E }$ can be understood using a variational lower bound on mutual information from Barber $\&$ Agakov (2003). In summary, the minimization is with respect to a lower bound on $I _ { \mathcal { D } } ( y ; z _ { n } )$ , while the maximization aims to tighten the bound (see Lemma 10 in Appendix C). By using these results, we now state the main result under the assumed distribution shift and successful minimization (proof in Appendix C.1):
|
| 129 |
+
|
| 130 |
+
Theorem 6 (Information $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } )$ maximal after distribution shift). Let $\mathcal { D } _ { A d v }$ denote the adversarial distribution and $\mathcal { D }$ the training distribution. Assume $I _ { \mathcal { D } } ( y ; z _ { n } ) = 0$ by minimizing $\mathcal { L } _ { i C E }$ and the distribution shift satisfies $I _ { \mathcal { D } _ { A d v } } ( z _ { n } ; y ) \le I _ { \mathcal { D } } ( z _ { n } ; y )$ and $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } | z _ { n } ) \le I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } )$ . Then,
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } ) = I _ { \mathcal { D } } ( y ; x ) .
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 6: Left: Mutual information under distribution $\mathcal { D } _ { t r a i n }$ , Right: Effect of distributional shift to $\mathcal { D } _ { A d v }$ . Each case under training with cross-entropy (CE) and independence cross-entropy (iCE). Under distribution $\mathcal { D }$ , the iCE-loss minimizes $I ( y ; z _ { n } )$ (Lemma 10, Appendix C), but has no effect as the CE-loss already maximizes $I ( y ; z _ { s } )$ . However under the shift to $\mathcal { D } _ { A d v }$ , the information $I ( y ; z _ { s } )$ decreases when training only under the CE-loss (orange arrow), while the iCE-loss induces $I ( y ; z _ { n } ) = 0$ and thus leaves $I ( y ; z _ { s } )$ unchanged (Theorem 6).
|
| 138 |
+
|
| 139 |
+
Thus, incorporating the nuisance classifier allows for the discussed indirect increase of $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } )$ under an adversarial distribution shift, visualized in Figure 6.
|
| 140 |
+
|
| 141 |
+
To aid stability and further encourage factorization of $z _ { s }$ and $z _ { n }$ in practice, we add a maximum likelihood term to our independence cross-entropy objective as
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
\operatorname* { m i n } _ { \theta } \operatorname* { m a x } _ { \theta _ { n c } } \mathcal { L } ( \theta , \theta _ { n c } ) = \mathcal { L } _ { i C E } ( \theta , \theta _ { n c } ) - \underbrace { \sum _ { k = 1 } ^ { d - C } \log \big ( p _ { k } ( F _ { \theta } ^ { z _ { n } } ( x ) _ { k } ) | \mathsf { d e t } ( J _ { \theta } ^ { x } ) | \big ) } _ { = : \mathcal { L } _ { M L E _ { n } } ( \theta ) } ,
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
where $\operatorname* { d e t } ( J _ { \theta } ^ { x } )$ denotes the determinant of the Jacobian of $F _ { \theta } ( x )$ and $p _ { k } \sim \mathcal N ( \beta _ { k } , \gamma _ { k } )$ with $\beta _ { k } , \gamma _ { k }$ learned parameter. The log-determinant can be computed exactly in our model with negligible additional cost. Note, that optimizing $\mathcal { L } _ { M L E _ { n } }$ on the nuisance variables together with $\mathcal { L } _ { s C E }$ amounts to maximum-likelihood under a factorial prior (see Lemma 11 in Appendix C).
|
| 148 |
+
|
| 149 |
+
Just as in GANs the quality of the result relies on a tight bound provided by the nuisance classifier and convergence of the MLE term. Thus, it is important to analyze the success of the objective after training. We do this by applying our metameric sampling attack, but there are also other ways like evaluating a more powerful nuisance classifier after training.
|
| 150 |
+
|
| 151 |
+
# 4 APPLYING INDEPENDENCE CROSS-ENTROPY
|
| 152 |
+
|
| 153 |
+
In this section, we show that our proposed independence cross-entropy loss is effective in reducing invariance-based vulnerability in practice by comparing it to vanilla cross-entropy training in four aspects: (1) error on train and test set, (2) effect under distribution shift, perturbing nuisances via metameric sampling, (3) evaluate accuracy of a classifier on the nuisance variables to quantify the class-specific information in them and (4) on our newly introduced shiftMNIST, an augmented version of MNIST to benchmark adversarial distribution shifts according to Theorem 6.
|
| 154 |
+
|
| 155 |
+
For all experiments we use the same network architecture and settings, the only difference being the two additional loss terms as explained in Definition 5 and equation 6. In terms of test error of the logit classifier, both losses perform approximately on par, whereas the gap between train and test error vanishes for our proposed loss function, indicating less overfitting. For classification errors see Table 2 in appendix D.
|
| 156 |
+
|
| 157 |
+
Robustness under metameric sampling attack. To analyze if our proposed loss indeed leads to independence between $z _ { n }$ and labels $y$ , we attack it with our metameric sampling procedure. As we are only looking on data samples and not on samples from the model (factorized gaussian on nuisances), this attack should reveal if the network learned to trick the objective. In Figure 7 we show interpolations between original images and logit metamers in CE- and iCE-trained fully invertible RevNets. In particular, we are holding the activations $z _ { s }$ constant, while linearly interpolating nuisances $z _ { n }$ down the column. The CE-trained network allows us to transform any image into any class without changing the logits. However, when training with our proposed iCE, the picture changes fundamentally and interpolations in the pre-image only change the style of a digit, but not its semantic content. This shows our loss has the ability to overcome excessive task-related invariance and encourages the model to explain and separate all task-related variability of the input from the nuisances of the task.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 7: Samples $\tilde { x } = F ^ { - 1 } ( z _ { s } , \tilde { z } _ { n } )$ with logit activations $z _ { s }$ taken from original image and $\tilde { z } _ { n }$ obtained by linearly interpolating from the original nuisance $z _ { n }$ (first row) to the nuisance of a target example $z _ { n } ^ { * }$ (last row upper block). The used target example is shown at the bottom. When training with cross-entropy, virtually any image can be turned into any class without changing the logits $z _ { s }$ , illustrating strong vulnerability to invariance-based adversaries. Yet, training with independence cross-entropy solves the problem and interpolations between nuisances $z _ { n }$ and $z _ { n } ^ { * }$ preserve the semantic content of the image.
|
| 161 |
+
|
| 162 |
+
A classifier trained on the nuisance variables of the cross-entropy trained model performs even better than the logit classifier. Yet, a classifier on the nuisances of the independence cross-entropy trained model is performing poorly (Table 2 in appendix D). This indicates little class-specific information in the nuisances $z _ { n }$ , as intended by our objective function. Note also that this inability of the nuisance classifier to decode class-specific information is not due to it being hard to read out from $z _ { n }$ , as this would be revealed by the metameric sampling attack (see Figure 7).
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 8: shiftMNIST experiments. (a): Binary shiftMNIST, where the class is additionally encoded with a location-based binary code on the left border of the image (highlighted with red circles). The shifted adversarial test distribution does not have the binary class encoding. (b): Texture shiftMNIST, where the class is additionally encoded in background texture type. The texture-class coupling is randomized in the shifted adversarial test distribution. Right: Results of CE-trained ResNet, fully invertible RevNet and iCE-trained fully invertible RevNet. The CE-based models build excessive invariance with respect to the digit identity on $\mathcal { D } _ { t r a i n }$ and fail on $\mathcal { D } _ { A d v }$ . Difference denotes the largest improvement between CE-trained and iCE-trained model. The iCE model is more resilient to removing informative features, and reduces the error on $\mathcal { D } _ { A d v }$ up to $38 \%$ .
|
| 166 |
+
|
| 167 |
+
shiftMNIST: Benchmarking adversarial distribution shift. To further test the efficacy of our proposed independence cross-entropy, we introduce a simple, but challenging new dataset termed shiftMNIST to test classifiers under adversarial distribution shifts $\mathcal { D } _ { A d v }$ . The dataset is based on vanilla MNIST, augmented by introducing additional, highly predictive features at train time that are randomized or removed at test time. Randomization or removal ensures that there are no synergy effects between digits and planted features under $\mathcal { D } _ { A d v }$ . This setup allows us to reduce mutual information between category and the newly introduced feature in a targeted manner. (a) Binary shiftMNIST is vanilla MNIST augmented by coding the category for each digit into a single binary pixel scheme. The location of the binary pixel reveals the category of each image unambigiously, while only minimally altering the image’s appearance.
|
| 168 |
+
|
| 169 |
+
At test time, the binary code is not present and the network can not rely on it anymore. (b) Textured shiftMNIST introduces textured backgrounds for each digit category which are patches sampled from the describable texture dataset (Cimpoi et al., 2014).
|
| 170 |
+
|
| 171 |
+
At train time the same type of texture is underlayed each digit of the same category, while texture types across categories differ. At test time, the relationship is broken and texture backgrounds are paired with digits randomly, again minimizing the mutual information between background and label in a targeted manner. See Figure 8 for examples1.
|
| 172 |
+
|
| 173 |
+
It turns out that this task is indeed very hard for standard classifiers and their tendency to become excessively invariant to semantically meaningful features, as predicted by our theoretical analysis. When trained with cross-entropy, ResNets and fi-RevNets make zero errors on the train set, while having error rates of up to $87 \%$ on the shifted test set. This is striking, given that e.g. in binary shiftMNIST, only one single pixel is removed under $\mathcal { D } _ { A d v }$ , leaving the whole image almost unchanged. When applying our independence cross-entropy, the picture changes again. The errors made by the network improve by up to almost $38 \%$ on binary shiftMNIST and around $28 \%$ on textured shiftMNIST. This highlights the effectiveness of our proposed loss function and its ability to minimize catastrophic failure under severe distribution shifts exploiting excessive invariance.
|
| 174 |
+
|
| 175 |
+
# 5 RELATED WORK
|
| 176 |
+
|
| 177 |
+
Adversarial examples. Adversarial examples often include $\epsilon$ -norm restrictions (Szegedy et al., 2013), while (Gilmer et al., 2018a) argue for a broader definition to fully capture the implications for security. The $\epsilon$ -adversarial examples have also been extended to $\epsilon$ -feature adversaries (Sabour et al., 2016), which are equivalent to our approximate metameric sampling attack. Some works (Song et al., 2018; Fawzi et al., 2018) consider unrestricted adversarial examples, which are closely related to invariance-based adversarial vulnerability. The difference to human perception revealed by adversarial examples fundamentally questions which statistics deep networks use to base their decisions (Jo & Bengio, 2017; Tsipras et al., 2019).
|
| 178 |
+
|
| 179 |
+
Relationship between standard and bijective networks. We leverage recent advances in reversible (Gomez et al., 2017) and bijective networks (Jacobsen et al., 2018; Ardizzone et al., 2019; Kingma & Dhariwal, 2018) for our analysis. It has been shown that ResNets and iRevNets behave similarly on various levels of their representation on challenging tasks (Jacobsen et al., 2018) and that iRevNets as well as Glow-type networks are related to ResNets by the choice of dimension splitting applied in their residual blocks (Grathwohl et al., 2019). Perhaps unsurprisingly, given so many similarities, ResNets themselves have been shown to be provably bijective under mild conditions (Behrmann et al., 2018b). Further, excessive invariance of the type we discuss here has been shown to occur in non residual-type architectures as well (Gilmer et al., 2018b; Behrmann et al., 2018a). For instance, it has been observed that up to $60 \%$ of semantically meaningful input dimensions on the adversarial spheres problem are learned to be ignored, while retaining virtually perfect performance (Gilmer et al., 2018b). In summary, there is ample evidence that RevNet-type networks are closely related to ResNets, while providing a principled framework to study widely observed issues related to excessive invariance in deep learning in general and adversarial robustness in particular.
|
| 180 |
+
|
| 181 |
+
Information theory. The information-theoretic view has gained recent interest in machine learning due to the information bottleneck (Tishby & Zaslavsky, 2015; Shwartz-Ziv & Tishby, 2017; Alemi et al., 2017) and usage in generative modelling (Chen et al., 2016; Hjelm et al., 2019). As a consequence, the estimation of mutual information (Barber & Agakov, 2003; Alemi et al., 2018; Achille & Soatto, 2018; Belghazi et al., 2018) has attracted growing attention. The concept of group-wise independence between latent variables goes back to classical independent subspace analysis (Hyvarinen ¨ & Hoyer, 2000) and received attention in learning unbiased representations, e.g. see the Fair Variational Autoencoder (Louizos et al., 2015). Furthermore, extended cross-entropy losses via entropy terms (Pereyra et al., 2017) or minimizing predictability of variables (Schmidhuber, 1991) has been introduced for other applications. Our proposed loss also shows similarity to the GAN loss (Goodfellow et al., 2014). However, in our case there is no notion of real or fake samples, but exploring similarities in the optimization are a promising avenue for future work.
|
| 182 |
+
|
| 183 |
+
# 6 CONCLUSION
|
| 184 |
+
|
| 185 |
+
Failures of deep networks under distribution shift and their difficulty in out-of-distribution generalization are prime examples of the limitations in current machine learning models. The field of adversarial example research aims to close this gap from a robustness point of view. While a lot of work has studied $\epsilon$ -adversarial examples, recent trends extend the efforts towards the unrestricted case. However, adversarial examples with no restriction are hard to formalize beyond testing error. We introduce a reverse view on the problem to: (1) show that a major cause for adversarial vulnerability is excessive invariance to semantically meaningful variations, (2) demonstrate that this issue persists across tasks and architectures; and (3) make the control of invariance tractable via fully-invertible networks.
|
| 186 |
+
|
| 187 |
+
In summary, we demonstrated how a bijective network architecture enables us to identify large adversarial subspaces on multiple datasets like the adversarial spheres, MNIST and ImageNet. Afterwards, we formalized the distribution shifts causing such undesirable behavior via information theory. Using this framework, we find one of the major reasons is the insufficiency of the vanilla cross-entropy loss to learn semantic representations that capture all task-dependent variations in the input. We extend the loss function by components that explicitly encourage a split between semantically meaningful and nuisance features. Finally, we empirically show that this split can remove unwanted invariances by performing a set of targeted invariance-based distribution shift experiments.
|
| 188 |
+
|
| 189 |
+
# 7 ACKNOWLEDGEMENTS
|
| 190 |
+
|
| 191 |
+
We thank Ryota Tomioka for spotting a mistake in the proof for Theorem 6. We thank thank the anonymous reviewers, Ricky Chen, Will Grathwohl and Jesse Bettencourt for helpful comments on the manuscript. We gratefully acknowledge the financial support from the German Science Foundation for the CRC 1233 on ”Robust Vision” and RTG $2 2 2 4 \cdots 3$ : Parameter Identification - Analysis, Algorithms, Applications”
|
| 192 |
+
|
| 193 |
+
# REFERENCES
|
| 194 |
+
|
| 195 |
+
Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for largescale machine learning. In OSDI, volume 16, pp. 265–283, 2016.
|
| 196 |
+
|
| 197 |
+
Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations. Journal of Machine Learning Research, 18, 2018.
|
| 198 |
+
|
| 199 |
+
Alexander A. Alemi, Ian Fischer, Joshua V. Dillon, and Kevin Murphy. Deep variational information bottleneck. International Conference on Lerning Representations, 2017.
|
| 200 |
+
|
| 201 |
+
Alexander A. Alemi, Ben Poole, Ian Fischer, Joshua V. Dillon, Rif A. Saurous, and Kevin Murphy. An information-theoretic analysis of deep latent-variable models. Proceedings of the 35th International Conference on Machine Learning, 2018.
|
| 202 |
+
|
| 203 |
+
Lynton Ardizzone, Jakob Kruse, Carsten Rother, and Ullrich Kthe. Analyzing inverse problems with invertible neural networks. In International Conference on Learning Representations, 2019.
|
| 204 |
+
|
| 205 |
+
David Barber and Felix Agakov. The im algorithm: A variational approach to information maximization. In Advances in Neural Information Processing Systemss, 2003.
|
| 206 |
+
|
| 207 |
+
Jens Behrmann, Soren Dittmer, Pascal Fernsel, and Peter Maaß. Analysis of invariance and robust- ¨ ness via invertibility of relu-networks. arXiv preprint arXiv:1806.09730, 2018a.
|
| 208 |
+
|
| 209 |
+
Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Invertible residual networks. ¨ arXiv preprint arXiv:1811.00995, 2018b.
|
| 210 |
+
|
| 211 |
+
Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeshwar, Sherjil Ozair, Yoshua Bengio, Devon Hjelm, and Aaron Courville. Mutual information neural estimation. In Proceedings of the 35th International Conference on Machine Learning, 2018.
|
| 212 |
+
|
| 213 |
+
Wieland Brendel, Jonas Rauber, Alexey Kurakin, Nicolas Papernot, Behar Veliqi, Marcel Salathe,´ Sharada $\mathrm { \bf P }$ Mohanty, and Matthias Bethge. Adversarial vision challenge. arXiv preprint arXiv:1808.01976, 2018.
|
| 214 |
+
|
| 215 |
+
Tom B. Brown, Nicholas Carlini, Chiyuan Zhang, Catherine Olsson, Paul Christiano, and Ian Goodfellow. Unrestricted adversarial examples. arXiv preprint arXiv:1809.08352, 2018.
|
| 216 |
+
|
| 217 |
+
Sebastien Bubeck, Eric Price, and Ilya Razenshteyn. Adversarial examples from computational ´ constraints. arXiv preprint arXiv:1805.10204, 2018.
|
| 218 |
+
|
| 219 |
+
Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems. 2016.
|
| 220 |
+
|
| 221 |
+
M. Cimpoi, S. Maji, I. Kokkinos, S. Mohamed, , and A. Vedaldi. Describing textures in the wild. In Proceedings of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014.
|
| 222 |
+
|
| 223 |
+
Thomas M. Cover and Joy A. Thomas. Elements of Information Theory (Wiley Series in Telecommunications and Signal Processing). Wiley-Interscience, New York, NY, USA, 2006. ISBN 0471241954.
|
| 224 |
+
|
| 225 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. International Conference on Learning Representations, 2017.
|
| 226 |
+
|
| 227 |
+
Alhussein Fawzi, Hamza Fawzi, and Omar Fawzi. Adversarial vulnerability for any classifier. In Advances in Neural Information Processing Systems 31. 2018.
|
| 228 |
+
|
| 229 |
+
Leon A Gatys, Alexander S Ecker, and Matthias Bethge. Texture and art with deep neural networks. Current opinion in neurobiology, 46:178–186, 2017.
|
| 230 |
+
|
| 231 |
+
AmirEmad Ghassami and Negar Kiyavash. Interaction information for causal inference: The case of directed triangle. arXiv preprint arXiv:abs/1701.08868, 2017.
|
| 232 |
+
|
| 233 |
+
Justin Gilmer, Ryan P. Adams, Ian Goodfellow, David Andersen, and George E. Dahl. Motivating the rules of the game for adversarial example research. arXiv preprint arXiv:1807.06732, 2018a.
|
| 234 |
+
|
| 235 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. arXiv preprint arXiv:1801.02774, 2018b.
|
| 236 |
+
|
| 237 |
+
Aidan N Gomez, Mengye Ren, Raquel Urtasun, and Roger B Grosse. The reversible residual network: Backpropagation without storing activations. Advances in Neural Information Processing Systems, 2017.
|
| 238 |
+
|
| 239 |
+
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.
|
| 240 |
+
|
| 241 |
+
Ian Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. International Conference on Learning Representations, 2015.
|
| 242 |
+
|
| 243 |
+
Will Grathwohl, Ricky T. Q. Chen, Jesse Bettencourt, and David Duvenaud. Scalable reversible generative models with free-form continuous dynamics. In International Conference on Learning Representations, 2019.
|
| 244 |
+
|
| 245 |
+
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.
|
| 246 |
+
|
| 247 |
+
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. In International Conference on Learning Representations, 2019.
|
| 248 |
+
|
| 249 |
+
Aapo Hyvarinen and Patrik Hoyer. Emergence of phase-and shift-invariant features by decomposi- ¨ tion of natural images into independent feature subspaces. Neural computation, 12(7):1705–1720, 2000.
|
| 250 |
+
|
| 251 |
+
Jorn-Henrik Jacobsen, Arnold W.M. Smeulders, and Edouard Oyallon. i-revnet: Deep invertible ¨ networks. In International Conference on Learning Representations, 2018.
|
| 252 |
+
|
| 253 |
+
Jason Jo and Yoshua Bengio. Measuring the tendency of cnns to learn surface statistical regularities. arXiv preprint arXiv:1711.11561, 2017.
|
| 254 |
+
|
| 255 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 256 |
+
|
| 257 |
+
Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. In Advances in Neural Information Processing Systems 31. 2018.
|
| 258 |
+
|
| 259 |
+
Alexander Kraskov, Harald Stogbauer, and Peter Grassberger. Estimating mutual information. ¨ Physical Review E, 69, 2004.
|
| 260 |
+
|
| 261 |
+
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
|
| 262 |
+
|
| 263 |
+
Christos Louizos, Kevin Swersky, Yujia Li, Max Welling, and Richard S. Zemel. The variational fair autoencoder. arXiv preprint arXiv:abs/1511.00830, 2015.
|
| 264 |
+
|
| 265 |
+
Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. International Conference on Learning Representations, 2017.
|
| 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 |
+
Gabriel Pereyra, George Tucker, Jan Chorowski, Lukasz Kaiser, and Geoffrey E. Hinton. Regularizing neural networks by penalizing confident output distributions. International Conference on Lerning Representations (workshop), 2017.
|
| 270 |
+
|
| 271 |
+
Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. Certified defenses against adversarial examples. International Conference on Learning Representations, 2018.
|
| 272 |
+
|
| 273 |
+
Sara Sabour, Yanshuai Cao, Fartash Faghri, and David J Fleet. Adversarial manipulation of deep representations. International Conference on Learning Representations, 2016.
|
| 274 |
+
|
| 275 |
+
Jurgen Schmidhuber. Learning factorial codes by predictability minimization. Technical report, ¨ Dept. of Comp. Sci., University of Colorado at Boulder, 1991.
|
| 276 |
+
|
| 277 |
+
Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander Madry. Adversarially robust generalization requires more data. In Advances in Neural Information Processing Systems 31. 2018.
|
| 278 |
+
|
| 279 |
+
Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
|
| 280 |
+
|
| 281 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 282 |
+
|
| 283 |
+
Yang Song, Rui Shu, Nate Kushman, and Stefano Ermon. Constructing unrestricted adversarial examples with generative models. In Advances in Neural Information Processing Systems 31. 2018.
|
| 284 |
+
|
| 285 |
+
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.
|
| 286 |
+
|
| 287 |
+
Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In Information Theory Workshop (ITW), 2015 IEEE, pp. 1–5. IEEE, 2015.
|
| 288 |
+
|
| 289 |
+
Dimitris Tsipras, Shibani Santurkar, Logan Engstrom, Alexander Turner, and Aleksander Madry. Robustness may be at odds with accuracy. In International Conference on Learning Representations, 2019.
|
| 290 |
+
|
| 291 |
+
# A SEMANTIC AND NUISANCE VARIATION ON ADVERSARIAL SPHERES
|
| 292 |
+
|
| 293 |
+
Example 7 (Semantic and nuisance on Adversarial Spheres (Gilmer et al., 2018b)). Consider classifying inputs $x$ from two classes given by radii $R _ { 1 }$ or $R _ { 2 }$ . Further, let $( r , \phi )$ denote the spherical coordinates of $x$ . Then, any perturbation $\Delta x _ { \mathrm { { \ell } } }$ , $x ^ { * } = x + \Delta x$ with $r ^ { * } \neq r$ is semantic. On the other hand, $i f r ^ { * } = r$ the perturbation is a nuisance with respect to the task of discriminating two spheres.
|
| 294 |
+
|
| 295 |
+
In this example, the max-margin classifier $\begin{array} { r } { D ( x ) = s i g n \left( \| x \| - \frac { R _ { 1 } + R _ { 2 } } { 2 } \right) } \end{array}$ is invariant to any nuisance perturbation, while being only sensitive to semantic perturbations. In summary, the transform to spherical coordinates allows to linearize semantic and nuisance perturbations. Using this notion, invariance-based adversarial examples can be attributed to perturbations of $x ^ { * } = x + \Delta x$ with following two properties
|
| 296 |
+
|
| 297 |
+
1. Perturbed sample $x ^ { * }$ stays in the pre-image $\{ x ^ { * } \in \mathbb { R } ^ { d } \mid D ( x ^ { * } ) = D ( x ) \}$ of the classifier
|
| 298 |
+
|
| 299 |
+
2. Perturbation $\Delta x$ is semantic, as $o ( x ) \neq o ( x + \Delta x )$ .
|
| 300 |
+
|
| 301 |
+
Thus, the failure of the classifier $D$ can be thought of a mis-alignment between its invariance (expressed through the pre-image) and the semantics of the data and task (expressed by the oracle).
|
| 302 |
+
|
| 303 |
+
Example 8 (Mis-aligned classifier on Adversarial Spheres). Consider the classifier
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
D ( x ) = s i g n \left( \left\| x _ { 1 , \ldots , d - 1 } \right\| - { \frac { R _ { 1 } + R _ { 2 } } { 2 } } \right) ,
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
which computes the norm of $x$ from its first $d - 1$ cartesian-coordinates. Then, $D$ is invariant to a semantic perturbation with $\Delta r = R _ { 2 } - R _ { 1 }$ if only changes in the last coordinate $x _ { d }$ are made.
|
| 310 |
+
|
| 311 |
+
We empirically evaluate the classifier in equation 7 on the spheres problem (10M/2M samples setting (Gilmer et al., 2018b)) and validate that it can reach perfect classification accuracy. However, by construction, perturbing the invariant dimension $x _ { d } ^ { * } = x _ { d } + \Delta x _ { d }$ allows us to move all samples from the inner sphere to the outer sphere. Thus, the accuracy of the classifier drops to chance level when evaluating its performance under such a distributional shift.
|
| 312 |
+
|
| 313 |
+
To conclude, this underlines how classifiers with optimal performance on finite samples can exhibit non-intuitive failure modes due to excessive invariance with respect to semantic variations.
|
| 314 |
+
|
| 315 |
+
# B APPROXIMATE GRADIENT-BASED METAMERIC SAMPLES
|
| 316 |
+
|
| 317 |
+
We use a standard Imagenet pre-trained Resnet-154 as provided by the torchvision package (Paszke et al., 2017) and choose a logit percept $\mathbf { y } = G ( \mathbf { x } )$ that can be based on any seed image. Then we optimize various images $\tilde { x }$ to be metameric to $\mathbf { x }$ by simply minimizing a mean squared error loss of the form:
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
\mathcal { L } _ { \mathrm { M S E } } ( G ( x ) , G ( \tilde { x } ) ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } ( G ( x ) _ { k } - G ( \tilde { x } ) _ { k } ) ^ { 2 }
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
in the 1000-dimensional semantic logit space via stochastic gradient descent. We optimize with Adam in Pytorch default settings and a learning rate of 0.01 for 3000 iterations. The optimization thus takes the form of an adversarial attack targeting all logit entries and with no norm restriction on the input distance. Note that our metameric sampling attack in bijective networks is the analytic reverse equivalent of this attack. It leads to the exact solution at the cost of one inverse pass instead of an approximate solution here at the cost of thousands of gradient steps.
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
Figure 9: Here we show a batch of randomly sampled metamers from our ImageNet-trained fully invertible RevNet-48. The quality is generally similar, sometimes colored artifacts appear.
|
| 327 |
+
|
| 328 |
+
# C INFORMATION THEORY
|
| 329 |
+
|
| 330 |
+
Computing mutual information is often intractable as it requires the joint probability $p ( x , y )$ , see (Cover & Thomas, 2006) for an extensive treatment of information theory. However, following variational lower bound can be used for approximation, see (Barber & Agakov, 2003).
|
| 331 |
+
|
| 332 |
+
Lemma 9 (Variational lower bound on mutual information). Let $X , Y$ be random variables with conditional density $p ( y | x )$ . Further, let $q _ { \theta } ( y | x )$ be a variational density depending on parameter $\theta$ . Then, the lower bound
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { r l } & { I ( Y ; X ) = h ( Y ) - h ( Y \vert X ) = h ( Y ) + \mathbb { E } _ { X } \mathbb { E } _ { Y \vert X } \log q _ { \theta } ( y \vert x ) + \mathbb { E } _ { X } ( p ( y \vert x ) \parallel q _ { \theta } ( y \vert x ) ) } \\ & { \qquad \ge h ( Y ) + \mathbb { E } _ { X } \mathbb { E } _ { Y \vert X } \log q _ { \theta } ( y \vert x ) } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
holds with equality if $p ( y | x ) = q _ { \theta } ( y | x )$ .
|
| 339 |
+
|
| 340 |
+
While above lower bound removes the need for the computation of $p ( y | x )$ , estimating the expectation $\mathbb { E } _ { Y \mid X }$ still requires sampling from it. Using this bound, we can now state the effect of the nuisance classifiation loss.
|
| 341 |
+
|
| 342 |
+
Lemma 10 (Effect of nuisance classifier). Define semantics as $z _ { s } = F _ { \theta } ( x ) _ { 1 , . . . , C }$ and nuisances as $z _ { n } = F _ { \theta } ( x ) _ { C + 1 , \dots , d } ,$ , where $( x , y ) \sim \mathcal { D }$ . Then, the nuisance classification loss yields
|
| 343 |
+
|
| 344 |
+
(i) Minimization of lower bound on $I _ { \mathcal { D } } ( y ; z _ { n } )$ : $\theta ^ { * } ~ = ~ \arg \operatorname* { m i n } _ { \theta } \mathcal { L } _ { n C E } ( \theta , \theta _ { n c } ^ { * } )$ minimizes $I _ { \theta _ { n c } ^ { * } } ( y ; z _ { n } )$ , where $I _ { \theta _ { n c } ^ { * } } ( y ; z _ { n } ) \le I _ { \mathcal { D } } ( y ; z _ { n } )$ and $\begin{array} { r } { \theta _ { n c } ^ { * } = \arg \operatorname* { m a x } _ { \theta _ { 2 } } \mathcal { L } _ { n C E } ( \theta , \theta _ { n c } ) } \end{array}$ .
|
| 345 |
+
|
| 346 |
+
(ii) Maximization to tighten bound on $I _ { \mathcal { D } } ( y ; z _ { n } )$ : Under a perfect model of the conditional density, $D _ { \theta _ { n c } ^ { * } } ( z _ { n } ) \stackrel { } { = } p ( y | z _ { n } ) .$ , it holds $I _ { \theta _ { n c } ^ { * } } ( y ; z _ { n } ) = I _ { \mathcal { D } } ( y ; z _ { n } )$ .
|
| 347 |
+
|
| 348 |
+
Proof. To proof above result, we need to draw the connection to the variational lower bound on mutual information from Lemma 9. Let the nuisance classifier $D _ { \theta _ { n c } } ( z _ { n } )$ model the variational posterior $q _ { \theta _ { n c } } ( y | z _ { n } )$ . Then we have the lower bound
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
I ( y ; z _ { n } ) \geq h ( y ) + \mathbb { E } _ { z _ { n } } \mathbb { E } _ { y | z _ { n } } \log D _ { \theta _ { n c } } ( z _ { n } ) = : I _ { \theta _ { n c } } ( y ; z _ { n } ) .
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
From Lemma 9 follows, that if $D _ { \theta _ { n c } } ( z _ { n } ) = p ( y | z _ { n } )$ , it holds $I ( y ; z _ { n } ) = I _ { \theta _ { n c } } ( y ; z _ { n } )$ . Hence, the nuisance classifier needs to model the conditional density perfectly.
|
| 355 |
+
|
| 356 |
+
Estimating this bound via Monte Carlo simulation requires sampling from the conditional density $p ( y | z _ { n } )$ . Following (Alemi et al., 2017), we have the Markov property $y x z _ { n }$ as labels $y$ interact with inputs $x$ and representation $z _ { n }$ interacts with inputs $x$ . Hence,
|
| 357 |
+
|
| 358 |
+
$$
|
| 359 |
+
\begin{array} { r l } { { p ( y | z _ { n } ) p ( z _ { n } ) = p ( y , z _ { n } ) } } \\ & { = \int _ { \mathcal X } p ( x , y , z _ { n } ) d x } \\ & { = \int _ { \mathcal X } p ( z _ { n } | x , y ) p ( y | x ) p ( x ) d x } \\ & { = \displaystyle \int _ { \mathcal X } p ( z _ { n } | x ) p ( y | x ) p ( x ) d x } \\ & { = \mathbb E _ { \alpha } [ p ( z _ { n } | x ) p ( y | x ) ] . } \end{array}
|
| 360 |
+
$$
|
| 361 |
+
|
| 362 |
+
Including above and assuming $F _ { \theta } ( x ) = z _ { n }$ to be a deterministic function, we have
|
| 363 |
+
|
| 364 |
+
$$
|
| 365 |
+
\begin{array} { r } { \mathbb { E } _ { z _ { n } } \mathbb { E } _ { y | z _ { n } } \log D _ { \theta _ { n c } } ( z _ { n } ) = \mathbb { E } _ { x } \mathbb { E } _ { y | x } \mathbb { E } _ { z _ { n } | x } \log D _ { \theta _ { n c } } ( z _ { n } ) = \mathbb { E } _ { x } \mathbb { E } _ { y | x } \log D _ { \theta _ { n c } } ( z _ { n } ) . } \end{array}
|
| 366 |
+
$$
|
| 367 |
+
|
| 368 |
+
Lemma 11 (Effect of MLE-term). Define semantics as $z _ { s } = F _ { \theta } ( x ) _ { 1 , . . . , C }$ and nuisances as $z _ { n } =$ $F _ { \theta } ( x ) _ { C + 1 , . . . , d }$ , where $( x , y ) \sim \mathcal { D }$ . Then, the MLE-term in equation $6$ together with cross-entropy on the semantics
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
\theta ^ { * } = \arg \operatorname* { m i n } _ { \theta } \mathcal { L } _ { s C E } ( \theta ) + \mathcal { L } _ { M L E _ { n } } ( \theta )
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
minimizes the mutual information $I ( z _ { s } ; z _ { n } )$
|
| 375 |
+
|
| 376 |
+
Proof. Let $\tilde { z } _ { s } = s o f t m a x ( z _ { s } )$ . Then minimizing the loss terms $\mathcal { L } _ { s C E }$ and $ { \mathcal { L } } _ { M L E _ { n } }$ is a maximum likelihood estimation under the factorial prior
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { c } { { p ( \tilde { z } _ { s } , z _ { n } ) = p ( \tilde { z } _ { s } ) p ( z _ { n } ) } } \\ { { \ } } \\ { { = C a t ( ( \tilde { z } _ { s } ) _ { 1 } , \ldots , ( \tilde { z } _ { s } ) _ { C } ) \displaystyle \prod _ { k = 1 } ^ { d - C } p _ { k } ( z _ { n } ) _ { k } , } } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
where $C a t$ is a categorical distribution. As sof tmax is shift-invariant, $s o f t m a x ( x + c ) \ =$ $s o f t m a x ( x )$ , above factorial prior for $\tilde { z } _ { s }$ and $z _ { n }$ yields independence between logits $z _ { s }$ and $z _ { n }$ up to a constant $c$ . Finally note, the log term and summation in $\mathcal { L } _ { M L E _ { n } }$ and $\mathcal { L } _ { C E }$ is re-formulation for computational ease but does not change its minimizer as the logarithm is monotone. □
|
| 383 |
+
|
| 384 |
+
# C.1 PROOF OF THEOREM 6
|
| 385 |
+
|
| 386 |
+
From the assumptions follows $I _ { \mathcal { D } _ { A d v } } ( y ; z _ { n } ) = 0$ . Furthermore, we have the assumption
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } | z _ { n } ) \leq I _ { \mathcal { D } _ { A d v } } ( z _ { s } ; y ) ,
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
excluding synergetic effects in the interaction information (Ghassami & Kiyavash, 2017). By information preservation under homeomorphisms (Kraskov et al., 2004) and the chain rule of mutual information (Cover & Thomas, 2006), we have
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
\begin{array} { r l } & { I _ { \mathcal { D } _ { A d v } } ( y ; x ) = I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } , z _ { n } ) } \\ & { \qquad = I _ { \mathcal { D } _ { A d v } } ( y ; z _ { n } ) + I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } | z _ { n } ) } \\ & { \qquad \leq I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } ) . } \end{array}
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
As $z _ { s } = F ( x ) _ { 1 , . . . , C }$ is obtained by the deterministic transform $F$ , by the data processing inequality (Cover & Thomas, 2006) we have the inequality $I _ { \mathcal { D } _ { A d v } } ( y ; x ) \ge I _ { \mathcal { D } _ { A d v } } ( y ; z _ { s } )$ . Thus, the claimed equality must hold.
|
| 399 |
+
|
| 400 |
+
# C.2 MUTUAL INFORMATION BOUNDED
|
| 401 |
+
|
| 402 |
+
Remark 12. Since our goal is to maximize the mutual information $I ( y ; z _ { s } )$ while minimizing $I ( y ; z _ { n } )$ , we need to ensure that this objective is well defined as mutual information can be unbounded from above for continuous random variables. However, due to the data processing inequality (Cover & Thomas, 2006) we have $I ( y ; z _ { n } ) = I ( y ; F _ { \theta } ( x ) ) \le I ( y ; x )$ . Hence, we have a fixed upper bound given by our data $( x , y )$ . Compared to (Belghazi et al., 2018) there is thus no need for gradient clipping or a switch to the bounded Jensen-Shannon divergence as in (Hjelm et al., 2019) is not necessary.
|
| 403 |
+
|
| 404 |
+
# D TRAINING AND ARCHITECTURAL DETAILS
|
| 405 |
+
|
| 406 |
+
All experiments were based on a fully invertible RevNet model with different hyperparameters for each dataset. For the spheres experiment we used Pytorch (Paszke et al., 2017) and for MNIST, as well as Imagenet Tensorflow (Abadi et al., 2016).
|
| 407 |
+
|
| 408 |
+
# D.1 SPHERES EXPERIMENTS
|
| 409 |
+
|
| 410 |
+
The network is a fully connected fully invertible RevNet. It has 4 RevNet-type ReLU bottleneck blocks with additive couplings and uses no batchnorm. We train it via cross-entropy and use the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.0001 and otherwise default Pytorch settings. The nuisance classifier is a 3 layer ReLU network with 1000 hidden units per layer.
|
| 411 |
+
|
| 412 |
+
We choose the spheres to be 100-dimensional, with $R _ { 1 } = 1$ and $R _ { 2 } = 1 0$ , train on $5 0 0 \mathrm { k }$ samples for 10 epochs and then validate on another $1 0 0 \mathrm { k }$ holdout set. We achieve $100 \%$ train and validation accuracy for logit and nuisance classifier.
|
| 413 |
+
|
| 414 |
+
# D.2 MNIST EXPERIMENTS
|
| 415 |
+
|
| 416 |
+
We use a convolutional fully invertible RevNet with additional actnorm and invertible 1x1 convolutions between each layer as introduced in Kingma & Dhariwal (2018). The network has 3 stages, after which half of the variables are factored out and an invertible downsampling, or squeezing (Dinh et al., 2017; Jacobsen et al., 2018) is applied. The network has 16 RevNet blocks with batch norm per stage and 128 filters per layer. We also dequantize the inputs as is typically done in flow-based generative models.
|
| 417 |
+
|
| 418 |
+
The network is trained via Adamax (Kingma & Ba, 2014) with a base learning rate of 0.001 for 100 epochs and we multiply the it with a factor of 0.2 every 30 epochs and use a batch size of 64 and l2 weight decay of 1e-4. For training we compare vanilla cross-entropy training with our proposed independence cross-entropy loss. To have a more balanced loss signal, we normalize $\mathcal { L } _ { n C E }$ by the number of input dimensions it receives for the maximization step. The nuisance classifier is a fullyconnected 3 layer ReLU network with 512 units. As data-augmentation we use random shifts of 3 pixels. For classification errors of the different architectures we compare, see Table 2.
|
| 419 |
+
|
| 420 |
+
# D.3 IMAGENET EXPERIMENTS
|
| 421 |
+
|
| 422 |
+
We use a convolutional fully invertible RevNet with 4 stages, 4 RevNet blocks per stage and invertible downsampling after each stage, as well as two invertible downsamplings on the input of the network. The first three stages consist of additive and the last of affine coupling layers. After the final layer we apply an orthogonal 2D DCT type-II to all feature maps and read out the classes in the low-pass components of the transformation. This effectively gives us an invertible global average pooling and makes our network even more similar to ResNets, that always apply global average pooling on their final feature maps. We train the network with momentum SGD for 128 epochs, a batch size of 480 (distributed to 6 GPUs), a base learning rate of 0.1, which is reduced by a factor of 0.1 every 32 epochs. We apply momentum of 0.9 and l2 weight decay of 1e-4.
|
| 423 |
+
|
| 424 |
+
Table 2: Results comparing cross-entropy training (CE) with independence cross-entropy training (iCE) from Definition 5 and two architectures from the literature. The accuracy of the logit classifiers is on par for the CE and iCE networks, but the train error is higher for CE compared to test error, indicating less overfitting for iCE. Further, a classifier independently trained on the nuisance variables is able to reach even smaller error than on the logits for CE, but just $2 7 . 7 0 \%$ error for iCE, indicating that we have successfully removed most of the information of the label from the nuisance variables and fixed the problem of excessive invariance to semantically meaningful variability with no cost in test error.
|
| 425 |
+
|
| 426 |
+
<table><tr><td>MNIST</td><td>SOTA</td><td>LeNet</td><td>CE</td><td>iCE (ours)</td><td>CE</td><td>iCE (ours)</td></tr><tr><td>Readout</td><td>Logit</td><td>Logit</td><td>Logit</td><td>Logit</td><td>Nuisance</td><td>Nuisance</td></tr><tr><td>% Test Error</td><td>0.21</td><td>1.70</td><td>0.39</td><td>0.38</td><td>0.34</td><td>27.70</td></tr><tr><td>% Train Error</td><td>1</td><td>1</td><td>0.00</td><td>0.37</td><td>0.00</td><td>40.21</td></tr></table>
|
md/train/BklEFpEYwS/BklEFpEYwS.md
ADDED
|
@@ -0,0 +1,500 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# META-LEARNING WITHOUT MEMORIZATION
|
| 2 |
+
|
| 3 |
+
Mingzhang $\mathbf { Y i n ^ { 1 2 } }$ , George Tucker2, Mingyuan Zhou1, Sergey Levine23, Chelsea Finn24 mzyin@utexas.edu, gjt@google.com, mingyuan.zhou@mccombs.utexas.edu svlevine@eecs.berkeley.edu, cbfinn@cs.stanford.edu 1UT Austin, 2Google Research, Brain team, 3UC Berkeley, 4Stanford
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The ability to learn new concepts with small amounts of data is a critical aspect of intelligence that has proven challenging for deep learning methods. Meta-learning has emerged as a promising technique for leveraging data from previous tasks to enable efficient learning of new tasks. However, most meta-learning algorithms implicitly require that the meta-training tasks be mutually-exclusive, such that no single model can solve all of the tasks at once. For example, when creating tasks for few-shot image classification, prior work uses a per-task random assignment of image classes to N-way classification labels. If this is not done, the meta-learner can ignore the task training data and learn a single model that performs all of the meta-training tasks zero-shot, but does not adapt effectively to new image classes. This requirement means that the user must take great care in designing the tasks, for example by shuffling labels or removing task identifying information from the inputs. In some domains, this makes meta-learning entirely inapplicable. In this paper, we address this challenge by designing a meta-regularization objective using information theory that places precedence on data-driven adaptation. This causes the meta-learner to decide what must be learned from the task training data and what should be inferred from the task testing input. By doing so, our algorithm can successfully use data from non-mutually-exclusive tasks to efficiently adapt to novel tasks. We demonstrate its applicability to both contextual and gradientbased meta-learning algorithms, and apply it in practical settings where applying standard meta-learning has been difficult. Our approach substantially outperforms standard meta-learning algorithms in these settings.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
The ability to learn new concepts and skills with small amounts of data is a critical aspect of intelligence that many machine learning systems lack. Meta-learning (Schmidhuber, 1987) has emerged as a promising approach for enabling systems to quickly learn new tasks by building upon experience from previous related tasks (Thrun & Pratt, 2012; Koch et al., 2015; Santoro et al., 2016; Ravi & Larochelle, 2016; Finn et al., 2017). Meta-learning accomplishes this by explicitly optimizing for few-shot generalization across a set of meta-training tasks. The meta-learner is trained such that, after being presented with a small task training set, it can accurately make predictions on test datapoints for that meta-training task.
|
| 12 |
+
|
| 13 |
+
While these methods have shown promising results, current methods require careful design of the meta-training tasks to prevent a subtle form of task overfitting, distinct from standard overfitting in supervised learning. If the task can be accurately inferred from the test input alone, then the task training data can be ignored while still achieving low meta-training loss. In effect, the model will collapse to one that makes zero-shot decisions. This presents an opportunity for overfitting where the meta-learner generalizes on meta-training tasks, but fails to adapt when presented with training data from novel tasks. We call this form of overfitting the memorization problem in meta-learning because the meta-learner memorizes a function that solves all of the meta-training tasks, rather than learning to adapt.
|
| 14 |
+
|
| 15 |
+
Existing meta-learning algorithms implicitly resolve this problem by carefully designing the metatraining tasks such that no single model can solve all tasks zero-shot; we call tasks constructed in this way mutually-exclusive. For example, for $N$ -way classification, each task consists of examples from $N$ randomly sampled classes. The $N$ classes are labeled from 1 to $N$ , and critically, for each task, we randomize the assignment of classes to labels $\{ 1 , 2 , \ldots , N \}$ (visualized in Appendix Figure 3). This ensures that the task-specific class-to-label assignment cannot be inferred from a test input alone. However, the mutually-exclusive tasks requirement places a substantial burden on the user to cleverly design the meta-training setup (e.g., by shuffling labels or omitting goal information). While shuffling labels provides a reasonable mechanism to force tasks to be mutually-exclusive with standard few-shot image classification datasets such as MiniImageNet (Ravi & Larochelle, 2016), this solution cannot be applied to all domains where we would like to utilize meta-learning. For example, consider meta-learning a pose predictor that can adapt to different objects: even if $N$ different objects are used for meta-training, a powerful model can simply learn to ignore the training set for each task, and directly learn to predict the pose of each of the $N$ objects. However, such a model would not be able to adapt to new objects at meta-test time.
|
| 16 |
+
|
| 17 |
+
The primary contributions of this work are: 1) to identify and formalize the memorization problem in meta-learning, and 2) to propose a meta-regularizer (MR) using information theory as a general approach for mitigating this problem without placing restrictions on the task distribution. We formally differentiate the meta-learning memorization problem from overfitting problem in conventional supervised learning, and empirically show that na¨ıve applications of standard regularization techniques do not solve the memorization problem in meta-learning. The key insight of our metaregularization approach is that the model acquired when memorizing tasks is more complex than the model that results from task-specific adaptation because the memorization model is a single model that simultaneously performs well on all tasks. It needs to contain all information in its weights needed to do well on test points without looking at training points. Therefore we would expect the information content of the weights of a memorization model to be larger, and hence the model should be more complex. As a result, we propose an objective that regularizes the information complexity of the meta-learned function class (motivated by Alemi et al. (2016); Achille & Soatto (2018)). Furthermore, we show that meta-regularization in MAML can be rigorously motivated by a PAC-Bayes bound on generalization. In a series of experiments on non-mutually-exclusive task distributions entailing both few-shot regression and classification, we find that memorization poses a significant challenge for both gradient-based (Finn et al., 2017) and contextual (Garnelo et al., 2018a) meta-learning methods, resulting in near random performance on test tasks in some cases. Our meta-regularization approach enables both of these methods to achieve efficient adaptation and generalization, leading to substantial performance gains across the board on non-mutually-exclusive tasks.
|
| 18 |
+
|
| 19 |
+
# 2 PRELIMINARIES
|
| 20 |
+
|
| 21 |
+
We focus on the standard supervised meta-learning problem (see, e.g., Finn et al. (2017)). Briefly, we assume tasks $\mathcal { T } _ { i }$ are sampled from a task distribution $p ( \mathcal { T } )$ . During meta-training, for each task, we observe a set of training data $\mathcal { D } _ { i } = ( \boldsymbol { \mathsf { x } } _ { i } , \boldsymbol { \mathsf { y } } _ { i } )$ and a set of test data $\mathcal { D } _ { i } ^ { * } = ( \boldsymbol { x } _ { i } ^ { * } , \boldsymbol { y } _ { i } ^ { * } )$ with $\pmb { x } _ { i } = ( x _ { i 1 } , \dots , x _ { i K } ) , \pmb { y } _ { i } = ( y _ { i 1 } , \bar { \dots } , y _ { i K } )$ sampled from $p ( x , y | \mathcal { T } _ { i } )$ , and similarly for $\mathcal { D } _ { i } ^ { * }$ . We denote the entire meta-training set as $\mathcal { M } = \{ \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } \} _ { i = 1 } ^ { N }$ . The goal of meta-training is to learn a model for a new task $\tau$ by leveraging what is learned during meta-training and a small amount of training data for the new task $\mathcal { D }$ . We use $\theta$ to denote the meta-parameters learned during meta-training and use $\phi$ to denote the task-specific parameters that are computed based on the task training data.
|
| 22 |
+
|
| 23 |
+
Following Grant et al. (2018); Gordon et al. (2018), given a meta-training set $\mathcal { M }$ , we consider meta-learning algorithms that maximize conditional likelihood $q ( \hat { y } ^ { * } = y ^ { * } | x ^ { * } , \theta , \mathcal { D } )$ , which is composed of three distributions: $q ( \theta | { \mathcal { M } } )$ that summarizes meta-training data into a distribution on metaparameters, $q ( \phi | \mathcal { D } , \theta )$ that summarizes the per-task training set into a distribution on task-specific parameters, and $q ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta )$ that is the predictive distribution. These distributions are learned to minimize
|
| 24 |
+
|
| 25 |
+
$$
|
| 26 |
+
\begin{array} { r } { - \frac { 1 } { N } \sum _ { i } \mathbb { E } _ { q ( \theta | \mathcal { M } ) q ( \phi | \mathcal { D } _ { i } , \theta ) } \left[ \frac { 1 } { K } \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { i } ^ { * } } \log q ( \hat { y } ^ { * } = y ^ { * } | x ^ { * } , \phi , \theta ) \right] . } \end{array}
|
| 27 |
+
$$
|
| 28 |
+
|
| 29 |
+
For example, in MAML (Finn et al., 2017), $\theta$ and $\phi$ are the weights of a predictor network, $q ( \theta | { \mathcal { M } } )$ is a delta function learned over the meta-training data, $q ( \phi | \mathcal { D } , \theta )$ is a delta function centered at a point defined by gradient optimization, and $\phi$ parameterizes the predictor network $q ( \hat { y } ^ { * } | x ^ { * } , \phi )$ (Grant et al., 2018). In particular, to determine the task-specific parameters $\phi$ , the task training data $\mathcal { D }$ and $\theta$ are used in the predictor model $\begin{array} { r } { \phi = \theta + \frac { \alpha } { K } \sum _ { ( x , y ) \in { \mathcal { D } } } \nabla _ { \theta } \log q ( y | x , \phi = \theta ) } \end{array}$ .
|
| 30 |
+
|
| 31 |
+
Another family of meta-learning algorithms are contextual methods (Santoro et al., 2016), such as conditional neural processes (CNP) (Garnelo et al., 2018b;a). CNP instead defines $q ( \phi | \mathcal { D } , \theta )$ as a mapping from $\mathcal { D }$ to a summary statistic $\phi$ (parameterized by $\theta$ ). In particular, $\phi = a _ { \theta } \circ h _ { \theta } ( \mathcal { D } )$ is the output of an aggregator $a _ { \theta } ( \cdot )$ applied to features $h _ { \theta } ( \mathcal { D } )$ extracted from the task training data. Then $\theta$ parameterizes a predictor network that takes $\phi$ and $x ^ { * }$ as input and produces a predictive distribution $\mathbf { \bar { \rho } } _ { q } ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta )$ .
|
| 32 |
+
|
| 33 |
+
In the following sections, we describe a common pitfall for a variety of meta-learning algorithms, including MAML and CNP, and a general meta-regularization approach to prevent this pitfall.
|
| 34 |
+
|
| 35 |
+
# 3 THE MEMORIZATION PROBLEM IN META-LEARNING
|
| 36 |
+
|
| 37 |
+
The ideal meta-learning algorithm will learn in such a way that generalizes to novel tasks. However, we find that unless tasks are carefully designed, current meta-learning algorithms can overfit to the tasks and end up ignoring the task training data (i.e., either $q ( \phi | \mathcal { D } , \theta )$ does not depend on $\mathcal { D }$ or $q ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta )$ does not depend on $\phi$ , as shown in Figure 1), which can lead to poor generalization. This memorization phenomenon is best understood through examples.
|
| 38 |
+
|
| 39 |
+
Consider a 3D object pose prediction problem (illustrated in Figure 1), where each object has a fixed canonical pose. The $( x , y )$ pairs for the task are 2D grey-scale images of the rotated object $( x )$ and the rotation angle relative to the fixed canonical pose for that object $( y )$ . In the most extreme case, for an unseen object, the task is impossible without using $\mathcal { D }$ because the canonical pose for the unseen object is unknown. The number of objects in the meta-training dataset is small, so it is straightforward for a single network to memorize the canonical pose for each training object and to infer the object from the input image (i.e., task overfitting), thus achieving a low training error without using $\mathcal { D }$ . However, by construction, this solution will necessarily have poor generalization to test tasks with unseen objects.
|
| 40 |
+
|
| 41 |
+
As another example, imagine an automated medical prescription system that suggests medication prescriptions to doctors based on patient symptoms and the patient’s previous record of prescription responses (i.e., medical history) for adaptation. In the meta-learning framework, each patient represents a separate task. Here, the symptoms and prescriptions have a close relationship, so we cannot assign random prescriptions to symptoms, in contrast to the classification tasks where we can randomly shuffle the labels to create mutually-exclusiveness. For this non-mutually-exclusive task distribution, a standard meta-learning system can memorize the patients’ identity information in the training, leading it to ignore the medical history and only utilize the symptoms combined with the memorized information. As a result, it may issue highly accurate prescriptions on the meta-training set, but fail to adapt to new patients effectively. While such a system would achieve a baseline level of accuracy for new patients, it would be no better than a standard supervised learning method applied to the pooled data.
|
| 42 |
+
|
| 43 |
+
We formally define (complete) memorization as:
|
| 44 |
+
|
| 45 |
+
Definition 1 (Complete Meta-Learning Memorization). Complete memorization in meta-learning is when the learned model ignores the task training data such that $I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta ) ~ = ~ 0$ (i.e., $q ( \hat { y } ^ { * } | x ^ { * } , \theta , \mathcal { D } ) = q ( \hat { y } ^ { * } | x ^ { * } , \theta ) = \mathbb { E } _ { \mathcal { D } ^ { \prime } | x ^ { * } } \left[ q ( \hat { y } ^ { * } | x ^ { * } , \theta , \mathcal { D } ^ { \prime } ) \right] )$ .
|
| 46 |
+
|
| 47 |
+
Memorization describes an issue with overfitting the meta-training tasks, but it does not preclude the network from generalizing to unseen $( x , y )$ pairs on the tasks similar to the training tasks. Memorization becomes an undesired problem for generalization to new tasks when $I ( y ^ { * } ; \bar { \mathcal { D } | } x ^ { * } ) \gg$ $I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta )$ (i.e., the task training data is necessary to achieve good performance, even with exact inference under the data generating distribution, to make accurate predictions).
|
| 48 |
+
|
| 49 |
+
A model with the memorization problem may generalize to new datapoints in training tasks but cannot generalize to novel tasks, which distinguishes it from typical overfitting in supervised learning. In practice, we find that MAML and CNP frequently converge to this memorization solution (Table 2). For MAML, memorization can occur when a particular setting of $\theta$ that does not adapt to the task training data can achieve comparable meta-training error to a solution that adapts $\theta$ . For example, if a setting of $\theta$ can solve all of the meta-training tasks (i.e., for all $( x , y )$ in $\mathcal { D }$ and ${ \mathcal { D } } ^ { * }$ the predictive error is close to zero), the optimization may converge to a stationary point of the MAML objective where minimal adaptation occurs based on the task training set (i.e., $\phi \approx \theta$ ). For a novel task where it is necessary to use the task training data, MAML can in principle still leverage the task training data because the adaptation step is based on gradient descent. However, in practice, the poor initialization of $\theta$ can affect the model’s ability to generalize from a small mount of data. For CNP, memorization can occur when the predictive distribution network $q ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta )$ can achieve low training error without using the task training summary statistics $\phi$ . On a novel task, the network is not trained to use $\phi$ , so it is unable to use the information extracted from the task training set to effectively generalize.
|
| 50 |
+
|
| 51 |
+
In some problem domains, the memorization problem can be avoided by carefully constructing the tasks. For example, for $N$ -way classification, each task consists of examples from $N$ randomly sampled classes. If the classes are assigned to a random permutation of $N$ for each task, this ensures that the task-specific class-to-label assignment cannot be inferred from the test inputs alone. As a result, a model that ignores the task training data cannot achieve low training error, preventing convergence to the memorization problem. We refer to tasks constructed in this way as mutuallyexclusive. However, the mutually-exclusive tasks requirement places a substantial burden on the user to cleverly design the meta-training setup (e.g., by shuffling labels or omitting goal information) and cannot be applied to all domains where we would like to utilize meta-learning.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: Left: An example of non-mutually-exclusive pose prediction tasks, which may lead to the memorization problem. The training tasks are non-mutually-exclusive because the test data label (right) can be inferred accurately without using task training data (left) in the training tasks, by memorizing the canonical orientation of the meta-training objects. For a new object and canonical orientation (bottom), the task cannot be solved without using task training data (bottom left) to infer the canonical orientation. Right: Graphical model for meta-learning. Observed variables are shaded. Without either one of the dashed arrows, ${ \hat { Y } } ^ { * }$ is conditionally independent of $\mathcal { D }$ given $\theta$ and $X ^ { * }$ , which we refer to as complete memorization (Definition 1).
|
| 55 |
+
|
| 56 |
+
# 4 META REGULARIZATION USING INFORMATION THEORY
|
| 57 |
+
|
| 58 |
+
At a high level, the sources of information in the predictive distribution $q ( \hat { y } ^ { * } | x ^ { * } , \theta , \mathcal { D } )$ come from the input, the meta-parameters, and the data. The memorization problem occurs when the model encodes task information in the predictive network that is readily available from the task training set (i.e., it memorizes the task information for each meta-training task). We could resolve this problem by encouraging the model to minimize the training error and to rely on the task training dataset as much as possible for the prediction of $y ^ { * }$ (i.e., to maximize $I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta ) )$ . Explicitly maximizing $I ( \hat { y } ^ { * } ; D | x ^ { * } , \theta )$ requires an intractable marginalization over task training sets to compute $\boldsymbol { q } ( \boldsymbol { \hat { y } } ^ { * } | \boldsymbol { x } ^ { * } , \boldsymbol { \theta } )$ . Instead, we can implicitly encourage it by restricting the information flow from other sources $\boldsymbol { x } ^ { * }$ and $\theta$ ) to $\hat { y } ^ { * }$ . To achieve both low error and low mutual information between $\hat { y } ^ { * }$ and $( x ^ { * } , \theta )$ , the model must use task training data $\mathcal { D }$ to make predictions, hence increasing the mutual information $I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta )$ , leading to reduced memorization. In this section, we describe two tractable ways to achieve this.
|
| 59 |
+
|
| 60 |
+
# 4.1 META REGULARIZATION ON ACTIVATIONS
|
| 61 |
+
|
| 62 |
+
Given $\theta$ , the statistical dependency between $x ^ { * }$ and $\hat { y } ^ { * }$ is controlled by the direct path from $x ^ { * }$ to $\hat { y } ^ { * }$ and the indirect path through $\mathcal { D }$ (see Figure 1), where the latter is desirable because it leverages the task training data. We can control the information flow between $x ^ { * }$ and $\hat { y } ^ { * }$ by introducing an intermediate stochastic bottleneck variable $z ^ { * }$ such that $q ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta ) \ =$ $\begin{array} { r } { \int q ( \hat { y } ^ { * } | z ^ { * } , \phi , \theta ) q ( \zeta ^ { * } | x ^ { * } , \theta ) \ d z ^ { * } } \end{array}$ (Alemi et al., 2016) as shown in Figure 4. Now, we would like to maximize $I ( \hat { y } ^ { * } ; \mathcal { D } | z ^ { * } , \theta )$ to prevent memorization. We can bound this mutual information by
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\begin{array} { r l } & { \quad I ( \hat { y } ^ { * } ; \mathcal { D } | z ^ { * } , \theta ) } \\ & { \geq I ( x ^ { * } ; \hat { y } ^ { * } | \theta , z ^ { * } ) = I ( x ^ { * } ; \hat { y } ^ { * } | \theta ) - I ( x ^ { * } ; z ^ { * } | \theta ) + I ( x ^ { * } ; z ^ { * } | \hat { y } ^ { * } , \theta ) } \\ & { \geq I ( x ^ { * } ; \hat { y } ^ { * } | \theta ) - I ( x ^ { * } ; z ^ { * } | \theta ) } \\ & { = I ( x ^ { * } ; \hat { y } ^ { * } | \theta ) - \mathbb { E } _ { p ( x ^ { * } ) q ( z ^ { * } | x ^ { * } , \theta ) } \left[ \log \frac { q ( z ^ { * } | x ^ { * } , \theta ) } { q ( z ^ { * } | \theta ) } \right] } \\ & { \geq I ( x ^ { * } ; \hat { y } ^ { * } | \theta ) - \mathbb { E } \left[ \log \frac { q ( z ^ { * } | x ^ { * } , \theta ) } { r ( z ^ { * } ) } \right] = I ( x ^ { * } ; \hat { y } ^ { * } | \theta ) - \mathbb { E } \left[ D _ { \mathrm { K L } } ( q ( z ^ { * } | x ^ { * } , \theta ) | | r ( z ^ { * } ) ) \right] } \end{array}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $r ( z ^ { * } )$ is a variational approximation to the marginal, the first inequality follows from the statistical dependencies in our model (see Figure 4 and Appendix A.2 for the proof). By simultaneously minimizing $\mathbb { E } \left[ D _ { \mathrm { K L } } \big ( q ( z ^ { * } | x ^ { * } , \theta ) | | r ( z ^ { * } ) \big ) \right]$ and maximizing the mutual information $I ( x ^ { * } ; \hat { y } ^ { * } | \theta )$ , we can implicitly encourage the model to use the task training data $\mathcal { D }$ .
|
| 69 |
+
|
| 70 |
+
For non-mutually-exclusive problems, the true label $y ^ { * }$ is dependent on $x ^ { * }$ . If the model has the memorization problem and $\bar { I } ( x ^ { * } ; \hat { y } ^ { * } | \theta ) = 0$ , then $q ( \boldsymbol { \hat { y } } ^ { * } | \boldsymbol { x } ^ { * } , \boldsymbol { \hat { \theta } } , \mathcal { D } ) = q ( \boldsymbol { \hat { y } } ^ { * } | \boldsymbol { x } ^ { * } , \boldsymbol { \theta } ) = q ( \boldsymbol { \hat { y } } ^ { * } | \boldsymbol { \theta } )$ , which means the model predictions do not depend on $x ^ { * }$ or $\mathcal { D }$ . Hence, in practical problems, the predictions generated from the model will have low accuracy.
|
| 71 |
+
|
| 72 |
+
This suggests minimizing the training loss in Eq. (1) can increase $I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta )$ or $I ( x ^ { * } ; \hat { y } ^ { * } | \theta )$ . Replacing the maximization of $I ( x ^ { * } ; \hat { y } ^ { * } | \theta )$ in Eq. (2) with minimizing the training loss results in the following regularized training objective
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { r } { \frac { 1 } { N } \sum _ { i } \mathbb { E } _ { q ( \theta | M ) q ( \phi | \mathcal { D } _ { i } , \theta ) } \left[ - \frac { 1 } { K } \displaystyle \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { i } ^ { * } } \log q ( \hat { y } ^ { * } = y ^ { * } | x ^ { * } , \phi , \theta ) + \beta D _ { \mathrm { K L } } ( q ( z ^ { * } | x ^ { * } , \theta ) | | r ( z ^ { * } ) ) \right] } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $\log q ( \hat { y } ^ { \ast } | x ^ { \ast } , \phi , \theta )$ is estimated by $\log q ( \hat { y } ^ { \ast } | z ^ { \ast } , \phi , \theta )$ with $z ^ { * } \sim q ( z ^ { * } | x ^ { * } , \theta )$ , $\beta$ modulates the regularizer and $r ( z ^ { * } )$ can be set as $\mathcal { N } ( z ^ { * } ; 0 , I )$ . We refer to this regularizer as meta-regularization (MR) on the activations.
|
| 79 |
+
|
| 80 |
+
As we demonstrate in Section 6, we find that this regularizer performs well, but in some cases can fail to prevent the memorization problem. Our hypothesis is that in these cases, the network can sidestep the information constraint by storing the prediction of $y ^ { * }$ in a part of $z ^ { * }$ , which incurs a small penalty in Eq. (3) and small lower bound in Eq. (2).
|
| 81 |
+
|
| 82 |
+
# 4.2 META REGULARIZATION ON WEIGHTS
|
| 83 |
+
|
| 84 |
+
Alternatively, we can penalize the task information stored in the meta-parameters $\theta$ . Here, we provide an informal argument and provide the complete argument in Appendix A.3. Analogous to the supervised setting (Achille & Soatto, 2018), given meta-training dataset $\mathcal { M }$ , we consider $\theta$ as random variable where the randomness can be introduced by training stochasticity. We model the stochasticity over $\theta$ with a Gaussian distribution $\mathcal { N } ( \boldsymbol { \theta } ; \boldsymbol { \theta } _ { \mu } , \boldsymbol { \theta } _ { \sigma } )$ with learned mean and variance parameters per dimension (Blundell et al., 2015; Achille & Soatto, 2018). By penalizing $I ( y _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } )$ , we can limit the information about the training tasks stored in the metaparameters $\theta$ and thus require the network to use the task training data to make accurate predictions. We can tractably upper bound it by
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\begin{array} { r } { I ( y _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } ) = \mathbb { E } \left[ \log \frac { q ( \theta | \mathcal { M } ) } { q ( \theta | x _ { 1 : N } ^ { * } ) } \right] \leq \mathbb { E } \left[ \mathcal { D } _ { \mathrm { K L } } \left( q ( \theta | \mathcal { M } ) \| r ( \theta ) \right) \right] , } \end{array}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where $r ( \theta )$ is a variational approximation to the marginal, which we set to $\mathcal { N } ( \theta ; 0 , I )$ . In practice, we apply meta-regularization to the meta-parameters $\theta$ that are not used to adapt to the task training data and denote the other parameters as $\tilde { \theta }$ . In this way, we control the complexity of the network that can predict the test labels without using task training data, but we do not limit the complexity of the network that processes the task training data. Our final meta-regularized objective can be written as
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array} { r } { \frac { 1 } { N } \sum _ { i } \mathbb { E } _ { q ( \theta ; \theta _ { i } , \theta _ { \sigma } ) q ( \delta ) | \mathcal { D } _ { i } , \bar { \theta } ) } \left[ - \frac { 1 } { K } \displaystyle \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { \bar { \epsilon } } ^ { * } } \log q ( \hat { y } ^ { * } = y ^ { * } | x ^ { * } , \phi , \theta , \tilde { \theta } ) + \beta D _ { \mathrm { K L } } ( q ( \theta ; \theta _ { \mu } , \theta _ { \sigma } ) | | r ( \theta ) ) \right] } \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
For MAML, we apply meta-regularization to the parameters uninvolved in the task adaptation. For CNP, we apply meta-regularization to the encoder parameters. The detailed algorithms are shown in Algorithm 1 and 2 in the appendix.
|
| 97 |
+
|
| 98 |
+
# 4.3 DOES META REGULARIZATION LEAD TO BETTER GENERALIZATION?
|
| 99 |
+
|
| 100 |
+
Now that we have derived meta regularization approaches for mitigating the memorization problem, we theoretically analyze whether meta regularization leads to better generalization via a PAC-Bayes bound. In particular, we study meta regularization (MR) on the weights (W) of MAML, i.e. MRMAML (W), as a case study.
|
| 101 |
+
|
| 102 |
+
Meta regularization on the weights of MAML uses a Gaussian distribution $\mathcal { N } ( \boldsymbol { \theta } ; \boldsymbol { \theta } _ { \mu } , \boldsymbol { \theta } _ { \sigma } )$ to model the stochasticity in the weights. Given a task and task training data, the expected error is given by
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
e r ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } , \mathcal { T } ) = \mathbb { E } _ { \theta \sim \mathcal { N } ( \theta ; \theta _ { \mu } , \theta _ { \sigma } ) , \phi \sim q ( \phi | \theta , \mathcal { D } ) , ( x ^ { * } , y ^ { * } ) \sim p ( x , y | \mathcal { T } ) } \left[ \mathcal { L } ( x ^ { * } , y ^ { * } , \phi ) \right] ,
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where the prediction loss $\mathcal { L } ( x ^ { * } , y ^ { * } , \phi _ { i } )$ is bounded1. Then, we would like to minimize the error on novel tasks
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
e r ( \theta _ { \mu } , \theta _ { \sigma } ) = \mathbb { E } _ { \mathcal { T } \sim p ( \mathcal { T } ) , \mathcal { D } \sim p ( x , y | \mathcal { T } ) } \left[ e r ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } , \mathcal { T } ) \right]
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
We only have a finite sample of training tasks, so computing $e r ( Q )$ is intractable, but we can form an empirical estimate:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\begin{array} { l } { { \displaystyle \quad \displaystyle \hat { e r } ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * } ) } } \\ { \displaystyle = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \underbrace { \mathbb { E } _ { \theta \sim \mathcal { N } ( \theta ; \theta _ { \mu } , \theta _ { \sigma } ) , \phi _ { i } \sim q ( \phi | \theta , \mathcal { D } _ { i } ) } \left[ - \frac { 1 } { K } \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { i } ^ { * } } \log q ( \hat { y } ^ { * } = y ^ { * } | x ^ { * } , \phi _ { i } ) \right] } _ { \displaystyle \hat { e r } ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) } } \end{array}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where for exposition we have assumed $| \mathcal { D } _ { i } ^ { * } | = K$ are the same for all tasks. We would like to relate $e r ( \theta _ { \mu } , \theta _ { \sigma } )$ and $\hat { e r } ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * } )$ , but the challenge is that $\theta _ { \mu }$ and $\theta _ { \sigma }$ are derived from the meta-training tasks $\mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * }$ . There are two sources of generalization error: (i) error due to the finite number of observed tasks and (ii) error due to the finite number of examples observed per task. Closely following the arguments in (Amit & Meir, 2018), we apply a standard PAC-Bayes bound to each of these and combine the results with a union bound, resulting in the following Theorem.
|
| 121 |
+
|
| 122 |
+
Theorem 1. Let $P ( \theta )$ be an arbitrary prior distribution over $\theta$ that does not depend on the metatraining data. Then for any $\delta \in ( 0 , 1 ]$ , with probability at least $1 - \delta$ , the following inequality holds uniformly for all choices of $\theta _ { \mu }$ and $\theta _ { \sigma }$ ,
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\begin{array} { l } { \displaystyle e r ( \theta _ { \mu } , \theta _ { \sigma } ) \leq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \hat { e } r ( \theta _ { \mu } , \theta _ { \sigma } , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) + } \\ { \displaystyle \left( \sqrt { \frac { 1 } { 2 ( K - 1 ) } } + \sqrt { \frac { 1 } { 2 ( n - 1 ) } } \right) \sqrt { D _ { K L } ( \mathcal { N } ( \theta ; \theta _ { \mu } , \theta _ { \sigma } ) | | P ) + \log \frac { n ( K + 1 ) } { \delta } } , } \end{array}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where n is the number of meta-training tasks and $K$ is the number of per-task validation datapoints.
|
| 129 |
+
|
| 130 |
+
We defer the proof to the Appendix A.4. The key difference from the result in (Amit & Meir, 2018) is that we leverage the fact that the task training data is split into training and validation.
|
| 131 |
+
|
| 132 |
+
In practice, we set $P ( \theta ) = r ( \theta ) = \mathcal { N } ( \theta ; 0 , I )$ . If we can achieve a low value for the bound, then with high probability, our test error will also be low. As shown in the Appendix A.4, by a first order Taylor expansion of the the second term of the RHS in Eq.(9) and setting the coefficient of the KL√ √ term as β = 1/2(K−1)+ 1/2(n−1)√ , we recover the MR-MAML(W) objective (Eq.(5)). $\beta$ tradesoff between the tightness of the generalization bound and the probability that it holds true. The result of this bound suggests that the proposed meta-regularization on weights does indeed improve generalization on the meta-test set.
|
| 133 |
+
|
| 134 |
+
# 5 RELATED WORK
|
| 135 |
+
|
| 136 |
+
Previous works have developed approaches for mitigating various forms of overfitting in metalearning. These approaches aim to improve generalization in several ways: by reducing the number of parameters that are adapted in MAML (Zintgraf et al., 2019), by compressing the task embedding (Lee et al., 2019), through data augmentation from a GAN (Zhang et al., 2018), by using an auxiliary objective on task gradients (Guiroy et al., 2019), and via an entropy regularization objective (Jamal & Qi, 2019). These methods all focus on the setting with mutually-exclusive task distributions. We instead recognize and formalize the memorization problem, a particular form of overfitting that manifests itself with non-mutually-exclusive tasks, and offer a general and principled solution. Unlike prior methods, our approach is applicable to both contextual and gradientbased meta-learning methods. We additionally validate that prior regularization approaches, namely TAML (Jamal & Qi, 2019), are not effective for addressing this problem setting.
|
| 137 |
+
|
| 138 |
+
Our derivation uses a Bayesian interpretation of meta-learning (Tenenbaum, 1999; Fei-Fei et al., 2003; Edwards & Storkey, 2016; Grant et al., 2018; Gordon et al., 2018; Finn et al., 2018; Kim et al., 2018; Harrison et al., 2018). Some Bayesian meta-learning approaches place a distributional loss on the inferred task variables to constrain them to a prior distribution (Garnelo et al., 2018b; Gordon et al., 2018; Rakelly et al., 2019), which amounts to an information bottleneck on the latent task variables. Similarly Zintgraf et al. (2019); Lee et al. (2019); Guiroy et al. (2019) aim to produce simpler or more compressed task adaptation processes. Our approach does the opposite, penalizing information from the inputs and parameters, to encourage the task-specific variables to contain greater information driven by the per-task data.
|
| 139 |
+
|
| 140 |
+
We use PAC-Bayes theory to study the generalization error of meta-learning and meta-regularization. Pentina & Lampert (2014) extends the single task PAC-Bayes bound (McAllester, 1999) to the multitask setting, which quantifies the gap between empirical error on training tasks and the expected error on new tasks. More recent research shows that, with tightened generalization bounds as the training objective, the algorithms can reduce the test error for mutually-exclusive tasks (Galanti et al., 2016; Amit & Meir, 2018). Our analysis is different from these prior works in that we only include preupdate meta parameters in the generalization bound rather than both pre-update and post-update parameters. In the derivation, we also explicitly consider the splitting of data into the task training set and task validation set, which is aligned with the practical setting.
|
| 141 |
+
|
| 142 |
+
The memorization problem differs from overfitting in conventional supervised learning in several aspects. First, memorization occurs at the task level rather than datapoint level and the model memorizes functions rather than labels. In particular, within a training task, the model can generalize to new datapoints, but it fails to generalize to new tasks. Second, the source of information for achieving generalization is different. For meta-learning the information is from both the meta-training data and new task training data but in standard supervised setting the information is only from training data. Finally, the aim of regularization is different. In the conventional supervised setting, regularization methods such as weight decay (Krogh & Hertz, 1992), dropout (Srivastava et al., 2014), the information bottleneck (Tishby et al., 2000; Tishby & Zaslavsky, 2015), and Bayes-by-Backprop (Blundell et al., 2015) are used to balance the network complexity and the information in the data. The aim of meta-regularization is different. It governs the model complexity to avoid one complex model solving all tasks, while allowing the model’s dependency on the task data to be complex. We further empirically validate this difference, finding that standard regularization techniques do not solve the memorization problem.
|
| 143 |
+
|
| 144 |
+
# 6 EXPERIMENTS
|
| 145 |
+
|
| 146 |
+
In the experimental evaluation, we aim to answer the following questions: (1) How prevalent is the memorization problem across different algorithms and domains? (2) How does the memorization problem affect the performance of algorithms on non-mutually-exclusive task distributions? (3) Is our meta-regularization approach effective for mitigating the problem and is it compatible with multiple types of meta-learning algorithms? (4) Is the problem of memorization empirically distinct from that of the standard overfitting problem?
|
| 147 |
+
|
| 148 |
+
To answer these questions, we propose several meta-learning problems involving non-mutuallyexclusive task distributions, including two problems that are adapted from prior benchmarks with mutually-exclusive task distributions. We consider model-agnostic meta-learning (MAML) and conditional neural processes (CNP) as representative meta-learning algorithms. We study both variants of our method in combination with MAML and CNP. When comparing with meta-learning algorithms with and without meta-regularization, we use the same neural network architecture, while other hyperparameters are tuned via cross-validation per-problem.
|
| 149 |
+
|
| 150 |
+
# 6.1 SINUSOID REGRESSION
|
| 151 |
+
|
| 152 |
+
First, we consider a toy sinusoid regression problem that is non-mutually-exclusive. The data for each task is created in the following way: the amplitude $A$ of the sinusoid is uniformly sampled from a set of 20 equally-spaced points $\{ 0 . 1 , 0 . 3 , \cdot \cdot \cdot , 4 \}$ ; $u$ is sampled uniformly from $[ - 5 , 5 ]$ and $y$ is sampled from $\bar { \mathcal { N } } ( A \bar { \sin ( u ) } , 0 . \bar { 1 } ^ { 2 } )$ . We provide both $u$ and the amplitude $A$ (as a one-hot vector) as input, i.e. $x = ( u , { \dot { A } } )$ . At the test time, we expand the range of the tasks by randomly sampling the data-generating amplitude $A$ uniformly from [0.1, 4] and use a random one-hot vector for the input to the network. The meta-training tasks are a proper subset of the meta-test tasks.
|
| 153 |
+
|
| 154 |
+
Without the additional amplitude input, both MAML and CNP can easily solve the task and generalize to the meta-test tasks. However, once we add the additional amplitude input which indicates the task identity, we find that both MAML and CNP converge to the complete memorization solution and fail to generalize well to test data (Table 1 and Appendix Figures 7 and 8). Both meta-regularized MAML and CNP (MR-MAML) and (MR-CNP) instead converge to a solution that adapts to the data, and as a result, greatly outperform the unregularized methods.
|
| 155 |
+
|
| 156 |
+
Table 1: Test MSE for the non-mutually-exclusive sinusoid regression problem. We compare MAML and CNP against meta-regularized MAML (MR-MAML) and meta-regularized CNP (MR-CNP) where regularization is either on the activations (A) or the weights (W). We report the mean over 5 trials and the standard deviation in parentheses.
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Methods</td><td>MAML</td><td>MR-MAML (A) MR-MAML (W) (ours)</td><td>(ours)</td><td>CNP</td><td>MR-CNP (A) (ours)</td><td>MR-CNP (W) (ours)</td></tr><tr><td>5 shot</td><td>0.46 (0.04)</td><td>0.17 (0.03)</td><td>0.16 (0.04)</td><td>0.91 (0.10)</td><td>0.10 (0.01)</td><td>0.11 (0.02)</td></tr><tr><td>10 shot</td><td>0.13 (0.01)</td><td>0.07 (0.02)</td><td>0.06 (0.01)</td><td>0.92 (0.05)</td><td>0.09 (0.01)</td><td>0.09 (0.01)</td></tr></table>
|
| 159 |
+
|
| 160 |
+
# 6.2 POSE PREDICTION
|
| 161 |
+
|
| 162 |
+
To illustrate the memorization problem on a more realistic task, we create a multi-task regression dataset based on the Pascal 3D data (Xiang et al., 2014) (See Appendix A.5.1 for a complete description). We randomly select 50 objects for meta-training and the other 15 objects for meta-testing. For each object, we use MuJoCo (Todorov et al., 2012) to render images with random orientations of the instance on a table, visualized in Figure 1. For the meta-learning algorithm, the observation $( x )$ is the $1 2 8 \times 1 2 8$ gray-scale image and the label $( y )$ is the orientation relative to a fixed canonical pose. Because the number of objects in the meta-training dataset is small, it is straightforward for a single network to memorize the canonical pose for each training object and to infer the orientation from the input image, thus achieving a low meta-training error without using $\mathcal { D }$ . However, this solution performs poorly at the test time because it has not seen the novel objects and their canonical poses.
|
| 163 |
+
|
| 164 |
+
Optimization modes and hyperparameter sensitivity. We choose the learning rate from $\{ 0 . 0 0 0 1 $ , $0 . 0 0 0 5 , 0 . 0 0 1 \}$ for each method, $\beta$ from $\{ 1 0 ^ { - 6 } , 1 0 ^ { - 5 } , \cdot \cdot \cdot , 1 \}$ for meta-regularization and report the results with the best hyperparameters (as measured on the meta-validation set) for each method. In this domain, we find that the convergence point of the meta-learning algorithm is determined by both the optimization landscape of the objective and the training dynamics, which vary due to stochastic gradients and the random initialization. In particular, we observe that there are two modes of the objective, one that corresponds to complete memorization and one that corresponds to successful adaptation to the task data. As illustrated in the Appendix, we find that models that converge to a memorization solution have lower training error than solutions which use the task training data, indicating a clear need for meta-regularization. When the meta-regularization is on the activations, the solution that the algorithms converge to depends on the learning rate, while MR on the weights consistently converges to the adaptation solution (See Appendix Figure 9 for the sensitivity analysis). This suggests that MR on the activations is not always successful at preventing memorization. Our hypothesis is that there exists a solution in which the bottlenecked activations encode only the prediction $y ^ { * }$ , and discard other information. Such a solution can achieve both low training MSE and low regularization loss without using task training data, particularly if the predicted label contains a small number of bits (i.e., because the activations will have low information complexity).
|
| 165 |
+
|
| 166 |
+
However, note that this solution does not achieve low regularization error when applying MR to the weights because the function needed to produce the predicted label does not have low information complexity. As a result, meta-regularization on the weights does not suffer from this pathology and is robust to different learning rates. Therefore, we will use regularization on weights as the proposed methodology in the following experiments and algorithms in Appendix A.1.
|
| 167 |
+
|
| 168 |
+
Quantitative results. We compare MAML and CNP with their meta-regularized versions (Table 2). We additionally include fine-tuning as baseline, which trains a single network on all the instances jointly, and then fine-tunes on the task training data. Meta-learning with meta-regularization (on weights) outperforms all competing methods by a large margin. We show test error as a function of the meta-regularization coefficient $\beta$ in Appendix Figure 2. The curve reflects the trade-off when changing the amount of information contained in the weights. This indicates that $\beta$ gives a knob that allows us to tune the degree to which the model uses the data to adapt versus relying on the prior.
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 2: The performance of MAML and CNP with meta-regularization on the weights, as a function of the regularization strength $\beta$ . We observe $\beta$ provides us a knob with which we can control the degree to which the algorithm adapts versus memorizes. When $\beta$ is small, we observe memorization, leading to large test error; when $\beta$ is too large, the network does not store enough information in the weights to perform the task. Crucially, in the middle of these two extremes, meta-regularization is effective in inducing adaptation, leading to good generalization. The plot shows the mean and standard deviation across 5 meta-training runs.
|
| 172 |
+
|
| 173 |
+
Table 2: Meta-test MSE for the pose prediction problem. We compare MR-MAML (ours) with conventional MAML and fine-tuning (FT). We report the average over 5 trials and standard deviation in parentheses.
|
| 174 |
+
|
| 175 |
+
<table><tr><td>Method</td><td>MAML</td><td>MR-MAML (W) (ours)</td><td>CNP</td><td>MR-CNP (W) (ours)</td><td>FT</td><td>FT + Weight Decay</td></tr><tr><td>MSE</td><td>5.39 (1.31)</td><td>2.26 (0.09)</td><td>8.48 (0.12)</td><td>2.89 (0.18)</td><td>7.33 (0.35)</td><td>6.16 (0.12)</td></tr></table>
|
| 176 |
+
|
| 177 |
+
Comparison to standard regularization. We compare our meta-regularization with standard regularization techniques, weight decay (Krogh & Hertz, 1992) and Bayes-by-Backprop (Blundell et al., 2015), in Table 3. We observe that simply applying standard regularization to all the weights, as in conventional supervised learning, does not solve the memorization problem, which validates that the memorization problem differs from the standard overfitting problem.
|
| 178 |
+
|
| 179 |
+
Table 3: Meta-testing MSE for the pose prediction problem. We compare MR-CNP (ours) with conventional CNP, CNP with weight decay, and CNP with Bayes-by-Backprop (BbB) regularization on all the weights. We report the average over 5 trials and standard deviation in parentheses.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Methods</td><td>CNP</td><td>CNP + Weight Decay</td><td>CNP + BbB</td><td>MR-CNP (W) (ours)</td></tr><tr><td>MSE</td><td>8.48 (0.12)</td><td>6.86 (0.27)</td><td>7.73 (0.82)</td><td>2.89 (0.18)</td></tr></table>
|
| 182 |
+
|
| 183 |
+
# 6.3 OMNIGLOT AND MINIIMAGENET CLASSIFICATION
|
| 184 |
+
|
| 185 |
+
Next, we study memorization in the few-shot classification problem by adapting the few-shot Omniglot (Lake et al., 2011) and MiniImagenet (Ravi & Larochelle, 2016; Vinyals et al., 2016) benchmarks to the non-mutually-exclusive setting. In the non-mutually-exclusive N-way K-shot classification problem, each class is (randomly) assigned a fixed classification label from 1 to N. For each task, we randomly select a corresponding class for each classification label and $K$ task training data points and $K$ task test data points from that class2. This ensures that each class takes only one classification label across tasks and different tasks are non-mutually-exclusive (See Appendix A.5.2 for details).
|
| 186 |
+
|
| 187 |
+
We evaluate MAML, TAML (Jamal & Qi, 2019), MR-MAML (ours), fine-tuning, and a nearest neighbor baseline on non-mutually-exclusive classification tasks (Table 4). We find that MR-MAML significantly outperforms previous methods on all of these tasks. To better understand the problem, for the MAML variants, we calculate the pre-update accuracy (before adaptation on the task training data) on the meta-training data in Appendix Table 5. The high pre-update meta-training accuracy and low meta-test accuracy are evidence of the memorization problem for MAML and TAML, indicating that it is learning a model that ignores the task data. In contrast, MR-MAML successfully controls the pre-update accuracy to be near chance and encourages the learner to use the task training data to achieve low meta-training error, resulting in good performance at meta-test time.
|
| 188 |
+
|
| 189 |
+
Finally, we verify that meta-regularization does not degrade performance on the standard mutuallyexclusive task. We evaluate performance as a function of regularization strength on the standard 20-way 1-shot Omniglot task (Appendix Figure 10), and we find that small values of $\beta$ lead to slight improvements over MAML. This indicates that meta-regularization substantially improves performance in the non-mutually-exclusive setting without degrading performance in other settings.
|
| 190 |
+
|
| 191 |
+
Table 4: Meta-test accuracy on non-mutually-exclusive (NME) classification. The fine-tuning and nearestneighbor baseline results for MiniImagenet are from (Ravi & Larochelle, 2016).
|
| 192 |
+
|
| 193 |
+
<table><tr><td>NME Omniglot</td><td>20-way 1-shot</td><td>20-way 5-shot</td></tr><tr><td>MAML</td><td>7.8 (0.2)%</td><td>50.7 (22.9)%</td></tr><tr><td>TAML (Jamal & Qi,2019)</td><td>9.6 (2.3)%</td><td>67.9 (2.3)%</td></tr><tr><td>MR-MAML (W) (ours)</td><td>83.3 (0.8)%</td><td>94.1 (0.1)%</td></tr></table>
|
| 194 |
+
|
| 195 |
+
<table><tr><td>NME Minilmagenet</td><td></td><td>5-way 1-shot 5-way 5-shot</td></tr><tr><td>Fine-tuning</td><td>28.9 (0.5))%</td><td>49.8 (0.8))%</td></tr><tr><td>Nearest-neighbor</td><td>41.1 (0.7)%</td><td>51.0 (0.7) %</td></tr><tr><td>MAML</td><td>26.3 (0.7)%</td><td>41.6 (2.6)%</td></tr><tr><td>TAML (Jamal & Qi, 2019)</td><td>26.1 (0.6)%</td><td>44.2 (1.7)%</td></tr><tr><td>MR-MAML (W) (ours)</td><td>43.6 (0.6)%</td><td>53.8 (0.9)%</td></tr></table>
|
| 196 |
+
|
| 197 |
+
# 7 CONCLUSION AND DISCUSSION
|
| 198 |
+
|
| 199 |
+
Meta-learning has achieved remarkable success in few-shot learning problems. However, we identify a pitfall of current algorithms: the need to create task distributions that are mutually exclusive. This requirement restricts the domains that meta-learning can be applied to. We formalize the failure mode, i.e. the memorization problem, that results from training on non-mutually-exclusive tasks and distinguish it as a function-level overfitting problem compared to the the standard label-level overfitting in supervised learning.
|
| 200 |
+
|
| 201 |
+
We illustrate the memorization problem with different meta-learning algorithms on a number of domains. To address the problem, we propose an algorithm-agnostic meta-regularization (MR) approach that leverages an information-theoretic perspective of the problem. The key idea is that by placing a soft restriction on the information flow from meta-parameters in prediction of test set labels, we can encourage the meta-learner to use task training data during meta-training. We achieve this by successfully controlling the complexity of model prior to the task adaptation.
|
| 202 |
+
|
| 203 |
+
The memorization issue is quite broad and is likely to occur in a wide range of real-world applications, for example, personalized speech recognition systems, learning robots that can adapt to different environments (Nagabandi et al., 2018), and learning goal-conditioned manipulation skills using trial-and-error data. Further, this challenge may also be prevalent in other conditional prediction problems, beyond meta-learning, an interesting direction for future study. By both recognizing the challenge of memorization and developing a general and lightweight approach for solving it, we believe that this work represents an important step towards making meta-learning algorithms applicable to and effective on any problem domain.
|
| 204 |
+
|
| 205 |
+
# ACKNOWLEDGEMENT
|
| 206 |
+
|
| 207 |
+
The authors would like to thank Alexander A. Alemi, Kevin Murphy, Luke Metz, Abhishek Kumar and the anonymous reviewers for helpful discussions and feedback. M. Yin and M. Zhou acknowledge the support of the U.S. National Science Foundation under Grant IIS-1812699.
|
| 208 |
+
|
| 209 |
+
# REFERENCES
|
| 210 |
+
|
| 211 |
+
Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations. The Journal of Machine Learning Research, 19(1):1947–1980, 2018.
|
| 212 |
+
|
| 213 |
+
Alexander A Alemi, Ian Fischer, Joshua V Dillon, and Kevin Murphy. Deep variational information bottleneck. arXiv preprint arXiv:1612.00410, 2016.
|
| 214 |
+
|
| 215 |
+
Ron Amit and Ron Meir. Meta-learning by adjusting priors based on extended pac-bayes theory. In International Conference on Machine Learning, pp. 205–214, 2018.
|
| 216 |
+
|
| 217 |
+
Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural networks. arXiv preprint arXiv:1505.05424, 2015.
|
| 218 |
+
|
| 219 |
+
Thomas M Cover and Joy A Thomas. Elements of information theory. John Wiley & Sons, 2012.
|
| 220 |
+
|
| 221 |
+
Harrison Edwards and Amos Storkey. Towards a neural statistician. arXiv preprint arXiv:1606.02185, 2016.
|
| 222 |
+
|
| 223 |
+
Li Fei-Fei et al. A bayesian approach to unsupervised one-shot learning of object categories. In Proceedings Ninth IEEE International Conference on Computer Vision, pp. 1134–1141. IEEE, 2003.
|
| 224 |
+
|
| 225 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine LearningVolume 70, pp. 1126–1135. JMLR. org, 2017.
|
| 226 |
+
|
| 227 |
+
Chelsea Finn, Kelvin Xu, and Sergey Levine. Probabilistic model-agnostic meta-learning. In Advances in Neural Information Processing Systems, pp. 9516–9527, 2018.
|
| 228 |
+
|
| 229 |
+
Tomer Galanti, Lior Wolf, and Tamir Hazan. A theoretical framework for deep transfer learning. Information and Inference: A Journal of the IMA, 5(2):159–209, 2016.
|
| 230 |
+
|
| 231 |
+
Marta Garnelo, Dan Rosenbaum, Chris J Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo J Rezende, and SM Eslami. Conditional neural processes. arXiv preprint arXiv:1807.01613, 2018a.
|
| 232 |
+
|
| 233 |
+
Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J Rezende, SM Eslami, and Yee Whye Teh. Neural processes. arXiv preprint, 2018b.
|
| 234 |
+
|
| 235 |
+
Jonathan Gordon, John Bronskill, Matthias Bauer, Sebastian Nowozin, and Richard E Turner. Metalearning probabilistic inference for prediction. arXiv preprint arXiv:1805.09921, 2018.
|
| 236 |
+
|
| 237 |
+
Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradientbased meta-learning as hierarchical bayes. arXiv preprint arXiv:1801.08930, 2018.
|
| 238 |
+
|
| 239 |
+
Simon Guiroy, Vikas Verma, and Christopher Pal. Towards understanding generalization in gradientbased meta-learning. arXiv preprint arXiv:1907.07287, 2019.
|
| 240 |
+
|
| 241 |
+
James Harrison, Apoorva Sharma, and Marco Pavone. Meta-learning priors for efficient online bayesian regression. arXiv preprint arXiv:1807.08912, 2018.
|
| 242 |
+
|
| 243 |
+
Muhammad Abdullah Jamal and Guo-Jun Qi. Task agnostic meta-learning for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 11719– 11727, 2019.
|
| 244 |
+
|
| 245 |
+
Taesup Kim, Jaesik Yoon, Ousmane Dia, Sungwoong Kim, Yoshua Bengio, and Sungjin Ahn. Bayesian model-agnostic meta-learning. arXiv preprint arXiv:1806.03836, 2018.
|
| 246 |
+
|
| 247 |
+
Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2, 2015.
|
| 248 |
+
|
| 249 |
+
Anders Krogh and John A Hertz. A simple weight decay can improve generalization. In Advances in neural information processing systems, pp. 950–957, 1992.
|
| 250 |
+
|
| 251 |
+
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.
|
| 252 |
+
|
| 253 |
+
Yoonho Lee, Wonjae Kim, and Seungjin Choi. Discrete infomax codes for meta-learning. arXiv preprint arXiv:1905.11656, 2019.
|
| 254 |
+
|
| 255 |
+
David A McAllester. Pac-bayesian model averaging. In COLT, volume 99, pp. 164–170. Citeseer, 1999.
|
| 256 |
+
|
| 257 |
+
Anusha Nagabandi, Ignasi Clavera, Simin Liu, Ronald S Fearing, Pieter Abbeel, Sergey Levine, and Chelsea Finn. Learning to adapt in dynamic, real-world environments through metareinforcement learning. arXiv preprint arXiv:1803.11347, 2018.
|
| 258 |
+
|
| 259 |
+
Anastasia Pentina and Christoph Lampert. A pac-bayesian bound for lifelong learning. In International Conference on Machine Learning, pp. 991–999, 2014.
|
| 260 |
+
|
| 261 |
+
Kate Rakelly, Aurick Zhou, Deirdre Quillen, Chelsea Finn, and Sergey Levine. Efficient off-policy meta-reinforcement learning via probabilistic context variables. arXiv preprint arXiv:1903.08254, 2019.
|
| 262 |
+
|
| 263 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. In ICLR 2016, 2016.
|
| 264 |
+
|
| 265 |
+
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.
|
| 266 |
+
|
| 267 |
+
Jurgen Schmidhuber. Evolutionary principles in self-referential learning. On learning how to learn: The meta-meta-... hook.) Diploma thesis, Institut f. Informatik, Tech. Univ. Munich, 1:2, 1987.
|
| 268 |
+
|
| 269 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014.
|
| 270 |
+
|
| 271 |
+
Joshua Brett Tenenbaum. A Bayesian framework for concept learning. PhD thesis, Massachusetts Institute of Technology, 1999.
|
| 272 |
+
|
| 273 |
+
Sebastian Thrun and Lorien Pratt. Learning to learn. Springer Science & Business Media, 2012.
|
| 274 |
+
|
| 275 |
+
Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In 2015 IEEE Information Theory Workshop (ITW), pp. 1–5. IEEE, 2015.
|
| 276 |
+
|
| 277 |
+
Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
|
| 278 |
+
|
| 279 |
+
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.
|
| 280 |
+
|
| 281 |
+
Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pp. 3630–3638, 2016.
|
| 282 |
+
|
| 283 |
+
Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond pascal: A benchmark for 3d object detection in the wild. In IEEE Winter Conference on Applications of Computer Vision (WACV), 2014.
|
| 284 |
+
|
| 285 |
+
Ruixiang Zhang, Tong Che, Zoubin Ghahramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In Advances in Neural Information Processing Systems, pp. 2365–2374, 2018.
|
| 286 |
+
|
| 287 |
+
Luisa M Zintgraf, Kyriacos Shiarlis, Vitaly Kurin, Katja Hofmann, and Shimon Whiteson. Fast context adaptation via meta-learning. In Thirty-sixth International Conference on Machine Learning (ICML 2019), 2019.
|
| 288 |
+
|
| 289 |
+
# A APPENDIX
|
| 290 |
+
|
| 291 |
+
# A.1 ALGORITHM
|
| 292 |
+
|
| 293 |
+
We present the detailed algorithm for meta-regularization on weights with conditional neural processes (CNP) in Algorithm 1 and with model-agnostic meta-learning (MAML) in Algorithm 2. For CNP, we add the regularization on the weights $\theta$ of encoder and leave other weights $\bar { \theta }$ unrestricted. For MAML, we similarly regularize the weights $\theta$ from input to an intermediate hidden layer and leave the weights $\tilde { \theta }$ for adaptation unregularized. In this way, we restrict the complexity of the pre-adaptation model not the post-adaptation model.
|
| 294 |
+
|
| 295 |
+
# Algorithm 1: Meta-Regularized CNP
|
| 296 |
+
|
| 297 |
+
input : Task distribution $p ( \mathcal { T } )$ ; Encoder weights distribution $q ( \theta ; \tau ) = \mathcal { N } ( \theta ; \tau )$ with Gaussian parameters $\tau = ( \theta _ { \mu } , \theta _ { \sigma } )$ ; Prior distribution $r ( \theta )$ and Lagrangian multiplier $\beta$ ; $\tilde { \theta }$ that parameterizes feature extractor $h _ { \tilde { \theta } } ( \cdot )$ and decoder $T _ { \tilde { \theta } } ( \cdot )$ . Stepsize $\alpha$ .
|
| 298 |
+
|
| 299 |
+
output: Network parameter $\tau , { \tilde { \theta } }$
|
| 300 |
+
|
| 301 |
+
Initialize $\tau$ , $\tilde { \theta }$ randomly; while not converged do
|
| 302 |
+
|
| 303 |
+
Sample a mini-batch of $\{ \mathcal { T } _ { i } \}$ from $p ( \mathcal { T } )$ ;
|
| 304 |
+
Sample $\theta \sim q ( \theta ; \tau )$ with reparameterization ;
|
| 305 |
+
for all $\mathcal { T } _ { i } \in \{ \mathcal { T } _ { i } \}$ do Sample $\mathcal { D } _ { i } = ( \boldsymbol { \boldsymbol { x } } _ { i } , \boldsymbol { \boldsymbol { y } } _ { i } )$ , $\mathcal { D } _ { i } ^ { * } = ( \boldsymbol { x } _ { i } ^ { * } , \boldsymbol { y } _ { i } ^ { * } )$ from $\mathcal { T } _ { i }$ ; Encode observation $z _ { i } = g _ { \theta } ( \pmb { x } _ { i } )$ , $z _ { i } ^ { * } = g _ { \boldsymbol { \theta } } ( \boldsymbol { x } _ { i } ^ { * } )$ ; Compute task context $\phi _ { i } = a ( h _ { \tilde { \theta } } ( z _ { i } , \pmb { y } _ { i } ) )$ with aggregator $a ( \cdot )$ ;
|
| 306 |
+
|
| 307 |
+
Update $\begin{array} { r } { \tilde { \theta } \gets \tilde { \theta } + \alpha \nabla _ { \tilde { \theta } } \sum _ { \mathcal { T } _ { i } } \log q ( \pmb { y } _ { i } ^ { * } | T _ { \tilde { \theta } } ( \pmb { z } _ { i } ^ { * } , \phi _ { i } ) ) } \end{array}$ ; Update $\begin{array} { r l } & { \sim \sim \sim \smash { \tau } + \alpha \nabla _ { \tau } [ \sum _ { \tau _ { i } } \log q ( { \boldsymbol y } _ { i } ^ { * } | T _ { \tilde { \boldsymbol \theta } } ( { \boldsymbol z } _ { i } ^ { * } , \boldsymbol { \phi } _ { i } ) ) - \beta D _ { \mathrm { K L } } ( q ( { \boldsymbol \theta } ; \tau ) | | \boldsymbol { r } ( { \boldsymbol \theta } ) ) ] } \\ & { \sim \smash { \tau } \tau + \alpha \nabla _ { \tau } [ \sum _ { \tau _ { i } } \log q ( { \boldsymbol y } _ { i } ^ { * } | T _ { \tilde { \boldsymbol \theta } } ( { \boldsymbol z } _ { i } ^ { * } , { \boldsymbol \phi } _ { i } ) ) - \beta D _ { \mathrm { K L } } ( q ( { \boldsymbol \theta } ; \tau ) | | \boldsymbol { r } ( { \boldsymbol \theta } ) ) ] } \end{array}$
|
| 308 |
+
|
| 309 |
+
# Algorithm 2: Meta-Regularized MAML
|
| 310 |
+
|
| 311 |
+
input : Task distribution $p ( \mathcal { T } )$ ; Weights distribution $q ( \theta ; \tau ) = \mathcal { N } ( \theta ; \tau )$ with Gaussian parameters $\tau = ( \theta _ { \mu } , \theta _ { \sigma } )$ ; Prior distribution $r ( \theta )$ and Lagrangian multiplier $\beta$ ; Stepsize $\alpha , \alpha ^ { \prime }$ .
|
| 312 |
+
|
| 313 |
+
output: Network parameter $\tau , { \tilde { \theta } }$ .
|
| 314 |
+
|
| 315 |
+
Initialize $\tau$ , $\tilde { \theta }$ randomly; while not converged do
|
| 316 |
+
|
| 317 |
+
Sample a mini-batch of $\{ \mathcal { T } _ { i } \}$ from $p ( \mathcal { T } )$ ;
|
| 318 |
+
Sample $\theta \sim q ( \theta ; \tau )$ with reparameterization ;
|
| 319 |
+
for all $\mathcal { T } _ { i } \in \{ \mathcal { T } _ { i } \}$ do Sample $\mathcal { D } _ { i } = ( \boldsymbol { \boldsymbol { x } } _ { i } , \boldsymbol { \boldsymbol { y } } _ { i } )$ , $\mathcal { D } _ { i } ^ { * } = ( \boldsymbol { x } _ { i } ^ { * } , \boldsymbol { y } _ { i } ^ { * } )$ from $\mathcal { T } _ { i }$ ; Encode observation $z _ { i } = g _ { \theta } ( \pmb { x } _ { i } )$ , $z _ { i } ^ { * } = g _ { \boldsymbol { \theta } } ( \boldsymbol { x } _ { i } ^ { * } )$ ; Compute task specific parameter $\phi _ { i } = \tilde { \theta } + \alpha ^ { \prime } \nabla _ { \tilde { \theta } } \log q ( \pmb { y } _ { i } | \boldsymbol { z } _ { i } , \tilde { \theta } )$ ;
|
| 320 |
+
|
| 321 |
+
Update $\begin{array} { r } { \tilde { \theta } \gets \tilde { \theta } + \alpha \nabla _ { \tilde { \theta } } \sum _ { \tau _ { i } } \log q ( \pmb { y } _ { i } ^ { * } | \pmb { z } _ { i } ^ { * } , \phi _ { i } ) } \end{array}$ ; Update $\begin{array} { r } { \tau \gets \tau + \alpha \nabla _ { \tau } [ \sum _ { \tau _ { i } } \log q ( \pmb { y } _ { i } ^ { * } | \pmb { z } _ { i } ^ { * } , \phi _ { i } ) - \beta D _ { \mathrm { K L } } ( q ( \theta ; \tau ) | | \boldsymbol { r } ( \theta ) ) ] } \end{array}$
|
| 322 |
+
|
| 323 |
+
# Algorithm 3: Meta-Regularized Methods in Meta-testing
|
| 324 |
+
|
| 325 |
+
input : Meta-testing task $\tau$ with training data $\boldsymbol { \mathcal { D } } = ( \boldsymbol { \mathsf { x } } , \boldsymbol { \mathsf { y } } )$ and testing input $\mathbf { \nabla } _ { \mathbf { \mathcal { X } } } ^ { * }$ , optimized parameters $\tau , { \tilde { \theta } }$ .
|
| 326 |
+
|
| 327 |
+
output: Prediction $\hat { y } ^ { * }$ for $k$ from $I$ to $K$ do
|
| 328 |
+
|
| 329 |
+
Sample $\theta _ { k } \sim q ( \theta ; \tau )$ ;
|
| 330 |
+
Encode observation $z _ { k } = g _ { \theta _ { k } } ( \pmb { x } )$ , $z _ { k } ^ { * } = g _ { \theta _ { k } } ( x ^ { * } )$ ;
|
| 331 |
+
Compute task specific parameter $\phi _ { k } = a ( h _ { \widetilde { \theta } } ( z _ { k } , \pmb { y } ) )$ for MR-CNP and $\phi _ { k } = \tilde { \theta } + \alpha ^ { \prime } \nabla _ { \tilde { \theta } } \log q ( \pmb { y } | \boldsymbol { z } _ { k } , \tilde { \theta } )$ for MR-MAML;
|
| 332 |
+
Predict $\hat { y } _ { k } ^ { * } \sim q ( \hat { y } ^ { * } | z _ { k } ^ { * } , \phi _ { k } , \tilde { \theta } )$
|
| 333 |
+
|
| 334 |
+
Return prediction $\begin{array} { r } { \hat { y } ^ { * } = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \hat { y } _ { k } ^ { * } } \end{array}$
|
| 335 |
+
|
| 336 |
+
# A.2 META REGULARIZATION ON ACTIVATIONS
|
| 337 |
+
|
| 338 |
+
We show that $I ( x ^ { * } ; \hat { y } ^ { * } | z ^ { * } , \theta ) \le I ( \hat { y } ^ { * } ; D | z ^ { * } , \theta )$ . By Figure 4, we have that $I ( \hat { y } ^ { \ast } ; x ^ { \ast } | \theta , \mathcal { D } , z ^ { \ast } ) = 0$ By the chain rule of mutual information we have
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
\begin{array} { r l } & { I ( \hat { y } ^ { * } ; \mathcal { D } | z ^ { * } , \theta ) = I ( \hat { y } ^ { * } ; \mathcal { D } | z ^ { * } , \theta ) + I ( \hat { y } ^ { * } ; x ^ { * } | \mathcal { D } , \theta , z ^ { * } ) } \\ & { \quad \quad \quad = I ( \hat { y } ^ { * } ; x ^ { * } , \mathcal { D } | \theta , z ^ { * } ) } \\ & { \quad \quad \quad = I ( x ^ { * } ; \hat { y } ^ { * } | \theta , z ^ { * } ) + I ( \hat { y } ^ { * } ; \mathcal { D } | x ^ { * } , \theta , z ^ { * } ) } \\ & { \quad \quad \quad \geq I ( x ^ { * } ; \hat { y } ^ { * } | \theta , z ^ { * } ) } \end{array}
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
# A.3 META REGULARIZATION ON WEIGHTS
|
| 345 |
+
|
| 346 |
+
Similar to (Achille & Soatto, 2018), we use $\xi$ to denote the unknown parameters of the true data generating distribution. This defines a joint distribution $p ( \xi , \mathcal { M } , \theta ) = p ( \xi ) p ( \mathcal { M } | \xi ) q ( \theta | \mathcal { M } )$ . Furthermore, we have a predictive distribution $q ( \hat { y } ^ { * } | x ^ { * } , \mathcal { D } , \theta ) = \mathbb { E } _ { \phi | \theta , \mathcal { D } } \left[ q ( \hat { y } ^ { * } | x ^ { * } , \phi , \theta ) \right]$ .
|
| 347 |
+
|
| 348 |
+
The meta-training loss in Eq. 1 is an upper bound for the cross entropy $H _ { p , q } ( y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \theta )$ . Using an information decomposition of cross entropy (Achille & Soatto, 2018), we have
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
\begin{array} { r l } & { H _ { p , q } ( y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \theta ) = H ( y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \xi ) + I ( \xi ; y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \theta ) } \\ & { \qquad + \mathbb { E } \left[ D _ { \mathrm { K L } } ( p ( y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \theta ) | | q ( y _ { 1 : N } ^ { * } | x _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } , \theta ) ) \right] + I ( \mathcal { D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } , \xi ) } \\ & { \qquad - I ( y _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } , \xi ) . } \end{array}
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
Here the only negative term is the $I ( y _ { 1 : N } ^ { * } , { \cal D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } , \xi )$ , which quantifies the information that the meta-parameters contain about the meta-training data beyond what can be inferred from the data generating parameters (i.e., memorization). Without proper regularization, the cross entropy loss can be minimized by maximizing this term. We can control its value by upper bounding it
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\begin{array} { r l } & { I ( y _ { 1 : N } ^ { * } , \mathcal { D } _ { 1 : N } ; \theta | x _ { 1 : N } ^ { * } , \xi ) = \mathbb { E } \left[ \log \frac { q ( \theta | \mathcal { M } , \xi ) } { q ( \theta | x _ { 1 : N } ^ { * } , \xi ) } \right] } \\ & { \quad \quad \quad \quad \quad \quad \quad = \mathbb { E } \left[ \log \frac { q ( \theta | \mathcal { M } ) } { q ( \theta | x _ { 1 : N } ^ { * } , \xi ) } \right] } \\ & { \quad \quad \quad \quad = \mathbb { E } \left[ D _ { \mathrm { K L } } ( q ( \theta | \mathcal { M } ) | | q ( \theta | x _ { 1 : N } ^ { * } , \xi ) ) \right] } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \leq \mathbb { E } \left[ D _ { \mathrm { K L } } ( q ( \theta | \mathcal { M } ) | | r ( \theta ) ) \right] , } \end{array}
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
where the second equality follows because $\theta$ and $\xi$ are conditionally independent given $\mathcal { M }$ . This gives the regularization in Section 4.2.
|
| 361 |
+
|
| 362 |
+
# A.4 PROOF OF THE PAC-BAYES GENERALIZATION BOUND
|
| 363 |
+
|
| 364 |
+
First, we prove a more general result and then specialize it. The goal of the meta-learner is to extract information about the meta-training tasks and the test task training data to serve as a prior for test examples from the novel task. This information will be in terms of a distribution $Q$ over possible models. When learning a new task, the meta-learner uses the training task data $\mathcal { D }$ and a model parameterized by $\theta$ (sampled from $Q ( \theta ) )$ and outputs a distribution $q ( \phi | \mathcal { D } , \theta )$ over models. Our goal is to learn $Q$ such that it performs well on novel tasks.
|
| 365 |
+
|
| 366 |
+
To formalize this, define
|
| 367 |
+
|
| 368 |
+
$$
|
| 369 |
+
e r ( Q , \mathcal { D } , \mathcal { T } ) = \mathbb { E } _ { \theta \sim Q ( \theta ) , \phi \sim q ( \phi | \theta , \mathcal { D } ) , ( x ^ { * } , y ^ { * } ) \sim p ( x , y | \mathcal { T } ) } \left[ \mathcal { L } \bigl ( \phi ( x ^ { * } ) , y ^ { * } \bigr ) \right]
|
| 370 |
+
$$
|
| 371 |
+
|
| 372 |
+
where $\mathcal { L } ( \phi ( x ^ { * } ) , y ^ { * } )$ is a bounded loss in $[ 0 , 1 ]$ . Then, we would like to minimize the error on novel tasks
|
| 373 |
+
|
| 374 |
+
$$
|
| 375 |
+
e r ( Q ) = \operatorname* { m i n } _ { Q } \mathbb { E } _ { \mathcal { T } \sim p ( \mathcal { T } ) , \mathcal { D } \sim p ( x , y | \mathcal { T } ) } \left[ e r ( Q , \mathcal { D } , \mathcal { T } ) \right]
|
| 376 |
+
$$
|
| 377 |
+
|
| 378 |
+
Because we only have a finite training set, computing $e r ( Q )$ is intractable, but we can form an empirical estimate:
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\hat { e r } ( Q , \mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * } ) = \frac { 1 } { n } \underbrace { \sum _ { i = 1 } ^ { n } \mathbb { E } _ { \theta \sim Q ( \theta ) , \phi _ { i } \sim q ( \phi | \theta , \mathcal { D } _ { i } ) } \left[ \frac { 1 } { K } \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { i } ^ { * } } \mathcal { L } ( \phi ( x ^ { * } ) , y ^ { * } ) ) \right] } _ { \hat { e r } ( Q , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) }
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
where for exposition we assume $K = | \mathcal { D } _ { i } ^ { * } |$ is the same for all $i$ . We would like to relate $e r ( Q )$ and $\hat { e r } ( Q , \mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * } )$ , but the challenge is that $Q$ may depend on $\mathcal { D } _ { 1 } , \mathcal { D } _ { 1 } ^ { * } , . . . , \mathcal { D } _ { n } , \mathcal { D } _ { n } ^ { * }$ due to the learning algorithm. There are two sources of generalization error: (i) error due to the finite number of observed tasks and (ii) error due to the finite number of examples observed per task. Closely following the arguments in (Amit & Meir, 2018), we apply a standard PAC-Bayes bound to each of these and combine the results with a union bound.
|
| 385 |
+
|
| 386 |
+
Theorem. Let $Q ( \theta )$ be a distribution over parameters $\theta$ and let $P ( \theta )$ be a prior distribution. Then for any $\delta \in ( 0 , 1 ]$ , with probability at least $1 - \delta _ { \mathrm { { i } } }$ , the following inequality holds uniformly for all distributions $Q$ ,
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
\ L _ { T } ( Q ) \leq { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } { \hat { e } } r ( Q , { \mathcal { D } } _ { i } , { \mathcal { D } } _ { i } ^ { * } ) + \left( { \sqrt { { \frac { 1 } { 2 ( K - 1 ) } } } } + { \sqrt { { \frac { 1 } { 2 ( n - 1 ) } } } } \right) { \sqrt { D _ { K L } ( Q \| P ) + \log { \frac { n ( K + 1 ) } { \delta } } } }
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
Proof. To start, we state a classical PAC-Bayes bound and use it to derive generalization bounds on task and datapoint level generalization, respectively.
|
| 393 |
+
|
| 394 |
+
Theorem 2. Let $\mathcal { X }$ be a sample space (i.e. a space of possible datapoints). Let $P ( X )$ be a distribution over $\mathcal { X }$ (i.e. a data distribution). Let $\Theta$ be a hypothesis space. Given a “loss function” $l ( \theta , X ) : \Theta \times \mathcal { X } \to [ 0 , 1 ]$ and a collection of $M$ i.i.d. random variables sampled from $P ( X )$ , $X _ { 1 } , . . . , X _ { M }$ , let $\pi$ be a prior distribution over hypotheses in $\Theta$ that does not depend on the samples but may depend on the data distribution $P ( X )$ . Then, for any $\delta \in ( 0 , 1 ]$ , the following bound holds uniformly for all posterior distributions $\rho$ over $\Theta$
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
P ( \mathbb { E } _ { X _ { i } \sim P ( X ) , \theta \sim \rho ( \cdot ) } [ l ( \theta , X _ { i } ) ] \le \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \mathbb { E } _ { \theta \sim \rho ( \cdot ) } [ l ( \theta , X _ { m } ] + \sqrt { \frac { 1 } { 2 ( M - 1 ) } ( D _ { K L } ( \rho \| \pi ) + \log \frac { M } { \delta } ) } , \forall \rho ) \qquad \mathrm { ( 1 6 ) }
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
$e r ( Q )$ leve to $\textstyle { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } e r ( Q , { D _ { i } } , { T _ { i } } )$ t, we bound the task-leve. Letting the samples be $\begin{array} { r c l } { \bar { X _ { i } } } & { = } & { ( { \mathcal D } _ { i } , { \mathcal T } _ { i } ) } \end{array}$ that , and $l ( \theta , X _ { n } ) ~ =$ $\mathbb { E } _ { \phi _ { i } \sim q ( \phi | \mathcal { D } _ { i } , \theta ) , ( x ^ { * } , y ^ { * } ) \sim \mathcal { T } _ { i } } [ \mathcal { L } ( \phi ( x ^ { * } ) , y ^ { * } ) ]$ , then Theorem 1 says that for any $\delta _ { 0 } \sim ( 0 , 1 ]$
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
P \left( e r ( Q ) \leq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } e r ( Q , \mathcal { D } _ { i } , \mathcal { T } _ { i } ) + \sqrt { \frac { 1 } { 2 ( n - 1 ) } \left( D _ { K L } ( Q \| P ) + \log \frac { n } { \delta _ { 0 } } \right) } , \forall Q \right) \geq 1 - \delta _ { 0 } ,
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
where $P$ is a prior over $\theta$ .
|
| 407 |
+
|
| 408 |
+
Within task generalization Next, we relate $e r ( Q , { \mathcal { D } } _ { i } , { \mathcal { T } } _ { i } )$ to $\hat { e r } ( Q , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } )$ via the PAC-Bayes bound. For a fixed task $i$ , task training data $\mathcal { D } _ { i }$ , a prior $\pi ( \phi | { \mathcal { T } } _ { i } )$ that only depends on the training
|
| 409 |
+
|
| 410 |
+
data, and any $\delta _ { i } \in ( 0 , 1 ]$ , we have that
|
| 411 |
+
|
| 412 |
+
$$
|
| 413 |
+
\begin{array} { r l } & { \displaystyle > ( \mathbb { E } _ { ( x ^ { * } , y ^ { * } ) \sim p ( x , y | T _ { i } ) \rho ( \phi _ { i } ) } [ \mathcal { L } ( \phi _ { i } ( x ^ { * } ) , y ^ { * } ) ] \leq \mathbb { E } _ { \rho ( \phi _ { i } ) } [ \frac { 1 } { K } \sum _ { ( x ^ { * } , y ^ { * } ) \in \mathcal { D } _ { i } ^ { * } } \mathcal { L } ( \phi _ { i } ( x ^ { * } ) , y ^ { * } ) ] } \\ & { \quad \quad \quad \quad \quad \quad \quad + \sqrt { \frac { 1 } { 2 ( K - 1 ) } ( D _ { K L } ( { \rho } | | \pi ) + \log \frac { K } { \delta _ { i } } ) } , \forall { \rho } \Big ) \geq 1 - \delta _ { i } . } \end{array}
|
| 414 |
+
$$
|
| 415 |
+
|
| 416 |
+
Now, we choose $\pi ( \phi | { \mathcal { T } } _ { i } )$ to be $\begin{array} { r l } { \int P ( \theta ) q ( \phi | \theta , \mathcal { D } _ { i } ) d \theta } \end{array}$ and restrict $\rho ( \phi )$ to be of the form $\textstyle { \int Q ( \theta ) q ( \phi | \theta , \mathcal { D } _ { i } ) d \theta }$ for any $Q$ . While, $\pi$ and $\rho$ may be complicated distributions (especially, if they are defined implicitly), we know that with this choice of $\pi$ and $\rho$ $, D _ { K L } ( \rho | | \pi ) \leq D _ { K L } ( Q | | P )$ (Cover & Thomas, 2012), hence, we have
|
| 417 |
+
|
| 418 |
+
$$
|
| 419 |
+
P \left( e r ( Q , \mathcal { D } _ { i } , \mathcal { T } _ { i } ) \leq \hat { e r } ( Q , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) + \sqrt { \frac { 1 } { 2 ( K - 1 ) } \left( D _ { K L } ( Q \| P ) + \log { \frac { K } { \delta _ { i } } } \right) } , \forall Q \right) \geq 1 - \delta _ { i }
|
| 420 |
+
$$
|
| 421 |
+
|
| 422 |
+
Overall bound on meta-learner generalization Combining Eq. (17) and (18) using the union bound, we have
|
| 423 |
+
|
| 424 |
+
$$
|
| 425 |
+
\begin{array} { r l } { { P \Big ( e r ( Q ) \leq \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \hat { e r } ( Q , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) + \sqrt { \frac { 1 } { 2 ( K - 1 ) } D _ { K L } ( Q \| P ) + \log \frac { K } { \delta _ { i } } } } \quad } & { { } } \\ { + \sqrt { \frac { 1 } { 2 ( n - 1 ) } D _ { K L } ( Q \| P ) + \log \frac { n } { \delta _ { 0 } } } , \forall Q \Big ) \geq 1 - ( \sum _ { i } \delta _ { i } + \delta _ { 0 } ) } & { { } } \end{array}
|
| 426 |
+
$$
|
| 427 |
+
|
| 428 |
+
Choosing $\begin{array} { r } { \delta _ { 0 } = \frac { \delta } { K + 1 } } \end{array}$ and $\begin{array} { r } { \delta _ { i } = \frac { K \delta } { n ( K + 1 ) } } \end{array}$ , then we have:
|
| 429 |
+
|
| 430 |
+
$$
|
| 431 |
+
\begin{array} { r l r } { { P \Big ( e r ( Q ) \leq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \hat { e } r ( Q , \mathcal { D } _ { i } , \mathcal { D } _ { i } ^ { * } ) + ( \sqrt { \frac { 1 } { 2 ( K - 1 ) } } + \sqrt { \frac { 1 } { 2 ( n - 1 ) } } ) \sqrt { D _ { K L } ( Q \| P ) + \log \frac { n ( K + 1 ) } { \delta } } , \forall Q \Big ) } } \\ & { > 1 - \delta . } & ( 2 0 \end{array}
|
| 432 |
+
$$
|
| 433 |
+
|
| 434 |
+
Because $n$ is generally large, by Taylor expansion of the complexity term we have
|
| 435 |
+
|
| 436 |
+
$$
|
| 437 |
+
\begin{array} { r l } & { \left( \sqrt { \frac { 1 } { 2 ( K - 1 ) } } + \sqrt { \frac { 1 } { 2 ( n - 1 ) } } \right) \sqrt { \left( D _ { K L } Q | | P \rangle + \log \frac { n ( K + 1 ) } { \delta } \right) } } \\ & { = \frac { 1 } { 2 \sqrt { \log n ( K + 1 ) / \delta } } \left( \sqrt { \frac { 1 } { 2 ( K - 1 ) } } + \sqrt { \frac { 1 } { 2 ( n - 1 ) } } \right) \left( D _ { K L } Q | | P \rangle + 2 \log ( \frac { n ( K + 1 ) } { \delta } ) \right) + o ( 1 ) } \end{array}
|
| 438 |
+
$$
|
| 439 |
+
|
| 440 |
+
Re-defining the coefficient of $\mathrm { K L }$ term as $\beta$ and omitting the constant and higher order term, we recover the meta-regularization bound in Eq.(5) when $Q ( \bar { \theta } ) = \mathcal { N } ( \theta ; \theta _ { \mu } , \theta _ { \sigma } )$ .
|
| 441 |
+
|
| 442 |
+
# A.5 EXPERIMENTAL DETAILS
|
| 443 |
+
|
| 444 |
+
# A.5.1 POSE PREDICTION
|
| 445 |
+
|
| 446 |
+
We create a multi-task regression dataset based on the Pascal 3D data (Xiang et al., 2014). The dataset consists of 10 classes of 3D object such as “aeroplane”, “sofa”, “TV monitor”, etc. Each class has multiple different objects and there are 65 objects in total. We randomly select 50 objects for meta-training and the other 15 objects for meta-testing. For each object, we use MuJoCo (Todorov et al., 2012) to render 100 images with random orientations of the instance on a table, visualized in Figure 1. For the meta-learning algorithm, the observation $( x )$ is the $1 2 8 \times 1 2 8$ gray-scale image and the label $( y )$ is the orientation re-scaled to be within $[ 0 , 1 \dot { 0 } ]$ . For each task, we randomly sample
|
| 447 |
+
|
| 448 |
+
30 $( x , y )$ pairs for an object and evenly split them between task training and task test data. We use a meta batch-size of 10 tasks per iteration.
|
| 449 |
+
|
| 450 |
+
For MR-CNP, we use a convolutional encoder with a fully connected bottom layer to map the input image to a 20-dimensional latent representation $z$ and $z ^ { * }$ for task training input $x$ and test input $x ^ { * }$ respectively. The $( z , y )$ are concatenated and mapped by the feature extractor and aggregator which are fully connected networks to the 200 dimensional task summary statistics $\phi$ . The decoder is a fully connected network that maps $( \phi , z ^ { * } )$ to the prediction $\hat { y } ^ { * }$ .
|
| 451 |
+
|
| 452 |
+
For MR-MAML, we use a convolutional encoder to map the input image to a $1 4 \times 1 4$ dimensional latent representation $z$ and $z ^ { * }$ . The pairs $( z , y )$ are used in the task adaptation step to get a task specific parameter $\phi$ via gradient descent. Then $z ^ { * }$ is mapped to the prediction $\hat { y } ^ { * }$ with a convolutional predictor parameterized by $\phi$ . The network is trained using 5 gradient steps with learning rate 0.01 in the inner loop for adaptation and evaluated using 20 gradient steps at the test-time.
|
| 453 |
+
|
| 454 |
+
# A.5.2 NON-MUTUALLY-EXCLUSIVE CLASSIFICATION
|
| 455 |
+
|
| 456 |
+
The Omniglot dataset consists of 20 instances of 1623 characters from 50 different alphabets. We randomly choose 1200 characters for meta-training and use the remaining for testing. The metatraining characters are partitioned into 60 disjoint sets for 20-way classification. The MiniImagenet dataset contains 100 classes of images including 64 training classes, 12 validation classes, and 24 test classes. We randomly partition the 64 meta-training classes into 13 disjoint sets for 5-way classification with one label having one less class of images than the others.
|
| 457 |
+
|
| 458 |
+
For MR-MAML we use a convolutional encoder similar to the pose prediction problem. The dimension of $z$ and $z ^ { * }$ is $1 4 \times 1 4$ for Omniglot and $2 0 \times 2 0$ for MiniImagenet. We use a convolutional decoder for both datasets. Following (Finn et al., 2017), we use a meta batch-size of 16 for 20-way Omniglot classification and meta batch-size of 4 for 5-way MiniImagenet classification. The metalearning rate is chosen from $\lbrace 0 . 0 0 1 , 0 . 0 0 5 \rbrace$ and the $\beta$ for meta-regularized methods are chosen from $\{ 1 0 ^ { - 7 } , \overset { \vartriangle } { 1 0 ^ { - 6 } } , \dots , 1 0 ^ { - 3 } \}$ . The optimal hyperparameters are chosen for each method separately via cross-validation.
|
| 459 |
+
|
| 460 |
+
# A.6 ADDITIONAL ILLUSTRATION AND GRAPHICAL MODEL
|
| 461 |
+
|
| 462 |
+
We show a standard few-shot classification setup in meta-learning to illustrate a mutually-exclusive task distribution and a graphical model for the regularization on the activations.
|
| 463 |
+
|
| 464 |
+

|
| 465 |
+
Figure 3: An example of mutually-exclusive task distributions. In each task of mutually-exclusive few-shot classification, different classes are randomly assigned to the $N$ -way classification labels. The same class, such as the dog and butterfly in this illustration, can be assigned different labels across tasks which makes it impossible for one model to solve all tasks simultaneously.
|
| 466 |
+
|
| 467 |
+

|
| 468 |
+
Figure 4: Graphical model of the regularization on activations. Observed variables are shaded and $Z$ is bottleneck variable. The complete memorization corresponds to the graph without the dashed arrows.
|
| 469 |
+
|
| 470 |
+
# A.7 ADDITIONAL RESULTS
|
| 471 |
+
|
| 472 |
+
As shown in Figures 5, 7 and 8, when meta-learning algorithms converge to the memorization solution, the test tasks must be similar to the train tasks in order to achieve low test error. For CNP, although the task training set contains sufficient information to infer the correct amplitude, this information is ignored and the regression curve at test-time is determined by the one-hot vector. As a result, CNP can only generalize to points from the curves it has seen in the training (Figure 7 first row). On the other hand, MAML does use the task training data (Figure 5, 8 and Table 1), however, its performance is much worse than in the mutually-exclusive task. MR-MAML and MR-CNP avoid converging to a memorization solution and achieve excellent test performance on sinusoid task.
|
| 473 |
+
|
| 474 |
+

|
| 475 |
+
Figure 5: Test MSE on the mutually-non-exclusive sinusoid problem as function of the number of gradient steps used in the inner loop of MAML and MR-MAML. For each trial, we calculate the mean MSE over 100 randomly generated meta-testing tasks. We report the mean and standard deviation over 5 random trials.
|
| 476 |
+
|
| 477 |
+

|
| 478 |
+
Figure 6: Visualization of the optimized weight matrix $W$ that is connected to the inputs in the sinusoid regression example. The input $x = ( u , A )$ where $u \sim \mathrm { U n i f } ( - 5 , 5 )$ , $A$ is 20 dimensional one-hot vector and the intermediate layer is 100 dimensional, hence $\boldsymbol { x } \in \mathbb { R } ^ { 2 1 }$ and $W \in \mathbb { R } ^ { 2 1 \times 1 0 0 }$ . For both CNP and MAML, the meta-regularization restricts the part of weights that is connected to $A$ close to 0. Therefore it avoids storing the amplitude information in weights and forces the amplitude to be inferred from the task training data $\mathcal { D }$ , hence preventing the memorization problem.
|
| 479 |
+
|
| 480 |
+

|
| 481 |
+
Figure 7: Meta-test results on the non-mutually-exclusive sinusoid regression problem with CNP. For each row, the amplitudes of the true curves (orange) are randomly sampled uniformly from [0.1, 4]. For illustrative purposes, we fix the one-hot vector component of the input. (a): The vanilla CNP cannot adapt to new task training data at test-time and the shape of prediction curve (blue) is determined by the one-hot amplitude not the task training data. (b) (c): Adding meta-regularization on both activation and weights enables the CNP to use the task training data at meta-training and causes the model to generalize well at test-time.
|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
Figure 8: Meta-test results on the non-mutually-exclusive sinusoid regression problem with MAML. For each row, the true amplitudes of the true curves (orange) are randomly sampled uniformly from [0.1, 4]. For illustrative purposes, we fix the one-hot vector component of the input. (a): Due to memorization, MAML adapts slowly and has large generalization error at test-time. (b) (c): Adding meta-regularization on both activation and weights recovers efficient adaptation.
|
| 485 |
+
|
| 486 |
+

|
| 487 |
+
Figure 9: Sensitivity of activation regularization and weight regularization with respect to the learning rate on the pose prediction problem. For activation regularization, lower training loss corresponds to higher test MSE which indicates that the memorization solution is not solved. For weights regularization, lower training loss corresponds to lower test MSE which indicates proper training can converge to the adaptation solution.
|
| 488 |
+
|
| 489 |
+
In Table 5, we report the pre-update accuracy for the non-mutually-exclusive classification experiment in Section 6.3. The pre-update accuracy is obtained by the initial parameters $\theta$ rather than the task adapted parameters $\phi$ . At the meta-training time, for both MAML and MR-MAML the post-update accuracy obtained by using $\phi$ gets close to 1. High pre-update accuracy reflects the memorization problem. For example, in 20-way 1-shot Omniglot example, the pre-update accuracy for MAML is ${ \bar { 9 } } 9 . 2 \%$ at the training time, which means only $\bar { 0 . 8 \% }$ improvement in accuracy is due to adaptation, so the task training data is ignored to a large extent. The pre-update training accuracy for MR-MAML is $5 \%$ , which means $9 5 \%$ improvement in accuracy during training is due to the adaptation. This explains why in Table 4, the test accuracy of MR-MAML is much higher than that of MAML at the test-time, since the task training data is used to achieve fast adaptation.
|
| 490 |
+
|
| 491 |
+
Table 5: Meta-training pre-update accuracy on non-mutually-exclusive classification. MR-MAML controls the meta-training pre-update accuracy close to random guess and achieves low training error after adaptation.
|
| 492 |
+
|
| 493 |
+
<table><tr><td>NME Omniglot</td><td>20-way 1-shot</td><td>20-way 5-shot</td></tr><tr><td>MAML</td><td>99.2 (0.2)%</td><td>45.1 (38.9)%</td></tr><tr><td>TAML</td><td>68.9(43.1)%</td><td>6.7 (1.8)%</td></tr><tr><td>MR-MAML (ours)</td><td>5.0 (0)%</td><td>5.0 (0)%</td></tr></table>
|
| 494 |
+
|
| 495 |
+
Mutually-exclusive Omniglot 20-way 1-shot
|
| 496 |
+
|
| 497 |
+
<table><tr><td>NME MiniImagenet5-way 1-shot</td><td></td><td>5-way 5-shot</td></tr><tr><td>MAML</td><td>99.4 (0.1)%</td><td>21.0(1.2)%</td></tr><tr><td>TAML</td><td>99.4 (0.1)%</td><td>20.8(0.4)%</td></tr><tr><td>MR-MAML (ours)</td><td>20.0(0)%</td><td>20.2(0.1)%</td></tr></table>
|
| 498 |
+
|
| 499 |
+

|
| 500 |
+
Figure 10: The test accuracy of MAML with meta-regularization on the weights as a function of the regularization strength $\beta$ on the mutually-exclusive 20-way 1-shot Omniglot problem. The plot shows the mean and standard deviation across 5 meta-training runs. When $\beta$ is small, MR-MAML slightly outperforms MAML, indicating that meta-regularization does not degrade performance on mutually-exclusive tasks. The accuracy numbers are not directly comparable to previous work (e.g., (Finn et al., 2017)) because we do not use data augmentation.
|
md/train/BklhAj09K7/BklhAj09K7.md
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNSUPERVISED DOMAIN ADAPTATION FOR DISTANCE METRIC LEARNING
|
| 2 |
+
|
| 3 |
+
Kihyuk Sohn1 Wenling Shang2 Xiang $\mathbf { Y u } ^ { 1 }$ Manmohan Chandraker1,3 1NEC Labs America 2University of Amsterdam 3UC San Diego
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Unsupervised domain adaptation is a promising avenue to enhance the performance of deep neural networks on a target domain, using labels only from a source domain. However, the two predominant methods, domain discrepancy reduction learning and semi-supervised learning, are not readily applicable when source and target domains do not share a common label space. This paper addresses the above scenario by learning a representation space that retains discriminative power on both the (labeled) source and (unlabeled) target domains while keeping representations for the two domains well-separated. Inspired by a theoretical analysis, we first reformulate the disjoint classification task, where the source and target domains correspond to non-overlapping class labels, to a verification one. To handle both within and cross domain verifications, we propose a Feature Transfer Network (FTN) to separate the target feature space from the original source space while aligned with a transformed source space. Moreover, we present a non-parametric multi-class entropy minimization loss to further boost the discriminative power of FTNs on the target domain. In experiments, we first illustrate how FTN works in a controlled setting of adapting from MNIST-M to MNIST with disjoint digit classes between the two domains and then demonstrate the effectiveness of FTNs through state-of-the-art performances on a cross-ethnicity face recognition problem.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Despite strong performances on facial analysis using deep neural networks (Taigman et al., 2014; Sun et al., 2014; Schroff et al., 2015; Parkhi et al., 2015), learning a model that generalizes across variations in attributes like ethnicity, gender or age remains a challenge. For example, it is reported by Buolamwini & Gebru (2018) that commercial engines tend to make mistakes at detecting gender for images of darker-skinned females. Such biases have enormous social consequences, such as conscious or unconscious discrimination in law enforcement, surveillance or security (WIRED, 2018a;b; NYTimes, 2018; GIZMODO, 2018). A typical solution is to collect and annotate more data along the underrepresented dimension, but such efforts are laborious and time consuming. This paper proposes a novel deep unsupervised domain adaptation approach to overcome such biases in face verification and identification.
|
| 12 |
+
|
| 13 |
+
Deep domain adaptation (Long et al., 2013; 2015; 2016; Tzeng et al., 2015; Ganin et al., 2016; Sohn et al., 2017; Haeusser et al., 2017; Luo et al., 2017) allows porting a deep neural network to a target domain without extensive labeling efforts. Currently, there are two predominant approaches to deep domain adaptation. The first approach, domain divergence reduction learning, is motivated by the works of (Ben-David et al., 2007; 2010). It aims to reduce the source-target domain divergence using domain adversarial training (Ganin et al., 2016; Sohn et al., 2017; Tran et al., 2018) or maximum mean discrepancy minimization (Tzeng et al., 2015; Long et al., 2015; 2016), while leveraging supervised loss from labeled source examples to maintain feature space discriminative power. Since the theoretical basis of this approach (Ben-David et al., 2007) assumes a common task between domains, it is usually applied to a classification problem where the source and target domains share the same label space and task definition. The second approach considers domain adaptation as a semi-supervised learning problem and applies techniques such as entropy minimization (Grandvalet & Bengio, 2005) or self-ensembling (Laine & Aila, 2017; Tarvainen & Valpola, 2017; French et al., 2018) on target examples to encourage decisive and consistent predictions.
|
| 14 |
+
|
| 15 |
+
However, neither of those are applicable if the label spaces of source and target domains do not align. As a motivating example, consider a cross-ethnicity generalization of face recognition problem, where the source ethnicity (e.g., Caucasian) contains labeled examples and the target ethnicity (e.g., African-American) contains only unlabeled examples. When it is cast as a classification problem, the tasks of the two domains are different due to disjoint label spaces. Moreover, examples from different ethnicity domains almost certainly belong to different identity classes. To satisfy such additional label constraints, representations of examples from different domains should ideally be distant from each other in the embedding space, which conflicts with the requirements of domain divergence reduction learning as well as entropy minimization on target examples with source domain class labels.
|
| 16 |
+
|
| 17 |
+
In this work, we aim at learning a shared representation space between a source and target domain with disjoint label spaces that not only remains discriminative over both domains but also keep representations of examples from different domains well-separated, when provided with additional label constraints. Firstly, to overcome the limitation of domain adversarial neural network (DANN) (Ganin et al., 2016), we propose to convert disjoint classification tasks (i.e., the source and target domains correspond to non-overlapping class labels) into a unified binary verification task. We term adaptation across such source and target domains as cross-domain distance metric adaptation (CD2MA). We demonstrate a generalization of the theory of domain adaptation (Ben-David et al., 2007) to our setup, which bounds the empirical risk for within-domain verification of two examples drawn from the unlabeled target domain. While the theory does not guarantee verification between examples from different domains, we propose approaches that also address such cross-domain verification tasks.
|
| 18 |
+
|
| 19 |
+
To this end, we introduce a Feature Transfer Network (FTN) that separates the target features from the source features while simultaneously aligning them with an auxiliary domain of transformed source features. Specifically, we learn a shared feature extractor that maps examples from different domains to representations far apart. Simultaneously, we learn a feature transfer module that transforms the source representation space to another space used to align with the target representation space through a domain adversarial loss. By forging this alignment, the discriminative power from the augmented source representation space would ideally be transferred to the target representation space. The verification setup also allows us to introduce a novel entropy minimization loss in the form of $N$ -pair metric loss (Sohn, 2016), termed multi-class entropy minimization (MCEM), to further leverage unlabeled target examples whose label structure is not known. MCEM samples pairs of examples from a discovered label structure within the target domain using an offline hierarchical clustering algorithm such as HDBSCAN (Campello et al., 2013), computes the $N$ -pair metric loss among these examples (Sohn, 2016), and backpropagates the resulting error derivatives.
|
| 20 |
+
|
| 21 |
+
In experiments, we first perform on a controlled setting by adapting between disjoint sets of digit classes. Specifically, we adapt from 0–4 of MNIST-M (Ganin et al., 2016) dataset to 5–9 of MNIST dataset and demonstrate the effectiveness of FTN in learning to align and separate domains. Then, we assess the impact of our proposed unsupervised CD2MA method on a challenging cross-ethnicity face recognition task, whose source domain contains face images of Caucasian identities and the target domain of non-Caucasian identities, such as African-American or East-Asian. This is an important problem since existing face recognition datasets show significant label biases towards Caucasian ethnicity, leading to sub-optimal recognition performance for other ethnicities. The proposed method demonstrates significant improvement in face verification and identification compared to a source-only baseline model and a standard DANN. Our proposed method also closely matches the performance upper bounds obtained by training with fully labeled source and target domains.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Research efforts in deep domain adaptation have explored a proper metric to measure the variational distance between two domains and subsequently regularize neural networks to minimize this distance. For example, maximum mean discrepancy (Long et al., 2013; 2016; Tzeng et al., 2014; Fernando et al., 2015; Tzeng et al., 2015; Sun & Saenko, 2016) estimates the domain difference based on kernels. As another example, domain adversarial neural networks (Ganin et al., 2016; Bousmalis et al., 2016; 2017; Sohn et al., 2017; Luo et al., 2017; Tran et al., 2018), measuring the distance using a trainable and flexible discriminator often parameterized by an MLP, have been successfully adopted for several computer vision applications, such as semantic segmentation (Hoffman et al., 2016; Tsai et al., 2018; Zhang et al., 2018) and object detection (Chen et al., 2018). Most of those works assume a common classification task between two domains, whereas we tackle a cross-domain distance metric adaptation problem where label spaces of source and target domains are different.
|
| 26 |
+
|
| 27 |
+
Moreover, our problem setting, an adaptation from labeled source to unlabeled target with disjoint label spaces, contains flavors from both domain adaptation (DA) and transfer learning (TL), following the nomenclature of (Pan et al., 2010). The difference in input distribution between source and target domains and the lack of labels in the target domain are similar to that of DA or transductive TL (Pan et al., 2010), while the difference in label distribution and task definitions between two domains is akin to inductive TL (Pan et al., 2010; Daumé III, 2007). In our work, we formalize this problem in domain adaptation framework using verification as a common task. This is a key contribution that allows theoretical analysis on the generalization bound as presented in Section 3 and Appendix A, while allowing novel applications like cross-ethnicity face recognition.
|
| 28 |
+
|
| 29 |
+
In terms of task objective, (Hu et al., 2015; Ganin et al., 2016; Sohn et al., 2017) also deal with domain adaptation in distance metric learning, but neither learns a representation space capable of separating the source and target domains. Resembling CD2MA, Luo et al. (2017) considers domain adaptation with disjoint label spaces, but the problem is still cast as classification with an assumption that the target label space is known and a few labeled target examples are provided for training.
|
| 30 |
+
|
| 31 |
+
In terms of network design, residual transfer network (Long et al., 2016), which learns two classifiers differ by a residual function for the source and the target domain, is closely related. However, it only tackles the scenario where source and target domains share a common label space for classification.
|
| 32 |
+
|
| 33 |
+
# 3 REVISITING THE THEORY OF DOMAIN ADAPTATION FOR VERIFICATION
|
| 34 |
+
|
| 35 |
+
Under the domain adaptation assumption, Ben-David et al. (2007) show that the empirical risk on the target domain $\mathcal { X } _ { T }$ is bounded by the empirical risk on the source domain $\chi _ { S }$ and the variational distance between the two domains, provided that the source and the target domains share the classifiers. Therefore, this bound is not applicable to our CD2MA setup where the label spaces of two domains are often different. To generalize those theoretical results to our setting, we reformulate the verification task as a binary classification task shared across two domains. This new binary classification task takes a pair of images as an input and predicts the label of 1 if the pair of images shares the same identity and 0 otherwise. Furthermore, if we now define the new source domain to be pairs of source images and the new target domain to be pairs of target images, then Theorem 1 and 2 from (Ben-David et al., 2007) can be directly carried over to bound the new target domain binary classification error in the same manner. That is, the empirical with-in target domain verification loss is bounded by with-in source domain verification loss and the variational distance between $\mathcal { X } _ { S } \times \mathcal { X } _ { S }$ and $\mathscr { X } _ { T } \times \mathscr { X } _ { T }$ .1 Note that inputs to the binary classifier are pairs of images from the same domain. Thus, this setup only addresses adaptation of within-domain verification to unlabeled target domains.
|
| 36 |
+
|
| 37 |
+
There are two implications from the theoretical insights on domain adaptation using verification as a shared classification task. Firstly, domain adversarial training, reducing the discrepancy between the source and the target product spaces, coupled with supervised source domain binary classification loss (i.e., verification loss using source domain labels) can yield target representations with high discriminative power when performing within-domain verification. Note that in practice we approximately reduce the product space discrepancy by generic adversarial learning as done in (Ganin et al., 2016; Sohn et al., 2017). Secondly, there is no guarantee that the aligned source and target feature spaces possess any discriminative power for cross-domain verification task. Thus, additional actions in the form of a feature transfer module and domain separation objective are required to address this issue. These two consequences together motivate the design of our proposed framework, which is introduced in the next section.
|
| 38 |
+
|
| 39 |
+
# 4 FEATURE TRANSFER NET: LEARNING TO ALIGN AND SEPARATE DOMAINS
|
| 40 |
+
|
| 41 |
+
In this section, we first define the CD2MA problem setup and motivate our proposed feature transfer network (FTN). Then we elaborate on the training objectives that help our model achieve its desired properties. Lastly, we provide practical considerations to implement our proposed algorithm.
|
| 42 |
+
|
| 43 |
+
# 4.1 PROBLEM STATEMENT AND ALGORITHM OVERVIEW
|
| 44 |
+
|
| 45 |
+
Recall the description of CD2MA, given source and target domain data distributions $\chi _ { S }$ and $\mathcal { X } _ { T }$ , our goal is to verify whether two random samples $x , x ^ { \prime }$ drawn from either of the two distributions (and we do not know which distribution $x$ or $x ^ { \prime }$ come from a priori) belong to the same class.
|
| 46 |
+
|
| 47 |
+
There are 3 scenarios of constructing a pair: $x , x ^ { \prime } \in \mathcal { X } _ { S }$ , $x , x ^ { \prime } \in \mathcal { X } _ { T }$ , or $x \in \mathcal { X } _ { S } , x ^ { \prime } \in \mathcal { X } _ { T }$ . We refer the task of the first two cases as within-domain verification and the last as cross-domain verification.
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 1: Training of Feature Transfer Network (FTN) for verification, composed of feature generation module (Gen; $f )$ , feature transfer module $( \operatorname { T x } ; g )$ , and two domain discriminators $D _ { 1 }$ and $D _ { 2 }$ . Verification objective ${ \mathcal { L } } _ { \mathrm { v r f } }$ ’s are applied to source $( f _ { s } )$ pairs and transformed source $( g ( f _ { s } ) ) ,$ ) pairs. Our FTN applies domain adversarial objective ${ \mathcal { L } } _ { \mathrm { a d v } }$ for domain alignment between transformed source and target domains by $D _ { 1 }$ and applies $\mathcal { L } _ { \mathrm { s e p } }$ to distinguish source domain from both target and transformed source domains by $D _ { 2 }$ .
|
| 51 |
+
|
| 52 |
+
If $x , x ^ { \prime } \in \mathcal { X } _ { S }$ (or $\chi _ { T } .$ ), we need a source (or target) domain classifier2. For the source domain, we are provided with adequate labeled training examples to learn a competent classifier. For the target domain, we are only given unlabeled examples. However, with our extension of Theorem 1 and 2 from (Ben-David et al., 2007), discriminative power of the classifier can be transferred to the target domain by adapting the representation spaces of $\mathcal { X } _ { T } \times \mathcal { X } _ { T }$ and $\mathcal { X } _ { S } \times \mathcal { X } _ { S }$ , that is, we can utilize the same competent classifier from the source domain to verify target domain pairs if two domains are well-aligned. For the third scenario where $x \in X _ { S }$ but $x ^ { \prime } \in X _ { T }$ , we assume that the two examples cannot be of the same class, which is true for problems such as cross-ethnicity face verification.
|
| 53 |
+
|
| 54 |
+
Our proposed framework, Feature Transfer Network (FTN), is designed to solve all these verification scenarios in an unified framework. FTN is composed of multiple modules as illustrated in Figure 1. First, a feature generation module $f : \mathcal { X } \to \mathcal { Z }$ denoted as “Gen” in Figure 1 ideally maps $\chi _ { S }$ and $\mathcal { X } _ { T }$ to distinguishable representation spaces, that is, $f ( \mathcal { X } _ { S } )$ and $f ( \mathcal { X } _ { T } )$ are far apart. To achieve this, we introduce a domain separation objective.3 Next, the feature transfer module $g : { \mathcal { Z } } \to { \mathcal { Z } }$ denoted as “Tx” in Figure 1 transforms $f ( \mathcal { X } _ { S } )$ to $g ( f ( \mathcal { X } _ { S } ) )$ for it to be aligned with $f ( \mathcal { X } _ { T } )$ . To achieve this, we introduce a domain adversarial objective. Finally, we apply verification losses on $f ( \mathcal { X } _ { S } )$ and $g ( f ( \mathcal { X } _ { S } ) )$ using classifiers $h _ { f } , h _ { g } : \mathcal { Z } \times \mathcal { Z } \{ 0 , 1 \}$ . During testing, we compare the metric distance between ${ \dot { f } } ( x )$ and $f ( x ^ { \prime } )$ . Overall, we achieve the following desired capabilities:
|
| 55 |
+
|
| 56 |
+
• If $x , x ^ { \prime }$ are from different domains, $f ( x )$ and $f ( x ^ { \prime } )$ will be far away due to the functionality of the feature generation module. • If $x , x ^ { \prime } \in \mathcal { X } _ { S }$ , then $f ( x )$ and $f ( x ^ { \prime } )$ will be close if they belong to the same class and far away otherwise, due to the discriminative power acquired from optimizing $h _ { f }$ . • If $x , x ^ { \prime } \in \mathcal { X } _ { T }$ , then $f ( x )$ and $f ( x ^ { \prime } )$ will be close if they belong to the same class and far otherwise, due to the discriminative power acquired by optimizing $h _ { g }$ with domain adversarial training.
|
| 57 |
+
|
| 58 |
+
# 4.2 TRAINING OBJECTIVES
|
| 59 |
+
|
| 60 |
+
We first define individual learning objectives of the proposed Feature Transfer Network and then present overall training objectives of FTN. For ease of exposition, all objectives are to be maximized.
|
| 61 |
+
|
| 62 |
+
Verification Objective. For a pair of source examples, we evaluate the verification losses at two representations spaces $f ( \mathcal { X } _ { S } )$ and $g ( f ( \mathcal { X } _ { S } ) )$ using classifiers $h _ { f }$ and $h _ { g }$ as follows:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\begin{array} { r l } & { \mathcal { L } _ { \mathrm { v r f } } ( f ) = \mathbb { E } _ { ( x _ { 1 } , x _ { 2 } ) \in \mathcal { X } _ { S } \times \mathcal { X } _ { S } } \left[ y _ { 1 2 } \log h _ { f } ( f _ { 1 } , f _ { 2 } ) + ( 1 \mathrm { - } y _ { 1 2 } ) \log ( 1 - h _ { f } ( f _ { 1 } , f _ { 2 } ) ) \right] } \\ & { \mathcal { L } _ { \mathrm { v r f } } ( g ) = \mathbb { E } _ { ( x _ { 1 } , x _ { 2 } ) \in \mathcal { X } _ { S } \times \mathcal { X } _ { S } } \left[ y _ { 1 2 } \log h _ { g } ( g _ { 1 } , g _ { 2 } ) + ( 1 \mathrm { - } y _ { 1 2 } ) \log ( 1 - h _ { g } ( g _ { 1 } , g _ { 2 } ) ) \right] } \end{array}
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where $g _ { i } = g ( f ( x _ { i } ) ) , f _ { i } = f ( x _ { i } )$ and $y _ { 1 2 } = 1$ if $x _ { 1 }$ and $x _ { 2 }$ are from the same class and 0 otherwise. While classifiers $h _ { f } , h _ { g }$ can be parameterized by neural networks, we aim to learn a generator $f$ and $g$ whose embeddings can be directly used as a distance metric. Therefore, we use non-parameteric classifiers hf = σ(f >1 f2), hg = σ(g>1 g2) where σ(a) = 11+exp(−a) .
|
| 69 |
+
|
| 70 |
+
Domain Adversarial Objective. Let $D _ { 1 } : \mathcal { Z } \to ( 0 , 1 )$ be a domain discriminator. As mentioned earlier, $D _ { 1 }$ is trained to discriminate distributions $f ( \mathcal { X } _ { T } )$ and $g ( f ( \mathcal { X } _ { S } ) )$ and then produces gradient for them to be indistinguishable. The learning objectives are written as follows:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathcal { L } _ { D _ { 1 } } = \mathbb { E } _ { x \in \mathcal { X } _ { S } } \log D _ { 1 } ( g ) + \mathbb { E } _ { x \in \mathcal { X } _ { T } } \log \left( 1 - D _ { 1 } ( f ) \right) , \ \mathcal { L } _ { \mathrm { a d v } } = \mathbb { E } _ { x \in \mathcal { X } _ { T } } \log D _ { 1 } ( f )
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
Note that when feature transform module is an identity mapping, i.e., $g ( f ( x ) ) = f ( x )$ , Equation (3) defines the training objective of standard DANN.
|
| 77 |
+
|
| 78 |
+
Domain Separation Objective. The goal of this objective is to distinguish between source and target at representation spaces of generation module. To this end, we formulate the objective using another domain discriminator $D _ { 2 } : \mathcal { Z } \to ( 0 , 1 )$ :
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathcal { L } _ { \mathrm { s e p } } = \mathbb { E } _ { x \in \mathcal { X } _ { S } } \log D _ { 2 } ( f ) + \frac { 1 } { 2 } \big [ \mathbb { E } _ { x \in \mathcal { X } _ { S } } \log ( 1 - D _ { 2 } ( g ) ) + \mathbb { E } _ { x \in \mathcal { X } _ { T } } \log ( 1 - D _ { 2 } ( f ) ) \big ]
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
Note that, in $\mathcal { L } _ { \mathrm { s e p } }$ , the source space $f ( \mathcal { X } _ { S } )$ is not only pushed apart from the target space $f ( \mathcal { X } _ { T } )$ but also from the augmented source space $g ( f ( \mathcal { X } _ { S } ) )$ to ensure that $g$ learns meaningful transformation of source domain representation beyond identity transformation.
|
| 85 |
+
|
| 86 |
+
Training FTN. Now we are ready to present the overall training objectives $\mathcal { L } _ { f }$ and $\mathcal { L } _ { g }$ :
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\mathcal { L } _ { f } = \frac { 1 } { 2 } \big [ \mathcal { L } _ { \mathrm { v r f } } ( g ) + \mathcal { L } _ { \mathrm { v r f } } ( f ) \big ] + \lambda _ { 1 } \mathcal { L } _ { \mathrm { a d v } } + \lambda _ { 2 } \mathcal { L } _ { \mathrm { s e p } } , \mathcal { L } _ { g } = \mathcal { L } _ { \mathrm { v r f } } ( g ) + \lambda _ { 2 } \mathbb { E } _ { \mathcal { X } _ { S } } \log ( 1 - D _ { 2 } ( g ) )
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
with $\lambda _ { 1 }$ for domain adversarial objective and $\lambda _ { 2 }$ for domain separation objective. We use $\mathcal { L } _ { D _ { 1 } }$ in Equation (3) for $D _ { 1 }$ and $\mathcal { L } _ { D _ { 2 } } = \mathcal { L } _ { \mathrm { s e p } }$ for $D _ { 2 }$ . We alternate updating between $D _ { 1 }$ and $( f , g , D _ { 2 } )$ .
|
| 93 |
+
|
| 94 |
+
# 4.3 PRACTICAL CONSIDERATIONS
|
| 95 |
+
|
| 96 |
+
Preventing Mode Collapse via Feature Reconstruction Loss. The mode collapsing phenomenon with generative adversarial networks (GANs) (Goodfellow et al., 2014) has received much attention (Salimans et al., 2016). In the context of domain adaptation, we also find it critical to treat the domain adversarial objective with care to avoid similar optimization instability.
|
| 97 |
+
|
| 98 |
+
In this work, we prevent the mode collapse issue for domain adversarial learning with an additional regularization method similar to (Sohn et al., 2017). Assuming the representation of the source domain is already close to optimal, we regularize the features of source examples to be similar to those from the reference network $f _ { \mathrm { r e f } } : \mathcal { X } \xrightarrow { } \mathcal { Z }$ , which is pretrained on labeled source data and fixed during the training of $f$ . Furthermore, we add a similar but less emphasized $( \lambda _ { 4 } < \lambda _ { 3 } )$ regularization to target examples, simultaneously avoiding collapsing and allowing more room for target features to diverge from the original representations. Finally, the feature reconstruction loss is written as follows:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { r e c o n } } = - \big [ \lambda _ { 3 } \mathbb { E } _ { x \in \mathcal { X } _ { S } } \| f ( x ) - f _ { \mathrm { r e f } } ( x ) \| _ { 2 } ^ { 2 } + \lambda _ { 4 } \mathbb { E } _ { x \in \mathcal { X } _ { T } } \| f ( x ) - f _ { \mathrm { r e f } } ( x ) \| _ { 2 } ^ { 2 } \big ] } \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
We empirically find that without the feature reconstruction loss, the training would become unstable, reach an early local optimum and lead to suboptimal performance (see Section 6 and Appendix C). Thus, we always include the feature reconstruction loss to train DANN or FTN models unless stated otherwise.
|
| 105 |
+
|
| 106 |
+
Replacing Verification Loss with $N$ -pair Loss. Our theoretical analysis in Section 3 (and Appendix A) suggests to use a verification loss that compares similarity between a pair of images. In practice, however, the pairwise verification loss is too weak to learn a good deep distance metric. Following (Sohn, 2016), we propose to replace the verification loss with an $N$ -pair loss, defined as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathcal { L } _ { N } ( f ) = \mathbb { E } _ { \{ x _ { n } , x _ { n } ^ { + } \} _ { n = 1 } ^ { N } , x _ { n } , x _ { n } ^ { + } \in \mathcal { X } _ { S } } \Big [ \sum _ { n = 1 } ^ { N } \log p _ { n } ( f ) \Big ] , \ p _ { n } ( f ) = \frac { \exp ( f ( x _ { n } ) ^ { \top } f ( x _ { n } ^ { + } ) ) } { \sum _ { k = 1 } ^ { N } \exp ( f ( x _ { n } ) ^ { \top } f ( x _ { k } ^ { + } ) ) }
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $x _ { n }$ and $x _ { n } ^ { + }$ are from the same class and $x _ { n }$ and $x _ { k } ^ { + }$ , $n \neq k$ , are from different classes. Replacing ${ \mathcal { L } } _ { \mathrm { v r f } }$ into $\mathcal { L } _ { N }$ , the training objective of FTN with $N$ -pair loss is written as follows:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathcal { L } _ { f } = \frac { 1 } { 2 } \big [ \mathcal { L } _ { N } ( g ) + \mathcal { L } _ { N } ( f ) \big ] + \lambda _ { 1 } \mathcal { L } _ { \mathrm { a d v } } + \lambda _ { 2 } \mathcal { L } _ { \mathrm { s e p } } + \mathcal { L } _ { \mathrm { r e c o n } } , \ \mathcal { L } _ { g } = \mathcal { L } _ { N } ( g ) + \lambda _ { 2 } \mathbb { E } _ { \mathcal { X } _ { S } } \log ( 1 - D _ { 2 } ( g ) )
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 2: t-SNE visualizations of source (0–4 from MNIST-M) and target (5–9 from MNIST) representations by different learning methods: (a) deep neural network without adaptation, (b) domain adversarial neural network (DANN) and (c) our feature transfer network (FTN). While domain adversarial learning results in significant confusion of digits classes between source and target domains (e.g., 3/5, 2/8, 4/9, or 0/6 in (b)), the proposed FTN transfers discriminative power to target domain while successfully separating them from the source domain.
|
| 120 |
+
|
| 121 |
+
# 5 ENTROPY MINIMIZATION VIA HIERARCHICAL CLUSTERING
|
| 122 |
+
|
| 123 |
+
Entropy minimization (Grandvalet & Bengio, 2005) is a popular training objective in unsupervised domain adaptation: unlabeled data is trained to minimize entropy of a class prediction distribution so as to form features that convey confident decision rules. However, it is less straightforward how to apply entropy minimization when label spaces for source and target are disjoint. Motivated from Section 3, we extend entropy minimization for distance metric adaptation using verification as a common task for both domains:
|
| 124 |
+
|
| 125 |
+
$$
|
| 126 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { v r f } } ^ { \mathrm { e n t } } ( f ) = \mathbb { E } _ { x _ { i } , x _ { j } \in \mathcal { X } _ { T } } \left[ p _ { i j } \log p _ { i j } + ( 1 - p _ { i j } ) \log ( 1 - p _ { i j } ) \right] } \end{array}
|
| 127 |
+
$$
|
| 128 |
+
|
| 129 |
+
where $p _ { i j } \triangleq p _ { i j } ( f ) = \sigma ( f ( x _ { i } ) ^ { \top } f ( x _ { j } ) )$ . This formulation encourages a more confident prediction for verifying two unlabeled images, whether or not coming from the same class.
|
| 130 |
+
|
| 131 |
+
However, recall that for the source domain, we use $N$ -pair loss instead of pair-wise verification loss for better representation learning. Therefore, we would like to similarly incorporate the concept of $N$ - pair loss on the target domain by forging a multi-class entropy minimization (MCEM) objective. This demands $N$ pair examples to be sampled from the target domain. As the target domain is unlabeled, we ought to first discover a plausible label structure, which is done off-line via HDBSCAN (Campello et al., 2013; McInnes et al., 2017), a fast and scalable density-based hierarchical clustering algorithm. The returned clusters provide pseudo-labels to individual examples of the target domain, allowing us to sample $N$ pair examples to evaluate the following MCEM objective:
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\mathcal { L } _ { N } ^ { \mathrm { e n t } } ( f ) = \mathbb { E } _ { \{ x _ { n } , x _ { n } ^ { + } \} _ { n = 1 } ^ { N } , x _ { n } , x _ { n } ^ { + } \in \mathcal { X } _ { T } } \Big [ \sum _ { n = 1 } ^ { N } \big \{ \sum _ { m = 1 } ^ { N } p _ { n m } \log p _ { n m } \big \} \Big ] , \ p _ { n m } ( f ) = \frac { \exp \bigl ( f _ { n } ^ { \top } f _ { m } ^ { + } \bigr ) } { \sum _ { k = 1 } ^ { N } \exp \bigl ( f _ { n } ^ { \top } f _ { k } ^ { + } \bigr ) }
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
where $x _ { n }$ and $x _ { n } ^ { + }$ are from the same cluster and $x _ { n }$ and $x _ { k } ^ { + }$ , $n \neq k$ are from different clusters. The objective can be combined with $\mathcal { L } _ { f }$ in Equation (8) to optimize $f$ .
|
| 138 |
+
|
| 139 |
+
# 6 EXPERIMENTS
|
| 140 |
+
|
| 141 |
+
In this section, we first experiment on digit datasets as a proof of concept and compare our proposed FTN to DANN. Then, we tackle the problem of cross-ethnicity generalization in the context of face recognition to demonstrate the effectiveness of FTN. In all experiments, we use $N$ -pair loss as defined in Equation (8) to update $f$ and $g$ for better convergence and improved performance. We also use the same learning objectives for DANN while fixing $g$ to the identity mapping and $\lambda _ { 2 } = 0$ .
|
| 142 |
+
|
| 143 |
+
# 6.1 PROOF OF CONCEPT: MNIST-M (0–4) TO MNIST (5–9)
|
| 144 |
+
|
| 145 |
+
To provide insights on the functionality of FTN, we conduct an experiment adapting the digits 0–4 from MNIST-M (Ganin et al., 2016) to 5–9 from MNIST. In other words, the two domains in our setting not only differ in foreground and background patterns but also contain non-overlapping digit classes, contrasting the usual adaptation setup with a shared label space. Our goal is to learn a feature space that separates the digit classes not only within each domain, but also across the two.
|
| 146 |
+
|
| 147 |
+
We construct a feature generator $f$ composed of a CNN encoder followed by two fully-connected (FC) layers and a feature transfer module $g$ composed of MLP with residual connections. Outputs of $f$ and $g$ are then fed to discriminators $D _ { 1 }$ and $D _ { 2 }$ parameterized by MLPs to induce domain adversarial and domain separation losses respectively. We provide more architecture details in Appendix B.1.
|
| 148 |
+
|
| 149 |
+
We visualize t-SNE plots of generator features in Figure 2. Without an adaptation (Figure 2(a)), features of digits from the target domain are heavily mixed with those from the source domain as well as one another. The model reaches $1 . 3 \%$ verification error in the source domain but as high as $2 7 . 3 \%$ in the target domain. Though DANN in Figure 2(b) shows better separation with a reduced target verification error of $2 . 2 \%$ , there still exists significant overlap between digit classes across two domains, such as 3/5, 4/9, 0/6 and 2/8. As a result, a domain classifier trained to distinguish source and target on top of generator features can only attain $1 1 . 5 \%$ classification error. In contrast, the proposed FTN in Figure 2(c) shows 10 clean clusters without any visual overlap among 10 digits classes from either source or target domain, implying that it not only separates digits within the target domain ( $2 . 1 \%$ verification error), but also differentiates them across domains $( 0 . 3 \%$ domain classification error).
|
| 150 |
+
|
| 151 |
+
Table 1: Verification and identification accuracy on the Cross Ethnicity Faces (CEF) dataset. For supervised models, we report results trained on labeled CAU $( \mathrm { S u p } ^ { \mathrm { C } } )$ or on labeled CAU, AA, EA domains $( \mathbf { S } \mathbf { u p } ^ { \mathbf { C } , \mathrm { A } , \mathrm { E } } )$ ; for adaptation, we evaluate DANN and FTN, without and with multi-class entropy minimization (MCEM).
|
| 152 |
+
|
| 153 |
+
<table><tr><td rowspan="2">Model</td><td colspan="4">Verification</td><td colspan="4">Identification</td></tr><tr><td>CAU</td><td>AA</td><td>EA</td><td>ALL</td><td>CAU</td><td>AA</td><td>EA</td><td>ALL</td></tr><tr><td>SupC</td><td>98.39</td><td>92.24</td><td>93.41</td><td>95.58</td><td>90.07</td><td>69.64</td><td>76.37</td><td>77.97</td></tr><tr><td>SupCA.E</td><td>98.43</td><td>97.16</td><td>97.05</td><td>98.15</td><td>90.16</td><td>84.02</td><td>84.38</td><td>85.75</td></tr><tr><td>DANN\Lrecon</td><td>98.36</td><td>94.54</td><td>95.02</td><td>96.84</td><td>90.01</td><td>73.05</td><td>74.94</td><td>77.99</td></tr><tr><td>DANN</td><td>98.36</td><td>95.37</td><td>96.36</td><td>97.34</td><td>90.34</td><td>74.88</td><td>79.39</td><td>79.83</td></tr><tr><td>FTN</td><td>98.36</td><td>95.62</td><td>96.64</td><td>97.68</td><td>90.54</td><td>75.35</td><td>80.69</td><td>81.28</td></tr><tr><td>DANN+MCEM</td><td>98.39</td><td>96.36</td><td>97.34</td><td>97.88</td><td>90.77</td><td>80.30</td><td>83.07</td><td>82.69</td></tr><tr><td>FTN+MCEM</td><td>98.37</td><td>96.76</td><td>97.40</td><td>98.08</td><td>90.95</td><td>80.75</td><td>83.71</td><td>84.16</td></tr></table>
|
| 154 |
+
|
| 155 |
+
Table 2: Cross domain identification accuracy on CEF, with CAU evaluated against AA $^ +$ EA combined, AA against CAU and EA against CAU.
|
| 156 |
+
|
| 157 |
+
<table><tr><td>Model</td><td>CAU vs. AA, EA</td><td>AA vs. CAU</td><td>EA vs. CAU</td></tr><tr><td>SupC</td><td>91.67</td><td>95.42</td><td>94.87</td></tr><tr><td>DANN</td><td>89.91</td><td>84.78</td><td>91.47</td></tr><tr><td>FTN</td><td>92.29</td><td>88.09</td><td>92.07</td></tr></table>
|
| 158 |
+
|
| 159 |
+
# 6.2 CROSS ETHNICITY FACE VERIFICATION AND RECOGNITION
|
| 160 |
+
|
| 161 |
+
The performances of face recognition engines have significantly improved thanks to recent advances in deep learning for image recognition (Krizhevsky et al., 2012; Simonyan & Zisserman, 2015; Szegedy et al., 2015; He et al., 2016) and publicly available large-scale face recognition datasets (Yi et al., 2014; Guo et al., 2016). However, most public datasets are collected from the web by querying celebrities, with significant label bias towards Caucasian ethnicity. For example, more than $\bar { 8 } 5 \%$ of identities are Caucasian for CASIA Web face dataset (Yi et al., 2014). Similarly, $8 2 \%$ are Caucasian (CAU) for MS-Celeb-1M (MS-1M) dataset (Guo et al., 2016), while there are only $9 . 7 \%$ African-American (AA), $6 . 4 \%$ East-Asian (EA) and less than $2 \%$ Latino and South-Asian combined.4
|
| 162 |
+
|
| 163 |
+
Such imbalance across ethnicity in labeled training data can result in significant drop in identification performance on data-scarce minorities: the second row of Table 1 shows a model trained on Caucasian dominated dataset performs poorly on the other ethnicities. As expected, if the training data is composed of only Caucasian identities as source domain, the performance over the target domains consisting of the other ethnicities further deteriorates (see row 1 of Table 1). Provided the available labeled source domain contains only Caucasian identities, we subsequently demonstrate that our method can effectively leverage unlabeled data from the non-Caucasian target ethnicity to substantially improve their face verification performances.
|
| 164 |
+
|
| 165 |
+
Experimental Setup. We perform an adaptation from CAU to a mixture of AA and EA. Our experiments use the MS-1M dataset. We first remove identities that both appear in the training and testing sets. The resulting training set consists of $4 . 0 4 M$ images from $6 0 K$ CAU identities, $3 9 8 K$ images from $7 K$ AA identities, and $3 0 8 K$ images from $4 . 6 K$ EA identities. For domain adaptation experiments, we use labeled CAU images and unlabeled AA, EA images for training. For supervised experiments to obtain performance lower and upper bound, we use labeled CAU images to train $\mathrm { S u p ^ { C } }$ and labeled CAU, AA, EA images to train $\mathrm { S u p } ^ { \mathrm { \hat { C } , A , E } }$ .
|
| 166 |
+
|
| 167 |
+
We adopt a 38-layer ResNet (He et al., 2016) for the feature generation module. Feature transfer module and discriminators are parameterized with MLPs similarly to Section 6.1. We use 4096-pair loss for training, including for the supervised CNNs. It is worth mentioning that our network architecture and training scheme result in strongly competitive face recognition performance, comparing to other state-of-the-art methods such as FaceNet (Schroff et al., 2015) on YouTube Faces (Wolf et al., 2011) $( 9 7 . 3 2 \%$ (ours) vs $9 5 . 1 2 \%$ ) and Neural Aggregation Network (Yang et al., 2017) on IJB-A (see row 2 of Table 3). The complete network architecture and training details are provided in Appendix B.2.
|
| 168 |
+
|
| 169 |
+
Evaluation. We report the performance of the baseline and our proposed models on two standard face recognition benchmarks LFW (Huang et al., 2007) and IJB-A (Klare et al., 2015). Note that these datasets also exhibit significant ethnicity bias.5
|
| 170 |
+
|
| 171 |
+
To highlight the effectiveness of the proposed adaptation approach, we construct individual test set for CAU, AA, EA, each of which contains 10 face images from 200 identities. We refer to our testing set as the Cross-Ethnicity Faces (CEF) dataset. We apply two evaluation metrics on CEF dataset, verification accuracy and identification accuracy. For verification, following the standard protocol (Huang et al., 2007), we construct 10 splits, each containing 900 positive and 900 negative pairs, and compute the accuracy on each split using the threshold found from the other 9 splits. For identification, a pair composed of the reference and the query images from the same identity is considered correct if there is no image from different identity that has higher similarity to the reference image than the query image. We evaluate identification accuracy per ethnicity (200-way) as well as across all ethnicities (600-way).
|
| 172 |
+
|
| 173 |
+
Results. The results on CEF are summarized in Table 1. Cross domain identification accuracy is reported in Table 2, where we use AA and EA as negative classes when evaluating accuracy on CAU and vice versa, as a measure to indicate domain discrepancy. Among adaptation models, DANN without feature reconstruction loss $\left( \mathrm { D A N N } \backslash \mathcal { L } _ { \mathrm { r e c o n } } \right)$ shows unstable training and easily degenerate, which leads to only marginal improvement upon $\mathrm { S u p ^ { C } }$ . Similar trend is observed while training FTN. Therefore, to ensure training stability, we impose ${ \mathcal { L } } _ { \mathrm { r e c o n } }$ as a regularization term for all adaptation models. More analysis on the effectiveness of $\scriptstyle { \mathcal { L } } _ { \mathrm { r e c o n } }$ is provided in Appendix C.
|
| 174 |
+
|
| 175 |
+
When testing on AA and EA with model trained on only the labeled source CAU domain $( \mathrm { S u p } ^ { \mathrm { C } } )$ , we observe significant performance drops in Table 1. Meanwhile, in Table 2, cross domain identification accuracy is much higher than within domain identification accuracy, i.e., $9 6 . 1 4 \%$ of AA vs. CAU is much higher than $7 1 . 9 2 \%$ of AA identification in Table 1, indicating 1) significant discrepancy between the feature spaces of the source and target domains and 2) lack of discriminative power for within domain verification task on target ethnicity.
|
| 176 |
+
|
| 177 |
+
Comparing to $\mathrm { S u p ^ { C } }$ , both DANN and FTN show moderate improvement when testing on AA and EA from CEF (Table 1), demonstrating the effectiveness of domain adversarial learning in transferring within domain verification capability from labeled source domain to unlabeled target domain. Despite the improvement, DANN suffers a notable drawback from adversarial objective which attempts to align identities from different domains, resulting a poor cross domain identification accuracy as shown in Table 2. In contrast, the proposed FTN achieves much higher cross domain identification accuracy, demonstrating both within and cross domain discriminative power.
|
| 178 |
+
|
| 179 |
+
Additionally, in combination with the multi-class entropy minimization $\mathbf { ( F T N + M C E M ) }$ ), we further boost the verification and identification accuracy over FTN on AA and EA as well as approach the accuracy of $\operatorname { S u p } ^ { \mathrm { C , A , E } }$ , the performance upper bound. This indicates that the HDBSCAN-based hierarchical clustering provides high quality pseudo-class labels for MCEM to be effective. Indeed, the clustering algorithm achieves F-score as high as $9 6 . 3 1 \%$ and $9 6 . 3 4 \%$ on AA and EA. We provide more in-depth analysis on the clustering strategy in Appendix D.
|
| 180 |
+
|
| 181 |
+
Finally, Table 3 reports the performance of face recognition models on standard verification and recognition benchmarks. We observe similar improvements with our proposed distance metric adaptation when only using labeled CAU, i.e., source domain, as training data. Once the task becomes more challenging thus demands more discriminative power, the advantage of our method becomes more evident, such as in the case of open-set recognition and verification at low FAR.
|
| 182 |
+
|
| 183 |
+
# 7 CONCLUSION
|
| 184 |
+
|
| 185 |
+
We address the challenge of unsupervised domain adaptation when the source and the target domains have disjoint label spaces by formulating the classification problem into a verification task. We propose a Feature Transfer Network, allowing simultaneous optimization of domain adversarial loss and domain separation loss, as well as a variant of $N$ -pair metric loss for entropy minimization on the target domain where the ground-truth label structure is unknown, to further improve the adaptation quality. Our proposed framework excels at both within-domain and cross-domain verification tasks. As an application, we demonstrate cross-ethnicity face verification that overcomes label biases in training data, achieving high accuracy even for unlabeled ethnicity domains, which we believe is a result with vital social significance.
|
| 186 |
+
|
| 187 |
+
Table 3: Face verification and recognition performance on LFW and IJB-A. From left to right, verification (VRF), closed-set (CLS) and open-set recognition at $\mathrm { F A R } = 0 . 0 1$ and 0.001 (Best-Rowden et al., 2014) on LFW, and verification at different FAR and identification (id.) at rank- $k$ on IJB-A are reported.
|
| 188 |
+
|
| 189 |
+
<table><tr><td rowspan="2">Model</td><td colspan="4">LFW</td><td colspan="3">IJB-A (verification)</td><td colspan="2">IJB-A (id.)</td></tr><tr><td>VRF</td><td>CLS</td><td>0.01</td><td>0.001</td><td>0.01</td><td>0.001</td><td>0.0001</td><td>rank-1</td><td>rank-5</td></tr><tr><td>SupC</td><td>99.57</td><td>98.95</td><td>86.07</td><td>66.61</td><td>92.67</td><td>76.65</td><td>50.32</td><td>94.31</td><td>97.25</td></tr><tr><td>SupCA.E</td><td>99.72</td><td>98.79</td><td>96.81</td><td>91.11</td><td>95.57</td><td>87.45</td><td>76.45</td><td>94.73</td><td>97.19</td></tr><tr><td>DANN\Lrecon</td><td>99.43</td><td>98.98</td><td>96.81</td><td>91.44</td><td>94.23</td><td>86.87</td><td>73.80</td><td>94.27</td><td>97.03</td></tr><tr><td>DANN</td><td>99.63</td><td>98.95</td><td>97.15</td><td>93.46</td><td>95.54</td><td>88.64</td><td>77.13</td><td>94.59</td><td>97.31</td></tr><tr><td>FTN</td><td>99.63</td><td>99.11</td><td>97.15</td><td>92.95</td><td>95.07</td><td>88.45</td><td>77.70</td><td>94.48</td><td>97.19</td></tr><tr><td>DANN+MCEM</td><td>99.63</td><td>99.08</td><td>97.65</td><td>94.97</td><td>95.28</td><td>88.78</td><td>77.30</td><td>94.75</td><td>97.30</td></tr><tr><td>FTN+MCEM</td><td>99.65</td><td>99.14</td><td>96.98</td><td>93.46</td><td>94.63</td><td>88.28</td><td>77.98</td><td>94.79</td><td>97.00</td></tr></table>
|
| 190 |
+
|
| 191 |
+
# REFERENCES
|
| 192 |
+
|
| 193 |
+
Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In NIPS, 2007. 1, 2, 3, 4
|
| 194 |
+
|
| 195 |
+
Shai Ben-David, John Blitzer, Koby Crammer, Alex Kulesza, Fernando Pereira, and Jennifer Wortman Vaughan. A theory of learning from different domains. Machine learning, 79(1):151–175, 2010. 1
|
| 196 |
+
|
| 197 |
+
Lacey Best-Rowden, Hu Han, Christina Otto, Brendan F Klare, and Anubhav K Jain. Unconstrained face recognition: Identifying a person of interest from a media collection. IEEE Transactions on Information Forensics and Security, 9(12):2144–2157, 2014. 9
|
| 198 |
+
|
| 199 |
+
Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. In NIPS, 2016. 2, 4
|
| 200 |
+
|
| 201 |
+
Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, July 2017. 2
|
| 202 |
+
|
| 203 |
+
Joy Buolamwini and Timnit Gebru. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Conference on Fairness, Accountability and Transparency, 2018. 1
|
| 204 |
+
|
| 205 |
+
Ricardo JGB Campello, Davoud Moulavi, and Jörg Sander. Density-based clustering based on hierarchical density estimates. In Pacific-Asia conference on knowledge discovery and data mining, pp. 160–172. Springer, 2013. 2, 6
|
| 206 |
+
|
| 207 |
+
Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, 2018. 2
|
| 208 |
+
|
| 209 |
+
Hal Daumé III. Domain adaptation vs. transfer learning. https://nlpers.blogspot.com/ 2007/11/domain-adaptation-vs-transfer-learning.html, 2007. 3
|
| 210 |
+
|
| 211 |
+
Basura Fernando, Tatiana Tommasi, and Tinne Tuytelaars. Joint cross-domain classification and subspace learning for unsupervised adaptation. Pattern Recognition Letters, 65:60–66, 2015. 2
|
| 212 |
+
|
| 213 |
+
Brian Forrest. Math 451 course note. 1
|
| 214 |
+
|
| 215 |
+
Geoffrey French, Michal Mackiewicz, and Mark Fisher. Self-ensembling for visual domain adaptation. In ICLR, 2018. 1
|
| 216 |
+
|
| 217 |
+
Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario Marchand, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of Machine Learning Research, 17(59):1–35, 2016. 1, 2, 3, 6
|
| 218 |
+
|
| 219 |
+
GIZMODO. How apple says it prevented face id from being racist. https://gizmodo.com/ how-apple-says-it-prevented-face-id-from-being-racist-1819557448, 2018. 1
|
| 220 |
+
|
| 221 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NIPS, 2014. 5
|
| 222 |
+
|
| 223 |
+
Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. In ICML, 2013. 2
|
| 224 |
+
|
| 225 |
+
Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In NIPS, 2005. 1, 6
|
| 226 |
+
|
| 227 |
+
Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. MS-Celeb-1M: A dataset and benchmark for large scale face recognition. In ECCV, 2016. 7
|
| 228 |
+
|
| 229 |
+
Philip Haeusser, Thomas Frerix, Alexander Mordvintsev, and Daniel Cremers. Associative domain adaptation. In ICCV, 2017. 1, 2
|
| 230 |
+
|
| 231 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 7
|
| 232 |
+
|
| 233 |
+
Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. FCNs in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. 2
|
| 234 |
+
|
| 235 |
+
Junlin Hu, Jiwen Lu, and Yap-Peng Tan. Deep transfer metric learning. In CVPR, pp. 325–333, 2015. 3
|
| 236 |
+
|
| 237 |
+
Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical report, University of Massachusetts, Amherst, 2007. 8
|
| 238 |
+
|
| 239 |
+
Daniel Kifer, Shai Ben-David, and Johannes Gehrke. Detecting change in data streams. In Proceedings of the Thirtieth international conference on Very large data bases-Volume 30, pp. 180–191. VLDB Endowment, 2004. 1
|
| 240 |
+
|
| 241 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. 3
|
| 242 |
+
|
| 243 |
+
Brendan F Klare, Ben Klein, Emma Taborsky, Austin Blanton, Jordan Cheney, Kristen Allen, Patrick Grother, Alan Mah, and Anil K Jain. Pushing the frontiers of unconstrained face detection and recognition: IARPA Janus Benchmark A. In CVPR, 2015. 8
|
| 244 |
+
|
| 245 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. 7
|
| 246 |
+
|
| 247 |
+
Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In ICLR, 2017. 1
|
| 248 |
+
|
| 249 |
+
Steven P Lalley. Measure-theoretic probability I, 2017. 1
|
| 250 |
+
|
| 251 |
+
Mingsheng Long, Jianmin Wang, Guiguang Ding, Jiaguang Sun, and Philip S Yu. Transfer feature learning with joint distribution adaptation. In ICCV, 2013. 1, 2
|
| 252 |
+
|
| 253 |
+
Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. 1
|
| 254 |
+
|
| 255 |
+
Mingsheng Long, Han Zhu, Jianmin Wang, and Michael I Jordan. Unsupervised domain adaptation with residual transfer networks. In NIPS, 2016. 1, 2, 3
|
| 256 |
+
|
| 257 |
+
Zelun Luo, Yuliang Zou, Judy Hoffman, and Li Fei-Fei. Label efficient learning of transferable representations across domains and tasks. In NIPS, 2017. 1, 2, 3, 4
|
| 258 |
+
|
| 259 |
+
Leland McInnes, John Healy, and Steve Astels. hdbscan: Hierarchical density based clustering. The Journal of Open Source Software, 2(11):205, 2017. 6
|
| 260 |
+
|
| 261 |
+
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. 2
|
| 262 |
+
|
| 263 |
+
NYTimes. Facial recognition is accurate, if you’re a white guy. https://www.nytimes.com/2018/02/09/technology/ facial-recognition-race-artificial-intelligence.html, 2018. 1
|
| 264 |
+
|
| 265 |
+
Sinno Jialin Pan, Qiang Yang, et al. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10):1345–1359, 2010. 3
|
| 266 |
+
|
| 267 |
+
O. M. Parkhi, A. Vedaldi, and A. Zisserman. Deep face recognition. In BMVC, 2015. 1
|
| 268 |
+
|
| 269 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NIPS, 2016. 5
|
| 270 |
+
|
| 271 |
+
Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A unified embedding for face recognition and clustering. In CVPR, 2015. 1, 8
|
| 272 |
+
|
| 273 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. 7
|
| 274 |
+
|
| 275 |
+
Kihyuk Sohn. Improved deep metric learning with multi-class N-pair loss objective. In NIPS, 2016. 2, 5
|
| 276 |
+
|
| 277 |
+
Kihyuk Sohn, Sifei Liu, Guangyu Zhong, Xiang Yu, Ming-Hsuan Yang, and Manmohan Chandraker. Unsupervised domain adaptation for face recognition in unlabeled videos. In ICCV, 2017. 1, 2, 3, 5
|
| 278 |
+
|
| 279 |
+
Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV Workshop, 2016. 2
|
| 280 |
+
|
| 281 |
+
Yi Sun, Yuheng Chen, Xiaogang Wang, and Xiaoou Tang. Deep learning face representation by joint identification-verification. In NIPS, 2014. 1
|
| 282 |
+
|
| 283 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, 2015. 7
|
| 284 |
+
|
| 285 |
+
Yaniv Taigman, Ming Yang, Marc’Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In CVPR, 2014. 1
|
| 286 |
+
|
| 287 |
+
Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In NIPS, 2017. 1
|
| 288 |
+
|
| 289 |
+
Luan Tran, Kihyuk Sohn, Xiang Yu, Xiaoming Liu, and Manmohan Chandraker. Joint pixel and feature-level domain adaptation in the wild. arXiv preprint arXiv:1803.00068, 2018. 1, 2
|
| 290 |
+
|
| 291 |
+
Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kihyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, 2018. 2
|
| 292 |
+
|
| 293 |
+
Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. 2
|
| 294 |
+
|
| 295 |
+
Eric Tzeng, Judy Hoffman, Trevor Darrell, and Kate Saenko. Simultaneous deep transfer across domains and tasks. In ICCV, 2015. 1, 2
|
| 296 |
+
|
| 297 |
+
Oriol Vinyals, Charles Blundell, Tim Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NIPS, 2016. 4
|
| 298 |
+
|
| 299 |
+
WIRED. Lawmakers can’t ignore facial recognition’s bias anymore. https://www.wired.com/ story/amazon-facial-recognition-congress-bias-law-enforcement/, 2018a. 1
|
| 300 |
+
|
| 301 |
+
WIRED. When it comes to gorillas, google photos remains blind. https://www.wired.com/ story/when-it-comes-to-gorillas-google-photos-remains-blind/, 2018b. 1
|
| 302 |
+
|
| 303 |
+
Lior Wolf, Tal Hassner, and Itay Maoz. Face recognition in unconstrained videos with matched background similarity. In CVPR, 2011. 8
|
| 304 |
+
|
| 305 |
+
Fan Yang, Wongun Choi, and Yuanqing Lin. Exploit all the layers: Fast and accurate cnn object detector with scale dependent pooling and cascaded rejection classifiers. In CVPR, 2016. 2
|
| 306 |
+
|
| 307 |
+
Jiaolong Yang, Peiran Ren, Dongqing Zhang, Dong Chen, Fang Wen, Hongdong Li, and Gang Hua. Neural aggregation network for video face recognition. In CVPR, 2017. 8
|
| 308 |
+
|
| 309 |
+
Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Learning face representation from scratch. arXiv preprint:1411.7923, 2014. 7
|
| 310 |
+
|
| 311 |
+
Xiang Yu, Feng Zhou, and Manmohan Chandraker. Deep deformation network for object landmark localization. In ECCV, 2016. 2
|
| 312 |
+
|
| 313 |
+
Yiheng Zhang, Zhaofan Qiu, Ting Yao, Dong Liu, and Tao Mei. Fully convolutional adaptation networks for semantic segmentation. In CVPR, 2018. 2
|
| 314 |
+
|
| 315 |
+
# Appendix
|
| 316 |
+
|
| 317 |
+
# A DERIVATION FOR GENERALIZATION BOUND OF TARGET DOMAIN VERIFICATION LOSS
|
| 318 |
+
|
| 319 |
+
Let $( \mathcal { X } , \mathcal { F } )$ and $( { \mathcal { Z } } , { \mathcal { G } } )$ be measurable input and feature spaces respectively and a feature extractor $R : { \mathcal { X } } \to { \mathcal { Z } }$ be a measurable function. Let $\mu$ be a probability measure on $\mathcal { X }$ corresponding to the data distribution. Let $( \mathcal { X } _ { 1 } , \mathcal { F } , \mu _ { 1 } ) = ( \mathcal { X } _ { 2 } , \mathcal { F } , \mu _ { 2 } ) = ( \mathcal { X } , \mathcal { F } , \mu )$ and $\mu _ { 1 2 } = \mu _ { 1 } \times \mu _ { 2 }$ on $\mathcal { X } _ { 1 } \times \mathcal { X } _ { 2 }$ be the unique product measure (Forrest). Similarly, we construct $\mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 }$ where $( \mathcal { Z } _ { 1 } , \mathcal { G } ) = ( \mathcal { Z } _ { 2 } , \mathcal { G } ) = ( \mathcal { Z } , \mathcal { G } )$ . Since $R$ is measurable, $R ^ { 2 } : \mathcal { X } _ { 1 } \times \mathcal { X } _ { 2 } \to \mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 }$ where $R ^ { 2 } ( x _ { 1 } , x _ { 2 } ) = ( R ( x _ { 1 } ) , R ( x _ { 2 } ) )$ is also measurable (see Lemma 1 for the proof). Then we can obtain an induced probability measure for $\mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 }$ from $R ^ { 2 }$ , denoted as ${ \tilde { \mu } _ { 1 2 } } = \mu _ { 1 2 } \circ ( R ^ { 2 } ) ^ { - 1 }$ (Proposition 1.34 from (Lalley, 2017)).
|
| 320 |
+
|
| 321 |
+
Let $Y : \mathcal { X } _ { 1 } \times \mathcal { X } _ { 2 } \{ 0 , 1 \}$ , where 1 represents the pair from the same identity and 0 otherwise,6 be the stochastic target function for ground truth labeling, $\phi ( x _ { 1 } , x _ { 2 } ) = \mathbb { E } \left[ Y ( \dot { x _ { 1 } } , x _ { 2 } ) \right]$ be the expectation of the label at $( x _ { 1 } , x _ { 2 } )$ , and $\tilde { \phi } ( z _ { 1 } , z _ { 2 } ) = \mathbb { E } \left[ \phi ( x _ { 1 } , x _ { 2 } ) | R ( x _ { 1 } ) { = } z _ { 1 } , R ( x _ { 2 } ) { = } z _ { 2 } \right]$ be the conditional expectation of $\phi$ given the value of $R ^ { 2 } ( x _ { 1 } , x _ { 2 } ) = ( z _ { 1 } , z _ { 2 } )$ . Now, consider two domains, namely the source domain with probability measure $\mu ^ { S }$ over $\mathcal { X }$ and induced probability measure $\tilde { \mu } ^ { S }$ over $\mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 }$ , as well as target domain counterparts $\mu ^ { T }$ and $\tilde { \mu } ^ { T }$ . Provided with a deterministic hypothesis class $\mathcal { H } \subseteq \left\{ g : \mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 } \overset { \cdot } { \to } \left\{ 0 , 1 \right\} \right\}$ of VC-dimension $d$ , suppose there exists a function $h \in \mathcal H$ that can predict both source and target domains reasonably well. Then, we can quantify $\tilde { \phi }$ to be $\lambda$ -close to $\mathcal { H }$ :
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\operatorname* { i n f } _ { h \in \mathcal { H } } \epsilon _ { S } ( h ) + \epsilon _ { T } ( h ) \leq \lambda , \mathrm { w h e r e } \epsilon _ { i } ( h ) = \int | \tilde { \phi } ( z _ { 1 } , z _ { 2 } ) - h ( z _ { 1 } , z _ { 2 } ) | d \tilde { \mu } ^ { i } .
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
We are ready to define the variational distance between the two domains with respect to $\mathcal { H }$ :
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\begin{array} { r } { d _ { \mathcal { H } } ( \tilde { \mu } ^ { S } , \tilde { \mu } ^ { T } ) = 2 \underset { A \in \mathcal { A } } { \operatorname* { s u p } } | \tilde { \mu } ^ { S } ( A ) - \tilde { \mu } ^ { T } ( A ) | , \ A = \{ A _ { h } = \{ ( z _ { 1 } , z _ { 2 } ) \in \mathcal { Z } _ { 1 } \times \mathcal { Z } _ { 2 } : h ( z _ { 1 } , z _ { 2 } ) = 1 \} , h \in \mathcal { H } \} . } \end{array}
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
So far, we have successfully prepared the components in our verification setup to meet the assumptions and the format required by Theorem 1 from (Ben-David et al., 2007). We may now directly apply the theorem:
|
| 334 |
+
|
| 335 |
+
Theorem 1. Randomly sample a labeled set of size m by applying $R ^ { 2 }$ to samples from $\mathcal { X } _ { 1 } \times \mathcal { X } _ { 2 }$ with labels defined according to $Y$ , with probability at least $1 - \delta$ , $\forall h \in { \mathcal { H } }$
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\epsilon _ { T } ( h ) \leq \hat { \epsilon } _ { S } ( h ) + \sqrt { \frac { 4 } { m } ( d \log \frac { 2 m } { d } + d + \log \frac { 4 } { \delta } } ) + d _ { \mathcal { H } } ( \tilde { \mu } ^ { S } , \tilde { \mu } ^ { T } ) + \lambda .
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
Furthermore, $d _ { \mathcal { H } } ( \tilde { \mu } ^ { S } , \tilde { \mu } ^ { T } )$ can be empirically approximated by finite samples from both domain (Kifer et al., 2004), using the binary classifier from $\mathcal { H }$ that can best distinguishes pairs of samples between two domains. Following Theorem 2 from (Ben-David et al., 2007), let $\tilde { U } _ { S }$ and $\tilde { U } _ { T }$ consist of $n$ random pairs of samples from source and target each, with probability at least $1 - \delta$ , we have :
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\begin{array} { r l } & { d _ { \mathcal { H } } ( \tilde { \mu } ^ { S } , \tilde { \mu } ^ { T } ) \leq d _ { \mathcal { H } } ( \tilde { U } _ { S } , \tilde { U } _ { T } ) + \sqrt { \frac { d \log ( 2 n ) + \log \frac { 4 } { \delta } } { n } } , } \\ & { \cdot d _ { \mathcal { H } } ( \tilde { U } _ { S } , \tilde { U } _ { T } ) = 2 \left( 1 - 2 \operatorname* { m i n } _ { h \in \mathcal { H } } \frac { 1 } { 2 n } \sum _ { i = 1 } ^ { 2 n } \big | h \big ( z _ { 1 , i } , z _ { 2 , i } \big ) - \mathbf { 1 } \big \{ \big ( z _ { 1 , i } , z _ { 2 , i } \big ) \in \tilde { U } _ { S } \big \} \big | \right) . } \end{array}
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
For completeness of our analysis, we formalize and prove in Lemma 1 that $R ^ { 2 }$ is measurable.
|
| 348 |
+
|
| 349 |
+
Lemma 1. Let $( \mathcal { X } , \mathcal { F } , \mu )$ and $( \mathcal { Z } , \mathcal { G } , \tilde { \mu } )$ be measurable spaces and let $( \boldsymbol { \mathcal { X } } \times \boldsymbol { \mathcal { X } } , \sigma ( \boldsymbol { \mathcal { F } } \times \boldsymbol { \mathcal { F } } ) , \mu \times \mu )$ , $( \mathcal { Z } \times \mathcal { Z } , \sigma ( \mathcal { G } \times \mathcal { G } ) , \tilde { \mu } \times \tilde { \mu } )$ be their product spaces with the product measures. Let $R : { \mathcal { X } } \to { \mathcal { Z } }$ be $a$ measurable function, then $R ^ { 2 } : \mathcal { X } \times \mathcal { X } \to \mathcal { Z } \times \mathcal { Z }$ where $R ^ { 2 } \bar { ( x _ { 1 } , x _ { 2 } ) } = ( R ( x _ { 1 } ) , R ( x _ { 2 } ) )$ is also measurable.
|
| 350 |
+
|
| 351 |
+
Proof. As the $\sigma$ -algebra of $\mathcal { Z } \times \mathcal { Z }$ is generated by $\mathcal { G } \times \mathcal { G }$ , we only need to show that the pre-image of any generator is measurable. Let $G _ { 1 } \times G _ { 2 } \in \mathcal { G } \times \mathcal { G }$ , then it is easy to see that $\hat { ( } R ^ { 2 } ) ^ { - 1 } \bar { ( } G _ { 1 } \times G _ { 2 } \bar { ) } \stackrel { - } { = } R ^ { - 1 } ( G _ { 1 } ) \times R ^ { - 1 } ( G _ { 2 } )$ . Since $R$ is a measurable function, hence $\overline { { R } } ^ { - 1 } ( G _ { 1 } )$ and $R ^ { - 1 } ( G _ { 2 } )$ are measurable and so is $R ^ { - 1 } ( G _ { 1 } ) \times R ^ { - 1 } ( G _ { 2 } )$ measurable. □
|
| 352 |
+
|
| 353 |
+

|
| 354 |
+
Figure S1: Network architecture of feature transfer module and domain discriminators.
|
| 355 |
+
|
| 356 |
+

|
| 357 |
+
(b) domain discriminator
|
| 358 |
+
|
| 359 |
+
(a) feature transfer module
|
| 360 |
+
|
| 361 |
+
Table S1: Network architecture for digit experiments.
|
| 362 |
+
|
| 363 |
+
<table><tr><td rowspan=1 colspan=1>operation</td><td rowspan=1 colspan=1>kernel</td><td rowspan=1 colspan=1>output size</td></tr><tr><td rowspan=1 colspan=1>Conv1-1+ReLUConv1-2 +ReLU max pooling</td><td rowspan=1 colspan=1>3×33×32×2</td><td rowspan=1 colspan=1>32×32×3232×32×3216×16×32</td></tr><tr><td rowspan=1 colspan=1>Conv2-1 +ReLUConv2-2 +ReLUmax pooling</td><td rowspan=1 colspan=1>3×33×32×2</td><td rowspan=1 colspan=1>16×16×6416×16×648×8×64</td></tr><tr><td rowspan=1 colspan=1>Conv3-1+ReLUConv3-2+ReLUmax pooling</td><td rowspan=1 colspan=1>3×33×32×2</td><td rowspan=1 colspan=1>8×8×1288×8×1284×4×128</td></tr><tr><td rowspan=1 colspan=1>FC1+ReLUFC2Normalize and Scale (2)</td><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>128128128</td></tr></table>
|
| 364 |
+
|
| 365 |
+
# B NETWORK ARCHITECTURE AND TRAINING DETAILS
|
| 366 |
+
|
| 367 |
+
B.1 TOY EXPERIMENTS: MNIST-M $( 0 - 4 )$ TO MNIST $( 5 - 9 )$
|
| 368 |
+
|
| 369 |
+
Following (Haeusser et al., 2017), we preprocess the data by subtracting a channel-wise pixel mean and dividing by channel-wise standard deviation of pixel values. For MNIST examples, we also apply color-intensity inversion. All images are resized into $3 2 \times 3 2$ with 3 channels.
|
| 370 |
+
|
| 371 |
+
Our feature generator module is composed of 6 convolution layers and 3 max-pooling layers followed by 2 fully-connected layers. We use ReLU (Nair & Hinton, 2010) after convolution layers. The output dimension of the feature generator module is 128 and is normalized to have L2-norm of 2. The full description of the generator module is in Table S1.
|
| 372 |
+
|
| 373 |
+
The feature transfer module maps 128 dimensional vector into the same dimensional vector using two fully-connected layers $( 1 2 8 - 2 5 6 - 2 5 6 - 1 2 8 )$ and residual connection as in Figure 1(a). Discriminator architectures are similar to that in Figure 1(b) but with fully-connected layers whose output dimensions are 128 instead of 256.
|
| 374 |
+
|
| 375 |
+
We use Adam stochastic optimizer with learning rate of 0.0003, $\lambda _ { 1 } = 0 . 3$ and $\lambda _ { 2 } = 0 . 0 3$ to train FTN.
|
| 376 |
+
|
| 377 |
+
# B.2 CROSS ETHNICITY FACE VERIFICATION AND RECOGNITION
|
| 378 |
+
|
| 379 |
+
Our experimental protocols, such as data preprocessing and network architecture, closely follow those of (Sohn et al., 2017). We preprocess face images by detecting (Yang et al., 2016), aligning (Yu et al., 2016), and cropping to provide face images of size $1 1 0 \times 1 1 0$ . The data is prepared for network training by random cropping into $1 0 0 \times 1 0 0$ with horizontal flip with a $5 0 \%$ chance and converting into gray-scale.
|
| 380 |
+
|
| 381 |
+
Our feature generation module contains 38 layers of convolution with several residual blocks and max pooling layers. We use ReLU (Nair & Hinton, 2010) for most of the layers in combination with maxout nonlinearities (Goodfellow et al., 2013). We add $7 \times 7$ average pooling layer on top of the last convolution layer. The output of the feature generation module is 320 dimensional vector and is normalized to have L2-norm of size 12. The full description of the model is in Table S2.
|
| 382 |
+
|
| 383 |
+
The feature transfer module maps 320 dimensional output vector from feature generation module into the same dimensional vector using two fully-connected layers and residual connection. The architecture of feature transfer module is described in Figure 1(a). Discriminators have similar network architecture besides different numbers of neurons and omitted residual connection.
|
| 384 |
+
|
| 385 |
+
All models, including supervised CNNs $\mathrm { \langle S u p ^ { C } }$ , $\operatorname { S u p } ^ { \mathrm { C , A , E } }$ ), are trained with 4096-pair loss. For SupC and $\operatorname { S u p } ^ { \mathrm { C , A , E } }$ , we use Adam stochastic optimizer (Kingma & Ba, 2015) with the learning rate of 0.0003 for the first $1 2 K$ updates and 0.0001 and 0.00003 for the next two subsequent $3 K$ updates.
|
| 386 |
+
|
| 387 |
+
Our feature generation module is initialized with the $\mathrm { S u p ^ { C } }$ model, which is also used as a reference network for feature reconstruction loss as described in Section 4.3. Other modules of our model, such as feature generation module and discriminators, are initialized randomly. All modules are then updated with the learning rate of 0.00003. Hyperparameters of different models are summarized in Table S3.
|
| 388 |
+
|
| 389 |
+
Table S2: Network architecture for face experiments.
|
| 390 |
+
|
| 391 |
+
<table><tr><td rowspan=1 colspan=1>operation</td><td rowspan=1 colspan=1>kernel</td><td rowspan=1 colspan=1>output size</td></tr><tr><td rowspan=1 colspan=1>Conv1-1+ReLUConv1-2 + Maxout (2)max pooling</td><td rowspan=1 colspan=1>3×33×32×2</td><td rowspan=1 colspan=1>100×100×32100×100×6450×50×64</td></tr><tr><td rowspan=1 colspan=1>ResBlock+ReLU×2Conv2 + Maxout (2)max pooling</td><td rowspan=1 colspan=1>3×3,64-64-643×32×2</td><td rowspan=1 colspan=1>50×50×6450×50×12825×25×128</td></tr><tr><td rowspan=1 colspan=1>ResBlock+ReLU×4Conv3 + Maxout (2) max pooling</td><td rowspan=1 colspan=1>3×3,128-96-1283×32×2</td><td rowspan=1 colspan=1>25×25×12825×25×19213×13×192</td></tr><tr><td rowspan=1 colspan=1>ResBlock + ReLU ×8Conv4 + Maxout (2)max pooling</td><td rowspan=1 colspan=1>3×3,192-128-1923×32×2</td><td rowspan=1 colspan=1>13×13×19213×13×2567×7×256</td></tr><tr><td rowspan=1 colspan=1>ResBlock + ReLU ×2Conv5 + Maxout (2)avg poolingNormalize and Scale (12)</td><td rowspan=1 colspan=1>3×3,256-160-2563×37×71</td><td rowspan=1 colspan=1>7×7×2567×7×3201×1×320320</td></tr></table>
|
| 392 |
+
|
| 393 |
+
Table S3: Optimal hyperparameter settings of different adaptation models.
|
| 394 |
+
|
| 395 |
+
<table><tr><td></td><td>入1</td><td>入2</td><td>入3</td><td>入4</td></tr><tr><td>DANN</td><td>0.1</td><td>1</td><td>0.1</td><td>0.01</td></tr><tr><td>FTN</td><td>0.03</td><td>0.1</td><td>0.03</td><td>0.01</td></tr><tr><td>FTN+MCEM</td><td>0.03</td><td>0.1</td><td>0.03</td><td>0.003</td></tr></table>
|
| 396 |
+
|
| 397 |
+
# C IMPACT OF FEATURE RECONSTRUCTION LOSS ON DOMAIN ADVERSARIALTRAINING
|
| 398 |
+
|
| 399 |
+
We demonstrate the effectiveness of feature reconstruction loss in stabilizing the domain adversarial training in DANN framework. We train four different DANN models with different configurations of $\lambda _ { 3 }$ and $\lambda _ { 4 }$ . We visualize in Figure S2 the performance curves of identification accuracy evaluated on the AA, EA, and CAU ethnicities of CEF dataset. Note that we stop training early on when the performance start to degrade significantly. Therefore, $x$ -axis, the number of training epoch, of different curves are different. $y$ -axis represents the identification accuracy.
|
| 400 |
+
|
| 401 |
+
As we see in Figure S2, the performance of all models on the target ethnicities start to improve in the beginning of training from those of the pretrained reference network. Soon after, however, the accuracy starts to drop when values of either $\lambda _ { 3 }$ or $\lambda _ { 4 }$ are set to 0. Note that even in that situation the performance on the CAU set still remains high, which implies the failure of discriminative information transfer. On the other hand, our proposed feature reconstruction loss with non-zero values of $\lambda _ { 3 }$ and $\lambda _ { 4 }$ (Figure 2(d)) shows much more stable performance curve. Nonetheless, values of $\lambda _ { 3 }$ and $\lambda _ { 4 }$ should be carefully selected since the feature generation module of DANNs or FTNs will remain almost the same to the reference network when they are set too strong and the effectiveness of the domain adversarial loss will be reduced. In our experiment, we use $\lambda _ { 3 } = 0 . 1$ and $\lambda _ { 4 } = 0 . 0 1$ for DANN, $\lambda _ { 3 } = 0 . 0 3$ and $\lambda _ { 4 } = 0 . 0 1$ for FTN. For FTN with entropy minimization we further reduce $\lambda _ { 4 } = 0 . 0 0 3$ to give more flexibility in updating model parameters based on entropy loss.
|
| 402 |
+
|
| 403 |
+

|
| 404 |
+
Figure S2: Performance curves of identification accuracy per ethnicity subset on the CEF datasets. The accuracy of DANNs with different values of $\lambda _ { 3 }$ for $\lambda _ { 4 }$ are visualized.
|
| 405 |
+
|
| 406 |
+
# D PERFORMANCE OF UNSUPERVISED HIERARCHICAL CLUSTERING
|
| 407 |
+
|
| 408 |
+
In this section, we provide analysis on the performance of our clustering strategy by measuring the clustering accuracy. Specifically, we measure the verification precision and recall as follows:
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\mathrm { P r e c i s i o n } = \frac { \sum _ { x _ { 1 } , x _ { 2 } \in \mathcal { X } _ { T } } 1 \big \{ y _ { 1 } = y _ { 2 } , \hat { y } _ { 1 } = \hat { y } _ { 2 } \big \} } { \sum _ { x _ { 1 } , x _ { 2 } \in \mathcal { X } _ { T } } 1 \big \{ \hat { y } _ { 1 } = \hat { y } _ { 2 } \big \} } , \ \mathrm { R e c a l l } = \frac { \sum _ { x _ { 1 } , x _ { 2 } \in \mathcal { X } _ { T } } 1 \big \{ y _ { 1 } = y _ { 2 } , \hat { y } _ { 1 } = \hat { y } _ { 2 } \big \} } { \sum _ { x _ { 1 } , x _ { 2 } \in \mathcal { X } _ { T } } 1 \big \{ y _ { 1 } = y _ { 2 } \big \} }
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
where $y _ { i }$ is the ground-truth class label of an example $x _ { i }$ , and $\hat { y } _ { i }$ is an index of an assigned cluster. Precision computes the proportion of positive pairs among pairs assigned to the same cluster, i.e., purity of returned clusters, and recall computes the proportion of positive pairs assigned to the same cluster. Ideally, we expect high precision and high recall, i.e., high F-score, to ensure examples with the same class labels are assigned to the same cluster. Note that we only use clusters of size 5 or larger as new target classes and discard examples assigned to a cluster whose size is less than 5.
|
| 415 |
+
|
| 416 |
+
Here, in addition to our proposed clustering strategy, we also evaluate the clustering performance that clusters target examples by finding a nearest classes or examples from the source domain, which are shown to be effective for zero-shot learning (Vinyals et al., 2016) or semi-supervised domain adaptation with disjoint source and target classes (Luo et al., 2017). In this case, we call two examples from the target domain are assigned to the same cluster if the nearest source examples are the same. We also measure the clustering performance by matching the nearest source classes.
|
| 417 |
+
|
| 418 |
+
The summary result is provided in Table S4. Firstly, we observe extremely low precision when using source domain examples or clusters as a proxy to relate target examples. We believe that this idea of “clustering by finding the nearest source classes” works under a cross-category similarity assumption between disjoint classes of source and target domains. In other words, it assumes that there exists a certain source class closer to examples from certain target class, so that those examples from the same target class can be clustered around that source class, even though those matching source and target classes are indeed different (e.g., 3/5, 2/8, 4/9, and 0/6 in Section 6.1). Unfortunately, such an assumption does not hold for our problem, maybe due to the huge number of identity classes $( 6 0 K )$ in the source domain.
|
| 419 |
+
|
| 420 |
+
On the other hand, using hierarchical clustering on target features achieves significantly higher precision and recall. Especially, when using embedding vectors of $\mathrm { S u p ^ { C } }$ , we achieve $1 0 0 \%$ precision, which means that all clusters are pure even though some ground-truth classes might be separated into multiple clusters. We observe slightly lower precision using FTN features but much higher recall, achieving higher F-score overall. Further, the number of examples returned with FTN feature $2 5 3 K$ and $1 9 5 K$ for AA and EA, respectively) is higher than with $\mathrm { S u p ^ { C } }$ feature $2 1 7 K$ and $1 6 5 K _ { , }$ ). Repeating the process using feature of FTN+MCEM model improves the F-score while returning more target examples that are with cluster assignment ( $2 7 6 K$ and $2 1 4 K$ ). This not only shows the
|
| 421 |
+
|
| 422 |
+
<table><tr><td rowspan="3"></td><td colspan="2">source example</td><td colspan="2">source center</td><td colspan="2">HDBSCAN</td><td colspan="2">FTN</td><td colspan="2">FTN+MCEM</td></tr><tr><td>AA</td><td>EA</td><td>AA</td><td>EA</td><td>AA</td><td>EA</td><td>AA</td><td>EA</td><td>AA</td><td>EA</td></tr><tr><td>Precision</td><td>0.11</td><td>0.12</td><td>0.30</td><td>0.08</td><td>100</td><td>100</td><td>95.36</td><td>96.23</td><td>95.79</td><td>96.10</td></tr><tr><td>Recall</td><td>25.64</td><td>31.11</td><td>22.54</td><td>48.60</td><td>88.66</td><td>81.74</td><td>97.29</td><td>96.46</td><td>97.81</td><td>96.89</td></tr><tr><td>F-score</td><td>0.22</td><td>0.25</td><td>0.58</td><td>0.16</td><td>93.99</td><td>89.95</td><td>96.31</td><td>96.34</td><td>96.79</td><td>96.49</td></tr></table>
|
| 423 |
+
|
| 424 |
+
Table S4: Verification precision and recall of clustering methods, such as projection to source example or source class center, or hierarchical clustering using embeddings of $\mathrm { { S u p } ^ { C } }$ (HDBSCAN) or our proposed FTN model. Furthermore, we repeat the clustering using the FTN with multi-class entropy minimization model $\left( \mathrm { F T N + M C E M } \right)$ and report the clustering accuracy.
|
| 425 |
+
|
| 426 |
+
improved discriminative quality of features by FTNs, but also suggests a potential tool for automatic labeling of unlabeled data by iterative training of FTN model and hierarchical clustering.
|
| 427 |
+
|
| 428 |
+
# E VISUALIZATION OF ETHNICITY ANNOTATED IMAGE SAMPLES
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
Figure S3: Face images of Caucasian, African-American, and East-Asian sampled from MS-1M dataset.
|
md/train/BkrsAzWAb/BkrsAzWAb.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ONLINE LEARNING RATE ADAPTATION WITH HYPERGRADIENT DESCENT
|
| 2 |
+
|
| 3 |
+
Atılım Gunes¸ Baydin ¨ University of Oxford gunes@robots.ox.ac.uk
|
| 4 |
+
|
| 5 |
+
Robert Cornish
|
| 6 |
+
University of Oxford
|
| 7 |
+
rcornish@robots.ox.ac.uk
|
| 8 |
+
David Mart´ınez Rubio
|
| 9 |
+
University of Oxford
|
| 10 |
+
david.martinez2@wadham.ox.ac.uk
|
| 11 |
+
|
| 12 |
+
Mark Schmidt University of British Columbia schmidtm@cs.ubc.ca
|
| 13 |
+
|
| 14 |
+
Frank Wood University of Oxford fwood@robots.ox.ac.uk
|
| 15 |
+
|
| 16 |
+
# ABSTRACT
|
| 17 |
+
|
| 18 |
+
We introduce a general method for improving the convergence rate of gradientbased optimizers that is easy to implement and works well in practice. We demonstrate the effectiveness of the method in a range of optimization problems by applying it to stochastic gradient descent, stochastic gradient descent with Nesterov momentum, and Adam, showing that it significantly reduces the need for the manual tuning of the initial learning rate for these commonly used algorithms. Our method works by dynamically updating the learning rate during optimization using the gradient with respect to the learning rate of the update rule itself. Computing this “hypergradient” needs little additional computation, requires only one extra copy of the original gradient to be stored in memory, and relies upon nothing more than what is provided by reverse-mode automatic differentiation.
|
| 19 |
+
|
| 20 |
+
# 1 INTRODUCTION
|
| 21 |
+
|
| 22 |
+
In nearly all gradient descent algorithms the choice of learning rate remains central to efficiency; Bengio (2012) asserts that it is “often the single most important hyper-parameter” and that it always should be tuned. This is because choosing to follow your gradient signal by something other than the right amount, either too much or too little, can be very costly in terms of how fast the overall descent procedure achieves a particular level of objective value.
|
| 23 |
+
|
| 24 |
+
Understanding that adapting the learning rate is a good thing to do, particularly on a per parameter basis dynamically, led to the development of a family of widely-used optimizers including AdaGrad (Duchi et al., 2011), RMSProp (Tieleman & Hinton, 2012), and Adam (Kingma & Ba, 2015). However, a persisting commonality of these methods is that they are parameterized by a “pesky” fixed global learning rate hyperparameter which still needs tuning. There have been methods proposed that do away with needing to tune such hyperparameters altogether (Schaul et al., 2013) but their adoption has not been widespread, owing perhaps to their complexity, applicability in practice, or performance relative to the aforementioned family of algorithms.
|
| 25 |
+
|
| 26 |
+
Our initial conceptualization of the learning rate adaptation problem was one of automatic differentiation (Baydin et al., 2018). We hypothesized that the derivative of a parameter update procedure with respect to its global learning rate ought to be useful for improving optimizer performance. This conceptualization is not unique, having been explored, for instance, by Maclaurin et al. (2015). While the automatic differentiation perspective was integral to our conceptualization, the resulting algorithm turns out to simplify elegantly and not require additional automatic differentiation machinery. In fact, it is easily adaptable to nearly any gradient update procedure while only requiring one extra copy of a gradient to be held in memory and very little computational overhead; just a dot product in the dimension of the parameter. Considering the general applicability of this method and adopting the name “hypergradient” introduced by Maclaurin et al. (2015) to mean a derivative taken with respect to a hyperparameter, we call our method hypergradient descent.
|
| 27 |
+
|
| 28 |
+
To our knowledge, our rediscovery appeared first in the largely neglected paper of Almeida et al. (1998), who arrived at the same hypergradient procedure as us. However, none of the aforementioned modern gradient-based optimization procedures existed at the time of its publication so the only examples considered were gradient and stochastic gradient descent on relatively simple functions. Having rediscovered this approach, we develop it further and demonstrate that adapting existing gradient descent procedures to use hypergradient descent to dynamically tune global learning rates improves stochastic gradient descent (SGD), stochastic gradient descent with Nesterov momentum (SGDN), and Adam; particularly so on large-scale neural network training problems.
|
| 29 |
+
|
| 30 |
+
For a given untuned initial learning rate, hypergradient algorithms consistently bring the loss trajectory closer to the optimal one that would be attained with a tuned initial learning rate, and thus significantly reduce the need for the expensive and time consuming practice of hyperparameter search (Goodfellow et al., 2016) for learning rates, which is conventionally performed using grid search, random search (Bergstra & Bengio, 2012), Bayesian optimization (Snoek et al., 2012), and model-based approaches (Bergstra et al., 2013; Hutter et al., 2013).
|
| 31 |
+
|
| 32 |
+
# 2 HYPERGRADIENT DESCENT
|
| 33 |
+
|
| 34 |
+
We define the hypergradient descent (HD) method by applying gradient descent on the learning rate of an underlying gradient descent algorithm, independently discovering a technique that has been previously considered in the optimization literature, most notably by Almeida et al. (1998). This differs from the reversible learning approach of Maclaurin et al. (2015) in that we apply gradientbased updates to a hyperparameter (in particular, the learning rate) at each iteration in an online fashion, instead of propagating derivatives through an entire inner optimization that consists of many iterations.
|
| 35 |
+
|
| 36 |
+
The method is based solely on the partial derivative of an objective function—following an update step—with respect to the learning rate. In this paper we consider and report the case where the learning rate $\alpha$ is a scalar. It is straightforward to generalize the introduced method to the case where $\alpha$ is a vector of per-parameter learning rates.
|
| 37 |
+
|
| 38 |
+
The most basic form of HD can be derived from regular gradient descent as follows. Regular gradient descent, given an objective function $f$ and previous parameters $\theta _ { t - 1 }$ , evaluates the gradient $\bar { \nabla f } ( \theta _ { t - 1 } )$ and moves against it to arrive at updated parameters
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\theta _ { t } = \theta _ { t - 1 } - \alpha \nabla f ( \theta _ { t - 1 } ) ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
where $\alpha$ is the learning rate. In addition to this update rule, we would like to derive an update rule for the learning rate $\alpha$ itself. We make the assumption that the optimal value of $\alpha$ does not change much between two consecutive iterations so that we can use the update rule for the previous step to optimize $\alpha$ in the current one. For this, we will compute $\partial f ( \theta _ { t - 1 } ) / \bar { \partial \alpha }$ , the partial derivative of the objective $f$ at the previous time step with respect to the learning rate $\alpha$ . Noting that $\theta _ { t - 1 } = \theta _ { t - 2 } - \alpha \nabla f ( \theta _ { t - 2 } )$ , i.e., the result of the previous update step, and applying the chain rule, we get
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\frac { \partial f ( \theta _ { t - 1 } ) } { \partial \alpha } = \nabla f ( \theta _ { t - 1 } ) \cdot \frac { \partial ( \theta _ { t - 2 } - \alpha \nabla f ( \theta _ { t - 2 } ) ) } { \partial \alpha } = \nabla f ( \theta _ { t - 1 } ) \cdot ( - \nabla f ( \theta _ { t - 2 } ) ) \ ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
which allows us to compute the needed hypergradient with a simple dot product and the memory cost of only one extra copy of the original gradient. Using this hypergradient, we construct a higher level update rule for the learning rate as
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\alpha _ { t } = \alpha _ { t - 1 } - \beta \frac { \partial f ( \theta _ { t - 1 } ) } { \partial \alpha } = \alpha _ { t - 1 } + \beta \nabla f ( \theta _ { t - 1 } ) \cdot \nabla f ( \theta _ { t - 2 } ) ,
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
introducing $\beta$ as the hypergradient learning rate. We then modify Eq. 1 to use the sequence $\alpha _ { t }$ to become
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\theta _ { t } = \theta _ { t - 1 } - \alpha _ { t } \nabla f ( \theta _ { t - 1 } ) .
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
Equations 3 and 4 thus define the most basic form of the HD algorithm, updating both $\theta _ { t }$ and $\alpha _ { t }$ at each iteration. This derivation, as we will see shortly, is applicable to any gradient-based primal
|
| 63 |
+
|
| 64 |
+
# Algorithm 1 Stochastic gradient descent (SGD)
|
| 65 |
+
|
| 66 |
+
Require: $_ \alpha$ : learning rate
|
| 67 |
+
Require: $f ( \theta )$ : objective function
|
| 68 |
+
Require: $\theta _ { 0 }$ : initial parameter vector $t \gets 0$ . Initialization while $\theta _ { t }$ not converged do $\begin{array} { r l } & { t \gets t + 1 } \\ & { g _ { t } \gets \nabla f _ { t } ( \theta _ { t - 1 } ) } \\ & { u _ { t } \gets - \alpha g _ { t } } \\ & { \theta _ { t } \gets \theta _ { t - 1 } + u _ { t } } \end{array}$ . Gradient . Parameter update . Apply parameter update end while return $\theta _ { t }$
|
| 69 |
+
|
| 70 |
+
# Algorithm 4 SGD with hyp. desc. (SGD-HD)
|
| 71 |
+
|
| 72 |
+
Require: $\alpha _ { 0 }$ : initial learning rate
|
| 73 |
+
Require: $f ( \theta )$ : objective function
|
| 74 |
+
Require: $\theta _ { 0 }$ : initial parameter vector
|
| 75 |
+
Require: $\beta$ : hypergradient learning rate t $, \nabla _ { \alpha } u _ { 0 } \gets 0 , 0$ . Initialization while $\theta _ { t }$ not converged do t ← t + 1 gt ← ∇ft(θt−1) . Gradient ht ← gt · ∇αut−1 . Hypergradient αt ← αt−1 − β ht . Learning rate update Or, alternative to the line above: αt ← αt−1 1 − β htkgtkk∇αut−1k . Mult. update ut ← −αt gt . Parameter update ∇αut ← −gt θt ← θt−1 + ut . Apply parameter update end while return $\theta _ { t }$
|
| 76 |
+
|
| 77 |
+
# Algorithm 2 SGD with Nesterov (SGDN)
|
| 78 |
+
|
| 79 |
+
<table><tr><td>Require:μ:momentum</td><td>Initialization</td></tr><tr><td>t,vo←0,0 Update rule:</td><td></td></tr><tr><td>Ut ←μUt-1+gt</td><td>“Velocity”</td></tr><tr><td>ut←-α(gt+μUt)</td><td>Parameter update</td></tr></table>
|
| 80 |
+
|
| 81 |
+
# Algorithm 5 SGDN with hyp. desc. (SGDN-HD)
|
| 82 |
+
|
| 83 |
+
<table><tr><td>Require: μ: momentum</td><td>Initialization</td></tr><tr><td>t,vo,Vuo ←0,0,0 Update rule:</td><td></td></tr><tr><td>Ut ←μ Ut-1+gt</td><td>“Velocity”</td></tr><tr><td>Ut ← -αt (gt +μUt)</td><td>>Parameter update</td></tr><tr><td>Vαut ← -gt-μUt</td><td></td></tr></table>
|
| 84 |
+
|
| 85 |
+
# Algorithm 3 Adam
|
| 86 |
+
|
| 87 |
+
Require: $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ : decay rates for Adam t, m0, $v _ { 0 } \gets 0 , 0 , 0$ . Initialization Update rule: $m _ { t } \gets \beta _ { 1 } m _ { t - 1 } + \left( 1 - \beta _ { 1 } \right) g _ { t }$ . 1st mom. estimate vt ← β2 vt−1 + (1 − β2) g2t . 2nd mom. estimate m t ← mt/(1 − βt1) . Bias correction $\widehat { v } _ { t } \gets v _ { t } / ( 1 - \beta _ { 2 } ^ { t } )$ . Bias correction $u _ { t } \gets - \alpha \widehat { m } _ { t } / ( \sqrt { v _ { t } } + \epsilon )$ . Parameter update
|
| 88 |
+
|
| 89 |
+
# Algorithm 6 Adam with hyp. desc. (Adam-HD)
|
| 90 |
+
|
| 91 |
+
Require: $\beta _ { 1 } , \beta _ { 2 } \in [ 0 , 1 )$ : decay rates for Adam $t , m _ { 0 } , v _ { 0 } , \nabla _ { \alpha } u _ { 0 } \gets 0 , 0 , 0 , 0$ . Initialization Update rule: mt ← β1 mt−1 + (1 − β1) gt . 1st mom. estimate vt ← β2 vt−1 + (1 − β2) g2t . 2nd mom. estimate m t ← mt/(1 − βt1) . Bias correction bvt ← vt/(1 − βt2) . Bias correction ut ← −αt m t/( vt + ) . Parameter update b b∇αut ← −m t/( vt + )
|
| 92 |
+
|
| 93 |
+
optimization algorithm, and is computation- and memory-efficient in general as it does not require any more information than the last two consecutive gradients that have been already computed in the base algorithm.
|
| 94 |
+
|
| 95 |
+
# 2.1 DERIVATION OF THE HD RULE IN THE GENERAL CASE
|
| 96 |
+
|
| 97 |
+
Here we formalize the derivation of the HD rule for an arbitrary gradient descent method. Assume that we want to approximate a minimizer of a function $f : \mathbb { R } ^ { n } \mathbb { R }$ and we have a gradient descent method with update rule $\theta _ { t } = u ( \Theta _ { t - 1 } , \alpha )$ , where $\theta _ { t } \in \mathbb { R } ^ { n }$ is the point computed by this method at step $t$ , $\Theta _ { t } = \{ \bar { \theta } _ { i } \} _ { i = 0 } ^ { t }$ and $\alpha$ is the learning rate. For instance, the regular gradient descent mentioned above corresponds to an update rule of $\boldsymbol { u } \mathrm { ( } \Theta _ { t } , \alpha ) = \boldsymbol { \theta } _ { t } - \alpha \nabla f ( \boldsymbol { \theta } _ { t } )$ .
|
| 98 |
+
|
| 99 |
+
In each step, our goal is to update the value of $\alpha$ towards the optimum value $\alpha _ { t } ^ { * }$ that minimizes the expected value of the objective in the next iteration, that is, we want to minimize $\mathbb { E } [ f ( \theta _ { t } ) ] =$ $\mathbb { E } [ f ( u \bar { ( \Theta _ { t - 1 } , \alpha _ { t } ) ) } ]$ , where the expectation is taken with respect to the noise produced by the estimator of the gradient (if we compute the gradient exactly then the noise is just 0). We want to update the previous learning rate $\alpha _ { t - 1 }$ so the new computed value, $\alpha _ { t }$ , is closer to $\alpha _ { t } ^ { * }$ . As we did in the example above, we could perform a step gradient descent, where the gradient is
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\frac { \partial \mathbb { E } [ f \circ u ( \boldsymbol { \Theta } _ { t } , \alpha _ { t } ) ] } { \partial \alpha _ { t } } = \mathbb { E } \left[ \boldsymbol { \nabla } _ { \boldsymbol { \theta } } f ( \boldsymbol { \theta } _ { t } ) ^ { \top } \boldsymbol { \nabla } _ { \alpha } u ( \boldsymbol { \Theta } _ { t - 1 } , \alpha _ { t } ) \right] = \mathbb { E } \left[ \boldsymbol { \tilde { \nabla } } _ { \boldsymbol { \theta } } f ( \boldsymbol { \theta } _ { t } ) ^ { \top } \boldsymbol { \nabla } _ { \alpha } u ( \boldsymbol { \Theta } _ { t - 1 } , \alpha _ { t } ) \right]
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $\tilde { \nabla } _ { \boldsymbol { \theta } } f ( \boldsymbol { \theta } _ { t } )$ is the noisy estimator of $\nabla _ { { \boldsymbol { \theta } } } f ( { \boldsymbol { \theta } } _ { t } )$ . The last equality is true if we assume, as it is usual, that the noise at step $t$ is independent of the noise at previous iterations.
|
| 106 |
+
|
| 107 |
+
However we have not computed $\theta _ { t }$ yet, we need to compute $\alpha _ { t }$ first. If we assume that the optimum value of the learning rate at each step does not change much across iterations, we can avoid this problem by performing one step of the gradient descent to approximate $\alpha _ { t - 1 } ^ { * }$ instead. The update rule for the learning in such a case is
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\alpha _ { t } = \alpha _ { t - 1 } - \beta \tilde { \nabla } _ { \boldsymbol { \theta } } f ( \theta _ { t - 1 } ) ^ { \top } \nabla _ { \boldsymbol { \alpha } } u ( \Theta _ { t - 2 } , \alpha _ { t - 1 } ) .
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
We call the previous rule, the additive rule of HD. However, (see Mart´ınez (2017), Section 3.1) it is usually better for this gradient descent to set
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\beta = \beta ^ { \prime } \frac { \alpha _ { t - 1 } } { \left\| \tilde { \nabla } f ( \theta _ { t - 1 } ) \right\| \left\| \nabla _ { \alpha } u ( \Theta _ { t - 2 } , \alpha _ { t - 1 } ) \right\| }
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
so that the rule is
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\alpha _ { t } = \alpha _ { t - 1 } \left( 1 - \beta ^ { \prime } \frac { \tilde { \nabla } f ( \theta _ { t - 1 } ) ^ { \top } \nabla _ { \alpha } u ( \Theta _ { t - 2 } , \alpha _ { t - 1 } ) } { \left\| \tilde { \nabla } f ( \theta _ { t - 1 } ) \right\| \left\| \nabla _ { \alpha } u ( \Theta _ { t - 2 } , \alpha _ { t - 1 } ) \right\| } \right) \ .
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
We call this rule the multiplicative rule of HD. One of the practical advantages of this multiplicative rule is that it is invariant up to rescaling and that the multiplicative adaptation is in general faster than the additive adaptation. In Figure 2 we can see in black one execution of the multiplicative rule in each case.
|
| 126 |
+
|
| 127 |
+
Applying these derivation steps to stochastic gradient descent (SGD) (Algorithm 1), we arrive at the hypergradient variant of SGD that we abbreviate as SGD-HD (Algorithm 4). As all gradient-based algorithms that we consider have a common core where one iterates through a loop of gradient evaluations and parameter updates, for the sake of brevity, we define the regular algorithms with reference to Algorithm 1, where one substitutes the initialization statement (red) and the update rule (blue) with their counterparts in the variant algorithms. Similarly we define the hypergradient variants with reference to Algorithm 4. In this way, from SGD with Nesterov momentum (SGDN) (Algorithm 2) and Adam (Algorithm 3), we formulate the hypergradient variants of SGDN-HD (Algorithm 5) and Adam-HD (Algorithm 6).
|
| 128 |
+
|
| 129 |
+
In Section 4, we empirically demonstrate the performance of these hypergradient algorithms for the problems of logistic regression and training of multilayer and convolutional neural networks for image classification, also investigating good settings for the hypergradient learning rate $\beta$ and the initial learning rate $\alpha _ { 0 }$ . Section 5 discusses extensions to this technique and examines the convergence of HD for convex objective functions.
|
| 130 |
+
|
| 131 |
+
# 3 RELATED WORK
|
| 132 |
+
|
| 133 |
+
# 3.1 LEARNING RATE ADAPTATION
|
| 134 |
+
|
| 135 |
+
Almeida et al. (1998) previously considered the adaptation of the learning rate using the derivative of the objective function with respect to the learning rate. Plagianakos et al. (2001; 1998) proposed methods using gradient-related information of up to two previous steps in adapting the learning rate. In any case, the approach can be interpreted as either applying gradient updates to the learning rate or simply as a heuristic of increasing the learning rate after a “successful” step and decreasing it otherwise.
|
| 136 |
+
|
| 137 |
+
Similarly, Shao & Yip (2000) propose a way of controlling the learning rate of a main algorithm by using an averaging algorithm based on the mean of a sequence of adapted learning rates, also investigating rates of convergence. The stochastic meta-descent (SMD) algorithm (Schraudolph et al.,
|
| 138 |
+
|
| 139 |
+
2006; Schraudolph, 1999), developed as an extension of the gain adaptation work by Sutton (1992), operates by multiplicatively adapting local learning rates using a meta-learning rate, employing second-order information from fast Hessian-vector products (Pearlmutter, 1994). Other work that merits mention include RPROP (Riedmiller & Braun, 1993), where local adaptation of weight updates are performed by using only the temporal behavior of the gradient’s sign, and Delta-Bar-Delta (Jacobs, 1988), where the learning rate is varied based on a sign comparison between the current gradient and an exponential average of the previous gradients.
|
| 140 |
+
|
| 141 |
+
Recently popular optimization methods with adaptive learning rates include AdaGrad (Duchi et al., 2011), RMSProp (Tieleman & Hinton, 2012), vSGD (Schaul et al., 2013), and Adam (Kingma & Ba, 2015), where different heuristics are used to estimate aspects of the geometry of the traversed objective.
|
| 142 |
+
|
| 143 |
+
# 3.2 HYPERPARAMETER OPTIMIZATION USING DERIVATIVES
|
| 144 |
+
|
| 145 |
+
Previous authors, most notably Bengio (2000), have noted that the search for good hyperparameter values for gradient descent can be cast as an optimization problem itself, which can potentially be tackled via another level of gradient descent using backpropagation. More recent work includes Domke (2012), where an optimization procedure is truncated to a fixed number of iterations to compute the gradient of the loss with respect to hyperparameters, and Maclaurin et al. (2015), applying nested reverse automatic differentiation to larger scale problems in a similar setting.
|
| 146 |
+
|
| 147 |
+
A common point of these works has been their focus on computing the gradient of a validation loss at the end of a regular training session of many iterations with respect to hyperparameters supplied to the training in the beginning. This requires a large number of intermediate variables to be maintained in memory for being later used in the reverse pass of automatic differentiation. Maclaurin et al. (2015) introduce a reversible learning technique to efficiently store the information needed for exactly reversing the learning dynamics during the hyperparameter optimization step. As described in Sections 1 and 2, the main difference of our method from this is that we compute the hypergradients and apply hyperparameter updates in an online manner at each iteration,1 overcoming the costly requirement of keeping intermediate values during training and differentiating through whole training sessions per hyperparameter update.
|
| 148 |
+
|
| 149 |
+
# 4 EXPERIMENTS
|
| 150 |
+
|
| 151 |
+
We evaluate the behavior of HD in several tasks, comparing the behavior of the variant algorithms SGD-HD (Algorithm 4), SGDN-HD (Algorithm 5), and Adam-HD (Algorithm 6) to that of their ancestors SGD (Algorithm 1), SGDN (Algorithm 2), and Adam (Algorithm 3) showing, in all cases, a move of the loss trajectory closer to the optimum that would be attained by a tuned initial learning rate. The algorithms are implemented in Torch (Collobert et al., 2011) and PyTorch (Paszke et al., 2017) using an API compatible with the popular torch.optim package,2 to which we are planning to contribute via a pull request on GitHub.
|
| 152 |
+
|
| 153 |
+
Experiments were run using PyTorch, on a machine with Intel Core i7-6850K CPU, 64 GB RAM, and NVIDIA Titan Xp GPU, where the longest training (200 epochs of the VGG Net on CIFAR-10) lasted approximately two hours for each run.
|
| 154 |
+
|
| 155 |
+
# 4.1 ONLINE TUNING OF THE LEARNING RATE
|
| 156 |
+
|
| 157 |
+
Figure 2 demonstrates the general behavior of HD algorithms for the training of logistic regression and a multi-layer neural network with two hidden layers of 1,000 units each, for the task of image classification with the MNIST database. The learning rate $\alpha$ is taken from the set of $\{ 1 0 ^ { - 1 } , 1 0 ^ { - 2 } , 1 0 ^ { - 3 } , 1 0 ^ { - 4 } , 1 0 ^ { - 5 } , 1 0 ^ { - 6 } \}$ and $\beta$ is taken as $1 0 ^ { - 4 }$ in all instances.3 We observe that for any given untuned initial learning rate, HD algorithms (solid curves) consistently bring the loss trajectory closer to the optimal one that would be attained with the tuned initial learning rate of the non-HD algorithm (dashed curves).
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 2: Online tuning of the learning rate for logistic regression and multi-layer neural network. Top row shows the learning rate, middle row shows the training loss, and the bottom row shows the validation loss. Dashed curves represent the regular gradient descent algorithms SGD and Adam, and solid curves represent their HD variants, SGD-HD and Adam-HD. HDM denotes an example of the multiplicative update rule.
|
| 161 |
+
|
| 162 |
+
In Figure 4 we report the results of a grid search for all the algorithms on the logitistic regression objective; similar results have been observed for the multi-layer neural network and CNN objectives as well. Figure 4 compels several empirical arguments. For one, independent of these results, and even if one acknowledges that using hypergradients for online learning rate adaption improves on the baseline algorithm, one might worry that using hypergradients makes the hyperparameter search problem worse. One might imagine that their use would require tuning both the initial learning rate $\alpha _ { 0 }$ and the hypergradient learning rate $\beta$ . In fact, what we have repeatedly observed and can be seen in this figure is that, given a good value of $\beta$ , HD is somewhat insensitive to the value of $\alpha _ { 0 }$ . So, in practice tuning $\beta$ by itself, if hyperparameters are to be tuned at all, is actually sufficient.
|
| 163 |
+
|
| 164 |
+
Also note that in reasonable ranges for $\alpha _ { 0 }$ and $\beta$ , no matter which values of $\alpha _ { 0 }$ and $\beta$ you choose, you improve upon the original method. The corollary to this is that if you have tuned to a particular value of $\alpha _ { 0 }$ and use our method with an arbitrary small $\beta$ (no tuning) you will still improve upon the original method started at the same $\alpha _ { 0 }$ ; remembering of course that $\beta = 0$ recovers the original method in all cases.
|
| 165 |
+
|
| 166 |
+
In the following subsections, we show examples of online tuning for an initial learning rate of $\alpha _ { 0 } = 0 . 0 0 1$ , for tasks of increasing complexity, covering logistic regression, multi-layer neural networks, and convolutional neural networks.
|
| 167 |
+
|
| 168 |
+
# 4.1.1 TUNING EXAMPLE: LOGISTIC REGRESSION
|
| 169 |
+
|
| 170 |
+
We fit a logistic regression classifier to the MNIST database, assigning membership probabilities for ten classes to input vectors of length 784. We use a learning rate of $\alpha = 0 . 0 0 1$ for all algorithms, where for the HD variants this is taken as the initial $\alpha _ { 0 }$ . We take $\mu = 0 . 9$ for SGDN and SGDN-HD. For Adam, we use √ $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 0 ^ { - 8 }$ , and apply a $1 / \sqrt { t }$ decay to the learning rate $\left( \alpha _ { t } = \alpha / \sqrt { t } \right)$ as used in Kingma & Ba (2015) only for the logistic regression problem. We use the full 60,000 images in MNIST for training and compute the validation loss using the 10,000 test images. L2 regularization is used with a coefficient of $1 0 ^ { - 4 }$ . We use a minibatch size of 128 for all the experiments in the paper.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 3: Behavior of hypergradient variants compared with their regular counterparts. Columns: left: logistic regression on MNIST; middle: multi-layer neural network on MNIST; right: VGG Net on CIFAR-10. Rows: top: evolution of the learning rate $\alpha _ { t }$ ; middle: training loss; bottom: validation loss. Main plots show epoch averages and inset plots highlight the behavior of the algorithms during initial iterations. For MNIST one epoch is one full pass through the entire training set of 60,000 images (468.75 iterations with a minibatch size of 128) and for CIFAR-10 one epoch is one full pass through the entire training set of 50,000 images (390.625 iterations with a minibatch size of 128).
|
| 174 |
+
|
| 175 |
+
Figure 3 (left column) shows the negative log-likelihood loss for training and validation along with the evolution of the learning rate $\alpha _ { t }$ during training, using $\beta = 0 . 0 0 1$ for SGD-HD and SGDN-HD, and $\beta = 1 0 ^ { - 7 }$ for Adam-HD. Our main observation in this experiment, and the following experiments, is that the HD variants consistently outperform their regular versions.4 While this might not come as a surprise for the case of vanilla SGD, which does not possess capability for adapting the learning rate or the update speed, the improvement is also observed for SGD with Nesterov momentum (SGDN) and Adam. The improvement upon Adam is particularly striking because this method itself is based on adaptive learning rates.
|
| 176 |
+
|
| 177 |
+
An important feature to note is the initial smooth increase of the learning rates from $\alpha _ { 0 } = 0 . 0 0 1$ to approximately 0.05 for SGD-HD and SGDN-HD. For Adam-HD, the increase is up to 0.001174 (a $17 \%$ change), virtually imperceivable in the plot due to scale. For all HD algorithms, this initial increase is followed by a decay to a range around zero. We conjecture that this initial increase and the later decay of $\alpha _ { t }$ , automatically adapting to the geometry of the problem, is behind the performance increase observed.
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 4: Grid search for selecting $\alpha _ { 0 }$ and $\beta$ , looking at iterations to convergence to a training loss of 0.29 for logistic regression. Everywhere to the left and below the shaded region marked by the red boundary, hypergradient variants (bottom) perform better than or equal to the baseline variants (top). In the limit of $\beta 0$ , as one recovers the original update rule, the algorithms perform the same with the baseline variants in the worst case.
|
| 181 |
+
|
| 182 |
+
# 4.2 TUNING EXAMPLE: MULTI-LAYER NEURAL NETWORK
|
| 183 |
+
|
| 184 |
+
We next evaluate the effectiveness of HD algorithms on training a multi-layer neural network, again on the MNIST database. The network consists of two fully connected hidden layers with 1,000 units each and ReLU activations. We again use a learning rate of $\alpha = 0 . 0 0 1$ for all algorithms. We use $\beta = 0 . 0 0 1$ for SGD-HD and SGDN-HD, and $\beta = 1 \bar { 0 } ^ { - 7 }$ for Adam-HD. L2 regularization is applied with a coefficient of $1 0 ^ { - 4 }$ .
|
| 185 |
+
|
| 186 |
+
As seen in the results in Figure 3 (middle column), the hypergradient variants again consistently outperform their regular counterparts. In particular, we see that Adam-HD converges to a level of validation loss not achieved by Adam, and shows an order of magnitude improvement over Adam in the training loss.
|
| 187 |
+
|
| 188 |
+
Of particular note is, again, the initial rise and fall in the learning rates, where we see the learning rate climb to 0.05 for SGD-HD and SGDN-HD, whereas for Adam-HD the overall behavior of the learning rate is that of decay following a minute initial increase to 0.001083 (invisible in the plot due to scale). Compared with logistic regression results, the initial rise of the learning rate for SGDN-HD happens noticeably before SGD-HD, possibly caused by the speedup from the momentum updates.
|
| 189 |
+
|
| 190 |
+
4.3 TUNING EXAMPLE: CONVOLUTIONAL NEURAL NETWORK
|
| 191 |
+
|
| 192 |
+
To investigate whether the performance we have seen in the previous sections scales to deep architectures and large-scale high-dimensional problems, we apply these to train a VGG Net (Simonyan & Zisserman, 2014) on the CIFAR-10 image recognition dataset (Krizhevsky, 2009). We base our implementation on the VGG Net architecture for Torch by Sergey Zagoruyko.5 The network used has an architecture of $( \mathrm { c o n v – 6 4 } ) \times 2 \times$ maxpool $\circ$ (conv-128) $\times 2 \textdegree$ maxpool $\circ ( \mathrm { c o n v } { - } 2 5 6 ) { \times } 3 \circ$ maxpool $\mathrm { ~ o ~ } ( \mathrm { c o n v } { - } 5 1 2 ) { \times } 3 \mathrm { o ~ } \mathrm { m a x p o o l } \mathrm { ~ o ~ } ( \mathrm { c o n v } { - } 5 1 2 ) { \times } 3 \mathrm { o ~ }$ maxpool $\circ$ fc- $5 1 2 \mathrm { ~ o ~ }$ fc-10, corresponding closely to the “D configuration” in Simonyan & Zisserman (2014). All convolutions have $3 \times 3$ filters and a padding of 1; all max pooling layers are $2 \times 2$ with a stride of 2. We use $\alpha = 0 . 0 0 1$ and $\beta = 0 . 0 0 1$ for SGD-HD and SGDN-HD, and $\beta = 1 0 ^ { - 8 }$ for Adam-HD. We use the 50,000 training images in CIFAR-10 for training and the 10,000 test images for evaluating the validation loss.
|
| 193 |
+
|
| 194 |
+
Looking at Figure 3 (right column), once again we see consistent improvements of the hypergradient variants over their regular counterparts. SGD-HD and SGDN-HD perform significantly better than their regular versions in the validation loss, whereas Adam and Adam-HD reach the same validation loss with relatively the same speed. Adam-HD performs significantly better than Adam in the training loss. For SGD-HD and SGDN-HD we see an initial rise of $\alpha$ to approximately 0.025, this rise happening, again, with SGDN-HD before SGD-HD. During this initial rise, the learning rate of Adam-HD rises only up to 0.001002.
|
| 195 |
+
|
| 196 |
+
# 5 CONVERGENCE AND EXTENSIONS
|
| 197 |
+
|
| 198 |
+
# 5.1 TRANSITIONING TO THE UNDERLYING ALGORITHM
|
| 199 |
+
|
| 200 |
+
We observed in our experiments that $\alpha$ follows a consistent trajectory. As shown in Figure 3, it initially grows large, then shrinks, and thereafter fluctuates around a small value that is comparable to the best fixed $\alpha$ we could find for the underlying algorithm without hypergradients. This suggests that hypergradient updates improve performance partially due to their effect on the algorithm’s early behaviour, and motivates our first proposed extension, which involves smoothly transitioning to a fixed learning rate as the algorithm progresses.
|
| 201 |
+
|
| 202 |
+
More precisely, in this extension we update $\alpha _ { t }$ exactly as previously via Eq. 8, and when we come to the update of $\theta _ { t }$ , we use as our learning rate a new value $\gamma _ { t }$ instead of $\alpha _ { t }$ directly, so that our update rule is $\theta _ { t } = \theta _ { t - 1 } + u ( \Theta _ { t - 1 } , \gamma _ { t - 1 } )$ instead of $\theta _ { t } = \theta _ { t - 1 } + u ( \Theta _ { t - 1 } , \alpha _ { t - 1 } )$ as previously. Our $\gamma _ { t }$ satisfies $\gamma _ { t } \approx \alpha _ { t }$ when $t$ is small, and $\gamma _ { t } \approx \alpha _ { \infty }$ as $t \infty$ , where $\alpha _ { \infty }$ is some constant we choose. Specifically, $\gamma _ { t } = \delta ( t ) \alpha _ { t } + \left( 1 - \delta ( t ) \right) \alpha _ { \infty }$ , where $\delta$ is some function such that $\delta ( 1 ) = 1$ and $\delta ( t ) \bar { { } } 0$ as $t \to \infty$ (e.g., $\dot { \delta } ( t ) = \dot { 1 } / t ^ { 2 }$ ).
|
| 203 |
+
|
| 204 |
+
Intuitively, this extension will behave roughly like HD at the beginning of the optimization process, and roughly like the original underlying algorithm by the end. We suggest choosing a value for $\alpha _ { \infty }$ that would produce good performance when used as a fixed learning rate throughout.
|
| 205 |
+
|
| 206 |
+
Our preliminary experimental evaluation of this extension shows that it gives good convergence performance for a larger range of $\beta$ than without, and hence can improve the robustness of our approach. It also allows us to prove theoretical convergence under certain assumptions about $f$ :
|
| 207 |
+
|
| 208 |
+
Theorem 5.1. Suppose that $f$ is convex and $L$ -Lipschitz smooth with $\lVert \nabla f ( \theta ) \rVert < M$ for some fixed $M$ and all $\theta$ . Then $\theta _ { t } \to \theta ^ { * }$ if $\alpha _ { \infty } < 1 / L$ and $\cdot \delta ( t ) \to 0$ as $t \to \infty$ , where the $\theta _ { t }$ are generated according to (non-stochastic) gradient descent.
|
| 209 |
+
|
| 210 |
+
Proof. Note that
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\alpha _ { t } | \leq | \alpha _ { 0 } | + \beta \sum _ { i = 0 } ^ { t - 1 } \left| \nabla f \left( \theta _ { i + 1 } \right) ^ { \top } \nabla f \left( \theta _ { i } \right) \right| \leq | \alpha _ { 0 } | + \beta \sum _ { i = 0 } ^ { t - 1 } \| \nabla f \left( \theta _ { i + 1 } \right) \| \left\| \nabla f \left( \theta _ { i } \right) \right\| \leq | \alpha _ { 0 } | + t \beta M ^ { 2 }
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
where the right-hand side is $O ( t )$ as $t \to \infty$ . Our assumption about the limiting behaviour of $t \delta ( t )$ then entails ${ \bf \bar { \boldsymbol { \delta } } } ( t ) \alpha _ { t } 0$ and therefore $\gamma _ { t } \to \alpha _ { \infty }$ as $t \infty$ . For large enough $t$ , we thus have $1 / ( L + 1 ) < \dot { \gamma } _ { t } < 1 / L$ , and the algorithm converges by the fact that standard gradient descent converges for such a (potentially non-constant) learning rate under our assumptions about $f$ (see, e.g., Karimi et al. (2016)). □
|
| 217 |
+
|
| 218 |
+
# 5.2 HIGHER-ORDER HYPERGRADIENTS
|
| 219 |
+
|
| 220 |
+
While our method adapts $\alpha _ { t }$ during training, we still make use of a fixed $\beta$ , and it is natural to wonder whether one can use hypergradients to adapt this value as well. To do so would involve the addition of an update rule analogous to Eq. 3, using a gradient of our objective function computed now with respect to $\beta$ . We would require a fixed learning rate for this $\beta$ update, but then may consider doing hypergradient updates for this quantity also, and so on arbitrarily. Since our use of a single hypergradient appears to make a gradient descent algorithm less sensitive to hyperparameter selection, it is possible that the use of higher-order hypergradients in this way would improve robustness even further. We leave this hypothesis to explore in future work.
|
| 221 |
+
|
| 222 |
+
# 6 CONCLUSION
|
| 223 |
+
|
| 224 |
+
Having rediscovered a general method for adapting hyperparameters of gradient-based optimization procedures, we have applied it to the online tuning of the learning rate, and produced hypergradient descent variants of SGD, SGD with Nesterov momentum, and Adam that empirically appear to significantly reduce the time and resources needed to tune the initial learning rate. The method is general, memory and computation efficient, and easy to implement. The main advantage of the presented method is that, with a small $\beta$ , it requires significantly less tuning to give performance better than—or in the worst case the same as—the baseline. We believe that the ease with which the method can be applied to existing optimizers give it the potential to become a standard tool and significantly impact the utilization of time and hardware resources in machine learning practice.
|
| 225 |
+
|
| 226 |
+
Our start towards the establishment of theoretical convergence guarantees in this paper is limited and as such there remains much to be done, both in terms of working towards a convergence result for the non-transitioning variant of hypergradient descent and a more general result for the mixed variant. Establishing convergence rates would be even more ideal but remains future work.
|
| 227 |
+
|
| 228 |
+
# ACKNOWLEDGMENTS
|
| 229 |
+
|
| 230 |
+
Baydin and Wood are supported under DARPA PPAML through the U.S. AFRL under Cooperative Agreement FA8750-14-2-0006, Sub Award number 61160290-111668. Baydin is supported by the NVIDIA Corporation with the donation of the Titan Xp GPU used for this research. Cornish is supported by the EPSRC CDT in Autonomous Intelligent Machines and Systems. Mart´ınez Rubio is supported by Intel BDC / LBNL Physics Graduate Studentship. Wood is supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1; Intel; and DARPA D3M, under Cooperative Agreement FA8750-17-2-0093.
|
| 231 |
+
|
| 232 |
+
# REFERENCES
|
| 233 |
+
|
| 234 |
+
L. B. Almeida, T. Langlois, J. D. Amaral, and A. Plakhov. Parameter adaptation in stochastic optimization. In D. Saad (ed.), On-Line Learning in Neural Networks. Cambridge University Press, 1998.
|
| 235 |
+
A. G. Baydin, B. A. Pearlmutter, A. A. Radul, and J. M. Siskind. Automatic differentiation in machine learning: a survey. Journal of Machine Learning Research (JMLR) (In press) (ArXiv Preprint ArXiv:1502.05767), 2018.
|
| 236 |
+
Y. Bengio. Gradient-based optimization of hyperparameters. Neural Computation, 12(8):1889–1900, 2000. doi: 10.1162/089976600300015187.
|
| 237 |
+
Y. Bengio. Practical recommendations for gradient-based training of deep architectures. In Neural Networks: Tricks of the Trade, volume 7700, pp. 437–478. Springer, 2012. doi: 10.1007/978-3-642-35289-8 26.
|
| 238 |
+
J. Bergstra and Y. Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13:281–305, 2012.
|
| 239 |
+
J. Bergstra, D. Yamins, and D. D. Cox. Making a science of model search: Hyperparameter optimization in hundreds of dimensions for vision architectures. In International Conference on Machine Learning, 2013.
|
| 240 |
+
R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A MATLAB-like environment for machine learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011.
|
| 241 |
+
J. Domke. Generic methods for optimization-based modeling. In Proceedings of the Fifteenth International Conference on Artificial Intelligence and Statistics, volume 22, pp. 318–326, 2012.
|
| 242 |
+
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.
|
| 243 |
+
I. Goodfellow, Y. Bengio, and A. Courville. Practical methodology. In Deep Learning, chapter 11. MIT Press, 2016. http://www.deeplearningbook.org.
|
| 244 |
+
F. Hutter, H. Hoos, and K. Leyton-Brown. An evaluation of sequential model-based optimization for expensive blackbox functions. In Proceedings of the 15th Annual Conference Companion on Genetic and Evolutionary Computation, pp. 1209–1216. ACM, 2013.
|
| 245 |
+
R. A. Jacobs. Increased rates of convergence through learning rate adaptation. Neural Networks, 1 (4):295–307, 1988.
|
| 246 |
+
H. Karimi, J. Nutini, and M. Schmidt. Linear convergence of gradient and proximal-gradient methods under the Polyak-Lojasiewicz condition. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 795–811. Springer, 2016.
|
| 247 |
+
D. Kingma and J. Ba. Adam: A method for stochastic optimization. In The International Conference on Learning Representations (ICLR), San Diego, 2015.
|
| 248 |
+
A. Krizhevsky. Learning multiple layers of features from tiny images. Master’s thesis, Department of Computer Science, University of Toronto, 2009.
|
| 249 |
+
D. Maclaurin, D. K. Duvenaud, and R. P. Adams. Gradient-based hyperparameter optimization through reversible learning. In Proceedings of the 32nd International Conference on Machine Learning, pp. 2113–2122, 2015.
|
| 250 |
+
D. Mart´ınez. Convergence Analysis of an Adaptive Method of Gradient Descent. Master’s thesis, University of Oxford, 2017.
|
| 251 |
+
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 NIPS 2017 Autodiff Workshop: The Future of Gradient-based Machine Learning Software and Techniques, Long Beach, CA, US, December 9, 2017, 2017.
|
| 252 |
+
B. A. Pearlmutter. Fast exact multiplication by the Hessian. Neural Computation, 6(1):147–160, 1994. doi: 10.1162/neco.1994.6.1.147.
|
| 253 |
+
V. P. Plagianakos, D. G. Sotiropoulos, and M. N. Vrahatis. An improved backpropagation method with adaptive learning rate. Technical Report TR98-02, University of Patras, Department of Mathematics, 1998.
|
| 254 |
+
V. P. Plagianakos, G. D. Magoulas, and M. N. Vrahatis. Learning rate adaptation in stochastic gradient descent. In Advances in Convex Analysis and Global Optimization, pp. 433–444. Springer, 2001.
|
| 255 |
+
M. Riedmiller and H. Braun. A direct adaptive method for faster backpropagation learning: The RPROP algorithm. In IEEE International Conference on Neural Networks, pp. 586–591. IEEE, 1993.
|
| 256 |
+
T. Schaul, S. Zhang, and Y. LeCun. No more pesky learning rates. Proceedings of the 30th International Conference on Machine Learning, 28:343–351, 2013.
|
| 257 |
+
N. N. Schraudolph. Local gain adaptation in stochastic gradient descent. In Proceedings of the 9th International Conference on Neural Networks (ICANN), volume 2, pp. 569–574, 1999.
|
| 258 |
+
N. N. Schraudolph, J. Yu, and D. Aberdeen. Fast online policy gradient learning with SMD gain vector adaptation. In Advances in Neural Information Processing Systems, pp. 1185, 2006.
|
| 259 |
+
S. Shao and P. P. C. Yip. Rates of convergence of adaptive step-size of stochastic approximation algorithms. Journal of Mathematical Analysis and Applications, 244(2):333–347, 2000. ISSN 0022-247X. doi: 10.1006/jmaa.2000.6703.
|
| 260 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 261 |
+
J. Snoek, H. Larochelle, and R. P. Adams. Practical Bayesian optimization of machine learning algorithms. In Advances in Neural Information Processing Systems, pp. 2951–2959, 2012.
|
| 262 |
+
R. S. Sutton. Gain adaptation beats least squares? In Proceedings of the Seventh Yale Workshop on Adaptive and Learning Systems, pp. 161–166, 1992.
|
| 263 |
+
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, 4(2), 2012.
|
md/train/BkxfaTVFwH/BkxfaTVFwH.md
ADDED
|
@@ -0,0 +1,348 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENESIS: GENERATIVE SCENE INFERENCE AND SAMPLING WITH OBJECT-CENTRIC LATENT REPRESENTATIONS
|
| 2 |
+
|
| 3 |
+
Martin Engelcke∗∇, Adam R. Kosiorek∇∆, Oiwi Parker Jones∇ & Ingmar Posner∇ ∇ Applied AI Lab, University of Oxford; ∆ Dept. of Statistics, University of Oxford
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Generative latent-variable models are emerging as promising tools in robotics and reinforcement learning. Yet, even though tasks in these domains typically involve distinct objects, most state-of-the-art generative models do not explicitly capture the compositional nature of visual scenes. Two recent exceptions, MONet and IODINE, decompose scenes into objects in an unsupervised fashion. Their underlying generative processes, however, do not account for component interactions. Hence, neither of them allows for principled sampling of novel scenes. Here we present GENESIS, the first object-centric generative model of rendered 3D scenes capable of both decomposing and generating scenes by capturing relationships between scene components. GENESIS parameterises a spatial GMM over images which is decoded from a set of object-centric latent variables that are either inferred sequentially in an amortised fashion or sampled from an autoregressive prior. We train GENESIS on several publicly available datasets and evaluate its performance on scene generation, decomposition, and semi-supervised learning.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Task execution in robotics and reinforcement learning (RL) requires accurate perception of and reasoning about discrete elements in an environment. While supervised methods can be used to identify pertinent objects, it is intractable to collect labels for every scenario and task. Discovering structure in data—such as objects—and learning to represent data in a compact fashion without supervision are long-standing problems in machine learning (Comon, 1992; Tishby et al., 2000), often formulated as generative latent-variable modelling (e.g. Kingma & Welling, 2014; Rezende et al., 2014). Such methods have been leveraged to increase sample efficiency in RL (Gregor et al., 2019) and other supervised tasks (van Steenkiste et al., 2019). They also offer the ability to imagine environments for training (Ha & Schmidhuber, 2018). Given the compositional nature of visual scenes, separating latent representations into object-centric ones can facilitate fast and robust learning (Watters et al., 2019a), while also being amenable to relational reasoning (Santoro et al., 2017). Interestingly, however, state-of-the-art methods for generating realistic images do not account for this discrete structure (Brock et al., 2018; Parmar et al., 2018).
|
| 12 |
+
|
| 13 |
+
As in the approach proposed in this work, human visual perception is not passive. Rather it involves a creative interplay between external stimulation and an active, internal generative model of the world (Rao & Ballard, 1999; Friston, 2005). That this is necessary can be seen from the physiology of the eye, where the small portion of the visual field that can produce sharp images (fovea centralis) motivates the need for rapid eye movements (saccades) to build up a crisp and holistic percept of a scene (Wandell, 1995). In other words, what we perceive is largely a mental simulation of the external world. Meanwhile, work in computational neuroscience tells us that visual features (see, e.g., Hubel & Wiesel, 1968) can be inferred from the statistics of static images using unsupervised learning (Olshausen & Field, 1996). Experimental investigations further show that specific brain areas (e.g. LO) appear specialised for objects, for example responding more strongly to common objects than to scenes or textures, while responding only weakly to movement (cf. MT) (e.g., GrillSpector & Malach, 2004).
|
| 14 |
+
|
| 15 |
+
In this work, we are interested in probabilistic generative models that can explain visual scenes compositionally via several latent variables. This corresponds to fitting a probability distribution $p _ { \theta } ( \mathbf { x } )$ with parameters $\theta$ to the data. The compositional structure is captured by $K$ latent variables so that $\begin{array} { r } { p _ { \theta } ( \dot { \mathbf { x } } ) = \int p _ { \theta } ( \mathbf { x } \mid \mathbf { z } _ { 1 : K } ) p _ { \theta } ( \mathbf { z } _ { 1 : K } ) \mathrm { d } \mathbf { z } _ { 1 : K } } \end{array}$ . Models from this family can be optimised using the variational auto-encoder (VAE) framework (Kingma & Welling, 2014; Rezende et al., 2014), by maximising a variational lower bound on the model evidence (Jordan et al., 1999). Burgess et al. (2019) and Greff et al. (2019) recently proposed two such models, MONet and IODINE, to decompose visual scenes into meaningful objects. Both works leverage an analysis-by-synthesis approach through the machinery of VAEs (Kingma & Welling, 2014; Rezende et al., 2014) to train these models without labelled supervision, e.g. in the form of ground truth segmentation masks. However, the models have a factorised prior that treats scene components as independent. Thus, neither provides an object-centric generation mechanism that accounts for relationships between constituent parts of a scene, e.g. two physical objects cannot occupy the same location, prohibiting the component-wise generation of novel scenes and restricting the utility of these approaches. Moreover, MONet embeds a convolutional neural network (CNN) inside of an recurrent neural network (RNN) that is unrolled for each scene component, which does not scale well to more complex scenes. Similarly, IODINE utilises a CNN within an expensive, gradient-based iterative refinement mechanism.
|
| 16 |
+
|
| 17 |
+
Therefore, we introduce GENErative Scene Inference and Sampling (GENESIS) which is, to the best of our knowledge, the first object-centric generative model of rendered 3D scenes capable of both decomposing and generating scenes1. Compared to previous work, this renders GENESIS significantly more suitable for a wide range of applications in robotics and reinforcement learning. GENESIS achieves this by modelling relationships between scene components with an expressive, autoregressive prior that is learned alongside a sequential, amortised inference network. Importantly, sequential inference is performed in low-dimensional latent space, allowing all convolutional encoders and decoders to be run in parallel to fully exploit modern graphics processing hardware.
|
| 18 |
+
|
| 19 |
+
We conduct experiments on three canonical and publicly available datasets: coloured Multi-dSprites (Burgess et al., 2019), the GQN dataset (Eslami et al., 2018), and ShapeStacks (Groth et al., 2018). The latter two are simulated 3D environments which serve as testing grounds for navigation and object manipulation tasks, respectively. We show both qualitatively and quantitatively that in contrast to prior art, GENESIS is able to generate coherent scenes while also performing well on scene decomposition. Furthermore, we use the scene annotations available for ShapeStacks to show the benefit of utilising general purpose, object-centric latent representations from GENESIS for tasks such as predicting whether a block tower is stable or not.
|
| 20 |
+
|
| 21 |
+
Code and models are available at https://github.com/applied-ai-lab/genesis.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Structured Models Several methods leverage structured latent variables to discover objects in images without direct supervision. CST-VAE (Huang & Murphy, 2015), AIR (Eslami et al., 2016), SQAIR (Kosiorek et al., 2018), and SPAIR (Crawford & Pineau, 2019) use spatial attention to partition scenes into objects. TAGGER (Greff et al., 2016), NEM (Greff et al., 2017), and R-NEM (van Steenkiste et al., 2018a) perform unsupervised segmentation by modelling images as spatial mixture models. SCAE (Kosiorek et al., 2019) discovers geometric relationships between objects and their parts by using an affine-aware decoder. Yet, these approaches have not been shown to work on more complex images, for example visual scenes with 3D spatial structure, occlusion, perspective distortion, and multiple foreground and background components as considered in this work. Moreover, none of them demonstrate the ability to generate novel scenes with relational structure.
|
| 26 |
+
|
| 27 |
+
While Xu et al. (2018) present an extension of Eslami et al. (2016) to generate images, their method only works on binary images with a uniform black background and assumes that object bounding boxes do not overlap. In contrast, we train GENESIS on rendered 3D scenes from Eslami et al. (2018) and Groth et al. (2018) which feature complex backgrounds and considerable occlusion to perform both decomposition and generation. Lastly, Xu et al. (2019) use ground truth pixel-wise flow fields as a cue for segmenting objects or object parts. Similarly, GENESIS could be adapted to also leverage temporal information which is a promising avenue for future research.
|
| 28 |
+
|
| 29 |
+
MONet & IODINE While this work is most directly related to MONet (Burgess et al., 2019) and IODINE (Greff et al., 2019), it sets itself apart by introducing a generative model that captures relations between scene components with an autoregressive prior, enabling the unconditional generation of coherent, novel scenes. Moreover, MONet relies on a deterministic attention mechanism rather than utilising a proper probabilistic inference procedure. This implies that the training objective is not a valid lower bound on the marginal likelihood and that the model cannot perform density estimation without modification. Furthermore, this attention mechanism embeds a CNN in a RNN, posing an issue in terms of scalability. These two considerations do not apply to IODINE, but IODINE employs a gradient-based, iterative refinement mechanism which expensive both in terms of computation and memory, limiting its practicality and utility. Architecturally, GENESIS is more similar to MONet and does not require expensive iterative refinement as IODINE. Unlike MONet, though, the convolutional encoders and decoders in GENESIS can be run in parallel, rendering the model computationally more scalable to inputs with a larger number of scene components.
|
| 30 |
+
|
| 31 |
+
Adversarial Methods A few recent works have proposed to use an adversary for scene segmentation and generation. Chen et al. (2019) and Bielski & Favaro (2019) segment a single foreground object per image and Arandjelovic & Zisserman (2019) segment several synthetic objects superim- ´ posed on natural images. Azadi et al. (2019) combine two objects or an object and a background scene in a sensible fashion and van Steenkiste et al. (2018b) can generate scenes with a potentially arbitrary number of components. In comparison, GENESIS performs both inference and generation, does not exhibit the instabilities of adversarial training, and offers a probabilistic formulation which captures uncertainty, e.g. during scene decomposition. Furthermore, the complexity of GENESIS increases with $\mathcal O ( K )$ , where $K$ is the number of components, as opposed to the $\mathcal { O } ( K ^ { 2 } )$ complexity of the relational stage in van Steenkiste et al. (2018b).
|
| 32 |
+
|
| 33 |
+
Inverse Graphics A range of works formulate scene understanding as an inverse graphics problem. These well-engineered methods, however, rely on scene annotations for training and lack probabilistic formulations. For example, Wu et al. (2017b) leverage a graphics renderer to decode a structured scene description which is inferred by a neural network. Romaszko et al. (2017) pursue a similar approach but instead make use of a differentiable graphics render. Wu et al. (2017a) further employ different physics engines to predict the movement of billiard balls and block towers.
|
| 34 |
+
|
| 35 |
+
# 3 GENESIS: GENERATIVE SCENE INFERENCE AND SAMPLING
|
| 36 |
+
|
| 37 |
+
In this section, we first describe the generative model of GENESIS and a simplified variant called GENESIS-S. This is followed by the associated inference procedures and two possible learning objectives. GENESIS is illustrated in Figure 1 and Figure 2 shows the graphical model in comparison to alternative methods. An illustration of GENESIS-S is included Appendix B.1, Figure 5.
|
| 38 |
+
|
| 39 |
+
Generative model Let $\mathbf { x } \in \mathbb { R } ^ { H \times W \times C }$ be an image. We formulate the problem of image generation as a spatial Gaussian mixture model (GMM). That is, every Gaussian component $k = 1 , \ldots , K$ represents an image-sized scene component $\mathbf { x } _ { k } \in \mathbb { R } ^ { H \times W \times C }$ . $K \in \mathbb { N } _ { + }$ is the maximum number of scene components. The corresponding mixing probabilities $\pi _ { k } \in [ \dot { 0 } , 1 ] ^ { H \times W }$ indicate whether the component is present at a location in the image. The mixing probabilities are normalised across scene components, i.e. $\begin{array} { r } { \forall _ { i , j } \sum _ { k } \pi _ { i , j , k } = 1 } \end{array}$ , and can be regarded as spatial attention masks. Since there are strong spatial dependencies between components, we formulate an autoregressive prior distribution over mask variables $\mathbf { z } _ { k } ^ { m } \in \mathbb { R } ^ { D _ { m } }$ which encode the mixing probabilities $\pi _ { k }$ , as
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
p _ { \theta } ( \mathbf { z } _ { 1 : K } ^ { m } ) = \prod _ { k = 1 } ^ { K } p _ { \theta } \big ( \mathbf { z } _ { k } ^ { m } \mid \mathbf { z } _ { 1 : k - 1 } ^ { m } \big ) = \prod _ { k = 1 } ^ { K } p _ { \theta } ( \mathbf { z } _ { k } ^ { m } \mid \mathbf { u } _ { k } ) \vert _ { \mathbf { u } _ { k } = \mathrm { R } _ { \theta } ( \mathbf { z } _ { k - 1 } ^ { m } , \mathbf { u } _ { k - 1 } ) } .
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
The dependence on previous latents $\mathbf { z } _ { 1 : k - 1 } ^ { m }$ is implemented via an RNN $\mathrm { R } _ { \theta }$ with hidden state $\mathbf { u } _ { k }$
|
| 46 |
+
|
| 47 |
+
Next, we assume that the scene components $\mathbf { x } _ { k }$ are conditionally independent given their spatial allocation in the scene. The corresponding conditional distribution over component variables $\mathbf { z } _ { k } ^ { c } \in \mathbb { R } ^ { D _ { c } }$ which encode the scene components $\mathbf { x } _ { k }$ factorises as follows,
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
p _ { \boldsymbol { \theta } } ( \mathbf { z } _ { 1 : K } ^ { c } \mid \mathbf { z } _ { 1 : K } ^ { m } ) = \prod _ { k = 1 } ^ { K } p _ { \boldsymbol { \theta } } ( \mathbf { z } _ { k } ^ { c } \mid \mathbf { z } _ { k } ^ { m } ) .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: GENESIS illustration. Given an image $\mathbf { x }$ , an encoder and an RNN compute the mask latents $\mathbf { z } _ { k } ^ { m }$ . These are decoded to obtain the mixing probabilities $\pi _ { k }$ . The image and individual masks are concatenated to infer the component latents $\mathbf { z } _ { k } ^ { c }$ from which the scene components $\mathbf { x } _ { k }$ are decoded.
|
| 55 |
+
|
| 56 |
+
Now, the image likelihood is given by a mixture model,
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
p ( \mathbf { x } \mid \mathbf { z } _ { 1 : K } ^ { m } , \mathbf { z } _ { 1 : K } ^ { c } ) = \sum _ { k = 1 } ^ { K } \pi _ { k } p _ { \theta } ( \mathbf { x } _ { k } \mid \mathbf { z } _ { k } ^ { c } ) ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where the mixing probabilities $\pi _ { k } = \pi _ { \theta } ( \mathbf { z } _ { 1 : k } ^ { m } )$ are created via a stick-breaking process (SBP) adapted from Burgess et al. (2019) as follows, slightly overloading the $\pi$ notation,
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\pi _ { 1 } = \pi _ { \theta } ( { \bf z } _ { 1 } ^ { m } ) , \qquad \pi _ { k } = \left( 1 - \sum _ { j = 1 } ^ { k - 1 } \pi _ { j } \right) \pi _ { \theta } ( { \bf z } _ { k } ^ { m } ) , \qquad \pi _ { K } = \left( 1 - \sum _ { j = 1 } ^ { K - 1 } \pi _ { j } \right) .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
Note that this step is not necessary for our model and instead one could use a softmax to normalise masks as in Greff et al. (2019).
|
| 69 |
+
|
| 70 |
+
Finally, omitting subscripts, the full generative model can be written as
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
p _ { \theta } ( \mathbf { x } ) = \iint p _ { \theta } ( \mathbf { x } \mid \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) p _ { \theta } ( \mathbf { z } ^ { c } \mid \mathbf { z } ^ { m } ) p _ { \theta } ( \mathbf { z } ^ { m } ) \mathrm { d } \mathbf { z } ^ { m } \mathrm { d } \mathbf { z } ^ { c } ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where we assume that all conditional distributions are Gaussian. The Gaussian components of the image likelihood have a fixed scalar standard deviation $\sigma _ { x } ^ { 2 }$ . We refer to this model as GENESIS. To investigate whether separate latents for masks and component appearances are necessary for decomposition, we consider a simplified model, GENESIS-S, with a single latent variable per component,
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
p _ { \theta } ( \mathbf { z } _ { 1 : K } ) = \prod _ { k = 1 } ^ { K } p _ { \theta } ( \mathbf { z } _ { k } \mid \mathbf { z } _ { 1 : k - 1 } ) .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
In this case, $\mathbf { z } _ { k }$ takes the role of $\mathbf { z } _ { k } ^ { c }$ in Equation (3) and of $\mathbf { z } _ { k } ^ { m }$ in Equation (4), while Equation (2) is no longer necessary.
|
| 83 |
+
|
| 84 |
+
Approximate posterior We amortise inference by using an approximate posterior distribution with parameters $\phi$ and a structure similar to the generative model. The full approximate posterior reads as follows,
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\begin{array} { r l } & { \displaystyle q _ { \phi } ( \mathbf { z } _ { 1 : K } ^ { c } , \mathbf { z } _ { 1 : K } ^ { m } \mid \mathbf { x } ) = q _ { \phi } ( \mathbf { z } _ { 1 : K } ^ { m } \mid \mathbf { x } ) q _ { \phi } ( \mathbf { z } _ { 1 : K } ^ { c } \mid \mathbf { x } , \mathbf { z } _ { 1 : K } ^ { m } ) , \quad \mathrm { w h e r e } } \\ & { \displaystyle q _ { \phi } ( \mathbf { z } _ { 1 : K } ^ { m } \mid \mathbf { x } ) = \prod _ { k = 1 } ^ { K } q _ { \phi } \big ( \mathbf { z } _ { k } ^ { m } \mid \mathbf { x } , \mathbf { z } _ { 1 : k - 1 } ^ { m } \big ) , \quad \mathrm { a n d } \quad q _ { \phi } ( \mathbf { z } _ { 1 : K } ^ { c } \mid \mathbf { x } , \mathbf { z } _ { 1 : K } ^ { m } ) = \prod _ { k = 1 } ^ { K } q _ { \phi } ( \mathbf { z } _ { k } ^ { c } \mid \mathbf { x } , \mathbf { z } _ { 1 : k } ^ { m } ) , } \end{array}
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
with the dependence on the prior, but we have n $\mathbf { z } _ { 1 : k - 1 } ^ { m }$ realised by an RNN stigated this option. $\mathrm { R } _ { \phi }$ . The RNN could, in principle, be shared withll conditional distributions are Gaussian. For GENESIS-S, the approximate posterior takes the form $\begin{array} { r } { q _ { \phi } ( \mathbf { z } _ { 1 : K } \mid \mathbf { x } ) = \prod _ { k = 1 } ^ { K } q _ { \phi } ( \mathbf { z } _ { k } \mid \mathbf { x } , \mathbf { z } _ { 1 : k - 1 } ) } \end{array}$ .
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 2: Graphical model of GENESIS compared to related methods. $N$ denotes the number of refinement iterations in IODINE. Unlike the other methods, both GENESIS variants explicitly model dependencies between scene components.
|
| 94 |
+
|
| 95 |
+
Learning GENESIS can be trained by maximising the evidence lower bound (ELBO) on the logmarginal likelihood $\log p _ { \theta } ( \mathbf { x } )$ , given by
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
{ \begin{array} { r l } & { { \mathcal { L } } _ { \mathrm { E L B O } } ( \mathbf { x } ) = \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } | \mathbf { x } ) } \left[ \log \frac { p _ { \theta } ( \mathbf { x } \mid \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) p _ { \theta } ( \mathbf { z } ^ { c } \mid \mathbf { z } ^ { m } ) p _ { \theta } ( \mathbf { z } ^ { m } ) } { q _ { \phi } ( \mathbf { z } ^ { c } \mid \mathbf { z } ^ { m } , \mathbf { x } ) q _ { \phi } ( \mathbf { z } ^ { m } \mid \mathbf { x } ) } \right] } \\ & { \qquad = \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } | \mathbf { x } ) } [ \log p _ { \theta } ( \mathbf { x } \mid \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) ] - \operatorname { K L } \left( q _ { \phi } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } \mid \mathbf { x } ) \mid \mid p _ { \theta } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) \right) . } \end{array} }
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
However, this often leads to a strong emphasis on the likelihood term, while allowing the marginal approximate posterior $q _ { \phi } ( \mathbf { z } ) = \mathbb { E } _ { p _ { \mathrm { d a t a } } ( \mathbf { x } ) } [ q _ { \phi } ( \mathbf { z } \mid \mathbf { x } ) ]$ to drift away from the prior distribution, hence increasing the KL-divergence. This also decreases the quality of samples drawn from the model. To prevent this behaviour, we use the Generalised ELBO with Constrained Optimisation (GECO) objective from Rezende $\&$ Viola (2018) instead, which changes the learning problem to minimising the KL-divergence subject to a reconstruction constraint. Let $C \in \mathbb { R }$ be the minimum allowed reconstruction log-likelihood, GECO then uses Lagrange multipliers to solve the following problem,
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\begin{array} { r l } & { \theta ^ { \star } , \phi ^ { \star } = \arg \underset { \theta , \phi } { \operatorname* { m i n } } \mathrm { K L } \left( q _ { \phi } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } \mid \mathbf { x } ) \mid \mid p _ { \theta } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) \right) } \\ & { \quad \quad \quad \mathrm { s u c h t h a t } \quad \mathbb { E } _ { q _ { \phi } ( \mathbf { z } ^ { c } , \mathbf { z } ^ { m } \mid \mathbf { x } ) } [ \log p _ { \theta } ( \mathbf { x } \mid \mathbf { z } ^ { c } , \mathbf { z } ^ { m } ) ] \ge C . } \end{array}
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
# 4 EXPERIMENTS
|
| 108 |
+
|
| 109 |
+
In this section, we present qualitative and quantitative results on coloured Multi-dSprites (Burgess et al., 2019), the “rooms-ring-camera” dataset from $G Q N$ (Eslami et al., 2018) and the ShapeStacks dataset (Groth et al., 2018). We use an image resolution of 64-by-64 for all experiments. The number of components is set to $K = 5$ , $K = 7$ , and $K = 9$ for Multi-dSprites, GQN, and ShapeStacks, respectively. More details about the datasets are provided in Appendix A. Implementation and training details of all models are described in Appendix B.
|
| 110 |
+
|
| 111 |
+
# 4.1 COMPONENT-WISE SCENE GENERATION
|
| 112 |
+
|
| 113 |
+
Unlike previous works, GENESIS has an autoregressive prior to capture intricate dependencies between scene components. Modelling these relationships is necessary to generate coherent scenes. For example, different parts of the background need to fit together; we do not want to create components such as the sky several times; and several physical objects cannot be in the same location. GENESIS is able to generate novel scenes by sequentially sampling scene components from the prior and conditioning each new component on those that have been generated during previous steps.
|
| 114 |
+
|
| 115 |
+
After training GENESIS and MONet on the GQN dataset, Figure 3 shows the component-bycomponent generation process of novel scenes, corresponding to drawing samples from the respective prior distributions. More examples of generated scenes are shown in Figure 6, Appendix D. With GENESIS, either an object in the foreground or a part of the background is generated at every step and these components fit together to make up a semantically consistent scene that looks similar to the training data. MONet, though, generates random artefacts at every step that do not form a sensible scene. These results are striking but not surprising: MONet was not designed for scene generation. The need for such a model is why we developed GENESIS.
|
| 116 |
+
|
| 117 |
+

|
| 118 |
+
Figure 3: Component-by-component scene generation with GENESIS and MONet after training on the GQN dataset. The first pane shows the final scene and the subsequent panes show the components generated at each step. GENESIS first generates the sky and the floor, followed by individual objects, and finally distinct parts of the wall in the background to compose a coherent scene. MONet, in contrast, only generates incomplete components that do not fit together.
|
| 119 |
+
|
| 120 |
+
Notably, GENESIS pursues a consistent strategy for scene generation: Step one generates the floor and the sky, defining the layout of the scene. Steps two to four generate individual foreground objects. Some of these slots remain empty if less than three objects are present in the scene. The final three steps generate the walls in the background. We conjecture that this strategy evolves during training as the floor and sky constitute large and easy to model surfaces that have a strong impact on the reconstruction loss. Finally, we observe that some slots contain artefacts of the sky at the top of the wall boundaries. We conjecture this is due to the fact that the mask decoder does not have skip connections as typically used in segmentation networks, making it difficult for the model to predict sharp segmentation boundaries. Scenes generated by GENESIS-S are shown in Figure 8 and Figure 9, Appendix D. While GENESIS-S does separate the foreground objects from the background, it generates them in one step and the individual background components are not very interpretable.
|
| 121 |
+
|
| 122 |
+
# 4.2 INFERENCE OF SCENE COMPONENTS
|
| 123 |
+
|
| 124 |
+
Like MONet and IODINE, which were designed for unsupervised scene decomposition, GENESIS is also able to segment scenes into meaningful components. Figure 4 compares the decomposition of two images from the GQN dataset with GENESIS and MONet. Both models follow a similar decomposition strategy, but MONet fails to disambiguate one foreground object in the first example and does not reconstruct the background in as much detail in the second example. In Appendix E, Figure 10 illustrates the ability of both methods to disambiguate objects of the same colour and Figure 11 shows scene decomposition with GENESIS-S.
|
| 125 |
+
|
| 126 |
+
Following Greff et al. (2019), we quantify segmentation performance with the Adjusted Rand Index (ARI) of pixels overlapping with ground truth foreground objects. We computed the ARI on 300 random images from the ShapeStacks test set for five models trained with different random seeds. GENESIS achieves an ARI of $0 . 7 3 \pm 0 . 0 3$ which is better than $0 . 6 3 \pm 0 . 0 7$ for MONet. This metric, however, does not penalise objects being over-segmented, which can give a misleading impression with regards to segmentation quality. This is illustrated in Figure 13, Appendix E.
|
| 127 |
+
|
| 128 |
+
Inspired by Arbelaez et al. (2010), we thus propose to use the segmentation covering (SC) of the ground truth foreground objects by the predicted masks. This involves taking a weighted mean over mask pairs, putting a potentially undesirable emphasis on larger objects. We therefore also consider taking an unweighted mean $\mathrm { ( m S C ) }$ . For the same 300 images from the ShapeStacks test set and five different random seeds, GENESIS (SC: $0 . 6 4 \pm 0 . 0 8$ , mSC: $0 . 6 0 \pm 0 . 0 9 )$ again outperforms MONet (SC: $0 . 5 2 \pm 0 . 0 9$ , mSC: $0 . 4 9 \pm 0 . 0 9 )$ . More details are provided in Appendix C.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 4: Step-by-step decomposition of the same scene from GQN with GENESIS and MONet. Unlike MONet, GENESIS clearly differentiates individual objects in the first example. In the second example, GENESIS captures the fine-grained pattern of the wall in the background better than MONet.
|
| 132 |
+
|
| 133 |
+
# 4.3 EVALUATION OF UNSUPERVISED REPRESENTATION UTILITY
|
| 134 |
+
|
| 135 |
+
Using a subset of the available labelled training images from ShapeStacks, we train a set of classifiers on the representations learned by GENESIS and several baselines to evaluate how well these representations capture the ground truth scene state. In particular, we consider three tasks: (1) Is a tower stable or not? (2) What is the tower’s height in terms of the number of blocks? (3) What is the camera viewpoint (out of 16 possibilities)? Tower stability is a particularly interesting property as it depends on in fine-grained object information and the relative positioning of objects. We selected the third task as learning scene representations from different views has previously been prominently explored in Eslami et al. (2018). We compare GENESIS and GENESIS-S against three baselines: MONet, a VAE with a spatial broadcast decoder (BD-VAE) and a VAE with a deconvolutional decoder (DC-VAE). The results are summarised in Table 1. The architectural details of the baselines are described in Appendix B.2 and Appendix B.3. The implementation details of the classifiers are provided in Appendix B.5.
|
| 136 |
+
|
| 137 |
+
Both GENESIS and GENESIS-S perform better than than the baselines at predicting tower stability and their accuracies on predicting the height of the towers is only outperformed by MONet. We conjecture that MONet benefits here by its deterministic segmentation network. Overall, this corroborates the intuition that object-centric representations are indeed beneficial for these tasks which focus on the foreground objects. We observe that the BD-VAE does better than the DC-VAE on all three tasks, reflecting the motivation behind its design which is aimed at better disentangling the underlying factors of variation in the data (Watters et al., 2019b). All models achieve a high accuracy at predicting the camera view. Finally, we note that none of models reach the stability prediction accuracies reported in Groth et al. (2018) which were obtained with an Inception-v4 classifier (Szegedy et al., 2017). This is not surprising considering that only a subset the training images is used for training the classifiers without data augmentation and at a reduced resolution.
|
| 138 |
+
|
| 139 |
+
Table 1: Classification accuracy in $\%$ on the test sets of the ShapeStacks tasks.
|
| 140 |
+
|
| 141 |
+
<table><tr><td>Task</td><td>GENESIS</td><td>GENESIS-S</td><td>MONet</td><td>BD-VAE</td><td>DC-VAE</td><td>Random</td></tr><tr><td>Stability</td><td>64.0</td><td>63.2</td><td>59.6</td><td>60.1</td><td>59.0</td><td>50.0</td></tr><tr><td>Height</td><td>80.3</td><td>80.8</td><td>88.4</td><td>78.6</td><td>67.5</td><td>22.8</td></tr><tr><td>View</td><td>99.3</td><td>99.7</td><td>99.5</td><td>99.7</td><td>99.1</td><td>6.25</td></tr></table>
|
| 142 |
+
|
| 143 |
+
# 4.4 QUANTIFYING SAMPLE QUALITY
|
| 144 |
+
|
| 145 |
+
In order to quantify the quality of generated scenes, Table 2 summarises the Fréchet Inception Distances (FIDs) (Heusel et al., 2017) between 10,000 images generated by GENESIS as well several baselines and 10,000 images from the Multi-dSprites and the GQN test sets, respectively. The two GENESIS variants achieve the best FID on both datasets. While GENESIS-S performs better than GENESIS on GQN, Figure 8 and Figure 9 in Appendix D show that individual scene components are less interpretable and that intricate background patterns are generated at the expense of sensible foreground objects. It is not surprising that the FIDs for MONet are relatively large given that it was not designed for generating scenes. Interestingly, the DC-VAE achieves a smaller FID on GQN than the BD-VAE. This is surprising given that the BD-VAE representations are more useful for the ShapeStacks classification tasks. Given that the GQN dataset and ShapeStacks are somewhat similar in structure and appearance, this indicates that while FID correlates with perceptual similarity, it does not necessarily correlate with the general utility of the learned representations for downstream tasks. We include scenes sampled from the BD-VAE and the DC-VAE in Figure 7, Appendix D, where we observe that the DC-VAE models the background fairly well while foreground objects are blurry.
|
| 146 |
+
|
| 147 |
+
Table 2: Fréchet Inception Distances for GENESIS and baselines on GQN.
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Dataset</td><td>GENESIS</td><td>GENESIS-S</td><td>MONet</td><td>BD-VAE</td><td>DC-VAE</td></tr><tr><td>Multi-dSprites</td><td>24.9</td><td>28.2</td><td>92.7</td><td>89.8</td><td>100.5</td></tr><tr><td>GQN</td><td>80.5</td><td>70.2</td><td>176.4</td><td>145.5</td><td>82.5</td></tr></table>
|
| 150 |
+
|
| 151 |
+
# 5 CONCLUSIONS
|
| 152 |
+
|
| 153 |
+
In this work, we propose a novel object-centric latent variable model of scenes called GENESIS. We show that GENESIS is, to the best of our knowledge, the first unsupervised model to both decompose rendered 3D scenes into semantically meaningful constituent parts, while at the same time being able to generate coherent scenes in a component-wise fashion. This is achieved by capturing relationships between scene components with an autoregressive prior that is learned alongside a computationally efficient sequential inference network, setting GENESIS apart from prior art. Regarding future work, an interesting challenge is to scale GENESIS to more complex datasets and to employ the model in robotics or reinforcement learning applications. To this end, it will be necessary to improve reconstruction and sample quality, reduce computational cost, and to scale the model to higher resolution images. Another potentially promising research direction is to adapt the formulation to only model parts of the scene that are relevant for a certain task.
|
| 154 |
+
|
| 155 |
+
# ACKNOWLEDGMENTS
|
| 156 |
+
|
| 157 |
+
This research was supported by an EPSRC Programme Grant (EP/M019918/1), an EPSRC DTA studentship, and a Google studentship. The authors would like to acknowledge the use of the University of Oxford Advanced Research Computing (ARC) facility in carrying out this work, http://dx.doi.org/10.5281/zenodo.22558, and the use of Hartree Centre resources. The authors would like to thank Yizhe Wu for his help with re-implementing MONet, Oliver Groth for his support with the GQN and ShapeStacks datasets, and Rob Weston for proof reading the paper.
|
| 158 |
+
|
| 159 |
+
# REFERENCES
|
| 160 |
+
|
| 161 |
+
Relja Arandjelovic and Andrew Zisserman. Object Discovery with a Copy-Pasting GAN. ´ arXiv preprint arXiv:1905.11369, 2019.
|
| 162 |
+
|
| 163 |
+
Pablo Arbelaez, Michael Maire, Charless Fowlkes, and Jitendra Malik. Contour Detection and Hierarchical Image Segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010.
|
| 164 |
+
|
| 165 |
+
Samaneh Azadi, Deepak Pathak, Sayna Ebrahimi, and Trevor Darrell. Compositional GAN: Learning Image-Conditional Binary Composition. arXiv preprint arXiv:1807.07560, 2019.
|
| 166 |
+
|
| 167 |
+
Rianne van den Berg, Leonard Hasenclever, Jakub M Tomczak, and Max Welling. Sylvester Normalizing Flows for Variational Inference. Conference on Uncertainty in Artificial Intelligence, 2018.
|
| 168 |
+
|
| 169 |
+
Adam Bielski and Paolo Favaro. Emergence of Object Segmentation in Perturbed Generative Models. arXiv preprint arXiv:1905.12663, 2019.
|
| 170 |
+
|
| 171 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large Scale GAN Training for High Fidelity Natural Image Synthesis. arXiv preprint arXiv:1809.11096, 2018.
|
| 172 |
+
|
| 173 |
+
Christopher P Burgess, Loic Matthey, Nicholas Watters, Rishabh Kabra, Irina Higgins, Matt Botvinick, and Alexander Lerchner. MONet: Unsupervised Scene Decomposition and Representation. arXiv preprint arXiv:1901.11390, 2019.
|
| 174 |
+
|
| 175 |
+
Mickaël Chen, Thierry Artières, and Ludovic Denoyer. Unsupervised Object Segmentation by Redrawing. arXiv preprint arXiv:1905.13539, 2019.
|
| 176 |
+
|
| 177 |
+
Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs). International Conference on Learning Representations, 2016.
|
| 178 |
+
|
| 179 |
+
Pierre Comon. Independent Component Analysis. In J-L.Lacoume (ed.), Higher-Order Statistics, pp. 29–38. Elsevier, 1992.
|
| 180 |
+
|
| 181 |
+
Eric Crawford and Joelle Pineau. Spatially Invariant Unsupervised Object Detection with Convolutional Neural Networks. AAAI Conference on Artificial Intelligence, 2019.
|
| 182 |
+
|
| 183 |
+
Yann N Dauphin, Angela Fan, Michael Auli, and David Grangier. Language Modeling with Gated Convolutional Networks. International Conference on Machine Learning, 2017.
|
| 184 |
+
|
| 185 |
+
SM Ali Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, David Szepesvari, Geoffrey E Hinton, et al. Attend, Infer, Repeat: Fast Scene Understanding with Generative Models. Neural Information Processing Systems, 2016.
|
| 186 |
+
|
| 187 |
+
SM Ali Eslami, Danilo Jimenez Rezende, Frederic Besse, Fabio Viola, Ari S Morcos, Marta Garnelo, Avraham Ruderman, Andrei A Rusu, Ivo Danihelka, Karol Gregor, et al. Neural Scene Representation and Rendering. Science, 2018.
|
| 188 |
+
|
| 189 |
+
Karl Friston. A Theory of Cortical Responses. Philosophical Transactions of the Royal Society B: Biological Sciences, 360(1456):815–836, 2005.
|
| 190 |
+
|
| 191 |
+
Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep Sparse Rectifier Neural Networks. International Conference on Artificial Intelligence and Statistics, 2011.
|
| 192 |
+
|
| 193 |
+
Klaus Greff, Antti Rasmus, Mathias Berglund, Tele Hao, Harri Valpola, and Jürgen Schmidhuber. Tagger: Deep Unsupervised Perceptual Grouping. Neural Information Processing Systems, 2016.
|
| 194 |
+
|
| 195 |
+
Klaus Greff, Sjoerd van Steenkiste, and Jürgen Schmidhuber. Neural Expectation Maximization. Neural Information Processing Systems, 2017.
|
| 196 |
+
|
| 197 |
+
Klaus Greff, Raphaël Lopez Kaufmann, Rishab Kabra, Nick Watters, Chris Burgess, Daniel Zoran, Loic Matthey, Matthew Botvinick, and Alexander Lerchner. Multi-Object Representation Learning with Iterative Variational Inference. International Conference on Machine Learning, 2019.
|
| 198 |
+
|
| 199 |
+
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. arXiv preprint arXiv:1906.09237, 2019.
|
| 200 |
+
|
| 201 |
+
Kalanit Grill-Spector and Rafael Malach. The Human Visual Cortex. Annual Review of Neuroscience, 27(1):649–677, 2004.
|
| 202 |
+
|
| 203 |
+
Oliver Groth, Fabian B Fuchs, Ingmar Posner, and Andrea Vedaldi. ShapeStacks: Learning VisionBased Physical Intuition for Generalised Object Stacking. European Conference on Computer Vision, 2018.
|
| 204 |
+
|
| 205 |
+
David Ha and Jürgen Schmidhuber. World Models. Neural Information Processing Systems, 2018.
|
| 206 |
+
|
| 207 |
+
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. Neural Information Processing Systems, 2017.
|
| 208 |
+
|
| 209 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long Short-Term Memory. Neural Computation, 1997.
|
| 210 |
+
|
| 211 |
+
Jonathan Huang and Kevin Murphy. Efficient Inference in Occlusion-Aware Generative models of Images. arXiv preprint arXiv:1511.06362, 2015.
|
| 212 |
+
|
| 213 |
+
D. H. Hubel and T. N. Wiesel. Receptive Fields and Functional Architecture of Monkey Striate Cortex. The Journal of Physiology, 195(1):215–243, 1968.
|
| 214 |
+
|
| 215 |
+
Sergey Ioffe and Christian Szegedy. Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. International Conference on Machine Learning, 2015.
|
| 216 |
+
|
| 217 |
+
Michael I Jordan, Zoubin Ghahramani, Tommi S Jaakkola, and Lawrence K Saul. An Introduction to Variational Methods for Graphical Models. Machine Learning, 37(2):183–233, 1999.
|
| 218 |
+
|
| 219 |
+
Diederik P Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. International Conference on Learning Representations, 2015.
|
| 220 |
+
|
| 221 |
+
Diederik P Kingma and Max Welling. Auto-Encoding Variational Bayes. International Conference on Learning Representations, 2014.
|
| 222 |
+
|
| 223 |
+
Adam Kosiorek, Hyunjik Kim, Yee Whye Teh, and Ingmar Posner. Sequential Attend, Infer, Repeat: Generative Modelling of Moving Objects. Neural Information Processing Systems, 2018.
|
| 224 |
+
|
| 225 |
+
Adam R Kosiorek, Sara Sabour, Yee Whye Teh, and Geoffrey E Hinton. Stacked Capsule Autoencoders. arXiv preprint arXiv:1906.06818, 2019.
|
| 226 |
+
|
| 227 |
+
Loic Matthey, Irina Higgins, Demis Hassabis, and Alexander Lerchner. dSprites: Disentanglement Testing Sprites Dataset. https://github.com/deepmind/dsprites-dataset/, 2017.
|
| 228 |
+
|
| 229 |
+
Bruno A. Olshausen and David J. Field. Emergence of Simple-Cell Receptive Field Properties by Learning a Sparse Code for Natural Images. Nature, 381:607–609, 1996.
|
| 230 |
+
|
| 231 |
+
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image Transformer. International Conference on Machine Learning, 2018.
|
| 232 |
+
|
| 233 |
+
Rajesh P. N. Rao and Dana H. Ballard. Predictive Coding in the Visual Cortex: A Functional Interpretation of Some Extra-Classical Receptive-Field Effects. Nature Neuroscience, 2(1):79– 87, 1999.
|
| 234 |
+
|
| 235 |
+
Danilo Jimenez Rezende and Fabio Viola. Taming VAEs. arXiv preprint arXiv:1810.00597, 2018.
|
| 236 |
+
|
| 237 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. International Conference on Machine Learning, 2014.
|
| 238 |
+
|
| 239 |
+
Lukasz Romaszko, Christopher KI Williams, Pol Moreno, and Pushmeet Kohli. Vision-as-InverseGraphics: Obtaining a Rich 3D Explanation of a Scene from a Single Image. In IEEE International Conference on Computer Vision, 2017.
|
| 240 |
+
|
| 241 |
+
Adam Santoro, David Raposo, David G. T. Barrett, Mateusz Malinowski, Razvan Pascanu, Peter W. Battaglia, and Timothy P. Lillicrap. A Simple Neural Network Module for Relational Reasoning. Neural Information Processing Systems, 2017.
|
| 242 |
+
|
| 243 |
+
Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-V4, Inception-Resnet and the Impact of Residual Connections on Learning. AAAI Conference on Artificial Intelligence, 2017.
|
| 244 |
+
|
| 245 |
+
Naftali Tishby, Fernando C Pereira, and William Bialek. The Information Bottleneck Method. arXiv preprint arXiv:physics/0004057, 2000.
|
| 246 |
+
|
| 247 |
+
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, 2018a.
|
| 248 |
+
|
| 249 |
+
Sjoerd van Steenkiste, Karol Kurach, and Sylvain Gelly. A Case for Object Compositionality in Deep Generative Models of Images. NeurIPS Workshop on Modeling the Physical World: Learning, Perception, and Control, 2018b.
|
| 250 |
+
|
| 251 |
+
Sjoerd van Steenkiste, Francesco Locatello, Jurgen Schmidhuber, and Olivier Bachem. Are Disentangled Representations Helpful for Abstract Visual Reasoning? arXiv preprint arXiv:1905.12506, 2019.
|
| 252 |
+
|
| 253 |
+
Brian A. Wandell. Foundations of Vision. Sinauer Associates, 1995.
|
| 254 |
+
|
| 255 |
+
Nicholas Watters, Loic Matthey, Matko Bosnjak, Christopher P Burgess, and Alexander Lerchner. COBRA: Data-Efficient Model-Based RL through Unsupervised Object Discovery and CuriosityDriven Exploration. arXiv preprint arXiv:1905.09275, 2019a.
|
| 256 |
+
|
| 257 |
+
Nicholas Watters, Loic Matthey, Christopher P Burgess, and Alexander Lerchner. Spatial Broadcast Decoder: A Simple Architecture for Learning Disentangled Representations in VAEs. arXiv preprint arXiv:1901.07017, 2019b.
|
| 258 |
+
|
| 259 |
+
Jiajun Wu, Erika Lu, Pushmeet Kohli, Bill Freeman, and Josh Tenenbaum. Learning to See Physics via Visual De-Animation. Neural Information Processing Systems, 2017a.
|
| 260 |
+
|
| 261 |
+
Jiajun Wu, Joshua B Tenenbaum, and Pushmeet Kohli. Neural Scene De-rendering. IEEE Conference on Computer Vision and Pattern Recognition, pp. 699–707, 2017b.
|
| 262 |
+
|
| 263 |
+
Kun Xu, Chongxuan Li, Jun Zhu, and Bo Zhang. Multi-Objects Generation with Amortized Structural Regularization. Neural Information Processing Systems, 2018.
|
| 264 |
+
|
| 265 |
+
Zhenjia Xu, Zhijian Liu, Chen Sun, Kevin Murphy, William T Freeman, Joshua B Tenenbaum, and Jiajun Wu. Unsupervised Discovery of Parts, Structure, and Dynamics. arXiv preprint arXiv:1903.05136, 2019.
|
| 266 |
+
|
| 267 |
+
# A DATASETS
|
| 268 |
+
|
| 269 |
+
Multi-dSprites (Burgess et al., 2019) Images contain between one and four randomly selected “sprites” from Matthey et al. (2017), available at https://github.com/deepmind/ dsprites-dataset. For each object and the background, we randomly select one of five different, equally spread values for each of the three colour channels and generate 70,000 images. We set aside 10,000 for validation and testing each. The script for generating this data will be released with the rest of our code.
|
| 270 |
+
|
| 271 |
+
GQN (Eslami et al., 2018) The “rooms-ring-camera” dataset includes simulated 3D scenes of a square room with different floor and wall textures, containing one to three objects of various shapes and sizes. It can be downloaded from https://github.com/deepmind/gqn-datasets.
|
| 272 |
+
|
| 273 |
+
ShapeStacks (Groth et al., 2018) Images show simulated block towers of different heights (two to six blocks). Individual blocks can have different shapes, sizes, and colours. Scenes have annotations for: stability of the tower (binary), number of blocks (two to six), properties of individual blocks, locations in the tower of centre-of-mass violations and planar surface violations, wall and floor textures (five each), light presets (five), and camera view points (sixteen). More details about the dataset and download links can be found at https://shapestacks.robots.ox.ac.uk/.
|
| 274 |
+
|
| 275 |
+
# B IMPLEMENTATION DETAILS
|
| 276 |
+
|
| 277 |
+
# B.1 GENESIS ARCHITECTURE
|
| 278 |
+
|
| 279 |
+
We use the architecture from Berg et al. (2018) to encode and decode $\mathbf { z } _ { k } ^ { m }$ with the only modification of applying batch normalisation (Ioffe & Szegedy, 2015) before the GLU non-linearities (Dauphin et al., 2017). The convolutional layers in the encoder and decoder have five layers with size-5 kernels, strides of [1, 2, 1, 2, 1], and filter sizes of [32, 32, 64, 64, 64] and [64, 32, 32, 32, 32], respectively. Fully-connected layers are used at the lowest resolution.
|
| 280 |
+
|
| 281 |
+
The encoded image is passed to a long short-term memory (LSTM) cell (Hochreiter & Schmidhuber, 1997) followed by a linear layer to compute the mask latents $\mathbf { z } _ { k } ^ { m }$ of size 64. The LSTM state size is twice the latent size. Importantly, unlike the analogous counterpart in MONet, the decoding of $\mathbf { z } _ { k } ^ { m }$ is performed in parallel. The autoregressive prior $\overline { { p } } _ { \theta } \left( \mathbf { z } _ { k } ^ { m } \mid \mathbf { z } _ { 1 : k - 1 } ^ { m } \right)$ is implemented as an LSTM with 256 units. The conditional distribution $p _ { \theta } ( \mathbf { z } _ { k } ^ { c } \mid \mathbf { z } _ { k } ^ { m } )$ is parameterised by a multilayer perceptron (MLP) with two hidden layers, 256 units per layer, and ELUs (Clevert et al., 2016). We use the same component VAE featuring a spatial broadcast decoder as MONet to encode and decode $z _ { k } ^ { c }$ , but we replace RELUs (Glorot et al., 2011) with ELUs.
|
| 282 |
+
|
| 283 |
+
For GENESIS-S, as illustrated in Figure 5, the encoder of $\mathbf { z } _ { k }$ is the same as for $\mathbf { z } _ { k } ^ { m }$ above and the decoder from Berg et al. (2018) is again used to compute the mixing probabilities. However, GENESIS-S also has a second decoder with spatial broadcasting to obtain the scene components $\mathbf { x } _ { k }$ from $\mathbf { z } _ { k }$ . We found the use of two different decoders to be important for GENESIS-S in order for the model to decompose the input.
|
| 284 |
+
|
| 285 |
+

|
| 286 |
+
Figure 5: GENESIS-S overview. Given an image x, an encoder and an RNN compute latent variables $\mathbf { z } _ { k }$ . These are decoded to directly obtain the mixing probabilities $\pi _ { k }$ and the scene components $\mathbf { x } _ { k }$ .
|
| 287 |
+
|
| 288 |
+
# B.2 MONET BASELINES
|
| 289 |
+
|
| 290 |
+
We followed the provided architectural details described in Burgess et al. (2019). Regarding unspecified details, we employ an attention network with [32, 32, 64, 64, 64] filters in the encoder and the reverse in the decoder. Furthermore, we normalise the mask prior with a softmax function to compute the KL-divergence between mask posterior and prior distributions.
|
| 291 |
+
|
| 292 |
+
# B.3 VAE BASELINES
|
| 293 |
+
|
| 294 |
+
Both the BD-VAE and the DC-VAE have a latent dimensionality of 64 and the same encoder as in Berg et al. (2018). The DC-VAE also uses the decoder from Berg et al. (2018). The BD-VAE has the same spatial broadcast decoder with ELUs as GENESIS, but with twice the number of filters to enable a better comparison.
|
| 295 |
+
|
| 296 |
+
# B.4 OPTIMISATION
|
| 297 |
+
|
| 298 |
+
The scalar standard deviation of the Gaussian image likelihood components is set to $\sigma _ { x } = 0 . 7$ . We use GECO (Rezende & Viola, 2018) to balance the reconstruction and KL divergence terms in the loss function. The goal for the reconstruction error is set to 0.5655, multiplied by the image dimensions and number of colour channels. We deliberately choose a comparatively weak reconstruction constraint for the GECO objective to emphasise KL minimisation and sample quality. For the remainining GECO hyperparameters, the default value of $\alpha = 0 . 9 9$ is used and the step size for updating $\beta$ is set to $1 0 ^ { - 5 }$ . We increase the step size to $1 0 ^ { - 4 }$ when the reconstruction constraint is satisfied to accelerate optimisation as $\beta$ tended to undershoot at the beginning of training.
|
| 299 |
+
|
| 300 |
+
All models are trained for $5 * 1 0 ^ { 5 }$ iterations with a batch size of 32 using the ADAM optimiser (Kingma & Ba, 2015) and a learning rate of $1 0 ^ { - 4 }$ . With these settings, training GENESIS takes about two days on a single GPU. However, we expect performance to improve with further training. This particularly extends to training GENESIS on ShapeStacks where $5 * 1 0 ^ { 5 }$ training iterations are not enough to achieve good sample quality.
|
| 301 |
+
|
| 302 |
+
# B.5 SHAPESTACKS CLASSIFIERS
|
| 303 |
+
|
| 304 |
+
Multilayer perceptrons (MLPs) with one hidden layer, 512 units, and ELU activations are used for classification. The classifiers are trained for 100 epochs on 50,000 labelled examples with a batch size of 128 using a cross-entropy loss, the ADAM optimiser, and a learning rate of $1 0 ^ { - 4 }$ . As inputs to the classifiers, we concatenate $\mathbf { z } _ { k } ^ { m }$ and $\mathbf { z } _ { k } ^ { c }$ for GENESIS, $\mathbf { z } _ { k }$ for GENESIS-S, and the component VAE latents for the two MONet variants.
|
| 305 |
+
|
| 306 |
+
# C SEGMENTATION COVERING
|
| 307 |
+
|
| 308 |
+
Following Arbelaez et al. (2010), the segmentation covering (SC) is based on the intersection over union (IOU) between pairs of segmentation masks from two sets $S$ and $S ^ { \prime }$ . In this work, we consider $S$ to be the segmentation masks of the ground truth foreground objects and $S ^ { \prime }$ to be the predicted segmentation masks. The covering of $S$ by $S ^ { \prime }$ is defined as:
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
C ( S ^ { \prime } S ) = \frac { 1 } { \sum _ { R \in S } | R | } \sum _ { R \in S } | R | \operatorname* { m a x } _ { R ^ { \prime } \in S ^ { \prime } } \operatorname { I O U } ( R , R ^ { \prime } ) ,
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
where $| R |$ denotes the number of pixels belonging to mask $R$ . Note that this formulation is slightly more general than the one in Arbelaez et al. (2010) which assumes that masks in $S$ are nonoverlapping and cover the entire image. The above takes a weighted mean over IOU values, proportional to the number of pixels of the masks being covered. To give equal importance to masks of different sizes, we also consider taking an unweighted mean (mSC):
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
C _ { m } ( S ^ { \prime } S ) = \frac { 1 } { | S | } \sum _ { R \in S } \operatorname* { m a x } _ { R ^ { \prime } \in S ^ { \prime } } \operatorname { I O U } ( R , R ^ { \prime } ) ,
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
where $| S |$ denotes the number of non-empty masks in $S$ . Importantly and unlike the ARI, both segmentation covering variations penalise the over-segmentation of ground truth objects as this decreases the IOU for a pair of masks. This is illustrated in Figure 13, Appendix E.
|
| 321 |
+
|
| 322 |
+
# D COMPONENT-WISE SCENE GENERATION - GQN
|
| 323 |
+
|
| 324 |
+

|
| 325 |
+
Figure 6: Randomly selected scenes generated by GENESIS and MONet after training on the GQN dataset. Images sampled from GENESIS contain clearly distinguishable foreground objects and backgrounds. Samples from MONet, however, are mostly incoherent.
|
| 326 |
+
|
| 327 |
+

|
| 328 |
+
Figure 7: Randomly selected scenes generated by the BD-VAE and the DC-VAE after training on the GQN dataset; shown for comparison. The DC-VAE generates decent scene backgrounds but foreground objects are blurry.
|
| 329 |
+
|
| 330 |
+

|
| 331 |
+
Figure 8: Component-by-component scene generation with GENESIS-S after training on the GQN dataset. While GENESIS-S nominally achieves the best FID in Table 2, this appears to be due to the generation of high fidelity background patterns rather than appropriate foreground objects. Furthermore, unlike the components generated by GENESIS at every step in Figure 3, the components generated by GENESIS-S are not very interpretable.
|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
Figure 9: Randomly selected scenes generated by GENESIS-S after training on the GQN dataset.
|
| 335 |
+
|
| 336 |
+
# E INFERENCE OF SCENE COMPONENTS
|
| 337 |
+
|
| 338 |
+

|
| 339 |
+
Figure 10: Step-by-step decomposition of a scene from GQN with GENESIS and MONet. Two objects with the same shape and colour are successfully identified by both models. While colour and texture are useful cues for decomposition, this example shows that both models perform something more useful than merely identifying regions of similar colour.
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
Figure 11: Step-by-step decomposition of the same scenes as in Figure 4 and Figure 10 with GENESIS-S. While the foreground objects are distinguished from the background, they are explained together in the first step. Subsequent steps reconstruct the background in a haphazard fashion.
|
| 343 |
+
|
| 344 |
+

|
| 345 |
+
Figure 12: A ShapeStacks tower is decomposed by GENESIS and MONet. Compared to the GQN dataset, both methods struggle to segment the foreground objects properly. GENESIS captures the purple shape and parts of the background wall in step $k = 4$ . MONet explains the green shape, the cyan shape, and parts of floor in step $k \ = \ 9$ . This is reflected in the foreground ARI and segmentation covering for GENESIS (ARI: 0.82, SC: 0.68, mSC: 0.58) and MONet (ARI: 0.39, SC: 0.26, mSC: 0.35); the latter being lower as the green and cyan shapes are not separated.
|
| 346 |
+
|
| 347 |
+

|
| 348 |
+
Figure 13: In this example, GENESIS (ARI: 0.83, SC: 0.83, mSC: 0.83) segments the four foreground objects properly. MONet (ARI: 0.89, SC: 0.47, mSC: 0.50), however, merges foreground objects and background again in steps $k = 2$ and $k = 9$ . Despite the inferior decomposition, the ARI for MONet is higher than for GENESIS. This is possible as the ARI does not penalise the over-segmentation of the foreground objects, highlighting its limitations for evaluating unsupervised instance segmentation. The segmentation covering, however, reflects the quality of the segmentatioin masks properly.
|
md/train/BkxfshNYwB/BkxfshNYwB.md
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MINCUT POOLING IN GRAPH NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The advance of node pooling operations in Graph Neural Networks (GNNs) has lagged behind the feverish design of new message-passing techniques, and pooling remains an important and challenging endeavor for the design of deep architectures. In this paper, we propose a pooling operation for GNNs that leverages a differentiable unsupervised loss based on the minCUT optimization objective. For each node, our method learns a soft cluster assignment vector that depends on the node features, the target inference task (e.g., a graph classification loss), and, thanks to the minCUT objective, also on the connectivity structure of the graph. Graph pooling is obtained by applying the matrix of assignment vectors to the adjacency matrix and the node features. The proposed method can also be used as a stand-alone module to cluster vertexes in annotated graphs and solve unsupervised problems. We validate the effectiveness of the proposed pooling method on downstream tasks, including supervised graph classification and a set of unsupervised tasks, which reveal the limitations of existing GNN pooling approaches.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
A fundamental component in deep convolutional neural networks is the pooling operation, which replaces the output of convolutions with local summaries of nearby points and is usually implemented by maximum or average operations (Lee et al., 2016). State-of-the-art architectures alternate convolutions, which extrapolate local patterns irrespective of the specific location on the input signal, and pooling, which lets the ensuing convolutions capture aggregated patterns. Pooling allows to learn abstract representations in deeper layers of the network by discarding information that is superfluous for the task, and keeps model complexity under control by limiting the growth of intermediate features.
|
| 12 |
+
|
| 13 |
+
Graph Neural Networks (GNNs) extend the convolution operation from regular domains, such as images or time series, to data with arbitrary topologies and unordered structures described by graphs (Battaglia et al., 2018). The development of pooling strategies for GNNs, however, has lagged behind the design of newer and more effective message-passing (MP) operations (Gilmer et al., 2017), such as graph convolutions, mainly due to the difficulty of defining an aggregated version of the original graph that supports the pooled signal.
|
| 14 |
+
|
| 15 |
+
A na¨ıve pooling strategy in GNNs is to average all nodes features (Li et al., 2016), but it has limited flexibility since it does not extract local summaries of the graph structure, and no further MP operations can be applied afterwards. An alternative approach consists in pre-computing coarsened versions of the original graph and then fit the data to these deterministic structures (Bruna et al., 2013). While this aggregation accounts for the connectivity of the graph, it ignores task-specific objectives as well as the node features.
|
| 16 |
+
|
| 17 |
+
In this paper, we propose a differentiable pooling operation implemented as a neural network layer, which can be seamlessly combined with other MP layers (see Fig. 1). The parameters in the pooling layer are learned by combining the task-specific loss with an unsupervised regularization term, which optimizes a continuous relaxation of the normalized minCUT objective. The minCUT identifies dense graph components, where the nodes features become locally homogeneous after the message-passing. By gradually aggregating these components, the GNN learns to distil global properties from the graph. The proposed minCUT pooling operator (minCUTpool) yields partitions that 1) cluster together nodes which have similar features and are strongly connected on the graph, and 2) take into account the objective of the downstream task.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: A deep GNN architecture where message-passing is followed by minCUT pooling.
|
| 21 |
+
|
| 22 |
+
# 2 BACKGROUND
|
| 23 |
+
|
| 24 |
+
# 2.1 MINCUT AND SPECTRAL CLUSTERING
|
| 25 |
+
|
| 26 |
+
Given a graph $G = \{ \nu , \mathcal { E } \}$ , $| \nu | = N$ , and the associated adjacency matrix $\mathbf { A } \in \mathbb { R } ^ { N \times N }$ , the $K$ -way normalized minCUT (simply referred to as minCUT) aims at partitioning $\nu$ in $K$ disjoint subsets by removing the minimum volume of edges. The problem is equivalent to maximizing
|
| 27 |
+
|
| 28 |
+
$$
|
| 29 |
+
\frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { \operatorname* { l i n k s } ( \mathcal { V } _ { k } ) } { \deg \mathrm { r e e } ( \mathcal { V } _ { k } ) } = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { \sum _ { i , j \in \mathcal { V } _ { k } } \mathcal { E } _ { i , j } } { \sum _ { i \in \mathcal { V } _ { k } , j \in \mathcal { V } \backslash \mathcal { V } _ { k } } \mathcal { E } _ { i , j } } ,
|
| 30 |
+
$$
|
| 31 |
+
|
| 32 |
+
where the numerator counts the edge volume within each cluster, and the denominator counts the edges between the nodes in a cluster and the rest of the graph (Shi & Malik, 2000). Let $\mathbf { C } \in \mathbb { R } ^ { N \times K }$ be a cluster assignment matrix, so that $\mathbf { C } _ { i , j } = 1$ if node $i$ belongs to cluster $j$ , and 0 otherwise. The minCUT problem can be expressed as
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\mathrm { m a x i m i z e } \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \frac { { \bf C } _ { k } ^ { T } { \bf A } { \bf C } _ { k } } { { \bf C } _ { k } ^ { T } { \bf D } { \bf C } _ { k } } , \mathrm { s . t . } { \bf C } \in \{ 0 , 1 \} ^ { N \times K } , { \bf C } { \bf 1 } _ { K } = { \bf 1 } _ { N } ,
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where $\mathbf { D } = \mathrm { d i a g } ( \mathbf { A } \mathbf { 1 } _ { N } )$ is the degree matrix (Dhillon et al., 2004). Since problem (2) is NP-hard, it is usually recast in a relaxed formulation that can be solved in polynomial time and guarantees a near-optimal solution (Yu & Shi, 2003):
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\arg \operatorname* { m a x } _ { \mathbf { Q } \in \mathbb { R } ^ { N \times K } } \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbf { Q } _ { k } ^ { T } \mathbf { A } \mathbf { Q } _ { k } , \quad \mathrm { s . t . } \mathbf { Q } = \mathbf { C } ( \mathbf { C } ^ { T } \mathbf { D } \mathbf { C } ) ^ { - \frac { 1 } { 2 } } , \ \mathbf { Q } ^ { T } \mathbf { Q } = \mathbf { I } _ { K } .
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
While the optimization problem (3) is still non-convex, there exists an optimal solution $\mathbf { Q } ^ { * } = \mathbf { U } _ { K } \mathbf { O }$ , where ${ \bf U } _ { K } \dot { } \in \mathbb { R } ^ { N \times K }$ contains the eigenvectors of A corresponding to the $K$ largest eigenvalues, and $\mathbf { O } \in \mathbb { R } ^ { K \times K }$ is an orthogonal transformation (Ikebe et al., 1987).
|
| 45 |
+
|
| 46 |
+
Since the elements of $\mathbf { Q } ^ { * }$ are real values rather than binary cluster indicators, the spectral clustering (SC) approach can be used to find discrete cluster assignments. In SC, the rows of $\mathbf { Q } ^ { * }$ are treated as node representations embedded in the eigenspace of the Laplacian, and are clustered together with standard algorithms such as $k$ -means (Von Luxburg, 2007). One of the main limitations of SC lies in the computation of the spectrum of A, which has a memory complexity of $\mathcal { O } ( N ^ { 2 } )$ and a computational complexity of $\mathcal { O } ( \bar { N } ^ { 3 } )$ . This prevents its applicability to large datasets.
|
| 47 |
+
|
| 48 |
+
To deal with such scalability issues, the constrained optimization in (3) can be solved by gradient descent algorithms that refine the solution by iterating operations whose individual complexity is $\mathcal { O } ( N ^ { 2 } )$ , or even $\mathcal { O } ( N )$ (Han & Filippone, 2017). Those algorithms search the solution on the manifold induced by the orthogonality constraint on the columns of $\mathbf { Q }$ , by performing gradient updates along the geodesics (Wen & Yin, 2013; Collins et al., 2014). Alternative approaches rely on the QR factorization to constrain the space of feasible solutions (Damle et al., 2016), and alleviate the cost $\mathcal { O } ( N ^ { 3 } )$ of the factorization by ensuring that orthogonality holds only on one minibatch at a time (Shaham et al., 2018).
|
| 49 |
+
|
| 50 |
+
Other works based on neural networks include an autoencoder trained to map the $i$ th row of the Laplacian to the ith components of the first $K$ eigenvectors, to avoid the spectral decomposition (Tian et al., 2014). Yi et al. (2017) use a soft orthogonality constraint to learn spectral embeddings as a volumetric reparametrization of a precomputed Laplacian eigenbase. Shaham et al. (2018); Kampffmeyer et al. (2019) propose differentiable loss functions to partition generic data and process out-of-sample data at inference time. Nazi et al. (2019) generate balanced node partitions with a GNN, but adopt an optimization that does not encourage cluster assignments to be orthogonal.
|
| 51 |
+
|
| 52 |
+
# 2.2 GRAPH NEURAL NETWORKS
|
| 53 |
+
|
| 54 |
+
Many approaches have been proposed to process graphs with neural networks, including recurrent architectures (Scarselli et al., 2009; Li et al., 2016) or convolutional operations inspired by filters used in graph signal processing (Defferrard et al., 2016; Bianchi et al., 2019). Since our focus is on graph pooling, we base our GNN implementation on a simple MP operation, which combines the features of each node with its 1st-order neighbors. To account for the initial node features, it is possible to introduce self-loops by adding a (scaled) identity matrix to the diagonal of A (Kipf & Welling, 2017). Since our pooling will modify the structure of the adjacency matrix, we prefer a MP implementation that leaves the original A unaltered and accounts for the initial node features by means of skip connections.
|
| 55 |
+
|
| 56 |
+
Let $\tilde { \mathbf { A } } = \mathbf { D } ^ { - \frac { 1 } { 2 } } \mathbf { A } \mathbf { D } ^ { - \frac { 1 } { 2 } } \in \mathbb { R } ^ { N \times N }$ be the symmetrically normalized adjacency matrix and $\mathbf { X } \in \mathbb { R } ^ { N \times F }$ the matrix containing the node features. The output of the MP layer is
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathbf { X } ^ { ( t + 1 ) } = M P ( \mathbf { X } ^ { ( t ) } , \tilde { \mathbf { A } } ) = \operatorname { R e L U } ( \tilde { \mathbf { A } } \mathbf { X } ^ { ( t ) } \mathbf { W } _ { m } + \mathbf { X } ^ { ( t ) } \mathbf { W } _ { s } ) ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\boldsymbol { \Theta } _ { M P } = \{ \mathbf { W } _ { m } , \mathbf { W } _ { s } \}$ are the trainable weights relative to the mixing and skip component of the layer, respectively.
|
| 63 |
+
|
| 64 |
+
# 3 PROPOSED METHOD
|
| 65 |
+
|
| 66 |
+
The minCUT pooling strategy computes a cluster assignment matrix $\mathbf { S } \in \mathbb { R } ^ { N \times K }$ by means of a multi-layer perceptron, which maps each node feature $\mathbf { x } _ { i }$ into the ith row of S:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\begin{array} { r } { \mathbf { S } = s o f t m a x ( \mathbf { R e L U } ( \mathbf { X } \mathbf { W } _ { 1 } ) \mathbf { W } _ { 2 } ) , } \end{array}
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $\boldsymbol { \Theta } _ { P o o l } = \{ \mathbf { W } _ { 1 } \in \mathbb { R } ^ { F \times H } , \mathbf { W } _ { 2 } \in \mathbb { R } ^ { H \times K } \}$ are trainable parameters. The softmax function guarantees that $s _ { i , j } \in [ 0 , 1 ]$ and enforces the constraints $\mathbf { S 1 } _ { K } = \mathbf { 1 } _ { N }$ inherited from the optimization problem in (2). The parameters $\Theta _ { M P }$ and $\Theta _ { P o o l }$ are jointly optimized by minimizing the usual task-specific loss, as well as an unsupervised loss $\mathcal { L } _ { u }$ , which is composed of two terms
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\mathcal { L } _ { u } = \mathcal { L } _ { c } + \mathcal { L } _ { o } = \underbrace { - \frac { T r ( \mathbf { S } ^ { T } \tilde { \mathbf { A } } \mathbf { S } ) } { T r ( \mathbf { S } ^ { T } \tilde { \mathbf { D } } \mathbf { S } ) } } _ { \mathcal { L } _ { c } } + \underbrace { \left\| \frac { \mathbf { S } ^ { T } \mathbf { S } } { \| \mathbf { S } ^ { T } \mathbf { S } \| _ { F } } - \frac { \mathbf { I } _ { K } } { \sqrt { K } } \right\| _ { F } } _ { \mathcal { L } _ { o } } ,
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $\| \cdot \| _ { F }$ indicates the Frobenius norm.
|
| 79 |
+
|
| 80 |
+
The cut loss term, $\mathcal { L } _ { c }$ , evaluates the minCUT given by the cluster assignment S, and is bounded by $- 1 \leq \mathcal { L } _ { c } \leq 0$ . Minimizing $\mathcal { L } _ { c }$ encourages strongly connected nodes to be clustered together, since the inner product $\left. \mathbf { s } _ { i } , \mathbf { s } _ { j } \right.$ increases when $\tilde { a } _ { i , j }$ is large. $\mathcal { L } _ { c }$ has a single maximum, reached when the numerator $\begin{array} { r } { T r ( \mathbf { S } ^ { T } \tilde { \mathbf { A } } \mathbf { S } ) = \frac { 1 } { K } \sum _ { k = 1 } ^ { K } \mathbf { S } _ { k } ^ { T } \tilde { \mathbf { A } } \mathbf { S } _ { k } = 0 } \end{array}$ . This occurs if, for each pair of connected nodes (i.e., $\tilde { a } _ { i , j } > 0 \rangle$ ), the cluster assignments are orthogonal (i.e., $\langle \mathbf { s } _ { i } , \mathbf { s } _ { j } \rangle = 0 ,$ ). $\mathcal { L } _ { c }$ reaches its minimum, $- 1$ , when $T r ( \mathbf { S } ^ { T } \tilde { \mathbf { A } } \mathbf { S } ) = T r ( \mathbf { S } ^ { T } \tilde { \mathbf { D } } \mathbf { S } )$ . This occurs when in a graph with $K$ disconnected components the cluster assignments are equal for all the nodes in the same component and orthogonal to the cluster assignments of nodes in different components. However, $\mathcal { L } _ { c }$ is a non-convex function and its minimization can lead to local minima or degenerate solutions. For example, given a connected graph, a trivial optimal solution is the one that assigns all nodes to the same cluster. As a consequence of the continuous relaxation, another degenerate minimum occurs when the cluster assignments are all uniform, that is, all nodes are equally assigned to all clusters. This problem is exacerbated by prior message-passing operations, which make the node features more uniform.
|
| 81 |
+
|
| 82 |
+
The orthogonality loss term, $\mathcal { L } _ { o }$ , penalizes the degenerate minima of $\mathcal { L } _ { c }$ by encouraging the cluster assignments to be orthogonal and the clusters to be of similar size. Since the two matrices in $\mathcal { L } _ { o }$ have unitary norm it is easy to see that $0 \leq \mathcal { L } _ { o } \leq 2$ . Therefore, $\mathcal { L } _ { o }$ does not dominate over $\mathcal { L } _ { c }$ and the two terms can be safely summed directly (see Fig. 4 for an example). ${ \mathbf { I } } _ { K }$ can be interpreted as a (rescaled) clustering matrix $\mathbf { I } _ { K } = \hat { \mathbf { S } } ^ { T } \hat { \mathbf { S } }$ , where $\hat { \bf S }$ assigns exactly $N / K$ points to each cluster. The value of the Frobenius norm between clustering matrices is not dominated by the performance on the largest clusters (Law et al., 2017) and, thus, can be used to optimize intra-cluster variance.
|
| 83 |
+
|
| 84 |
+
Contrarily to SC methods that search for feasible solutions only within the space of orthogonal matrices, $\mathcal { L } _ { o }$ only introduces a soft constraint that could be violated during the learning procedure. Since $\mathcal { L } _ { c }$ is non-convex, the violation compromises the theoretical guarantee of convergence to the optimum of (3). However, we note that:
|
| 85 |
+
|
| 86 |
+
1. the cluster assignments S are well initialized: after the MP operation, the features of the connected vertices become similar and, since the MLP is a smooth function (Nelles, 2013), it yields similar cluster assignments for those vertices;
|
| 87 |
+
2. in the GNN architecture, the minCUT objective is a regularization term and, therefore, a solution which is sub-optimal for (3) could instead be adequate for the specific objective of the downstream task;
|
| 88 |
+
3. optimizing the task-specific loss helps the GNN to avoid the degenerate minima of $\mathcal { L } _ { c }$ .
|
| 89 |
+
|
| 90 |
+
# 3.1 COARSENING
|
| 91 |
+
|
| 92 |
+
The coarsened version of the adjacency matrix and the graph signal are computed as
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
{ \bf A } ^ { p o o l } = { \bf S } ^ { T } { \tilde { \bf A } } { \bf S } ; ~ { \bf X } ^ { p o o l } = { \bf S } ^ { T } { \bf X } ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where the entry xpooi,j in $\mathbf { X } ^ { p o o l } ~ \in ~ \mathbb { R } ^ { K \times F }$ is the weighted average value of feature $j$ among the elements in cluster $i$ . $\mathbf { A } ^ { p o o l } ~ \in ~ \mathbb { R } ^ { K \times K }$ is a symmetric matrix, whose entries $a _ { i , i } ^ { p o o l }$ are the total number of edges between the nodes in the cluster i, while apooi,j is the number of edges between cluster $i$ and $j$ . Since $\mathbf { A } ^ { p o o l }$ corresponds to the numerator of $\mathcal { L } _ { c }$ in (7), the trace maximization yields clusters with many internal connections and weakly connected to each other. Hence, $\mathbf { A } ^ { p o o l }$ will be a diagonal-dominant matrix, which describes a graph with self-loops much stronger than any other connection. Because self-loops hamper the propagation across adjacent nodes in the MP operations following the pooling layer, we compute the new adjacency matrix $\tilde { \mathbf { A } } ^ { p o o l }$ by zeroing the diagonal and by applying the degree normalization
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\hat { \bf A } = { \bf A } ^ { p o o l } - { \bf I } _ { K } d i a g ( { \bf A } ^ { p o o l } ) ; \quad \tilde { \bf A } ^ { p o o l } = \hat { \bf D } ^ { - \frac { 1 } { 2 } } \hat { \bf A } \hat { \bf D } ^ { - \frac { 1 } { 2 } } .
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $d i a g ( \cdot )$ returns the matrix diagonal.
|
| 105 |
+
|
| 106 |
+
# 3.2 DISCUSSION AND RELATIONSHIP WITH SPECTRAL CLUSTERING
|
| 107 |
+
|
| 108 |
+
The proposed method is straightforward to implement: the cluster assignments, the loss, graph coarsening, and feature pooling are all computed with standard linear algebra operations.
|
| 109 |
+
|
| 110 |
+
There are several differences between minCUTpool and classic SC methods. SC partitions the graph based on the Laplacian, but does not account for the node features. Instead, the cluster assignments $\mathbf { s } _ { i }$ found by minCUTpool depend on $\mathbf { x } _ { i }$ , which works well if connected nodes have similar features. This is a reasonable assumption in GNNs since, even in disassortative graphs (i.e., networks where dissimilar nodes are likely to be connected (Newman, 2003)), the features tend to become similar due to the MP operations.
|
| 111 |
+
|
| 112 |
+
Another difference is that SC handles a single graph and is not conceived for tasks with multiple graphs to be partitioned independently. Instead, thanks to the independence of the model parameters from the number of nodes $N$ and from the graph spectrum, minCUTpool can generalize to outof-sample data. This feature is fundamental in problems such as graph classification, where each sample is a graph with a different structure, and allows to train the model on small graphs and process larger ones at inference time. Finally, minCUTpool directly uses the soft cluster assignments rather than performing $k$ -means afterwards.
|
| 113 |
+
|
| 114 |
+
# 4 RELATED WORK ON POOLING IN GNNS
|
| 115 |
+
|
| 116 |
+
Trainable pooling methods. Similarly to our method, these approaches learn how to generate coarsened version of the graph through differentiable functions, which take as input the nodes features $\mathbf { X }$ and are parametrized by weights optimized on the task at hand.
|
| 117 |
+
|
| 118 |
+
Diffpool (Ying et al., 2018) is a pooling module that includes two parallel MP layers: one to compute the new node features $\mathbf { X } ^ { ( t + 1 ) }$ and another to generate the cluster assignments S. Diffpool implements an unsupervised loss that consists of two terms. First, the link prediction term $\| \mathbf { A } - \mathbf { S } \mathbf { \dot { S } } ^ { T } \| _ { F }$ minimizes the Frobenius norm of the difference between the adjacency and the Gram matrix of the cluster assignments, encouraging nearby nodes to be clustered together. The second term $\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } H ( \mathbf { S } _ { i } ) } \end{array}$ minimizes the entropy of the cluster assignments to make them alike to one-hot vectors. Like minCUTpool, Diffpool clusters the vertices of annotated graphs, but yields completely different partitions, since it computes differently the clustering assignments, the coarsened adjacency matrix and, most importantly, the unsupervised loss. In Diffpool, such a loss shows pathological behaviors that are discussed later in the experiments.
|
| 119 |
+
|
| 120 |
+
The approach dubbed Top- $K$ pooling (Hongyang Gao, 2019; Lee et al., 2019), learns a projection vector that is applied to each node feature to obtain a score. The nodes with the $K$ highest scores are retained, the others are dropped. Since the top- $K$ selection is not differentiable, the scores are also used as a gate/attention for the node features, letting the projection vector to be trained with backpropagation. Top- $K$ is memory efficient as it avoids generating cluster assignments. To prevent A from becoming disconnected after nodes removal, Top- $K$ drops the rows and the columns from ${ \bf A } ^ { 2 }$ and uses it as the new adjacency matrix. However, computing ${ \bf A } ^ { 2 }$ costs $\mathcal { O } ( N ^ { 2 } )$ and it is inefficient to implement with sparse operations.
|
| 121 |
+
|
| 122 |
+
Topological pooling methods. These methods pre-compute a pyramid of coarsened graphs, only taking into account the topology (A), but not the node features $\mathbf { \Pi } ( \mathbf { X } )$ . During training, the node features are pooled with standard procedures and are fit into these deterministic graph structures. These methods are less flexible, but provide a stronger bias that can prevent degenerate solutions (e.g., coarsened graphs collapsing in a single node).
|
| 123 |
+
|
| 124 |
+
The approach proposed by Bruna et al. (2013), which has been adopted also in other GNN architectures (Defferrard et al., 2016; Fey et al., 2018), exploits GRACLUS (Dhillon et al., 2004), a hierarchical algorithm based on SC. At each pooling level $l$ , GRACLUS indetifies the pairs of maximally similar nodes $i _ { l }$ and $j _ { l }$ to be clustered together into a new vertex $k _ { ( l + 1 ) }$ . At inference phase, max-pooling is used to determine which node in the pair is kept. Fake vertices are added so that the number of nodes can be halved each time, but this injects noisy information in the graph.
|
| 125 |
+
|
| 126 |
+
Node decimation is a method originally proposed in graph signal processing literature (Shuman et al., 2016), which as been adapted also for GNNs (Simonovsky & Komodakis, 2017). The nodes are partitioned in two sets, according to the signs of the Laplacian eigenvector associated to the largest eigenvalue. One of the two sets is dropped, reducing the number of nodes each time approximately by half. Kron reduction is used to compute a pyramid of coarsened Laplacians from the remaining nodes.
|
| 127 |
+
|
| 128 |
+
A procedure proposed in Gama et al. (2018) diffuses a signal from designated nodes on the graph and stores the observed sequence of diffused components. The resulting stream of information is interpreted as a time signal, where standard CNN pooling is applied. We also mention a pooling operation for coarsening binary unweighted graphs by aggregating maximal cliques (Luzhnica et al., 2019). Nodes assigned to the same clique are summarized by max or average pooling and become a new node in the coarsened graph.
|
| 129 |
+
|
| 130 |
+
# 5 EXPERIMENTS
|
| 131 |
+
|
| 132 |
+
We consider both supervised and unsupervised tasks, and compare minCUTpool with other GNN pooling strategies. The Appendix provides further details on the experiments and a schematic depiction of the architectures used in each task. In addition, the Appendix reports two additional experiments: i) graph reconstruction by means of an Auto Encoder with bottleneck, implemented with pooling and un-pooling layers, ii) an architecture with pooling for graph regression.
|
| 133 |
+
|
| 134 |
+
# 5.1 CLUSTERING THE GRAPH NODES
|
| 135 |
+
|
| 136 |
+
To study the effectiveness of the proposed loss, we perform different node clustering tasks with a simple GNN composed of a single MP layer followed by a pooling layer. The GNN is trained by minimizing $\mathcal { L } _ { u }$ only, so that its effect is evaluated without the “interference” of a supervised loss.
|
| 137 |
+
|
| 138 |
+
Clustering on synthetic networks We consider two simple graphs: the first is a network with 6 communities and the second is a regular grid. The adjacency matrix A is binary and the features X are the 2-D node coordinates. Fig. 2 depicts the node partitions generated by SC (a, d), Diffpool (b, e), and minCUTpool (c, f). Cluster indexes for Diffpool and minCUTpool are obtained by taking the argmax of S row-wise. Compared to SC, Diffpool and minCUTpool leverage the information contained in X. minCUTpool generates very accurate and balanced partitions, demonstrating that the cluster assignment matrix S is well formed. On the other hand, Diffpool assigns some nodes to the wrong community in the first example, and produces an imbalanced partition of the grid.
|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
Figure 2: Node clustering on a community network $K { = } 6 )$ and on a grid graph $( K { = } 5 )$
|
| 142 |
+
|
| 143 |
+
Image segmentation Given an image, we build a Region Adjacency Graph (Tremeau & Colan- ´ toni, 2000) using as nodes the regions generated by an oversegmentation procedure (Felzenszwalb & Huttenlocher, 2004). The SC technique used in this example is the recursive normalized cut (Shi & Malik, 2000), which recursively clusters the nodes until convergence. For Diffpool and minCUTpool, we include node features consisting of the average and total color in each oversegmented region. We set the number of desired clusters to $K = 4$ . The results in Fig. 3 show that minCUTpool yields a more precise segmentation. On the other hand, SC and Diffpool aggregate wrong regions and, in addition, SC finds too many segments.
|
| 144 |
+
|
| 145 |
+
Clustering on citation networks We cluster the nodes of three popular citation networks: Cora, Citeseer, and Pubmed. The nodes are documents represented by sparse bag-of-words feature vectors stored in $\mathbf { X }$ and the binary undirected edges in $\mathbf { A }$ indicate citation links between documents. Each node $i$ is labeled with the document class $y _ { i }$ . Once the training is over, to test the quality of the partitions generated by each method we check the agreement between the cluster assignments and the true class labels. Tab. 1 reports the Completeness Score $\begin{array} { r } { \mathrm { C S } ( \tilde { \bf y } , { \bf y } ) = 1 - \frac { H ( \tilde { \bf y } | { \bf y } ) } { H ( \tilde { \bf y } ) } } \end{array}$ and Normalized Mutual Information $\begin{array} { r } { \mathbf { N M I } ( \tilde { \mathbf { y } } , \mathbf { y } ) = \frac { H ( \tilde { \mathbf { y } } ) - H ( \tilde { \mathbf { y } } | \mathbf { y } ) } { \sqrt { H ( \tilde { \mathbf { y } } ) - H ( \mathbf { y } ) } } } \end{array}$ where $H ( \cdot )$ is the entropy.
|
| 146 |
+
|
| 147 |
+
The GNN architecture configured with minCUTpool achieves a higher NMI score than SC, which does not account for the node features $\mathbf { X }$ when generating the partitions. Our pooling operation outperforms also Diffpool, since the minimization of the unsupervised loss in Diffpool yields degenerate solutions. The pathological behavior is shown in Fig. 4, which depicts the evolution of the NMI scores as the unsupervised losses in Diffpool and minCUTpool are minimized in training.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: Image segmentation by clustering the nodes of the Region Adjacency Graph.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: Unsupervised losses and NMI of Diffpool and minCUTpool on Cora.
|
| 154 |
+
|
| 155 |
+
Table 1: NMI and CS obtained by clustering the nodes on citation networks over 10 different runs. The number of clusters $K$ is equal to the number of node classes.
|
| 156 |
+
|
| 157 |
+
<table><tr><td>Dataset</td><td>K</td><td colspan="2">Spectral clustering</td><td colspan="2">Diffpool</td><td colspan="2">minCUTpool</td></tr><tr><td></td><td></td><td>NMI</td><td>cs</td><td>NMI</td><td>CS</td><td>NMI</td><td>CS</td></tr><tr><td>Cora</td><td>7</td><td>0.025 ± 0.014</td><td>0.126 ± 0.042</td><td>0.315 ± 0.005</td><td>0.309 ±0.005</td><td>0.404 ± 0.018</td><td>0.392 ± 0.018</td></tr><tr><td>Citeseer</td><td>6</td><td>0.014 ± 0.003</td><td>0.033 ±0.000</td><td>0.139 ± 0.016</td><td>0.153 ± 0.020</td><td>0.287 ±0.047</td><td>0.283 ± 0.046</td></tr><tr><td>Pubmed</td><td>3</td><td>0.182 ± 0.000</td><td>0.261 ± 0.000</td><td>0.079 ±0.001</td><td>0.085 ±0.001</td><td>0.200 ± 0.020</td><td>0.197 ± 0.019</td></tr></table>
|
| 158 |
+
|
| 159 |
+
# 5.2 SUPERVISED GRAPH CLASSIFICATION
|
| 160 |
+
|
| 161 |
+
In this task, the $i$ -th datum is a graph with $N _ { i }$ nodes represented by a pair $\{ \mathbf { A } _ { i } , \mathbf { X } _ { i } \}$ and must be associated to the correct label $\mathbf { y } _ { i }$ . We test the models on different graph classification datasets. For featureless graphs, we used the node degree information and the clustering coefficient as surrogate node features. We evaluate model performance with a 10-fold train/test split, using $1 0 \%$ of the training set in each fold as validation for early stopping. We adopt a fixed network architecture, MP(32)-poolMP(32)-pool-MP(32)-GlobalAvgPool-softmax, where MP is the message-passing operation in (4)
|
| 162 |
+
|
| 163 |
+
with 32 hidden units. The pooling module is implemented either by Graclus, Decimation pooling, Top- $K$ , SAGPool (Lee et al., 2019), Diffpool, or the proposed minCUTpool. Each pooling method is configured to drop half of the nodes in a graph $K = N / 2$ in Top- $K$ , Diffpool, and minCUTpool). As baselines, we consider the popular Weisfeiler-Lehman (WL) graph kernel (Shervashidze et al., 2011), a network with only MP layers (Flat), and a fully connected network (Dense).
|
| 164 |
+
|
| 165 |
+
Table 2: Graph classification accuracy. Significantly better results $( p < 0 . 0 5 )$ are in bold.
|
| 166 |
+
|
| 167 |
+
<table><tr><td>Dataset</td><td>WL</td><td>Dense</td><td>Flat</td><td>Graclus</td><td>Decim.</td><td>Diffpool</td><td>Top-K</td><td>SAGpool</td><td>minCUT</td></tr><tr><td>Bench-easy</td><td>92.6</td><td>29.3±0.3</td><td>98.5±0.3</td><td>97.5±0.5</td><td>97.9±0.5</td><td>98.6±0.4</td><td>82.4±8.9</td><td>84.2±2.3</td><td>99.0±0.0</td></tr><tr><td>Bench-hard</td><td>60.0</td><td>29.4±0.3</td><td>67.6±2.8</td><td>69.0±1.5</td><td>72.6±0.9</td><td>69.9±1.9</td><td>42.7±15.2</td><td>37.7±14.5</td><td>73.8±1.9</td></tr><tr><td>Mutagenicity</td><td>81.7±1.1</td><td>68.4±0.3</td><td>78.0±1.3</td><td>74.4±1.8</td><td>77.8±2.3</td><td>77.6±2.7</td><td>71.9±3.7</td><td>72.4±2.4</td><td>79.9±2.1</td></tr><tr><td>Proteins</td><td>71.2±2.6</td><td>68.7±3.3</td><td>72.6±4.8</td><td>68.6±4.6</td><td>73.3±3.7</td><td>72.7±3.8</td><td>69.6±3.5</td><td>70.5±2.6</td><td>76.5±2.6</td></tr><tr><td>DD</td><td>78.6±2.7</td><td>70.6±5.2</td><td>76.8±1.5</td><td>70.5±4.8</td><td>72.0±3.1</td><td>79.3±2.4</td><td>69.4±7.8</td><td>71.5±4.5</td><td>80.8±2.3</td></tr><tr><td>COLLAB</td><td>74.8±1.3</td><td>79.3±1.6</td><td>82.1±1.8</td><td>77.1±2.1</td><td>79.1±1.5</td><td>81.8±1.4</td><td>79.3±1.8</td><td>79.2±2.0</td><td>83.4±1.7</td></tr><tr><td>Reddit-Binary</td><td>68.2±1.7</td><td>48.5±2.6</td><td>80.3±2.6</td><td>79.2±0.4</td><td>84.3±2.4</td><td>86.8±2.1</td><td>74.7±4.5</td><td>73.9±5.1</td><td>91.4±1.5</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Tab. 2 reports the classification results, highlighting those that are significantly better ( $\dot { p }$ -value $< ~ 0 . 0 5$ w.r.t. the method with the highest mean accuracy). The comparison with Flat helps to understand if a pooling operation is useful or not. The results of Dense, instead, help to quantify how much additional information is brought by the graph structure, with respect to the node features alone. It can be seen that minCUTpool obtains always equal or better results with respect to every other GNN architecture. On the other hand, some pooling procedures do not always improve the performance compared to the Flat baseline, making them not advisable to use in some cases. The WL kernel generally performs worse than the GNNs, except for the Mutagenicity dataset. This is probably because Mutagenicity has smaller graphs than the other datasets, and the adopted GNN architecture is overparametrized for this task. Interestingly, in some dataset such as Proteins and COLLAB it is possible to obtain fairly good classification accuracy with the Dense architecture, meaning that the graph structure only adds limited information.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 5: Average duration of one epoch using the same GNN with different pooling operations. Times were computed with an Nvidia GeForce GTX 1050, on the DD dataset with batch size of 1.
|
| 173 |
+
|
| 174 |
+
Fig. 5 reports a comparison of the execution time per training epoch for each pooling algorithm. Graclus and Decimation are understandably the fastest methods, since the coarsened graphs are precomputed. Among the differentiable pooling methods, minCUTpool is faster than Diffpool, which uses a slower MP layer rather than a MLP to compute cluster assignments, and than Top- $K$ , which computes the square of A at every forward pass.
|
| 175 |
+
|
| 176 |
+
# 6 CONCLUSIONS
|
| 177 |
+
|
| 178 |
+
We proposed a pooling layer for GNNs that coarsens a graph by taking into account both the the connectivity structure and the node features. The layer optimizes a regularization term based on the minCUT objective, which is minimized in conjunction with the task-specific loss to produce node partitions that are optimal for the task at hand.
|
| 179 |
+
|
| 180 |
+
We tested the effectiveness of our pooling strategy on unsupervised node clustering tasks, by optimizing only the unsupervised clustering loss, as well as supervised graph classification tasks on several popular benchmark datasets. Results show that minCUTpool performs significantly better than existing pooling strategies for GNNs.
|
| 181 |
+
|
| 182 |
+
# REFERENCES
|
| 183 |
+
|
| 184 |
+
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.
|
| 185 |
+
|
| 186 |
+
Filippo Maria Bianchi, Daniele Grattarola, L Livi, and C Alippi. Graph neural networks with convolutional arma filters. arXiv preprint arXiv:1901.01343, 2019.
|
| 187 |
+
|
| 188 |
+
Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013.
|
| 189 |
+
|
| 190 |
+
Maxwell D Collins, Ji Liu, Jia Xu, Lopamudra Mukherjee, and Vikas Singh. Spectral clustering with a convex regularizer on millions of images. In European Conference on Computer Vision, pp. 282–298. Springer, 2014.
|
| 191 |
+
|
| 192 |
+
Anil Damle, Victor Minden, and Lexing Ying. Robust and efficient multi-way spectral clustering. arXiv preprint arXiv:1609.08251, 2016.
|
| 193 |
+
|
| 194 |
+
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.
|
| 195 |
+
|
| 196 |
+
Inderjit S Dhillon, Yuqiang Guan, and Brian Kulis. Kernel k-means: spectral clustering and normalized cuts. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 551–556. ACM, 2004.
|
| 197 |
+
|
| 198 |
+
Pedro F Felzenszwalb and Daniel P Huttenlocher. Efficient graph-based image segmentation. International journal of computer vision, 59(2):167–181, 2004.
|
| 199 |
+
|
| 200 |
+
Matthias Fey, Jan Eric Lenssen, Frank Weichert, and Heinrich Muller. Splinecnn: Fast geomet- ¨ ric deep learning with continuous b-spline kernels. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 869–877, 2018.
|
| 201 |
+
|
| 202 |
+
Fernando Gama, Antonio G Marques, Geert Leus, and Alejandro Ribeiro. Convolutional neural network architectures for signals supported on graphs. IEEE Transactions on Signal Processing, 67(4):1034–1049, 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 |
+
Yufei Han and Maurizio Filippone. Mini-batch spectral clustering. In 2017 International Joint Conference on Neural Networks (IJCNN), pp. 3888–3895. IEEE, 2017.
|
| 207 |
+
|
| 208 |
+
Shuiwang Ji Hongyang Gao. Graph u-nets. In Proceedings of the 36th International conference on Machine learning (ICML), 2019.
|
| 209 |
+
|
| 210 |
+
Yasuhiko Ikebe, Toshiyuki Inagaki, and Sadaaki Miyamoto. The monotonicity theorem, cauchy’s interlace theorem, and the courant-fischer theorem. The American Mathematical Monthly, 94(4): 352–354, 1987.
|
| 211 |
+
|
| 212 |
+
Michael Kampffmeyer, Sigurd Løkse, Filippo M. Bianchi, Lorenzo Livi, Arnt-Børre Salberg, and Robert Jenssen. Deep divergence-based approach to clustering. Neural Networks, 113:91 – 101, 2019.
|
| 213 |
+
|
| 214 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. International Conference of Learning Representations (ICLR), 2017.
|
| 215 |
+
|
| 216 |
+
Marc T Law, Raquel Urtasun, and Richard S Zemel. Deep spectral clustering learning. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1985–1994. JMLR. org, 2017.
|
| 217 |
+
|
| 218 |
+
Chen-Yu Lee, Patrick W Gallagher, and Zhuowen Tu. Generalizing pooling functions in convolutional neural networks: Mixed, gated, and tree. In Artificial Intelligence and Statistics, pp. 464–472, 2016.
|
| 219 |
+
|
| 220 |
+
Junhyun Lee, Inyeop Lee, and Jaewoo Kang. Self-attention graph pooling. In Proceedings of the 36th International conference on Machine learning (ICML-19), 2019.
|
| 221 |
+
|
| 222 |
+
Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. International Conference of Learning Representations (ICLR), 2016.
|
| 223 |
+
|
| 224 |
+
Enxhell Luzhnica, Ben Day, and Pietro Lio. Clique pooling for graph classification. International Conference of Learning Representations (ICLR) – Representation Learning on Graphs and Manifolds workshop, 2019.
|
| 225 |
+
|
| 226 |
+
Azade Nazi, Will Hang, Anna Goldie, Sujith Ravi, and Azalia Mirhoseini. Gap: Generalizable approximate graph partitioning framework. arXiv preprint arXiv:1903.00614, 2019.
|
| 227 |
+
|
| 228 |
+
Oliver Nelles. Nonlinear system identification: from classical approaches to neural networks and fuzzy models. Springer Science & Business Media, 2013.
|
| 229 |
+
|
| 230 |
+
Mark EJ Newman. Mixing patterns in networks. Physical Review E, 67(2):026126, 2003.
|
| 231 |
+
|
| 232 |
+
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, 2009.
|
| 233 |
+
|
| 234 |
+
Uri Shaham, Kelly Stanton, Henry Li, Boaz Nadler, Ronen Basri, and Yuval Kluger. Spectralnet: Spectral clustering using deep neural networks. arXiv preprint arXiv:1801.01587, 2018.
|
| 235 |
+
|
| 236 |
+
Nino Shervashidze, Pascal Schweitzer, Erik Jan van Leeuwen, Kurt Mehlhorn, and Karsten M Borgwardt. Weisfeiler-lehman graph kernels. Journal of Machine Learning Research, 12(Sep):2539– 2561, 2011.
|
| 237 |
+
|
| 238 |
+
Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. Departmental Papers (CIS), pp. 107, 2000.
|
| 239 |
+
|
| 240 |
+
David I Shuman, Mohammad Javad Faraji, and Pierre Vandergheynst. A multiscale pyramid transform for graph signals. IEEE Transactions on Signal Processing, 64(8):2119–2134, 2016.
|
| 241 |
+
|
| 242 |
+
Martin Simonovsky and Nikos Komodakis. Dynamic edgeconditioned filters in convolutional neural networks on graphs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017.
|
| 243 |
+
|
| 244 |
+
Fei Tian, Bin Gao, Qing Cui, Enhong Chen, and Tie-Yan Liu. Learning deep representations for graph clustering. In AAAI, pp. 1293–1299, 2014.
|
| 245 |
+
|
| 246 |
+
Alain Tremeau and Philippe Colantoni. Regions adjacency graph applied to color image segmenta-´ tion. IEEE Transactions on image processing, 9(4):735–744, 2000.
|
| 247 |
+
|
| 248 |
+
Ulrike Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007.
|
| 249 |
+
|
| 250 |
+
Zaiwen Wen and Wotao Yin. A feasible method for optimization with orthogonality constraints. Mathematical Programming, 142(1-2):397–434, 2013.
|
| 251 |
+
|
| 252 |
+
Li Yi, Hao Su, Xingwen Guo, and Leonidas J Guibas. Syncspeccnn: Synchronized spectral cnn for 3d shape segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2282–2290, 2017.
|
| 253 |
+
|
| 254 |
+
Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In Advances in Neural Information Processing Systems, pp. 4800–4810, 2018.
|
| 255 |
+
|
| 256 |
+
Yu and Shi. Multiclass spectral clustering. In Proceedings Ninth IEEE International Conference on Computer Vision, pp. 313–319 vol.1, Oct 2003.
|
| 257 |
+
|
| 258 |
+
# APPENDIX
|
| 259 |
+
|
| 260 |
+
A ADDITIONAL EXPERIMENTS
|
| 261 |
+
|
| 262 |
+
# A.1 GNN AUTOENCODER
|
| 263 |
+
|
| 264 |
+
To compare the amount of information retained by the pooling layers in the coarsened graphs, we train an autoencoder (AE) to reconstruct a input graph signal $\mathbf { X }$ from its pooled version. The AE architecture is MP(32)-MP(32)-pool-unpool-MP(32)-MP(32)-MP, and is trained by minimizing the mean squared error between the original and the reconstructed graph signal, $\lVert \bf { X } - \bf { X } ^ { \mathrm { { r e c } } } \rVert ^ { 2 }$ . All the pooling operations are configured to retain $2 5 \%$ of the original nodes.
|
| 265 |
+
|
| 266 |
+
In Diffpool and minCUTpool, the unpool step is simply implemented by transposing the original pooling operations
|
| 267 |
+
|
| 268 |
+
$$
|
| 269 |
+
{ \bf X } ^ { \mathrm { r e c } } = { \bf S } { \bf X } ^ { \mathrm { p o o l } } ; ~ { \bf A } ^ { \mathrm { r e c } } = { \bf S } { \bf A } ^ { \mathrm { p o o l } } { \bf S } ^ { T } .
|
| 270 |
+
$$
|
| 271 |
+
|
| 272 |
+
Top- $K$ does not generate a cluster assignment matrix, but returns a binary mask $\mathbf { m } = \{ 0 , 1 \} ^ { N }$ that indicates the nodes to drop (0) or to retain (1). Therefore, an upsamplig matrix $\mathbf { U }$ is built by dropping the columns of the identity matrix ${ \mathbf { I } } _ { N }$ that correspond to a 0 in $\mathbf { m }$ , $\bar { \mathbf { U } } = [ \mathbf { I } _ { N } ] _ { : , \mathbf { m } = = 1 }$ . The unpooling operation is performed by replacing S with $\mathbf { U }$ in (9), and the resulting upscaled graph is a version of the original graph with zeroes in correspondence of the dropped nodes.
|
| 273 |
+
|
| 274 |
+

|
| 275 |
+
Figure 6: AE reconstruction of a ring graph
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 7: AE reconstruction of a grid graph
|
| 279 |
+
|
| 280 |
+
Fig. 6 and 7 report the original graph signal $\mathbf { X }$ (the node features are the 2-D coordinates of the nodes) and the reconstruction $\mathbf { X } ^ { \mathrm { r e c } }$ obtained by using the different pooling methods, for a ring graph and a regular grid graph. The reconstruction produced by Diffpool is worse for the ring graph, but is almost perfect for the grid graph, while minCUTpool yields good results in both cases. On the other hand, Top- $K$ clearly fails in generating a coarsened representation that maintains enough information from the original graph.
|
| 281 |
+
|
| 282 |
+
This experiment highlights a major issue in Top- $K$ pooling, which retains the nodes associated to the highest $K$ values of a score vector s, computed by projecting the node features onto a trainable vector p: $\mathbf { s } = \mathbf { X } \mathbf { p } $ . Nodes that are connected on the graph usually share similar features, and their similarity further increases after the MP operations, which combine the features of neighboring nodes. Retaining the nodes associated to the top $K$ scores in s corresponds to keeping those nodes that are alike and highly connected, as it can be seen in Fig. 6-7. Therefore, Top- $K$ discards entire portions of the graphs, which might contain important information. This explains why Top- $K$ fails to recover the original graph signal when used as bottleneck for the AE, and yields the worse performance among all GNN methods in the graph classification task.
|
| 283 |
+
|
| 284 |
+
# A.2 GRAPH REGRESSION OF MOLECULAR PROPERTIES ON QM9
|
| 285 |
+
|
| 286 |
+
The QM9 chemical database is a collection of ${ \approx } 1 3 5 \mathrm { k }$ small organic molecules, associated to continuous labels describing several geometric, energetic, electronic, and thermodynamic properties1. Each molecule in the dataset is represented as a graph $\{ \mathbf { A } _ { i } , \mathbf { X } _ { i } \}$ , where atoms are associated to nodes, and edges represent chemical bonds. The atomic number of each atom (one-hot encoded; C, N, F, O) is taken as node feature and the type of bond (one-hot encoded; single, double, triple, aromatic) can be used as edge attribute. In this experiment, we ignore the edge attributes in order to use all pooling algorithms without modifications.
|
| 287 |
+
|
| 288 |
+
The purpose of this experiment is to compare the trainable pooling methods also on a graph regression task, but it must be intended as a proof of concept. In fact, the graphs in this dataset are extremely small (the average number of nodes is 8) and, therefore, a pooling operation is arguably not necessary. We consider a GNN with architecture MP(32)-pool-MP(32)-GlobalAvgPool-Dense, where pool is implemented by Top- $K$ , Diffpool, or minCUTpool. The network is trained to predict a given chemical property from the input molecular graphs. Performance is evaluated with a 10-fold cross-validation, using $1 \dot { 0 } \%$ of the training set for validation in each split. The GNNs are trained for 50 epochs, using Adam with learning rate 5e-4, batch size 32, and ReLU activations. We use the mean squared error (MSE) as supervised loss.
|
| 289 |
+
|
| 290 |
+
The MSE obtained on the prediction of each property for different pooling methods is reported in Tab. 3. As expected, the flat baseline with no pooling operation (MP(32)-MP(32)-GlobalAvgPoolDense) yields a lower error in most cases. Contrarily to the graph classification and the AE task, Top- $K$ achieves better results than Diffpool in average. Once again, minCUTpool significantly outperforms the other methods on each regression task and, in one case, also the flat baseline.
|
| 291 |
+
|
| 292 |
+
<table><tr><td>Property</td><td>Top-K</td><td>Diffpool</td><td>minCUTpool</td><td>Flat baseline</td></tr><tr><td>mu</td><td>0.600±0.085</td><td>0.651±0.026</td><td>0.538±0.012</td><td>0.559±0.007</td></tr><tr><td>alpha</td><td>0.197±0.087</td><td>0.114±0.001</td><td>0.078±0.007</td><td>0.065±0.006</td></tr><tr><td>homo</td><td>0.698±0.102</td><td>0.712±0.015</td><td>0.526±0.021</td><td>0.435±0.013</td></tr><tr><td>lumo</td><td>0.601±0.050</td><td>0.646±0.013</td><td>0.540±0.005</td><td>0.515±0.007</td></tr><tr><td>gap</td><td>0.630±0.044</td><td>0.698±0.004</td><td>0.584±0.007</td><td>0.552±0.008</td></tr><tr><td>r2</td><td>0.452±0.087</td><td>0.440±0.024</td><td>0.261±0.006</td><td>0.204±0.006</td></tr><tr><td>zpve</td><td>0.402±0.032</td><td>0.410±0.004</td><td>0.328±0.005</td><td>0.284±0.005</td></tr><tr><td>uO_atom</td><td>0.308±0.055</td><td>0.245±0.006</td><td>0.193±0.002</td><td>0.163±0.001</td></tr><tr><td>cv</td><td>0.291±0.118</td><td>0.337±0.018</td><td>0.148±0.004</td><td>0.127±0.002</td></tr></table>
|
| 293 |
+
|
| 294 |
+
Table 3: MSE on the graph regression task. The best results with a statistical significance of $p < 0 . 0 5$ are highlighted: the best overall are in bold, the best among pooling methods are underlined.
|
| 295 |
+
|
| 296 |
+
# B EXPERIMENTAL DETAILS
|
| 297 |
+
|
| 298 |
+
For the WL kernel, we used the implementation provided in the GraKeL library2. The pooling strategy based on Graclus, is taken from the ChebyNets repository3.
|
| 299 |
+
|
| 300 |
+
# B.1 CLUSTERING ON CITATION NETWORKS
|
| 301 |
+
|
| 302 |
+
Diffpool and minCUTpool are configured with 16 hidden neurons with linear activations in the MLP and MP layer, respectively used to compute the cluster assignment matrix S. The MP layer used to compute the propagated node features $\mathbf { X } ^ { ( 1 ) }$ uses an ELU activation in both architectures. The learning rate for Adam is 5e-4, and the models are trained for 10000 iterations. The details of the citation networks dataset are reported in Tab. 4.
|
| 303 |
+
|
| 304 |
+
Table 4: Details of the citation networks datasets
|
| 305 |
+
|
| 306 |
+
<table><tr><td>Dataset</td><td>Nodes</td><td>Edges</td><td>Node features</td><td>Node classes</td></tr><tr><td>Cora</td><td>2708</td><td>5429</td><td>1433</td><td>7</td></tr><tr><td>Citeseer</td><td>3327</td><td>9228</td><td>3703</td><td>6</td></tr><tr><td>Pubmed</td><td>19717</td><td>88651</td><td>500</td><td>3</td></tr></table>
|
| 307 |
+
|
| 308 |
+
# B.2 GRAPH CLASSIFICATION
|
| 309 |
+
|
| 310 |
+
We train the GNN architectures with Adam, an $\mathrm { L } _ { 2 }$ penalty loss with weight 1e-4, and 16 hidden units $( H )$ both in the MLP of minCUTpool and in the internal MP of Diffpool. Mutagenicity, Proteins, DD, COLLAB, and Reddit- ${ \it 2 k }$ are datasets representing real-world graphs and are taken from the repository of benchmark datasets for graph kernels4. Bench-easy and Bench-hard5 are datasets where the node features $\mathbf { X }$ and the adjacency matrix A are completely uninformative if considered alone. Hence, algorithms that account only for the node features or the graph structure will fail to classify the graphs. Since Bench-easy and Bench-hard come with a train/validation/test split, the 10-fold split is not necessary to evaluate the performance. The statistics of all the datasets are reported in Tab. 5.
|
| 311 |
+
|
| 312 |
+
Table 5: Summary of statistics of the graph classification datasets
|
| 313 |
+
|
| 314 |
+
<table><tr><td>Dataset</td><td>samples</td><td>classes</td><td>avg. nodes</td><td>avg. edges</td><td>node attr.</td><td>node labels</td></tr><tr><td>Bench-easy</td><td>1800</td><td>3</td><td>147.82</td><td>922.66</td><td></td><td>yes</td></tr><tr><td>Bench-hard</td><td>1800</td><td>3</td><td>148.32</td><td>572.32</td><td></td><td>yes</td></tr><tr><td>Mutagenicity</td><td>4337</td><td>2</td><td>30.32</td><td>30.77</td><td></td><td>yes</td></tr><tr><td>Proteins</td><td>1113</td><td>2</td><td>39.06</td><td>72.82</td><td>1</td><td>no</td></tr><tr><td>DD</td><td>1178</td><td>2</td><td>284.32</td><td>715.66</td><td>1</td><td>yes</td></tr><tr><td>COLLAB</td><td>5000</td><td>3</td><td>74.49</td><td>2457.78</td><td></td><td>no</td></tr><tr><td>Reddit-2K</td><td>2000</td><td>2</td><td>429.63</td><td>497.75</td><td>1</td><td>no</td></tr></table>
|
| 315 |
+
|
| 316 |
+
# C ARCHITECTURES SCHEMATA
|
| 317 |
+
|
| 318 |
+
Fig. 8 reports the schematic representation of the minCUTpool layer; Fig. 9 the GNN architecture used in the clustering and segmentation tasks; Fig. 10 the GNN architecture used in the graph classification task; Fig. 12 the GNN architecture used in the graph regression task; Fig. 11 the graph autoencoder used in the graph signal reconstruction task.
|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Figure 8: Schema of the minCUTpool layer.
|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 9: Architecture for clustering/segmentation.
|
| 325 |
+
|
| 326 |
+

|
| 327 |
+
Figure 10: Architecture for graph classification.
|
| 328 |
+
|
| 329 |
+

|
| 330 |
+
Figure 11: Architecture for the autoencoder.
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
Figure 12: Architecture for graph regression.
|
md/train/ByME42AqK7/ByME42AqK7.md
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EFFICIENT MULTI-OBJECTIVE NEURAL ARCHITECTURE SEARCH VIA LAMARCKIAN EVOLUTION
|
| 2 |
+
|
| 3 |
+
Thomas Elsken Bosch Center for Artificial Intelligence and University of Freiburg Thomas.Elsken@de.bosch.com
|
| 4 |
+
|
| 5 |
+
Jan Hendrik Metzen Bosch Center for Artificial Intelligence JanHendrik.Metzen@de.bosch.com
|
| 6 |
+
|
| 7 |
+
Frank Hutter University of Freiburg fh@cs.uni-freiburg.de
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Neural Architecture Search aims at automatically finding neural network architectures that are competitive with architectures designed by human experts. While recent approaches have achieved state-of-the-art predictive performance for, e.g., image recognition, they are problematic under resource constraints for two reasons: (1) the neural architectures found are solely optimized for high predictive performance, without penalizing excessive resource consumption; (2) most architecture search methods require vast computational resources. We address the first shortcoming by proposing LEMONADE, an evolutionary algorithm for multi-objective architecture search that allows approximating the entire Pareto front of architectures under multiple objectives, such as predictive performance and number of parameters, in a single run of the method. We address the second shortcoming by proposing a Lamarckian inheritance mechanism for LEMONADE which generates child networks that are warm started with the predictive performance of their trained parents. This is accomplished by using (approximate) network morphism operators for generating children. The combination of these two contributions allows finding models that are on par or even outperform both hand-crafted as well as automatically-designed networks.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Deep learning has enabled remarkable progress on a variety of perceptual tasks, such as image recognition (Krizhevsky et al., 2012), speech recognition (Hinton et al., 2012), and machine translation (Bahdanau et al., 2015). One crucial aspect for this progress are novel neural architectures (Szegedy et al., 2016; He et al., 2016; Huang et al., 2017b). Currently employed architectures have mostly been developed manually by human experts, which is a time-consuming and error-prone process. Because of this, there is growing interest in automatic architecture search methods (Elsken et al., 2018). Some of the architectures found in an automated way have already outperformed the best manually-designed ones; however, algorithms such as by Zoph & Le (2017); Zoph et al. (2018); Real et al. (2017; 2018) for finding these architectures require enormous computational resources often in the range of thousands of GPU days.
|
| 16 |
+
|
| 17 |
+
Prior work on architecture search has typically framed the problem as a single-objective optimization problem. However, most applications of deep learning do not only require high predictive performance on unseen data but also low resource-consumption in terms of, e.g., inference time, model size or energy consumption. Moreover, there is typically an implicit trade-off between predictive performance and consumption of resources. Recently, several architectures have been manually designed that aim at reducing resource-consumption while retaining high predictive performance (Iandola et al., 2016; Howard et al., 2017; Sandler et al., 2018). Automatically found neural architectures have also been down-scaled to reduce resource consumption (Zoph et al., 2018). However, very little previous work has taken the trade-off between resource-consumption and predictive performance into account during automatic architecture search.
|
| 18 |
+
|
| 19 |
+
In this work, we make the following two main contributions:
|
| 20 |
+
|
| 21 |
+
1. To overcome the need for thousands of GPU days (Zoph & Le, 2017; Zoph et al., 2018; Real et al., 2018), we make use of operators acting on the space of neural network architectures that preserve the function a network represents, dubbed network morphisms (Chen et al., 2015; Wei et al., 2016), obviating training from scratch and thereby substantially reducing the required training time per network. This mechanism can be interpreted as Lamarckian inheritance in the context of evolutionary algorithms, where Lamarckism refers to a mechanism which allows passing skills acquired during an individual’s lifetime (e.g., by means of learning), on to children by means of inheritance. Since network morphisms are limited to solely increasing a network’s size (and therefore likely also resource consumption), we introduce approximate network morphisms (Section 3.2) to also allow shrinking networks, which is essential in the context of multi-objective search. The proposed Lamarckian inheritance mechanism could in principle be combined with any evolutionary algorithm for architecture search, or any other method using (a combination of) localized changes in architecture space.
|
| 22 |
+
|
| 23 |
+
2. We propose a Lamarckian Evolutionary algorithm for Multi-Objective Neural Architecture DEsign, dubbed LEMONADE, Section 4, which is suited for the joint optimization of several objectives, such as predictive performance, inference time, or number of parameters. LEMONADE maintains a population of networks on an approximation of the Pareto front of the multiple objectives. In contrast to generic multi-objective algorithms, LEMONADE exploits that evaluating certain objectives (such as an architecture’s number of parameters) is cheap while evaluating the predictive performance on validation data is expensive (since it requires training the model first). Thus, LEMONADE handles its various objectives differently: it first selects a subset of architectures, assigning higher probability to architectures that would fill gaps on the Pareto front for the “cheap” objectives; then, it trains and evaluates only this subset, further reducing the computational resource requirements during architecture search. In contrast to other multi-objective architecture search methods, LEMONADE (i) does not require to define a trade-off between performance and other objectives a-priori (e.g., by weighting objectives when using scalarization methods) but rather returns a set of architectures, which allows the user to select a suitable model a-posteriori; (ii) LEMONADE does not require to be initialized with well performing architectures; it can be initialized with trivial architectures and hence requires less prior knowledge. Also, LEMONADE can handle various search spaces, including complex topologies with multiple branches and skip connections.
|
| 24 |
+
|
| 25 |
+
We evaluate LEMONADE for up to five objectives on two different search spaces for image classification: (i) non-modularized architectures and (ii) cells that are used as repeatable building blocks within an architecture (Zoph et al., 2018; Zhong et al., 2018) and also allow transfer to other data sets. LEMONADE returns a population of CNNs covering architectures with 10 000 to 10 000 000 parameters.
|
| 26 |
+
|
| 27 |
+
Within only 5 days on 16 GPUs, LEMONADE discovers architectures that are competitive in terms of predictive performance and resource consumption with hand-designed networks, such as MobileNet V2 (Sandler et al., 2018), as well as architectures that were automatically designed using $4 0 \mathrm { x }$ greater resources (Zoph et al., 2018) and other multi-objective methods (Dong et al., 2018).
|
| 28 |
+
|
| 29 |
+
# 2 BACKGROUND AND RELATED WORK
|
| 30 |
+
|
| 31 |
+
Multi-objective Optimization Multi-objective optimization (Miettinen, 1999) deals with problems that have multiple, complementary objective functions $f _ { 1 } , \ldots , f _ { n }$ . Let $\mathcal { N }$ be the space of feasible solutions $N$ (in our case the space of feasible neural architectures). In general, multi-objective optimization deals with finding $N ^ { * } \in \mathcal { N }$ that minimizes the objectives $f _ { 1 } , \ldots , f _ { n }$ . However, typically there is no single $N ^ { * }$ that minimizes all objectives at the same time. In contrast, there are multiple Pareto-optimal solutions that are optimal in the sense that one cannot reduce any $f _ { i }$ without increasing at least one $f _ { j }$ . More formally, a solution $N ^ { ( 1 ) }$ Pareto-dominates another solution $N ^ { ( 2 ) }$ if $\forall i \in 1 , \ldots , n : f _ { i } ( N ^ { ( 1 ) } ) \leq f _ { i } ( N ^ { ( 2 ) } )$ and $\exists j \in 1 , \dots , n : f _ { j } ( N ^ { ( 1 ) } ) < f _ { j } ( N ^ { ( 2 ) } )$ . The Pareto-optimal solutions $N ^ { * }$ are exactly those solutions that are not dominated by any other $\dot { N } \in \mathcal { N }$ The set of Pareto optimal $N ^ { * }$ is the so-called Pareto front.
|
| 32 |
+
|
| 33 |
+
Neural Architecture Search We give a short overview of the most relevant works in neural architecture search (NAS) and refer to Elsken et al. (2018) for a comprehensive survey on the topic. It was recently proposed to frame NAS as a reinforcement learning (RL) problem, where the reward of the RL agent is based on the validation performance of the trained architecture (Baker et al., 2017a; Zoph & Le, 2017; Zhong et al., 2018; Pham et al., 2018). Zoph & Le (2017) use a recurrent neural network to generate a string representing the neural architecture. In a follow-up work, Zoph et al. (2018) search for cells, which are repeated according to a fixed macro architecture to generate the eventual architecture. Defining the architecture based on a cell simplifies the search space.
|
| 34 |
+
|
| 35 |
+
An alternative to using RL are neuro-evolutionary approaches that use genetic algorithms for optimizing the neural architecture (Stanley & Miikkulainen, 2002; Liu et al., 2018a; Real et al., 2018; Miikkulainen et al., 2017; Xie & Yuille, 2017). In contrast to these works, our proposed method is applicable for multi-objective optimization and employs Lamarckian inheritance, i.e, learned parameters are passed on to a network’s offspring. A related approach to our Lamarckian evolution is population-based training (Jaderberg et al., 2017), which, however, focuses on hyperparameter optimization and not on the specific properties of the optimization of neural architectures. We note that it would be possible to also include the evolution of hyperparameters in our work.
|
| 36 |
+
|
| 37 |
+
Unfortunately, most of the aforementioned approaches require vast computational resources since they need to train and validate thousands of neural architectures; e.g., Zoph & Le (2017) trained over 10.000 neural architectures, requiring thousands of GPU days. One way of speeding up evaluation is to predict performance of a (partially) trained model (Domhan et al., 2015; Baker et al., 2017b; Klein et al., 2017; Liu et al., 2017). Works on performance prediction are complementary to our work and could be incorporated in the future.
|
| 38 |
+
|
| 39 |
+
One-Shot Architecture Search is another promising approach for speeding up performance estimation, which treats all architectures as different subgraphs of a supergraph (the one-shot model) and shares weights between architectures (Saxena & Verbeek, 2016; Brock et al., 2017; Pham et al., 2018; Liu et al., 2018b; Bender et al., 2018). Only the weights of a single one-shot model need to be trained, and architectures (which are just subgraphs of the one-shot model) can then be evaluated without any separate training. However, a general limitation of one-shot NAS is that the supergraph defined a-priori restricts the search space to its subgraphs. Moreover, approaches which require that the entire supergraph resides in GPU memory during architecture search will be restricted to relatively small supergraphs. It is also not obvious how one-shot models could be employed for multi-objective optimization as all subgraphs of the one-shot models are of roughly the same size and it is not clear if weight sharing would work for very different-sized architectures. LEMONADE does not suffer from any of these disadvantages; it can handle arbitrary large, unconstrained search spaces while still being efficient.
|
| 40 |
+
|
| 41 |
+
Elsken et al. (2017); Cai et al. (2018a) proposed to employ the concept of network morphisms (see Section 3.1). The basic idea is to initialize weights of newly generated neural architectures based on weights of similar, already trained architectures so that they have the same accuracy. This pretrained initialization allows reducing the large cost of training all architectures from scratch. Our work extends this approach by introducing approximate network morphisms, making the use of such operators suitable for multi-objective optimization.
|
| 42 |
+
|
| 43 |
+
Multi-objective Neural Architecture Search Very recently, there has also been some work on multi-objective neural architecture search (Kim et al., 2017; Dong et al., 2018; Tan et al., 2018) with the goal of not solely optimizing the accuracy on a given task but also considering resource consumption. Kim et al. (2017) parameterize an architecture by a fixed-length vector description, which limits the architecture search space drastically. In parallel, independent work to ours, Dong et al. (2018) extend PNAS (Liu et al., 2017) by considering multiple objective during the model selection step. However, they employ CondenseNet (Huang et al., 2017a) as a base network and solely optimize building blocks within the network which makes the search less interesting as (i) the base network is by default already well performing and (ii) the search space is again limited. Tan et al. (2018) use a weighted product method (Deb & Kalyanmoy, 2001) to obtain a scalarized objective. However, this scalarization comes with the drawback of weighting the objectives a-priori, which might not be suitable for certain applications. In contrast to all mentioned work, LEMONADE (i) does not require a complex macro architecture but rather can start from trivial initial networks, (ii) can handle arbitrary search spaces, (iii) does not require to define hard constraints or weights on objectives a-priori.
|
| 44 |
+
|
| 45 |
+
# 3 NETWORK OPERATORS
|
| 46 |
+
|
| 47 |
+
Let $\mathcal { N } ( \mathcal { X } )$ denote a space of neural networks, where each element $N \in \mathcal { N } ( \mathcal { X } )$ is a mapping from $\mathcal { X } \subset \mathbb { R } ^ { n }$ to some other space, e.g., mapping images to labels. A network operator $T : \mathcal { N } ( \dot { \mathcal { X } } ) \times \mathbf { \bar { R } } ^ { k } $ $\mathcal { N } ( \mathcal { X } ) \times \mathbb { R } ^ { j }$ maps a neural network $\bar { N ^ { w } } \in \mathcal { N } ( \bar { \mathcal X } )$ with parameters $w \in \mathbb { R } ^ { k }$ to another neural network $( T N ) ^ { \tilde { w } } \in \mathcal { N } ( \mathcal { X } ) , \tilde { w } \in \mathbb { R } ^ { j }$ .
|
| 48 |
+
|
| 49 |
+
We now discuss two specific classes of network operators, namely network morphisms and approximate network morphisms. Operators from these two classes will later on serve as mutations in our evolutionary algorithm.
|
| 50 |
+
|
| 51 |
+
# 3.1 NETWORK MORPHISMS
|
| 52 |
+
|
| 53 |
+
Chen et al. (2015) introduced two function-preserving operators for deepening and widening a neural network. Wei et al. (2016) built upon this work, dubbing function-preserving operators on neural networks network morphisms. Formally, a network morphism is a network operator satisfying $N ^ { w } ( x ) = ( T N ) ^ { \tilde { w } } ( x )$ for every $x \in \mathcal { X }$ , i.e., $N ^ { w }$ and $( T N ) ^ { \tilde { w } }$ represent the same function. This can be achieved by properly initializing $\tilde { w }$ .
|
| 54 |
+
|
| 55 |
+
We now describe the operators used in LEMONADE and how they can be formulated as a network morphism. We refer to Appendix A.1.1 for details.
|
| 56 |
+
|
| 57 |
+
1. Inserting a Conv-BatchNorm-ReLU block. We initialize the convolution to be an identity mapping, as done by Chen et al. (2015) (”Net2DeeperNet”). Offset and scale of BatchNormalization are initialized to be the (moving) batch mean and (moving) batch variance, hence initially again an identity mapping. Since the ReLU activation is idempotent, i.e., $R e L U ( R e L U ( x ) ) = R e L U ( x )$ , we can add it on top of the previous two operations without any further changes, assuming that the block will be added on top of a ReLU layer.
|
| 58 |
+
2. Increase the number of filters of a convolution. This operator requires the layer to be changed to have a subsequent convolutional layer, whose parameters are padded with $0 ^ { \circ } \mathrm { s }$ . Alternatively, one could use the ”Net2WiderNet” operator by Chen et al. (2015).
|
| 59 |
+
3. Add a skip connection. We allow skip connection either by concatenation (Huang et al., 2017b) or by addition (He et al., 2016). In the former case, we again use zero-padding in sub-sequential convolutional layers. In the latter case, we do not simply add two outputs $x$ and $y$ but rather use a convex combination $( 1 - \lambda ) x + \lambda y$ , with a learnable parameter $\lambda$ initialized as 0 (assuming $x$ is the original output and $y$ the output of an earlier layer).
|
| 60 |
+
|
| 61 |
+
# 3.2 APPROXIMATE NETWORK MORPHISMS
|
| 62 |
+
|
| 63 |
+
One common property of all network morphisms is that they can only increase the capacity of a network1. This may be a reasonable property if one solely aims at finding a neural architectures with maximal accuracy, but not if one also aims at neural architectures with low resource requirements. Also, decisions once made can not be reverted. Operators like removing a layer could considerably decrease the resources required by the model while (potentially) preserving its performance.
|
| 64 |
+
|
| 65 |
+
Hence, we now generalize the concept of network morphisms to also cover operators that reduce the capacity of a neural architecture. We say an operator $T$ is an approximate network morphism (ANM) with respect to a neural network $N ^ { w }$ with parameters $w$ if $\\hat { N ^ { w } } ( x ) \approx ( T N ) ^ { \tilde { w } } ( x )$ for every $x \in \mathcal { X }$ . We refer to Appendix A.1.2 for a formal definition. In practice we simply determine $\tilde { w }$ so that $\tilde { N }$ approximates $N$ by using knowledge distillation (Hinton et al., 2015).
|
| 66 |
+
|
| 67 |
+
In our experiments, we employ the following ANM’s: (i) remove a randomly chosen layer or a skip connection, (ii) prune a randomly chosen convolutional layer (i.e., remove $1 / 2$ or $1 / 4$ of its filters), and (iii) substitute a randomly chosen convolution by a depthwise separable convolution. Note that these operators could easily be extended by sophisticated methods for compressing neural networks (Han et al., 2016; Cheng et al., 2018).
|
| 68 |
+
|
| 69 |
+

|
| 70 |
+
Figure 1: Conceptual illustration of LEMONADE. (Left) LEMONADE maintains a population of trained networks that constitute a Pareto front in the multi-objective space. Parents are selected from the population inversely proportional to their density. Children are generated by mutation operators with Lamarckian inheritance that are realized by network morphisms and approximate network morphisms. NM operators generate children with the same initial error as their parent. In contrast, children generated with ANM operators may incur a (small) increase in error compared to their parent. However, their initial error is typically still very small. (Right) Only a subset of the generated children is accepted for training. After training, the performance of the children is evaluated and the population is updated to be the Pareto front.
|
| 71 |
+
|
| 72 |
+
# 4 LEMONADE: MULTI-OBJECTIVE NEURAL ARCHITECTURE SEARCH
|
| 73 |
+
|
| 74 |
+
In this section, we propose a Lamarckian Evolutionary algorithm for MultiObjective Neural Architecture DEsign, dubbed LEMONADE. We refer to Figure 1 for an illustration as well as Algorithm 1 for pseudo code. LEMONADE aims at minimizing multiple objectives $\mathfrak { f } ( N ) = ( f _ { e x p } ( N ) , f _ { c h e a p } ( N ) ) ^ { \intercal } \in \mathbb { R } ^ { \check { m } } \times \mathbb { R } ^ { n }$ whose first components $f _ { e x p } ( N ) \in \mathrm { ~ \mathbb { R } ^ { \it m } ~ }$ denote expensive-to-evaluate objectives (such as the validation error or some measure only be obtainable by expensive simulation) and its other components $f _ { c h e a p } ( N ) ~ \in ~ \mathbb { R } ^ { n }$ denote cheap-to-evaluate objectives (such as model size) that one also tries to minimize. LEMONADE maintains a population $\mathcal { P }$ of parent
|
| 75 |
+
|
| 76 |
+
# Algorithm 1 LEMONADE
|
| 77 |
+
|
| 78 |
+
1: input: $\mathcal { P } _ { 0 } , \dag , n _ { g e n } , n _ { p c } , n _ { a c }$
|
| 79 |
+
2: $\mathcal { P } \mathcal { P } _ { 0 }$
|
| 80 |
+
3: for $i 1 , \ldots , n _ { g e n }$ do
|
| 81 |
+
4: $p _ { K D E } K D E \big ( \{ f _ { c h e a p } ( N ) | N \in \mathcal { P } \} \big )$
|
| 82 |
+
5: Compute parent distribution $p _ { \mathcal { P } }$ (Eq. 1)
|
| 83 |
+
6: $\mathbf { N } _ { p c } ^ { c } G e n e r a t e C h i l d r e n ( \mathcal { P } , p \mathcal { P } , n _ { p c } )$
|
| 84 |
+
7: Compute children distribution $p _ { c h i l d }$ (Eq.
|
| 85 |
+
2)
|
| 86 |
+
8: $\mathbf { N } _ { a c } ^ { c } \gets A c c e p t S u b S e t ( \mathbf { N } _ { p c } ^ { c } , p _ { c h i l d } , n _ { a c } )$
|
| 87 |
+
9: Evaluate $f _ { e x p }$ for $N ^ { c } \in \mathbf { N } _ { a c } ^ { \varepsilon }$
|
| 88 |
+
10: $\mathcal { P } P a r e t o F r o n t ( \mathcal { P } \cup \mathbf { N } _ { a c } ^ { c } , \mathbf { \hat { f } } )$
|
| 89 |
+
11: end for
|
| 90 |
+
12: return $\mathcal { P }$
|
| 91 |
+
|
| 92 |
+
networks, which we choose to comprise all non-dominated networks with respect to $\mathfrak { f }$ , i.e., the current approximation of the Pareto front2. In every iteration of LEMONADE, we first sample parent networks with respect to some probability distribution based on the cheap objectives and generate child networks by applying network operators (described in Section 3). In a second sampling stage, we sample a subset of children, again based on cheap objectives, and solely this subset is evaluated on the expensive objectives. Hence, we exploit that $f _ { c h e a p }$ is cheap to evaluate in order to bias both sampling processes towards areas of $f _ { c h e a p }$ that are sparsely populated. We thereby evaluate $f _ { c h e a p }$ many times in order to end up with a diverse set of children in sparsely populated regions of the objective space, but evaluate $f _ { e x p }$ only a few times.
|
| 93 |
+
|
| 94 |
+
More specifically, LEMONADE first computes a density estimator $p _ { K D E }$ (e.g., in our case, a kernel density estimator) on the cheap objective values of the current population, $\{ f _ { c h e a p } ( N ) | N \in \mathcal { P } \}$ Note that we explicitly only compute the KDE with respect to $f _ { c h e a p }$ rather than $\mathfrak { f }$ as this allows to evaluate $p _ { K D E } ( f _ { c h e a p } ( N ) )$ very quickly. Then, larger number $n _ { p c }$ of proposed children $\mathbf { N } _ { p c } ^ { c } =$ $\{ N _ { 1 } ^ { c } , \ldots , N _ { n _ { p c } } ^ { c } \}$ is generated by applying network operators, where the parent $N$ for each child is sampled according to a distribution inversely proportional to $p _ { K D E }$ ,
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
p _ { \mathcal { P } } ( N ) = \frac { c } { p _ { K D E } ( f _ { c h e a p } ( N ) ) } ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
with a normalization constant $c = \big ( \sum _ { N \in \mathcal { P } } 1 / p _ { K D E } ( f _ { c h e a p } ( N ) ) \big ) ^ { - 1 }$ . Since children have similar objective values as their parents (network morphisms do not change architectures drastically), this sampling distribution of the parents is more likely to also generate children in less dense regions of $f _ { c h e a p }$ . Afterwards, we again employ $p _ { K D E }$ to sample a subset of $n _ { a c }$ accepted children $\mathbf { N } _ { a c } ^ { c } \subset \mathbf { N } _ { p c } ^ { c }$ The probability of a child being accepted is
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
p _ { c h i l d } ( N ^ { c } ) = \frac { \hat { c } } { p _ { K D E } ( f _ { c h e a p } ( N ^ { c } ) ) } ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
with $\hat { c }$ being another normalization constant. Only these accepted children are evaluated according to $f _ { e x p }$ . By this two-staged sampling strategy we generate and evaluate more children that have the potential to fill gaps in $\mathfrak { f }$ . We refer to the ablation study in Appendix A.2.2 for an empirical comparison of this sampling strategy to uniform sampling. Finally, LEMONADE computes the Pareto front from the current generation and the generated children, yielding the next generation. The described procedure is repeated for a prespecified number of generations (100 in our experiments).
|
| 107 |
+
|
| 108 |
+
# 5 EXPERIMENTS
|
| 109 |
+
|
| 110 |
+
We present results for LEMONADE on searching neural architectures for CIFAR-10. We ran LEMONADE with three different settings: (i) we optimize 5 objectives and search for entire architectures (Section 5.1), (ii) we optimize 2 objectives and search for entire architectures (Appendix A.2), and (iii) we optimize 2 objectives and search for cells (Section 5.2, Appendix A.2). We also transfer the discovered cells from the last setting to ImageNet (Section 5.4) and its down-scaled version ImageNet64x64 (Chrabaszcz et al., 2017) (Section 5.3). All experimental details, such as a description of the search spaces and hyperparameters can be found in Appendix A.3.
|
| 111 |
+
|
| 112 |
+
The progress of LEMONADE for setting (ii) is visualized in Figure 2. The Pareto front improves over time, reducing the validation error while covering a wide regime of, e.g., model parameters, ranging from 10 000 to 10 000 000.
|
| 113 |
+
|
| 114 |
+
# 5.1 EXPERIMENTS ON CIFAR-10
|
| 115 |
+
|
| 116 |
+
We aim at solving the following multi-objective problem: minimize the five objectives (i) performance on CIFAR-10 (expensive objective), (ii) performance on CIFAR-100 (expensive), (iii) number of parameters (cheap), (iv) number of multiply-add operations (cheap) and (v) inference time 3 (cheap). We think having five objectives is a realistic scenario for most NAS applications. Note that one could easily use other, more sophisticated measures for resource efficiency.
|
| 117 |
+
|
| 118 |
+
In this experiment, we search for entire neural network architectures (denoted as Search Space I, see Appendix A.3.2 for details) instead of convolutional cells (which we will do in a later experiment). LEMONADE natively handles this unconstrained, arbitrarily large search space, whereas other methods are by design a-priori restricted to relatively small search spaces (Bender et al., 2018; Liu et al., 2018b). Also, LEMONADE is initialized with trivial architectures (see Appendix A.3.2) rather than networks that already yield state-of-the-art performance (Cai et al., 2018b; Dong et al., 2018). The set of operators to generate child networks we consider in our experiments are the three network morphism operators (insert convolution, insert skip connection, increase number of filters), as well as the three approximate network morphism operators (remove layer, prune filters, replace layer) described in Section 3. The operators are sampled uniformly at random to generate children. The experiment ran for approximately 5 days on 16 GPUs in parallel. The resulting Pareto front consists of approximately 300 neural network architectures.
|
| 119 |
+
|
| 120 |
+

|
| 121 |
+
Figure 2: Progress of the Pareto front of LEMONADE during architecture search. The Pareto front gets more and more densely settled over the course of time. Very large models found (e.g., in generation 25) are discarded in a later generation as smaller, better ones are discovered. Note: generation 1 denotes the generation after one iteration of LEMONADE.
|
| 122 |
+
|
| 123 |
+
We compare against different-sized NASNets (Zoph et al., 2018) and MobileNets V2 (Sandler et al., 2018). In order to ensure that differences in test error are actually caused by differences in the discovered architectures rather than different training conditions, we retrained all architectures from scratch using exactly the same optimization pipeline with the same hyperparameters. We do not use stochastic regularization techniques, such as Shake-Shake (Gastaldi, 2017) or ScheduledDropPath (Zoph et al., 2018) in this experiment as they are not applicable to all networks out of the box.
|
| 124 |
+
|
| 125 |
+
The results are visualized in Figure 3. As one would expect, the performance on CIFAR-10 and CIFAR-100 is highly correlated, hence the resulting Pareto fronts only consist of a few elements and differences are rather small (top left). When considering the performance on CIFAR-10 versus the number of parameters (top right) or multiply-add operations (bottom left), LEMONADE is on par with NASNets and MobileNets V2 for resource-intensive models while it outperforms them in the area of very efficient models (e.g., less than 100,000 parameters). In terms of inference time (bottom right), LEMONADE clearly finds models superior to the baselines. We highlight that this result has been achieved based on using only 80 GPU days for LEMONADE compared to 2000 in Zoph et al. (2018) and with a significantly more complex Search Space I (since the entire architecture was optimized and not only a convolutional cell).
|
| 126 |
+
|
| 127 |
+
We refer to Appendix A.2 for an experiment with additional baselines (e.g., random search) and an ablation study.
|
| 128 |
+
|
| 129 |
+
# 5.2 COMPARISON TO PUBLISHED RESULTS ON CIFAR-10.
|
| 130 |
+
|
| 131 |
+
Above, we compared different models when trained with the exact same data augmentation and training pipeline. We now also briefly compare LEMONADE’s performance to results reported in the literature. We apply two widely used methods to improve results over the training pipeline used above: (i) instead of searching for entire architectures, we search for cells that are employed within a hand-crafted macro architecture, meaning one replaces repeating building blocks in the architecture with discovered cells (Cai et al., 2018b; Dong et al., 2018) and (ii) using stochastic regularization techniques, such as ScheduledDropPath during training (Zoph et al., 2018; Pham et al., 2018; Cai et al., 2018b). In our case, we run LEMONADE to search for cells within the ShakeShake macro architecture (i.e., we replace basic convolutional blocks with cells) and also use ShakeShake regularization (Gastaldi, 2017).
|
| 132 |
+
|
| 133 |
+
<table><tr><td>Method</td><td>Params</td><td>Error (%)</td></tr><tr><td>DPP-Net</td><td>0.5M 0.5M</td><td>4.62 4.57</td></tr><tr><td>LEMONADE DPP-Net</td><td>1.0M</td><td>4.78</td></tr><tr><td>LEMONADE</td><td>1.1M</td><td>3.69 2.65</td></tr><tr><td>NASNet ENAS</td><td>3.3M 4.6M</td><td>2.89</td></tr><tr><td>PLNT</td><td>5.7M</td><td>2.49</td></tr><tr><td>LEMONADE</td><td>4.7M</td><td>3.05</td></tr><tr><td></td><td></td><td></td></tr><tr><td>DPP-Net</td><td>11.4M</td><td>4.36</td></tr><tr><td>PLNT</td><td>14.3M</td><td>2.30</td></tr><tr><td>LEMONADE</td><td>13.1M</td><td>2.58</td></tr></table>
|
| 134 |
+
|
| 135 |
+
Table 1: Comparison of LEMONADE with other NAS methods on CIFAR-10 for different-sized models under identical training conditions.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 3: Comparison of LEMONADE with NASNet and MobileNet V2. LEMONADE optimized five objectives: performance on CIFAR-10 ( $\mathbf { \dot { x } }$ -axis in all plots), performance on CIFAR-100 (top left), number of parameters (top right), number of multiply add operations (bottom left) and inference time (bottom right, measured in seconds on a Titan X GPU).
|
| 139 |
+
|
| 140 |
+
We compare LEMONADE to the state of the art single-objective methods by Zoph et al. (2018) (NASNet), Pham et al. (2018) (ENAS) and Cai et al. (2018b) (PLNT), as well as with the multi-objective method by Dong et al. (2018) (DPP-Net). The results are summarized in Table 1. LEMONADE is on par or outperforms DPP-Net across all parameter regimes. As all other methods solely optimize for accuracy, they do not evaluate models with few parameters. However, also for larger models, LEMONADE is competitive to methods that require significantly more computational resources (Zoph et al., 2018) or start their search with non-trivial architectures (Cai et al., 2018b; Dong et al., 2018).
|
| 141 |
+
|
| 142 |
+
# 5.3 TRANSFER TO IMAGENET64X64
|
| 143 |
+
|
| 144 |
+
To study the transferability of the discovered cells to a different dataset (without having to run architecture search itself on the target dataset), we built architectures suited for ImageNet64x64 (Chrabaszcz et al., 2017) based on five cells discovered on CIFAR-10. We vary (1) the number of cells per block and (2) the number of filters in the last block to obtain different architectures for a single cell (as done by Zoph et al. (2018) for NASNets). We compare against different sized MobileNets V2, NASNets and Wide Residual Networks (WRNs) (Zagoruyko & Komodakis, 2016). For direct comparability, we again train all architectures in the same way.
|
| 145 |
+
|
| 146 |
+
In Figure 4, we plot the Pareto Front from all cells combined, as well as the Pareto Front from a single cell, Cell 2, against the baselines. Both clearly dominate NASNets, WRNs and MobileNets V2 over the entire parameter range, showing that a multi-objective search again is beneficial.
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Top-5 Validation error Figure 4: Transferring the cells discovered on CIFAR-10 to ImageNet64x64. A single Cell, namely Cell 2, outperforms all baselines. Utilizing 5 different cells (red line) further improves the results.
|
| 150 |
+
|
| 151 |
+
# 5.4 TRANSFER TO IMAGENET (MOBILE SETTING)
|
| 152 |
+
|
| 153 |
+
We also evaluated one discovered cell, Cell 2, on the regular ImageNet benchmark for the “mobile setting” (i.e., networks with $4 M$ to $6 M$ parameters and less than $6 0 0 M$ multiply-add operations). The cell found by LEMONADE achieved a top-1 error of $2 8 . 3 \%$ and a top-5 error of ${ \bar { 9 } } . 6 \%$ ; this is slightly worse than published results for, e.g., NASNet $2 6 \%$ and $8 . 4 \%$ , respectively) but still competitive, especially seeing that (due to time and resource constraints), we used an off-the-shelf training pipeline, on a single GPU (for four weeks), and did not alter any hyperparameters. We believe that our cell could perform substantially better with a better optimization pipeline and properly tuned hyperparameters (as in many other NAS papers by authors with more compute resources).
|
| 154 |
+
|
| 155 |
+
# 6 CONCLUSION
|
| 156 |
+
|
| 157 |
+
We have proposed LEMONADE, a multi-objective evolutionary algorithm for architecture search. The algorithm employs a Lamarckian inheritance mechanism based on (approximate) network morphism operators to speed up the training of novel architectures. Moreover, LEMONADE exploits the fact that evaluating several objectives, such as the performance of a neural network, is orders of magnitude more expensive than evaluating, e.g., a model’s number of parameters. Experiments on CIFAR-10 and ImageNet64x64 show that LEMONADE is able to find competitive models and cells both in terms of accuracy and of resource efficiency.
|
| 158 |
+
|
| 159 |
+
We believe that using more sophisticated concepts from the multi-objective evolutionary algorithms literature and using other network operators (e.g., crossovers and advanced compression methods) could further improve LEMONADE’s performance in the future.
|
| 160 |
+
|
| 161 |
+
Acknowledgements We would like to thank Arber Zela and the anonymous reviewers for valuable feedback on this work. We would like to thank Nicole Finnie for supporting us with the ImageNet experiments. This work has partly been supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme under grant no. 716721.
|
| 162 |
+
|
| 163 |
+
# REFERENCES
|
| 164 |
+
|
| 165 |
+
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. ICLR, 2015.
|
| 166 |
+
|
| 167 |
+
Bowen Baker, Otkrist Gupta, Nikhil Naik, and Ramesh Raskar. Designing neural network architectures using reinforcement learning. In International Conference on Learning Representations, 2017a.
|
| 168 |
+
|
| 169 |
+
Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating Neural Architecture Search using Performance Prediction. In arXiv:1705.10823 [cs], 2017b.
|
| 170 |
+
|
| 171 |
+
Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In International Conference on Machine Learning, 2018.
|
| 172 |
+
|
| 173 |
+
Andrew Brock, Theodore Lim, James M. Ritchie, and Nick Weston. SMASH: one-shot model architecture search through hypernetworks. arXiv preprint, 2017.
|
| 174 |
+
|
| 175 |
+
Han Cai, Tianyao Chen, Weinan Zhang, Yong Yu, and Jun Wang. Efficient architecture search by network transformation. In Association for the Advancement of Artificial Intelligence, 2018a.
|
| 176 |
+
|
| 177 |
+
Han Cai, Jiacheng Yang, Weinan Zhang, Song Han, and Yong Yu. Path-Level Network Transformation for Efficient Architecture Search. In International Conference on Machine Learning, June 2018b.
|
| 178 |
+
|
| 179 |
+
Tianqi Chen, Ian J. Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint, 2015.
|
| 180 |
+
|
| 181 |
+
Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. Model compression and acceleration for deep neural networks: The principles, progress, and challenges. IEEE Signal Process. Mag., 35(1): 126–136, 2018.
|
| 182 |
+
|
| 183 |
+
Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the CIFAR datasets. CoRR, abs/1707.08819, 2017. URL http://arxiv.org/ abs/1707.08819.
|
| 184 |
+
|
| 185 |
+
Kalyanmoy Deb and Deb Kalyanmoy. Multi-Objective Optimization Using Evolutionary Algorithms. John Wiley & Sons, Inc., New York, NY, USA, 2001. ISBN 047187339X.
|
| 186 |
+
|
| 187 |
+
Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint, abs/1708.04552, 2017. URL http://arxiv.org/abs/1708. 04552.
|
| 188 |
+
|
| 189 |
+
T. Domhan, J. T. Springenberg, and F. Hutter. Speeding up automatic hyperparameter optimization of deep neural networks by extrapolation of learning curves. In Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI), 2015.
|
| 190 |
+
|
| 191 |
+
Jin-Dong Dong, An-Chieh Cheng, Da-Cheng Juan, Wei Wei, and Min Sun. Dpp-net: Device-aware progressive search for pareto-optimal neural architectures. In European Conference on Computer Vision, 2018.
|
| 192 |
+
|
| 193 |
+
Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Simple And Efficient Architecture Search for Convolutional Neural Networks. In NIPS Workshop on Meta-Learning, 2017.
|
| 194 |
+
|
| 195 |
+
Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. AutoML: Methods, Systems, Challenges, 2018. URL https://www.automl.org/book/.
|
| 196 |
+
|
| 197 |
+
Xavier Gastaldi. Shake-shake regularization. ICLR 2017 Workshop, 2017.
|
| 198 |
+
|
| 199 |
+
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, 2016.
|
| 200 |
+
|
| 201 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016.
|
| 202 |
+
|
| 203 |
+
Geoffrey Hinton, Li Deng, Dong Yu, George Dahl, Abdel rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara Sainath, and Brian Kingsbury. Deep neural networks for acoustic modeling in speech recognition. IEEE Signal Processing Magazine, 2012.
|
| 204 |
+
|
| 205 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint, abs/1503.02531, 2015. URL https://arxiv.org/abs/1503.02531.
|
| 206 |
+
|
| 207 |
+
Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. In arXiv:1704.04861 [cs], April 2017.
|
| 208 |
+
|
| 209 |
+
Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely connected convolutional networks. 2016.
|
| 210 |
+
|
| 211 |
+
Gao Huang, Shichen Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Condensenet: An efficient densenet using learned group convolutions. arXiv preprint, 2017a.
|
| 212 |
+
|
| 213 |
+
Gao Huang, Zhuang Liu, and Kilian Q. Weinberger. Densely Connected Convolutional Networks. In CVPR, 2017b.
|
| 214 |
+
|
| 215 |
+
Forrest N. Iandola, Song Han, Matthew W. Moskewicz, Khalid Ashraf, William J. Dally, and Kurt Keutzer. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and ${ < } 0 . 5 \mathrm { m b }$ model size. arXiv:1602.07360 [cs], 2016.
|
| 216 |
+
|
| 217 |
+
Max Jaderberg, Valentin Dalibard, Simon Osindero, Wojciech M. Czarnecki, Jeff Donahue, Ali Razavi, Oriol Vinyals, Tim Green, Iain Dunning, Karen Simonyan, Chrisantha Fernando, and Koray Kavukcuoglu. Population based training of neural networks. CoRR, abs/1711.09846, 2017. URL http://arxiv.org/abs/1711.09846.
|
| 218 |
+
|
| 219 |
+
Y.-H. Kim, B. Reddy, S. Yun, and Ch. Seo. NEMO: Neuro-evolution with multiobjective optimization of deep neural network for speed and accuracy. In ICML’17 AutoML Workshop, 2017.
|
| 220 |
+
|
| 221 |
+
A. Klein, S. Falkner, J. T. Springenberg, and F. Hutter. Learning curve prediction with Bayesian neural networks. In International Conference on Learning Representations (ICLR) 2017 Conference Track, April 2017.
|
| 222 |
+
|
| 223 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pp. 1097–1105. Curran Associates, Inc., 2012.
|
| 224 |
+
|
| 225 |
+
Chenxi Liu, Barret Zoph, Jonathon Shlens, Wei Hua, Li-Jia Li, Li Fei-Fei, Alan Yuille, Jonathan Huang, and Kevin Murphy. Progressive Neural Architecture Search. In arXiv:1712.00559 [cs, stat], December 2017.
|
| 226 |
+
|
| 227 |
+
Hanxiao Liu, Karen Simonyan, Oriol Vinyals, Chrisantha Fernando, and Koray Kavukcuoglu. Hierarchical Representations for Efficient Architecture Search. In ICLR, 2018a.
|
| 228 |
+
|
| 229 |
+
Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. In arXiv:1806.09055, 2018b.
|
| 230 |
+
|
| 231 |
+
I. Loshchilov and F. Hutter. Sgdr: Stochastic gradient descent with warm restarts. In International Conference on Learning Representations (ICLR) 2017 Conference Track, April 2017.
|
| 232 |
+
|
| 233 |
+
Kaisa Miettinen. Nonlinear Multiobjective Optimization. Springer Science & Business Media, 1999.
|
| 234 |
+
|
| 235 |
+
Risto Miikkulainen, Jason Liang, Elliot Meyerson, Aditya Rawal, Dan Fink, Olivier Francon, Bala Raju, Hormoz Shahrzad, Arshak Navruzyan, Nigel Duffy, and Babak Hodjat. Evolving Deep Neural Networks. In arXiv:1703.00548 [cs], March 2017.
|
| 236 |
+
|
| 237 |
+
Hieu Pham, Melody Y. Guan, Barret Zoph, Quoc V. Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. In International Conference on Machine Learning, 2018.
|
| 238 |
+
|
| 239 |
+
Esteban Real, Sherry Moore, Andrew Selle, Saurabh Saxena, Yutaka Leon Suematsu, Quoc V. Le, and Alex Kurakin. Large-scale evolution of image classifiers. ICML, 2017.
|
| 240 |
+
|
| 241 |
+
Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V. Le. Regularized Evolution for Image Classifier Architecture Search. In arXiv:1802.01548 [cs], February 2018.
|
| 242 |
+
|
| 243 |
+
Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Inverted residuals and linear bottlenecks: Mobile networks for classification, detection and segmentation. CoRR, abs/1801.04381, 2018. URL http://arxiv.org/abs/1801.04381.
|
| 244 |
+
|
| 245 |
+
Shreyas Saxena and Jakob Verbeek. Convolutional neural fabrics. arXiv preprint, 2016.
|
| 246 |
+
|
| 247 |
+
Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary Computation, 10:99–127, 2002.
|
| 248 |
+
|
| 249 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the Inception Architecture for Computer Vision. CVPR, 2016.
|
| 250 |
+
|
| 251 |
+
Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, and Quoc V. Le. Mnasnet: Platform-aware neural architecture search for mobile. arXiv preprint, 2018.
|
| 252 |
+
|
| 253 |
+
Tao Wei, Changhu Wang, Yong Rui, and Chang Wen Chen. Network morphism. arXiv preprint, 2016.
|
| 254 |
+
|
| 255 |
+
Lingxi Xie and Alan Yuille. Genetic CNN. In ICCV, 2017.
|
| 256 |
+
|
| 257 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint, 2016.
|
| 258 |
+
|
| 259 |
+
Hongyi Zhang, Moustapha Cissé, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint, abs/1710.09412, 2017. URL http://arxiv.org/abs/ 1710.09412.
|
| 260 |
+
|
| 261 |
+
Zhao Zhong, Junjie Yan, and Cheng-Lin Liu. Practical Network Blocks Design with Q-Learning. AAAI, 2018.
|
| 262 |
+
|
| 263 |
+
Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In International Conference on Learning Representations, 2017.
|
| 264 |
+
|
| 265 |
+
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V. Le. Learning transferable architectures for scalable image recognition. In Conference on Computer Vision and Pattern Recognition, 2018.
|
| 266 |
+
|
| 267 |
+
# A APPENDIX
|
| 268 |
+
|
| 269 |
+
# A.1 DETAILS ON NETWORK OPERATORS
|
| 270 |
+
|
| 271 |
+
In the following two subsections we give some detailed information on the network morphisms and approximate network morphisms employed in our work.
|
| 272 |
+
|
| 273 |
+
# A.1.1 DETAILS ON NETWORK MORPHISMS
|
| 274 |
+
|
| 275 |
+
A network morphism is a network operator satisfying the network morphism equation:
|
| 276 |
+
|
| 277 |
+
i.e., $N ^ { w }$ and $( T N ) ^ { \tilde { w } }$ represent the same function. This can be achieved by properly initializing $\tilde { w }$
|
| 278 |
+
|
| 279 |
+
Network morphism Type I. Let $N _ { i } ^ { w _ { i } } ( x )$ be some part of a neural architecture $N ^ { w } ( x )$ , e.g., a layer or a subnetwork. We replace $N _ { i } ^ { w _ { i } }$ by
|
| 280 |
+
|
| 281 |
+
$$
|
| 282 |
+
\tilde { N } _ { i } ^ { \tilde { w } _ { i } } ( x ) = A N _ { i } ^ { w _ { i } } ( x ) + b ,
|
| 283 |
+
$$
|
| 284 |
+
|
| 285 |
+
with $\tilde { w } _ { i } = ( w _ { i } , A , b )$ . The network morphism equation (3) then holds for $A = \mathbf { 1 } , b = \mathbf { 0 }$ . This morphism can be used to add a fully-connected or convolutional layer, as these layers are simply linear mappings. Chen et al. (2015) dubbed this morphism ”Net2DeeperNet”. Alternatively to the above replacement, one could also choose
|
| 286 |
+
|
| 287 |
+
$$
|
| 288 |
+
\tilde { N } _ { i } ^ { \tilde { w } _ { i } } ( x ) = C ( A N _ { i } ^ { w _ { i } } ( x ) + b ) + d ,
|
| 289 |
+
$$
|
| 290 |
+
|
| 291 |
+
with $\tilde { w } _ { i } = ( w _ { i } , C , d )$ . $A , b$ are fixed, non-learnable. In this case, network morphism Equation (3) holds if $C = A ^ { - 1 } , d = - C b$ . A Batch Normalization layer (or other normalization layers) can be written in the above form: $A , b$ represent the batch statistics and $C , d$ the learnable scaling and shifting.
|
| 292 |
+
|
| 293 |
+
Network morphism Type II. Assume $N _ { i } ^ { w _ { i } }$ has the form $N _ { i } ^ { w _ { i } } ( x ) = A h ^ { w _ { h } } ( x ) + b$ for an arbitrary function $h$ . We replace $N _ { i } ^ { w _ { i } }$ , $w _ { i } = ( w _ { h } , \dot { A } , b )$ , by
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
\tilde { N } _ { i } ^ { \tilde { w } _ { i } } ( x ) = ( A \quad \tilde { A } ) \left( { h } ^ { w _ { h } } ( x ) \right) + b
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
with an arbitrary function $\tilde { h } ^ { w _ { \tilde { h } } } ( x )$ . The new parameters are $\tilde { w } _ { i } = ( w _ { i } , w _ { \tilde { h } } , \tilde { A } )$ . Again, Equation (3) can trivially be satisfied by setting $\tilde { A } = 0$ . We can think of two modifications of a neural network that can be expressed by this morphism: firstly, a layer can be widened (i.e., increasing the number of units in a fully connected layer or the number of channels in a CNN - the Net2WiderNet transformation of Chen et al. (2015)). Let $h ( x )$ be the layer to be widened. For example, we can then set ${ \tilde { h } } = h$ to simply double the width. Secondly, skip-connections by concatenation as used by Huang et al. (2016) can also be expressed. If $h ( x )$ itself is a sequence of layers, $h ( x ) = h _ { n } ( x ) \circ \cdots \circ h _ { 0 } ( x )$ , then one could choose $\tilde { h } ( x ) = x$ to realize a skip from $h _ { 0 }$ to the layer subsequent to $h _ { n }$ .
|
| 300 |
+
|
| 301 |
+
Network morphism Type III. By definition, every idempotent function $N _ { i } ^ { w _ { i } }$ can simply be replaced by
|
| 302 |
+
|
| 303 |
+
$$
|
| 304 |
+
N _ { i } ^ { ( w _ { i } , \tilde { w } _ { i } ) } = N _ { i } ^ { \tilde { w } _ { i } } \circ N _ { i } ^ { w _ { i } }
|
| 305 |
+
$$
|
| 306 |
+
|
| 307 |
+
with the initialization $\tilde { w } _ { i } = w _ { i }$ . This trivially also holds for idempotent functions without weights, e.g., ReLU.
|
| 308 |
+
|
| 309 |
+
Network morphism Type IV. Every layer $N _ { i } ^ { w _ { i } }$ is replaceable by
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\tilde { N } _ { i } ^ { \tilde { w } _ { i } } ( x ) = \lambda N _ { i } ^ { w _ { i } } ( x ) + ( 1 - \lambda ) h ^ { w _ { h } } ( x ) , \quad \tilde { w } _ { i } = ( w _ { i } , \lambda , w _ { h } )
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
with an arbitrary function $h$ and Equation (3) holds if the learnable parameter $\lambda$ is initialized as 1. This morphism can be used to incorporate any function, especially any non-linearity. For example, Wei et al. (2016) use a special case of this operator to deal with non-linear, non-idempotent activation functions. Another example would be the insertion of an additive skip connection, which were proposed by He et al. (2016) to simplify training: If $N _ { i } ^ { w _ { i } }$ itself is a sequence of layers, $N _ { i } ^ { w _ { i } } = N _ { i _ { n } } ^ { w _ { i _ { n } } } \circ \cdot \cdot \cdot \circ N _ { i _ { 0 } } ^ { w _ { i _ { 0 } } }$ , then one could choose $h ( x ) = x$ to realize a skip from $N _ { i _ { 0 } } ^ { w _ { i _ { 0 } } }$ to the layer subsequent to $N _ { i _ { n } } ^ { w _ { i _ { n } } }$ .
|
| 316 |
+
|
| 317 |
+
Note that every combination of network morphisms again yields a network morphism. Hence, one could, for example, add a block “Conv-BatchNorm-ReLU” subsequent to a ReLU layer by using Equations (4), (5) and (7).
|
| 318 |
+
|
| 319 |
+
# A.1.2 DETAILS ON APPROXIMATE NETWORK MORPHISMS
|
| 320 |
+
|
| 321 |
+
Let $T$ be an operator on some space of neural networks $\mathcal { N } ( \mathcal { X } )$ , $p ( x )$ a distribution on $\mathcal { X }$ and $\epsilon > 0$ . We say $T$ is an $\epsilon$ -approximate network morphism (ANM) with respect to a neural network $N ^ { w }$ with parameters $w$ iff
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\Delta ( T , N , w ) : = \operatorname* { m i n } _ { \tilde { w } } E _ { p ( x ) } \big [ d \big ( N ^ { w } ( x ) , ( T N ) ^ { \tilde { w } } ( x ) \big ) \big ] \leq \epsilon ,
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
for some measure of distance $d$ . Obviously, every network morphism is an $\epsilon$ -approximate network morphism (for every $\epsilon$ ) and the optimal $\tilde { w }$ is determined by the function-preserving property.
|
| 328 |
+
|
| 329 |
+
Unfortunately, one will not be able to evaluate the right hand side of Equation (9) in general since the true data distribution $p ( x )$ is unknown. Therefore, in practice, we resort to its empirical counterpart $\begin{array} { r } { \tilde { \Delta } ( T , N , w ) : = \operatorname* { m i n } _ { \tilde { w } } \frac { 1 } { | X _ { t r a i n } | } { \sum _ { x \in X _ { t r a i n } } } d ( N ^ { w } ( x ) , ( T N ) ^ { \tilde { w } } ( x ) ) } \end{array}$ for given training data $X _ { t r a i n } \subset \mathcal { X }$ . An approximation to the optimal $\tilde { w }$ can be found with the same algorithm as for training, e.g., SGD. This approach is akin to knowledge distillation (Hinton et al., 2015). We simply use categorical crossentropy as a measure of distance.
|
| 330 |
+
|
| 331 |
+
As retraining the entire network via distillation after applying an ANM is still very expensive, we further reduce computational costs as follows: in cases where the operators only affect some layers in the network, e.g., the layer to be removed as well as its immediate predecessor and successor layers, we let $T N$ first inherit all weights of $N$ except the weights of the affected layers. We then freeze the weights of unaffected layers and train only the affected weights for a few epochs.
|
| 332 |
+
|
| 333 |
+
In our experiments, we employ the following ANM’s: (i) remove a randomly chosen layer or a skip connection, (ii) prune a randomly chosen convolutional layer (i.e., remove $1 / 2$ or $1 / 4$ of its filters), and (iii) substitute a randomly chosen convolution by a depthwise separable convolution. We train the affected layers for 5 epochs as described above to minimize the left hand side of Equation 9. Note that these operators could easily be extended by sophisticated methods for compressing neural networks (Han et al., 2016; Cheng et al., 2018).
|
| 334 |
+
|
| 335 |
+
# A.2 ADDITIONAL EXPERIMENTS
|
| 336 |
+
|
| 337 |
+
We ran another experiment on CIFAR-10 to compare against additional baselines and also conducted some ablation studies. For the sake of simplicity and computational resource, we solely optimize two objectives: beside validation error as first objective to be minimized, we use $\log ( \# p a \dot { r a } \dot { m } s ( N ) )$ as a second objective as a proxy for memory consumption. We again use an identical training setup to guarantee that differences in performance are actually due to the model architecture.
|
| 338 |
+
|
| 339 |
+
# A.2.1 ADDITIONAL BASELINES
|
| 340 |
+
|
| 341 |
+
We compare the performance of the following methods and hand-crafted architectures:
|
| 342 |
+
|
| 343 |
+
1. LEMONADE on Search Space I (i.e., searching for entire architectures)
|
| 344 |
+
2. LEMONADE on Search Space II (i.e., seachring for convolutional cells)
|
| 345 |
+
3. Networks from generation 1 of LEMONADE. One could argue that the progress in Figure 2 is mostly due to pretrained models being trained further. To show that this is not the case, we also evaluated all models from generation 1.
|
| 346 |
+
4. Different-sized versions of MobileNet V1,V2 (Howard et al., 2017; Sandler et al., 2018); these are manually designed architecture aiming for small resource-consumption while retaining high predictive performance.
|
| 347 |
+
5. Different-sized NASNets (Zoph et al., 2018); NASNets are the result of neural architecture search by reinforcement learning and previously achieved state-of-the-art performance on CIFAR-10.
|
| 348 |
+
6. A random search baseline, where we generated random networks, trained and evaluated them and computed the resulting Pareto front (with respect to the validation data). The number and parameter range of these random networks as well as the training time (for evaluating validation performance) was exactly the same as for LEMONADE to guarantee a fair comparison.
|
| 349 |
+
|
| 350 |
+
Results are illustrated in Figure 5; we also refer to Table 2 for detailed numbers.
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 5: Performance on CIFAR-10 test data of models that have been trained under identical conditions.
|
| 354 |
+
Table 2: Comparison between LEMONADE (SS-I), Random Search, NASNet, MobileNet and MobileNet V2 on CIFAR-10 for different model sizes.
|
| 355 |
+
|
| 356 |
+
<table><tr><td>MODEL</td><td>PARAMS</td><td>ERROR (%)</td></tr><tr><td>MOBILENET</td><td>40K</td><td>11.5</td></tr><tr><td>MOBILENET V2</td><td>68K</td><td>11.5</td></tr><tr><td>NASNET</td><td>38K</td><td>12.0</td></tr><tr><td>RANDOM SEARCH</td><td>48K</td><td>10.0</td></tr><tr><td>LEMONADE</td><td>47K</td><td>8.9</td></tr><tr><td>MOBILENET</td><td>221K</td><td>6.8</td></tr><tr><td>MOBILENET V2</td><td>232K</td><td>6.3</td></tr><tr><td>NASNET</td><td>193K</td><td>6.8</td></tr><tr><td>RANDOM SEARCH</td><td>180K</td><td>6.3</td></tr><tr><td>LEMONADE</td><td>190K</td><td>5.5</td></tr><tr><td>MOBILENET</td><td>834K</td><td>5.0</td></tr><tr><td>MOBILENET V2</td><td>850K</td><td>4.6</td></tr><tr><td>NASNET</td><td>926K</td><td>4.7</td></tr><tr><td>RANDOM SEARCH</td><td>1.2M</td><td>5.3</td></tr><tr><td>LEMONADE</td><td>882K</td><td>4.6</td></tr><tr><td>MOBILENET</td><td>3.2M</td><td>4.5</td></tr><tr><td>MOBILENETV2</td><td>3.2M</td><td>3.8</td></tr><tr><td>NASNET</td><td>3.3M</td><td>3.7</td></tr><tr><td>RANDOM SEARCH</td><td>2.0M</td><td>4.4</td></tr><tr><td></td><td></td><td></td></tr><tr><td>LEMONADE</td><td>3.4M</td><td>3.6</td></tr></table>
|
| 357 |
+
|
| 358 |
+
# A.2.2 ABLATION STUDY
|
| 359 |
+
|
| 360 |
+
LEMONADE essentially consists of three components: (i) additionally using approximate network morphism operators to also allow shrinking architectures, (ii) using Lamarckism, i.e., (approximate) network morphisms, to avoid training from scratch, and (iii) the two-staged sampling strategy. In Figure 6, we present results for deactivating each of these components one at a time. The result shows that all three components improve LEMONADE’s performance.
|
| 361 |
+
|
| 362 |
+
# A.3 EXPERIMENTAL DETAILS
|
| 363 |
+
|
| 364 |
+
In this section we list all the experimental details.
|
| 365 |
+
|
| 366 |
+
# A.3.1 DETAILS ON SEARCHING FOR ENTIRE ARCHITECTURES (SEARCH SPACE I)
|
| 367 |
+
|
| 368 |
+
Search Space I corresponds to searching for an entire architecture (rather than cells). LEMONADE’s Pareto front was initialized to contain four simple convolutional networks with relatively large validation errors of $3 0 - 5 0 \%$ . All four initial networks had the following structure: three Conv
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
Figure 6: Ablation study on CIFAR-10. We deactivate different components of LEMONADE and investigate the impact. LEMONADE default: Performance of LEMONADE as proposed in this work. LEMONADE no ANM: we deactivated the approximate network morphisms operators, i.e., networks can only grow in size. LEMONADE no Lamarckism: all networks are initialized from scratch instead by means of (approximate) network morphisms. LEMONADE no KDE: we deactivate the proposed sampling strategy and use uniform sampling of parents and children instead.
|
| 372 |
+
|
| 373 |
+
BatchNorm-ReLU blocks with intermittent Max-Pooling, followed by a global average pooling and a fully-connected layer with softmax activation. The networks differ in the number of channels in the convolutions, and for further diversity two of them used depthwise-separable convolutions. The models had 15 000, 50 000, 100 000 and 400 000 parameters, respectively. For generating children in LEMONADE, we chose the number of operators that are applied to parents uniformly from {1,2,3}.LEMONADE natively handles this unconstrained, arbitrary large search space, whereas other methods are by design restricted a-priori to relatively small search spaces (Bender et al., 2018; Liu et al., 2018b).
|
| 374 |
+
|
| 375 |
+
We restricted the space of neural architectures such that every architecture must contain at least 3 (depthwise separable) convolutions with a minimum number of filters, which lead to a lower bound on the number of parameters of approximately 10 000.
|
| 376 |
+
|
| 377 |
+
The network operators implicitly define the search space, we do not limit the size of discovered architectures.
|
| 378 |
+
|
| 379 |
+
# A.3.2 DETAILS ON SEARCHING FOR CONVOLUTIONAL CELLS (SEARCH SPACE II)
|
| 380 |
+
|
| 381 |
+
Search Space II consists of convolutional cells that are used within some macro architecture to build the neural network. In the experiments in Section 5, we use cells within the macro architecture of the Shake-Shake architecture (Gastaldi, 2017), whereas in the baseline experiment in the appendix (Section A.2), we rely on a simpler scheme as in as in Liu et al. (2017), i.e., sequentially stacking cells. We only choose a single operator to generate children, but the operator is applied to all occurrences of the cell in the architecture. The Pareto Front was again initialized with four trivial cells: the first two cells consist of a single convolutional layer (followed by BatchNorm and ReLU) with $F = 1 2 8$ and $F = 2 5 6$ filters in the last block, respectively. The other two cells consist of a single depthwise separable convolution (followed by BatchNorm and ReLU), again with either $F = 1 2 8$ or $F = 2 5 6$ filters.
|
| 382 |
+
|
| 383 |
+
# A.3.3 DETAILS ON VARYING THE SIZE OF MOBILENETS AND NASNETS
|
| 384 |
+
|
| 385 |
+
To classify CIFAR-10 with MobileNets V1 and V2, we replaced three blocks with stride 2 with identical blocks with stride 1 to adapt the networks to the lower spatial resolution of the input.
|
| 386 |
+
|
| 387 |
+
We chose the replaced blocks so that there are the same number of stride 1 blocks between all stride 2 blocks. We varied the size of MobileNets V1 and V2 by varying the width multiplier $\alpha \in \{ 0 . 1 , 0 . 2 , \ldots , 1 . 2 \}$ and NASNets by varying the number of cell per block $( \in \{ 2 , 4 , 6 , 8 \}$ ) and number of filters $( \in \{ 9 6 , 1 9 2 , 3 8 4 , 7 6 8 , 1 5 3 6 \} )$ ) in the last block.
|
| 388 |
+
|
| 389 |
+
# A.3.4 DETAILS ON CIFAR-10 TRAINING
|
| 390 |
+
|
| 391 |
+
We apply the standard data augmentation scheme described by Loshchilov & Hutter (2017), as well as the recently proposed methods mixup (Zhang et al., 2017) and Cutout (Devries & Taylor, 2017). The training set is split up in a training (45.000) and a validation (5.000) set for the purpose of architecture search. We use weight decay $( 5 \cdot 1 0 ^ { - 4 } )$ for all models. We use batch size 64 throughout all experiments. During architecture search as well as for generating the random search baseline, all models are trained for 20 epochs using SGD with cosine annealing (Loshchilov & Hutter, 2017), decaying the learning rate from 0.01 to 0. For evaluating the test performance, all models are trained from scratch on the training and validation set with the same setup as described above except for 1) we train for 600 epochs and 2) the initial learning rate is set to 0.025. While searching for convolutional cells on CIFAR-10, LEMONADE ran for approximately 56 GPU days. However, there were no significant changes in the Pareto front after approximately 24 GPU days. The training setup (both during architecture search and final evaluation) is exactly the same as before.
|
| 392 |
+
|
| 393 |
+
# A.3.5 DETAILS ON IMAGENET64X64 TRAINING
|
| 394 |
+
|
| 395 |
+
The training setup on ImageNet64x64 is identical to Chrabaszcz et al. (2017).
|
| 396 |
+
|
| 397 |
+
# A.4 ADDITIONAL FIGURES
|
| 398 |
+
|
| 399 |
+
Below we list some additional figures.
|
| 400 |
+
|
| 401 |
+

|
| 402 |
+
Figure 7: Comparison of LEMONADE with other NAS methods and hand-crafted architectures on CIFAR-10. This plot shows the same results as Figure 5 but zoomed into the range of errors less than $0 . 0 6 \%$ .
|
| 403 |
+
|
| 404 |
+

|
| 405 |
+
|
| 406 |
+
Figure 8: Transferring the cells discovered on CIFAR-10 to ImageNet64x64. Top-1 validation error.
|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
Figure 9: Cell 0. Largest discovered cell.
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
Figure 10: Cell 2
|
| 413 |
+
|
| 414 |
+

|
| 415 |
+
Figure 11: Cell 6
|
| 416 |
+
|
| 417 |
+

|
| 418 |
+
Figure 12: Cell 9
|
| 419 |
+
|
| 420 |
+

|
| 421 |
+
Figure 13: Cell 18
|
| 422 |
+
|
| 423 |
+

|
| 424 |
+
Figure 14: Cell 21. The smallest possible cell in our search space is also discovered.
|
md/train/ByZvfijeg/ByZvfijeg.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# HIGHER ORDER RECURRENT NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Rohollah Soltani & Hui Jiang
|
| 4 |
+
Department of Computer Science and Engineering
|
| 5 |
+
York University
|
| 6 |
+
Toronto, CA
|
| 7 |
+
{rsoltani,hj}@cse.yorku.ca
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
In this paper, we study novel neural network structures to better model long term dependency in sequential data. We propose to use more memory units to keep track of more preceding states in recurrent neural networks (RNNs), which are all recurrently fed to the hidden layers as feedback through different weighted paths. By extending the popular recurrent structure in RNNs, we provide the models with better short-term memory mechanism to learn long term dependency in sequences. Analogous to digital filters in signal processing, we call these structures as higher order RNNs (HORNNs). Similar to RNNs, HORNNs can also be learned using the back-propagation through time method. HORNNs are generally applicable to a variety of sequence modelling tasks. In this work, we have examined HORNNs for the language modeling task using two popular data sets, namely the Penn Treebank (PTB) and English text8. Experimental results have shown that the proposed HORNNs yield the state-of-the-art performance on both data sets, significantly outperforming the regular RNNs as well as the popular LSTMs.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
In the recent resurgence of neural networks in deep learning, deep neural networks have achieved successes in various real-world applications, such as speech recognition, computer vision and natural language processing. Deep neural networks (DNNs) with a deep architecture of multiple nonlinear layers are an expressive model that can learn complex features and patterns in data. Each layer of DNNs learns a representation and transfers them to the next layer and the next layer may continue to extract more complicated features, and finally the last layer generates the desirable output. From early theoretical work, it is well known that neural networks may be used as the universal approximators to map from any fixed-size input to another fixed-size output. Recently, more and more empirical results have demonstrated that the deep structure in DNNs is not just powerful in theory but also can be reliably learned in practice from a large amount of training data.
|
| 16 |
+
|
| 17 |
+
Sequential modeling is a challenging problem in machine learning, which has been extensively studied in the past. Recently, many deep neural network based models have been successful in this area, as shown in various tasks such as language modeling Mikolov (2012), sequence generation Graves (2013); Sutskever et al. (2011), machine translation Sutskever et al. (2014) and speech recognition Graves et al. (2013). Among various neural network models, recurrent neural networks (RNNs) are appealing for modeling sequential data because they can capture long term dependency in sequential data using a simple mechanism of recurrent feedback. RNNs can learn to model sequential data over an extended period of time, then carry out rather complicated transformations on the sequential data. RNNs have been theoretically proved to be a turing complete machine Siegelmann & Sontag (1995). RNNs in principle can learn to map from one variable-length sequence to another. When unfolded in time, RNNs are equivalent to very deep neural networks that share model parameters and receive the input at each time step. The recursion in the hidden layer of RNNs can act as an excellent memory mechanism for the networks. In each time step, the learned recursion weights may decide what information to discard and what information to keep in order to relay onwards along time. While RNNs are theoretically powerful, the learning of RNNs needs to use the back-propagation through time (BPTT) method Werbos (1990) due to the internal recurrent cycles. Unfortunately, in practice, it turns out to be rather difficult to train RNNs to capture long-term dependency due to the fact that the gradients in BPTT tend to either vanish or explode Bengio et al. (1994). Many heuristic methods have been proposed to solve these problems. For example, a simple method, called gradient clipping, is used to avoid gradient explosion Mikolov (2012). However, RNNs still suffer from the vanishing gradient problem since the gradients decay gradually as they are back-propagated through time. As a result, some new recurrent structures are proposed, such as long short-term memory (LSTM) Hochreiter & Schmidhuber (1997) and gated recurrent unit (GRU) Cho et al. (2014). These models use some learnable gates to implement rather complicated feedback structures, which ensure that some feedback paths can allow the gradients to flow back in time effectively. These models have given promising results in many practical applications, such as sequence modeling Graves (2013), language modeling Sundermeyer et al. (2012), hand-written character recognition Liwicki et al. (2012), machine translation Cho et al. (2014), speech recognition Graves et al. (2013).
|
| 18 |
+
|
| 19 |
+
In this paper, we explore an alternative method to learn recurrent neural networks (RNNs) to model long term dependency in sequential data. We propose to use more memory units to keep track of more preceding RNN states, which are all recurrently fed to the hidden layers as feedback through different weighted paths. Analogous to digital filters in signal processing, we call these new recurrent structures as higher order recurrent neural networks (HORNNs). At each time step, the proposed HORNNs directly combine multiple preceding hidden states from various history time steps, weighted by different matrices, to generate the feedback signal to each hidden layer. By aggregating more history information of the RNN states, HORNNs are provided with better short-term memory mechanism than the regular RNNs. Moreover, those direct connections to more previous RNN states allow the gradients to flow back smoothly in the BPTT learning stage. All of these ensure that HORNNs can be more effectively learned to capture long term dependency. Similar to RNNs and LSTMs, the proposed HORNNs are general enough for variety of sequential modeling tasks. In this work, we have evaluated HORNNs for the language modeling task on two popular data sets, namely the Penn Treebank (PTB) and English text8 sets. Experimental results have shown that HORNNs yield the state-of-the-art performance on both data sets, significantly outperforming the regular RNNs as well as the popular LSTMs.
|
| 20 |
+
|
| 21 |
+
# 2 RELATED WORK
|
| 22 |
+
|
| 23 |
+
Hierarchical recurrent neural network proposed in Hihi & Bengio (1996) is one of the earliest papers that attempt to improve RNNs to capture long term dependency in a better way. It proposes to add linear time delayed connections to RNNs to improve the gradient descent learning algorithm to find a better solution, eventually solving the gradient vanishing problem. However, in this early work, the idea of multi-resolution recurrent architectures has only been preliminarily examined for some simple small-scale tasks. This work is somehow relevant to our work in this paper but the higher order RNNs proposed here differs in several aspects. Firstly, we propose to use weighted connections in the structure, instead of simple multi-resolution short-cut paths. This makes our models fall into the category of higher order models. Secondly, we have proposed to use various pooling functions in generating the feedback signals, which is critical in normalizing the dynamic ranges of gradients flowing from various paths. Our experiments have shown that the success of our models is largely attributed to this technique.
|
| 24 |
+
|
| 25 |
+
The most successful approach to deal with vanishing gradients so far is to use long short term memory (LSTM) model Hochreiter & Schmidhuber (1997). LSTM relies on a fairly sophisticated structure made of gates to control flow of information to the hidden neurons. The drawback of the LSTM is that it is complicated and slow to learn. The complexity of this model makes the learning very time consuming, and hard to scale for larger tasks. Another approach to address this issue is to add a hidden layer to RNNs Mikolov et al. (2014). This layer is responsible for capturing longer term dependencies in input data by making its weight matrix close to identity. Recently, clockwork RNNs Koutnik et al. (2014) are proposed to address this problem as well, which splits each hidden layer into several modules running at different clocks. Each module receives signals from input and computes its output at a predefined clock rate. Gated feedback recurrent neural networks Chung et al. (2015) attempt to implement a generalized version using the gated feedback connection between layers of stacked RNNs, allowing the model to adaptively adjust the connection between consecutive hidden layers.
|
| 26 |
+
|
| 27 |
+
Besides, short-cut skipping connections were considered earlier in Wermter (1992), and more recently have been found useful in learning very deep feed-forward neural networks as well, such as Lee et al. (2014); He et al. (2015). These skipping connections between various layers of neural networks can improve the flow of information in both forward and backward passes. Among them, highway networks Srivastava et al. (2015) introduce rather sophisticated skipping connections between layers, controlled by some gated functions.
|
| 28 |
+
|
| 29 |
+
# 3 HIGHER ORDER RECURRENT NEURAL NETWORKS
|
| 30 |
+
|
| 31 |
+
A recurrent neural network (RNN) is a type of neural network suitable for modeling a sequence of arbitrary length. At each time step $t$ , an RNN receives an input $\mathbf { x } _ { t }$ , the state of the RNN is updated recursively as follows (as shown in the left part of Figure 1):
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\mathbf { h } _ { t } = f ( W _ { i n } \mathbf { x } _ { t } + W _ { h } \mathbf { h } _ { t - 1 } )
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
where $f ( \cdot )$ is an nonlinear activation function, such as sigmoid or rectified linear (ReLU), and $W _ { i n }$ is the weight matrix in the input layer and $W _ { h }$ is the state to state recurrent weight matrix. Due to the recursion, this hidden layer may act as a short-term memory of all previous input data.
|
| 38 |
+
|
| 39 |
+
Given the state of the RNN, i.e., the current activation signals in the hidden layer $\mathbf { h } _ { t }$ , the RNN generates the output according to the following equation:
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\mathbf { y } _ { t } = g ( W _ { o u t } \mathbf { h } _ { t } )
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $g ( \cdot )$ denotes the softmax function and $W _ { o u t }$ is the weight matrix in the output layer. In principle, this model can be trained using the back-propagation through time (BPTT) algorithm Werbos (1990). This model has been used widely in sequence modeling tasks like language modeling Mikolov (2012).
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 1: Comparison of model structures between an RNN (1st order) and a higher order RNN (3rd order). The symbol $z ^ { - 1 }$ denotes a time-delay unit (equivalent to a memory unit).
|
| 49 |
+
|
| 50 |
+
# 3.1 HIGHER ORDER RNNS (HORNNS)
|
| 51 |
+
|
| 52 |
+
RNNs are very deep in time and the hidden layer at each time step represents the entire input history, which acts as a short-term memory mechanism. However, due to the gradient vanishing problem in back-propagation, it turns out to be very difficult to learn RNNs to model long-term dependency in sequential data.
|
| 53 |
+
|
| 54 |
+
In this paper, we extend the standard RNN structure to better model long-term dependency in sequential data. As shown in the right part of Figure 1, instead of using only the previous RNN state as the feedback signal, we propose to employ multiple memory units to generate the feedback signal at each time step by directly combining multiple preceding RNN states in the past, where these timedelayed RNN states go through separate feedback paths with different weight matrices. Analogous to the filter structures used in signal processing, we call this new recurrent structure as higher order RNNs, HORNNs in short. The order of HORNNs depends on the number of memory units used for feedback. For example, the model used in the right of Figure 1 is a 3rd-order HORNN. On the other hand, regular RNNs may be viewed as 1st-order HORNNs.
|
| 55 |
+
|
| 56 |
+
In HORNNs, the feedback signal is generated by combining multiple preceding RNN states. Therefore, the state of an $N$ -th order HORNN is recursively updated as follows:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathbf { h } _ { t } = f \left( W _ { i n } \mathbf { x } _ { t } + \sum _ { n = 1 } ^ { N } W _ { h n } \mathbf { h } _ { t - n } \right)
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\{ W _ { h n } \mid n = 1 , \cdot \cdot \cdot N \}$ denotes the weight matrices used for various feedback paths. Similar to
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
Figure 2: Unfolding a 3rd-order HORNN
|
| 68 |
+
Figure 3: Illustration of all back-propagation paths in BPTT for a 3rd-order HORNN.
|
| 69 |
+
|
| 70 |
+
RNNs, HORNNs can also be unfolded in time to get rid of the recurrent cycles. As shown in Figure 2, we unfold a 3rd-order HORNN in time, which clearly shows that each HORNN state is explicitly decided by the current input $\mathbf { x } _ { t }$ and all previous 3 states in the past. This structure looks similar to the skipping short-cut paths in deep neural networks but each path in HORNNs maintains a learnable weight matrix. The new structure in HORNNs can significantly improve the model capacity to capture long-term dependency in sequential data. At each time step, by explicitly aggregating multiple preceding hidden activities, HORNNs may derive a good representation of the history information in sequences, leading to a significantly enhanced short-term memory mechanism.
|
| 71 |
+
|
| 72 |
+
During the backprop learning procedure, these skipping paths directly connected to more previous hidden states of HORNNs may allow the gradients to flow more easily back in time, which eventually leads to a more effective learning of models to capture long term dependency in sequences. Therefore, this structure may help to largely alleviate the notorious problem of vanishing gradients in the RNN learning.
|
| 73 |
+
|
| 74 |
+
Obviously, HORNNs can be learned using the same BPTT algorithm as regular RNNs, except that the error signals at each time step need to be back-propagated to multiple feedback paths in the network. As shown in Figure 3, for a 3rd-order HORNN, at each time step $t$ , the error signal from the hidden layer $\mathbf { h } _ { t }$ will have to be back-propagated into four different paths: i) the first one back to the input layer, $\mathbf { x } _ { t }$ ; ii) three more feedback paths leading to three different histories in time scales, namely $\mathbf { h } _ { t - 1 } , \mathbf { h } _ { t - 2 }$ and $\mathbf { h } _ { t - 3 }$ .
|
| 75 |
+
|
| 76 |
+
Interestingly enough, if we use a fully-unfolded implementation for HORNNs as in Figure 2, the overall computation complexity is comparable with regular RNNs. Given a whole sequence, we may first simultaneously compute all hidden activities (from $\mathbf { x } _ { t }$ to $\mathbf { h } _ { t }$ for all $t$ ). Secondly, we recursively update $\mathbf { h } _ { t }$ for all $t$ using eq.(3). Finally, we use GPUs to compute all outputs together from the updated hidden states (from $\mathbf { h } _ { t }$ to $\mathbf { y } _ { t }$ for all $t$ ) based on eq.(2). The backward pass in learning can also be implemented in the same three-step procedure. Except the recursive updates in the second step (this issue remains the same in regular RNNs), all remaining computation steps can be formulated as large matrix multiplications. As a result, the computation of HORNNs can be implemented fairly efficiently using GPUs.
|
| 77 |
+
|
| 78 |
+
# 3.2 POOLING FUNCTIONS FOR HORNNS
|
| 79 |
+
|
| 80 |
+
As discussed above, the shortcut paths in HORNNs may help the models to capture long-term dependency in sequential data. On the other hand, they may also complicate the learning in a different way. Due to different numbers of hidden layers along various paths, the signals flowing from different paths may vary dramatically in the dynamic range. For example, in the forward pass in Figure 2, three different feedback signals from different time scales, e.g. $\mathbf { h } _ { t - 1 }$ , $\mathbf { h } _ { t - 2 }$ and $\mathbf { h } _ { t - 3 }$ , flow into the hidden layer to compute the new hidden state $\mathbf { h } _ { t }$ . The dynamic range of these signals may vary dramatically from case to case. The situation may get even worse in the backward pass during the BPTT learning. For example, in a 3rd-order HORNN in Figure 2, the node $\mathbf { h } _ { t - 3 }$ may directly receive an error signal from the node $\mathbf { h } _ { t }$ . In some cases, it may get so strong as to overshadow other error signals coming from closer neighbours of $\mathbf { h } _ { t - 1 }$ and $\mathbf { h } _ { t - 2 }$ . This may impede the learning of HORNNs, yielding slow convergence or even poor performance.
|
| 81 |
+
|
| 82 |
+
Here, we have proposed to use some pooling functions to calibrate the signals from different feedback paths before they are used to recursively generate a new hidden state, as shown in Figure 4. In the following, we will investigate three different choices for the pooling function in Figure 4, including max-based pooling, FOFE-based pooling and gated pooling.
|
| 83 |
+
|
| 84 |
+
# 3.2.1 MAX-BASED POOLING
|
| 85 |
+
|
| 86 |
+
Max-based pooling is a simple strategy that chooses the most responsive unit (exhibiting the largest activation value) among various paths to transfer to the hidden layer to generate the new hidden state. Many biological experiments have shown that biological neuron networks tend to use a similar strategy in learning and firing.
|
| 87 |
+
|
| 88 |
+
In this case, instead of using eq.(3), we use the following formula to update the hidden state of HORNNs:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathbf { h } _ { t } = f { \Big ( } W _ { i n } \mathbf { x } _ { t } + \operatorname* { m a x } _ { n = 1 } ^ { N } \left( W _ { h n } \mathbf { h } _ { t - n } \right) { \Big ) }
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where maximization is performed element-wisely to choose the maximum value in each dimension to feed to the hidden layer to generate the new hidden state. The aim here is to capture the most relevant feature and map it to a fixed predefined size.
|
| 95 |
+
|
| 96 |
+
The max pooling function is simple and biologically inspired. However, the max pooling strategy also has some serious disadvantages. For example, it has no forgetting mechanism and the signals may get stronger and stronger. Furthermore, it loses the order information of the preceding histories since it only choose the maximum values but it does not know where the maximum comes from.
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 4: A pooling function is used to calibrate various feedback paths in HORNNs.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 5: Gated HORNNs use learnable gates to combine various feedback signals.
|
| 103 |
+
|
| 104 |
+
# 3.2.2 FOFE-BASED POOLING
|
| 105 |
+
|
| 106 |
+
The fixed-size ordinally-forgetting encoding (FOFE) method was proposed in Zhang et al. (2015) to encode any variable-length sequence of data into a fixed-size representation. In FOFE, a single forgetting factor $\alpha$ ( $0 \textless \alpha \textless 1$ ) is used to encode the position information in sequences based on the idea of exponential forgetting to derive invertible fixed-size representations. In this work, we borrow this simple idea of exponential forgetting to calibrate all preceding histories using a pre-selected forgetting factor as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\mathbf { h } _ { t } = f \left( W _ { i n } \mathbf { x } _ { t } + \sum _ { n = 1 } ^ { N } \mathbf { \sigma } \alpha ^ { n } \cdot W _ { h n } \mathbf { h } _ { t - n } \right)
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where the forgetting factor $\alpha$ is manually pre-selected between $0 \textless \alpha \textless 1$ . The above constant coefficients related to $\alpha$ play an important role in calibrating signals from different paths in both
|
| 113 |
+
|
| 114 |
+
forward and backward passes of HORNNs since they slightly underweight the older history over the recent one in an explicit way.
|
| 115 |
+
|
| 116 |
+
# 3.2.3 GATED HORNNS
|
| 117 |
+
|
| 118 |
+
In this section, we follow the ideas of the learnable gates in LSTMs Hochreiter & Schmidhuber (1997) and GRUs Cho et al. (2014) as well as the recent soft-attention in Bahdanau et al. (2014). Instead of using constant coefficients derived from a forgetting factor, we may let the network automatically determine the combination weights based on the current state and input. In this case, we may use sigmoid gates to compute combination weights to regulate the information flowing from various feedback paths. The sigmoid gates take the current data and previous hidden state as input to decide how to weight all of the precede hidden states. The gate function weights how the current hidden state is generated based on all the previous time-steps of the hidden layer. This allows the network to potentially remember information for a longer period of time. In a gated HORNN, the hidden state is recursively computed as follows:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathbf { h } _ { t } = f \left( W _ { i n } \mathbf { x } _ { t } + \sum _ { n = 1 } ^ { N } \mathbf { r } _ { n } \odot \left( W _ { h n } \mathbf { h } _ { t - n } \right) \right)
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $\odot$ denotes element-wise multiplication of two equally-sized vectors, and the gate signal ${ \bf r } _ { n }$ is calculated as
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
{ \bf r } _ { n } = \sigma \left( W _ { 1 n } ^ { g } { \bf x } _ { t } + W _ { 2 n } ^ { g } { \bf h } _ { t - n } \right)
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where each g $\sigma ( \cdot )$ is the sigmoid function, and $W _ { 1 n } ^ { g }$ and $W _ { 2 n } ^ { g }$ denote two weight matrices introduced for
|
| 131 |
+
|
| 132 |
+
Note that the computation complexity of gated HORNNs is comparable with LSTMs and GRUs, significantly exceeding the other HORNN structures because of the overhead from the gate functions in eq. (7).
|
| 133 |
+
|
| 134 |
+
# 4 EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
In this section, we evaluate the proposed higher order RNNs (HORNNs) on several language modeling tasks. A statistical language model (LM) is a probability distribution over sequences of words in natural languages. Recently, neural networks have been successfully applied to language modeling Bengio et al. (2003); Mikolov et al. (2011), yielding the state-of-the-art performance. In language modeling tasks, it is quite important to take advantage of the long-term dependency of natural languages. Therefore, it is widely reported that RNN based LMs can outperform feedforward neural networks in language modeling tasks. We have chosen two popular LM data sets, namely the Penn Treebank (PTB) and English text8 sets, to compare our proposed HORNNs with traditional n-gram LMs, RNN-based LMs and the state-of-the-art performance obtained by LSTMs Graves (2013); Mikolov et al. (2014), FOFE based feedforward NNs Zhang et al. (2015) and memory networks Sukhbaatar et al. (2015).
|
| 137 |
+
|
| 138 |
+
In our experiments, we use the mini-batch stochastic gradient decent (SGD) algorithm to train all neural networks. The number of back-propagation through time (BPTT) steps is set to 30 for all recurrent models. Each model update is conducted using a mini-batch of 20 subsequences, each of which is of 30 in length. All model parameters (weight matrices in all layers) are randomly initialized based on a Gaussian distribution with zero mean and standard deviation of 0.1. A hard clipping is set to 5.0 to avoid gradient explosion during the BPTT learning. The initial learning rate is set to 0.5 and we halve the learning rate at the end of each epoch if the cross entropy function on the validation set does not decrease. We have used the weight decay, momentum and column normalization Pachitariu & Sahani (2013) in our experiments to improve model generalization. In the FOFE-based pooling function for HORNNs, we set the forgetting factor, $\alpha$ , to 0.6. We have used 400 nodes in each hidden layer for the PTB data set and 500 nodes per hidden layer for the English text8 set. In our experiments, we do not use the dropout regularization Zaremba et al. (2014) in all experiments since it significantly slows down the training speed, not applicable to any larger corpora.
|
| 139 |
+
|
| 140 |
+
Table 1: Perplexities on the PTB test set for various HORNNs are shown as a function of order (2, 3, 4). Note the perplexity of a regular RNN (1st order) is 123, as reported in Mikolov et al. (2011).
|
| 141 |
+
|
| 142 |
+
<table><tr><td>Models</td><td>2nd order</td><td>3rd order</td><td>4th order</td></tr><tr><td>HORNN</td><td>111</td><td>108</td><td>109</td></tr><tr><td>MaxHORNN</td><td>110</td><td>109</td><td>108</td></tr><tr><td>FOFEHORNN</td><td>103</td><td>101</td><td>100</td></tr><tr><td>GatedHORNN</td><td>102</td><td>100</td><td>100</td></tr></table>
|
| 143 |
+
|
| 144 |
+
# 4.1 LANGUAGE MODELING ON PTB
|
| 145 |
+
|
| 146 |
+
The standard Penn Treebank (PTB) corpus consists of about 1M words. The vocabulary size is limited to 10k. The preprocessing method and the way to split data into training/validation/test sets are the same as Mikolov et al. (2011). PTB is a relatively small text corpus. We first investigate various model configurations for the HORNNs based on PTB and then compare the best performance with other results reported on this task.
|
| 147 |
+
|
| 148 |
+
# 4.1.1 EFFECT OF ORDERS IN HORNNS
|
| 149 |
+
|
| 150 |
+
In the first experiment, we first investigate how the used orders in HORNNs may affect the performance of language models (as measured by perplexity). We have examined all different higher order model structures proposed in this paper, including HORNNs and various pooling functions in HORNNs. The orders of these examined models varies among 2, 3 and 4. We have listed the performance of different models on PTB in Table 1. As we may see, we are able to achieve a significant improvement in perplexity when using higher order RNNs for language models on PTB, roughly 10-20 reduction in PPL over regular RNNs. We can see that performance may improve slightly when the order is increased from 2 to 3 but no significant gain is observed when the order is further increased to 4. As a result, we choose the 3rd-order HORNN structure for the following experiments. Among all different HORNN structures, we can see that FOFE-based pooling and gated structures yield the best performance on PTB.
|
| 151 |
+
|
| 152 |
+
In language modeling, both input and output layers account for the major portion of model parameters. Therefore, we do not significantly increase model size when we go to higher order structures. For example, in Table 1, a regular RNN contains about 8.3 millions of weights while a 3rd-order HORNN (the same for max or FOFE pooling structures) has about 8.6 millions of weights. In comparison, an LSTM model has about 9.3 millions of weights and a 3rd-order gated HORNN has about 9.6 millions of weights.
|
| 153 |
+
|
| 154 |
+
As for the training speed, most HORNN models are only slightly slower than regular RNNs. For example, one epoch of training on PTB running in one NVIDIA’s TITAN X GPU takes about 80 seconds for an RNN, about 120 seconds for a 3rd-order HORNN (the same for max or FOFE pooling structures). Similarly, training of gated HORNNs is also slightly slower than LSTMs. For example, one epoch on PTB takes about 200 seconds for an LSTM, and about 225 seconds for a 3rd-order gates HORNN.
|
| 155 |
+
|
| 156 |
+
# 4.1.2 MODEL COMPARISON ON PENN TREEBANK
|
| 157 |
+
|
| 158 |
+
At last, we report the best performance of various HORNNs on the PTB test set in Table 2. We compare our 3rd-order HORNNs with all other models reported on this task, including RNN Mikolov et al. (2011), stack RNN Pascanu et al. (2014), deep RNN Pascanu et al. (2014), FOFE-FNN Zhang et al. (2015) and LSTM Graves (2013). 2 From the results in Table 2, we can see that our proposed higher order RNN architectures significantly outperform all other baseline models reported on this task. Both FOFE-based pooling and gated HORNNs have achieved the state-of-the-art performance, i.e., 100 in perplexity on this task. To the best of our knowledge, this is the best reported performance on PTB under the same training condition.
|
| 159 |
+
|
| 160 |
+
Table 2: Perplexities on the PTB test set for various examined models.
|
| 161 |
+
Table 3: Perplexities on the text8 test set for various models.
|
| 162 |
+
|
| 163 |
+
<table><tr><td>Models KN 5-gram Mikolov et al. (2011)</td><td>Test 141</td></tr><tr><td>RNN Mikolov et al. (2011) CSLM5Aransa et al. (2015) LSTM Graves (2013) genCNN Wang et al. (2015) Gated word&charMiyamoto & Cho (2016) E2E Mem Net Sukhbaatar et al. (2015) Stack RNN Pascanu et al. (2014) Deep RNN Pascanu et al. (2014) FOFE-FNN Zhang et al. (2015)</td><td>123 118.08 117 116.4 113.52 111 110 107 108</td></tr><tr><td>HORNN (3rd order) Max HORNN (3rd order) FOFE HORNN (3rd order) Gated HORNN (3rd order)</td><td>108 109 101 100</td></tr></table>
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Models</td><td>Test</td></tr><tr><td>RNN Mikolov et al. (2014) LSTM Mikolov et al. (2014) SCRNN Mikolov et al. (2014) E2E Mem Net Sukhbaatar et al. (2015)</td><td>184 156 161 147</td></tr><tr><td>HORNN (3rd order) Max HORNN (3rd order) FOFE HORNN (3rd order) Gated HORNN (3rd</td><td>172 163 154</td></tr></table>
|
| 166 |
+
|
| 167 |
+
# 4.2 LANGUAGE MODELING ON ENGLISH TEXT8
|
| 168 |
+
|
| 169 |
+
In this experiment, we will evaluate our proposed HORNNs on a much larger text corpus, namely the English text8 data set. The text8 data set contains a preprocessed version of the first 100 million characters downloaded from the Wikipedia website. We have used the same preprocessing method as Mikolov et al. (2014) to process the data set to generate the training and test sets. We have limited the vocabulary size to about $4 4 \mathrm { k }$ by replacing all words occurring less than 10 times in the training set with an ${ \bf \mathrm { < U N K > } }$ token. The text8 set is about 20 times larger than PTB in corpus size. The model training on text8 takes longer to finish. We have not tuned hyperparameters in this data set. We simply follow the best setting used in PTB to train all HORNNs for the text8 data set. Meanwhile, we also follow the same learning schedule used in Mikolov et al. (2014): We first initialize the learning rate to 0.5 and run 5 epochs using this learning rate; After that, the learning rate is halved at the end of every epoch.
|
| 170 |
+
|
| 171 |
+
Because the training is time-consuming, we have only evaluated 3rd-order HORNNs on the text8 data set. The perplexities of various HORNNs are summarized in Table 3. We have compared our HORNNs with all other baseline models reported on this task, including RNN Mikolov et al. (2014), LSTM Mikolov et al. (2014), SCRNN Mikolov et al. (2014) and end-to-end memory networks Sukhbaatar et al. (2015). Results have shown that all HORNN models work pretty well in this data set except the normal HORNN significantly underperforms the other three models. Among them, the gated HORNN model has achieved the best performance, i.e., 144 in perplexity on this task, which is slightly better than the recent result obtained by end-to-end memory networks (using a rather complicated structure). To the best of our knowledge, this is the best performance reported on this task.
|
| 172 |
+
|
| 173 |
+
# 5 CONCLUSIONS
|
| 174 |
+
|
| 175 |
+
In this paper, we have proposed some new structures for recurrent neural networks, called as higher order RNNs (HORNNs). In these structures, we use more memory units to keep track of more preceding RNN states, which are all fed along various feedback paths to the hidden layer to generate the feedback signals. In this way, we may enhance the model to capture long term dependency in sequential data. Moreover, we have proposed to use several types of pooling functions to calibrate multiple feedback paths. Experiments have shown that the pooling technique plays a critical role in learning higher order RNNs effectively. In this work, we have examined HORNNs for the language modeling task using two popular data sets, namely the Penn Treebank (PTB) and text8 sets. Experimental results have shown that the proposed higher order RNNs yield the state-of-the-art performance on both data sets, significantly outperforming the regular RNNs as well as the popular LSTMs. As the future work, we are going to continue to explore HORNNs for other sequential modeling tasks, such as speech recognition, sequence-to-sequence modelling and so on.
|
| 176 |
+
|
| 177 |
+
REFERENCES
|
| 178 |
+
Walid Aransa, Holger Schwenk, and Lo¨ıc Barrault. Improving continuous space language models using auxiliary features. In Proceedings of the 12th International Workshop on Spoken Language Translation, pp. 151–158, 2015.
|
| 179 |
+
D. Bahdanau, K. Cho, and Y. Bengio. Neural machine translation by jointly learning to align and translate. In arXiv:1409.0473, 2014.
|
| 180 |
+
Y. Bengio, P. Simard, and P. Frasconi. Learning long-term dependencies with gradient descent is difficult. IEEE Transactions on Neural Networks, 5(2):157–166, 1994.
|
| 181 |
+
Y. Bengio, R. Ducharme, P. Vincent, and C. Janvin. A neural probabilistic language model. Journal of Machine Learning Research, 3:1137–1155, 2003.
|
| 182 |
+
K. Cho, B. Van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio. ¨ Learning phrase representations using RNN encoder-decoder for statistical machine translation. In Proceedings of EMNLP, 2014.
|
| 183 |
+
J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. Gated feedback recurrent neural networks. In Proceedings of International Conference on Machine Learning (ICML), 2015.
|
| 184 |
+
A. Graves. Generating sequences with recurrent neural networks. In arXiv:1308.0850, 2013.
|
| 185 |
+
A. Graves, A. Mohamed, and G Hinton. Speech recognition with deep recurrent neural. In Proceedings of ICASSP, 2013.
|
| 186 |
+
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In arXiv:1512.03385, 2015.
|
| 187 |
+
Salah Hihi and Yoshua Bengio. Hierarchical recurrent neural networks for long-term dependencies. In Proceedings of Neural Information Processing Systems (NIPS), 1996.
|
| 188 |
+
S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
|
| 189 |
+
Y. Kim, Y. Jernite, D. Sontag, and A. M. Rush. Character-aware neural language models. In arXiv:1508.06615, 2015.
|
| 190 |
+
J. Koutnik, K. Greff, F. Gomez, and J. Schmidhuber. A clockwork rnn. In Proceedings of International Conference on Machine Learning (ICML), 2014.
|
| 191 |
+
C. Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply supervised nets. In arXiv:1409.5185, 2014.
|
| 192 |
+
M. Liwicki, A. Graves, and H. Bunke. Neural networks for handwriting recognition, Book Chapter, Computational intelligence paradigms in advanced pattern classification. Springer Berlin Heidelberg, 2012.
|
| 193 |
+
T. Mikolov. Statistical Language Models based on Neural Networks. PhD thesis, Brno University of Technology, 2012.
|
| 194 |
+
T. Mikolov, S. Kombrink, L. Burget, J.H. Cernock ˇ y, and S. Khudanpur. Extensions of recurrent \` neural network language model. In Proceedings ICASSP, pp. 5528–5531, 2011.
|
| 195 |
+
T. Mikolov, A. Joulin, S. Chopra, M. Mathieu, and M. Ranzato. Learning longer memory in recurrent neural networks. In arXiv 1412.7753, 2014.
|
| 196 |
+
Yasumasa Miyamoto and Kyunghyun Cho. Gated word-character recurrent language model. arXiv preprint arXiv:1606.01700, 2016.
|
| 197 |
+
M. Pachitariu and M. Sahani. Regularization and nonlinearities for neural language models: when are they needed? In arXiv:1301.5650, 2013.
|
| 198 |
+
R. Pascanu, C. Gulcehre, K. Cho, and Y. Bengio. How to construct deep recurrent neural networks. In Proceedings of ICLR, 2014.
|
| 199 |
+
H. T. Siegelmann and E. D. Sontag. On the computational power of neural nets. Journal of computer and system sciences, 50.(1):132–150, 1995.
|
| 200 |
+
R. K. Srivastava, K. Greff, and J. Schmidhuber. Highway networks. In Proceedings of Neural Information Processing Systems (NIPS), 2015.
|
| 201 |
+
S. Sukhbaatar, A. Szlam, J. Weston, and R. Fergus. End-to-end memory networks. In Proceedings of Neural Information Processing Systems (NIPS), 2015.
|
| 202 |
+
M. Sundermeyer, R. Schlter, and H. Ne. LSTM neural networks for language modeling. In Proceedings of Interspeech, 2012.
|
| 203 |
+
I. Sutskever, J. Martens, and G Hinton. Generating text with recurrent neural networks. In Proceedings of International Conference on Machine Learning (ICML), 2011.
|
| 204 |
+
I. Sutskever, O. Vinyals, and Q. Le. Sequence to sequence learning with neural networks. In Proceedings of Neural Information Processing Systems (NIPS), 2014.
|
| 205 |
+
Mingxuan Wang, Zhengdong Lu, Hang Li, Wenbin Jiang, and Qun Liu. gen cnn: A convolutional architecture for word sequence prediction. arXiv preprint arXiv:1503.05034, 2015.
|
| 206 |
+
P. J. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990.
|
| 207 |
+
Stefan Wermter. A hybrid and connectionist architecture for a scanning understanding. In Proceedings of the 10th European conference on Artificial intelligence, 1992.
|
| 208 |
+
W. Zaremba, I. Sutskever, and O.l Vinyals. Recurrent neural network regularization. In arXiv:1409.2329, 2014.
|
| 209 |
+
S. Zhang, H. Jiang, M. Xu, J. Hou, and L. Dai. The fixed-size ordinally-forgetting encoding method for neural network language models. In Proceedings of ACL, pp. 495–500, 2015.
|
md/train/ByeZ5jC5YQ/ByeZ5jC5YQ.md
ADDED
|
@@ -0,0 +1,576 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# KNOCKOFFGAN: GENERATING KNOCKOFFS FOR FEATURE SELECTION USING GENERATIVE ADVERSARIAL NETWORKS
|
| 2 |
+
|
| 3 |
+
James Jordon
|
| 4 |
+
Engineering Science Department
|
| 5 |
+
University of Oxford, UK
|
| 6 |
+
james.jordon@wolfson.ox.ac.uk
|
| 7 |
+
Jinsung Yoon
|
| 8 |
+
Department of Electrical and Computer Engineering
|
| 9 |
+
UCLA, California, USA
|
| 10 |
+
jsyoon0823@g.ucla.edu
|
| 11 |
+
Mihaela van der Schaar
|
| 12 |
+
University of Cambridge, UK
|
| 13 |
+
Department of Electrical and Computer Engineering, UCLA, California, USA
|
| 14 |
+
Alan Turing Institute, London, UK
|
| 15 |
+
mihaela@ee.ucla.edu
|
| 16 |
+
|
| 17 |
+
# ABSTRACT
|
| 18 |
+
|
| 19 |
+
Feature selection is a pervasive problem. The discovery of relevant features can be as important for performing a particular task (such as to avoid overfitting in prediction) as it can be for understanding the underlying processes governing the true label (such as discovering relevant genetic factors for a disease). Machine learning driven feature selection can enable discovery from large, high-dimensional, nonlinear observational datasets by creating a subset of features for experts to focus on. In order to use expert time most efficiently, we need a principled methodology capable of controlling the False Discovery Rate. In this work, we build on the promising Knockoff framework by developing a flexible knockoff generation model. We adapt the Generative Adversarial Networks framework to allow us to generate knockoffs with no assumptions on the feature distribution. Our model consists of 4 networks, a generator, a discriminator, a stability network and a power network. We demonstrate the capability of our model to perform feature selection, showing that it performs as well as the originally proposed knockoff generation model in the Gaussian setting and that it outperforms the original model in non-Gaussian settings, including on a real-world dataset.
|
| 20 |
+
|
| 21 |
+
# 1 INTRODUCTION
|
| 22 |
+
|
| 23 |
+
Feature selection is a pervasive problem. Often the goal is to discover features that are relevant to a particular outcome, either for the sake of discovery itself or to aid in prediction [16; 25]. When the focus is on discovery, feature selection methods typically focus on trying to control either the Family-Wise Error Rate (FWER) or the False Discovery Rate (FDR). The FWER measures the probability of making a single false discovery (a Type I error) among the selected features (i.e. selecting one which is not relevant), whereas the FDR measures the proportion of false discoveries made (i.e. the proportion of selected features which are false). Controlling FWER, however, leads to reduced power (i.e. selecting fewer relevant variables) since it controls the probability of making any false discovery, whereas FDR tries to control the proportion of false discoveries.
|
| 24 |
+
|
| 25 |
+
Controlling the FDR is important [5; 6; 3]. Often, data-driven feature selection will be used to select a set of candidate features for further investigation. When further investigation is expensive (for example when further investigation would involve conducting new experiments and collecting more data), a method that cannot control the FDR may result in a large amount of wasted resources, with no guarantee that anything meaningful will be discovered. On the other hand, being able to control the FDR at, say, $10 \%$ ensures that at most, $10 \%$ of the spent resources are wasted, and $90 \%$ are in fact spent on discovering positive, useful results. It should be noted, however, that estimating the FDR of a method empirically is hard in practice, since we do not have access to the ground truth relevance. As such, a theoretical analysis of the method and its (potential) FDR-controlling properties must be carried out, which does not exist for many existing feature selection methods.
|
| 26 |
+
|
| 27 |
+
[3] is the seminal paper on the knockoff framework, which is an innovative FDR-controlling feature selection method. Knockoffs are features that are generated to “look like” the real features but be conditionally independent of the label given the real features. Feature statistics (such as the coefficients of a LASSO [32]) are compared between the real features and their knockoffs and a selection is made when this difference is sufficiently large. Performing the selection in this way allows for an estimate of the FDR to be obtained and the selection threshold can be adjusted to control the FDR at the selected level. In the original paper, the relationship between the label and the features is constrained to be of a very specific form; in [7], they remove this constraint and instead provide a theoretical analysis that shifts the burden of knowledge onto knowing the underlying feature distribution. Unfortunately, while the theoretical results hold for any feature distribution, they rely on being able to generate valid knockoffs, for which [7] only provide a method for generating knockoffs when the distribution is a (known) multivariate Gaussian distribution. In this paper, we modify the Generative Adversarial Networks (GAN) [11] framework to address this problem, allowing us to generate knockoffs for any distribution (and without any prior knowledge of it). GANs have been shown to be a powerful method for learning to generate complex distributions [24; 20; 2].
|
| 28 |
+
|
| 29 |
+
Our main contribution is in modifying the discriminator used in the GAN framework in such a way that the generator learns to generate knockoffs satisfying the necessary swap condition [7] which requires that when a feature and its knockoff are swapped, the joint distribution remains unchanged. In addition, we propose a method for maximizing the power of our model using Mutual Information Neural Estimation (MINE) [4] and investigate a regularization method to improve the stability of training. Our model consists of four networks: (1) a generator network that takes as input noise and the real features, and outputs a set of candidate knockoff features; (2) a discriminator network taking as input “swapped” feature-knockoff features that attempts to determine which variables have been swapped; (3) a Wasserstein GAN discriminator that we use as a regularization term; and (4) a MINE network that estimates the mutual information between each feature-knockoff pair allowing us to maximize the power of the knockoff procedure.
|
| 30 |
+
|
| 31 |
+
# 2 RELATED WORKS
|
| 32 |
+
|
| 33 |
+
Feature selection is a well-studied problem with a wealth of related works ([12; 31; 17; 22] provide a summary of a lot of existing literature); however, most methods do not attempt to control the FDR. The most common feature selection method for FDR control is the Benjamini-Hochberg (BHq) procedure and its variants [5; 6], which relies on obtaining valid marginal p-values for each selection.
|
| 34 |
+
|
| 35 |
+
Knockoffs are an active area of research [9; 18; 10]. The notion of a knockoff was first introduced in [3] with the theory there requiring that the relationship between the features and the label be of a specific form. In [7], they build on the knockoff framework, removing this requirement but instead shifting the requirement to one of knowing the distribution of the features. As noted in the introduction, the theory in [7] holds independent of the distribution of the features - relying only on being able to generate valid knockoffs (which exist for any distribution of features). However, they only propose a method for generating knockoffs when the distribution of features is jointly Gaussian. While they do propose a method for generating approximate knockoffs in the non-Gaussian setting (by simply approximating the features as Gaussian), the guarantees on FDR control do not hold for their approximate knockoffs. In [26] and [10], they add to the class of constructible knockoffs, describing methods for constructing knockoffs for Markov Chains, Hidden Markov Models and Gaussian Mixture Models. Though once again, knowledge of the full distribution is still necessary for their construction.
|
| 36 |
+
|
| 37 |
+
In this paper we use a framework motivated by GANs [11] to learn to generate knockoffs without any assumptions on the distribution of the features. To do this, we modify the discriminator so that rather than trying to determine whether a sample is real or fake, it attempts to identify which components have been “swapped”. In [38], an unconventional discriminator is used that performs component-wise discrimination for the purpose of imputation. While the problem addressed in that paper is different to the one here, the key idea relies on a similar modification to the discriminator to be able to appropriately guide the generator.
|
| 38 |
+
|
| 39 |
+
In order to maximize the power of our variable selection mechanism, it will be desirable that the feature-knockoff pairs are ”as independent as possible” (this is discussed in [7]). In order to achieve this we will investigate the use of a promising recent paper, MINE [4]. MINE proposes a neural architecture and training procedure capable of estimating the mutual information between two random variables. As the mutual information between two random variables is zero only when they are independent, we will use this as a measure of independence and attempt to minimize it during the training of our modified GAN.
|
| 40 |
+
|
| 41 |
+
# 3 BACKGROUND
|
| 42 |
+
|
| 43 |
+
In this section we introduce our notation and define knockoffs as in [7]. Let us denote the feature space by $\mathcal { X }$ and the label space by $\mathcal { V }$ . Let the dimension of $\mathcal { X }$ be $d$ . Suppose that $\mathbf { X } = ( X _ { 1 } , . . . , X _ { d } )$ and $Y$ are random variables over $\mathcal { X }$ and $\mathcal { V }$ . As in [7], we will work with the notion of a null set.
|
| 44 |
+
|
| 45 |
+
Definition 1. A variable $X _ { j }$ is said to be ”null” if and only if $Y$ is independent of $X _ { j }$ conditional on $\{ X _ { i } : i \neq j \}$ . We define $\mathcal { H } _ { \mathrm { 0 } }$ to be the set of all null variables.
|
| 46 |
+
|
| 47 |
+
Our goal will be to discover as many relevant features as possible while controlling the FDR. For a given (potentially random) selection procedure that selects $\hat { S } \subset \{ 1 , . . . , d \}$ , we define the FDR to be
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\mathrm { F D R } = \mathbb { E } \left[ \frac { \left| \hat { S } \cap \mathcal { H } _ { 0 } \right| } { \left| \hat { S } \right| } \right] .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
Note that this agrees with the usual notion of FDR (i.e. when defined in terms of the Markov blanket) under mild assumptions (for a more thorough discussion see [7]).
|
| 54 |
+
|
| 55 |
+
# 3.1 KNOCKOFFS
|
| 56 |
+
|
| 57 |
+
Definition 2. A knockoff [7] for $\mathbf { X }$ is a random variable $\tilde { \textbf { X } } \in ~ \mathcal { X }$ satisfying the following two properties:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r } { ( \mathbf { X } , \tilde { \mathbf { X } } ) \stackrel { d . } { = } ( \mathbf { X } , \tilde { \mathbf { X } } ) _ { s w a p ( S ) } } \\ { \tilde { \mathbf { X } } \perp \perp Y | \mathbf { X } ~ } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
for all $S \subset \{ 1 , . . . , d \}$ where $( \cdot , \cdot ) _ { s w a p ( S ) }$ denotes the vector obtained by swapping the ith component with the $( i + d ) t h$ component for each $i \in S a n d \overset { d . } { = } i .$ s equality in distribution.
|
| 64 |
+
|
| 65 |
+
In order to use knockoffs for feature selection, we must define an appropriate feature statistic, $W _ { j }$ , that depends on ${ \bf x } , \tilde { \bf x }$ and $Y$ , i.e. $W _ { j } = w _ { j } ( ( { \bf X } , \tilde { { \bf X } } ) , Y )$ for some function $w _ { j }$ . This function $w _ { j }$ must satisfy the following flip-sign property:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
w _ { j } ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) _ { \operatorname { s w a p } ( S ) } , Y ) = { \left\{ \begin{array} { l l } { w _ { j } ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) , Y ) { \mathrm { ~ i f ~ } } j \notin S } \\ { - w _ { j } ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) , Y ) { \mathrm { ~ i f ~ } } j \in S . } \end{array} \right. }
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
One of the procedures used in [7] to construct these statistics is to perform LASSO, treating the augmented feature-knockoffs as the features on which to regress. This gives LASSO coefficients $b _ { 1 } , . . . , b _ { 2 d }$ , and the statistic $W _ { j }$ is set to be the LASSO Coefficient Difference given by
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
W _ { j } = | b _ { j } | - | b _ { j + d } | .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Note that the FDR control guarantees hold independently of the choice of statistic, but a poorly chosen statistic can significantly impact the power of the test. In particular, using the LASSO Coefficient Difference in non-linear settings can yield few discoveries. The focus of this paper, however, is on generating the knockoffs, not on the statistic used on top of the generated knockoffs and so in our synthetic experiments, we use a linear model for $Y$ to be able to draw fair comparisons between our model and [7]. In the real world data experiment, we use a statistic based on Random Forests for both methods [37].
|
| 78 |
+
|
| 79 |
+
The following result from [7] depends only on having obtained knockoffs that satisfy Definition 2 and feature statistics satisfying (3) (and in particular do not depend specifically on using LASSO to obtain the statistics).
|
| 80 |
+
|
| 81 |
+
Theorem 1. Let $q \in [ 0 , 1 ]$ . Given test statistics, $W _ { 1 } , . . . , W _ { d } ,$ satisfying (3), let
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\tau = \operatorname* { m i n } \left\{ t > 0 : \frac { 1 + | \{ j : W _ { j } \leq - t \} | } { | \{ j : W _ { j } \geq t \} | } \leq q \right\} .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Then the procedure selecting the variables
|
| 88 |
+
|
| 89 |
+
controls the FDR at level q, i.e.
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\hat { S } = \{ j : W _ { j } \geq \tau \}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\mathbb { E } \left[ \frac { \vert \hat { \boldsymbol { \mathcal { S } } } \boldsymbol { \cap } \mathcal { H } _ { 0 } \vert } { \vert \hat { \boldsymbol { \mathcal { S } } } \vert \vee 1 } \right] \le q .
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
# 4 KNOCKOFFGAN
|
| 100 |
+
|
| 101 |
+
It should be noted that in order to satisfy equation (2), it simply needs to be the case that the knockoffs are constructed without looking at the label, $Y$ . In order to satisfy equation (1) we use a modified GAN framework, which gives us the flexibility to learn to generate knockoffs without any assumptions on the distribution of the original features.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 1: KnockoffGAN Block Diagram
|
| 105 |
+
|
| 106 |
+
# 4.1 GENERATOR
|
| 107 |
+
|
| 108 |
+
The generator, $G$ , will be a function $G ( \cdot , \cdot ; \phi ) : \mathcal { X } \times [ 0 , 1 ] ^ { c } \to \mathcal { X }$ , parametrized by $\phi$ that takes a realization $\mathbf { x }$ of $\mathbf { X }$ and random noise, $\mathbf { z } \sim \mathcal { U } ( [ 0 , 1 ] ^ { c } )$ , as inputs and outputs knockoff features $\tilde { \bf x }$ . We define $\tilde { \mathbf { X } } : = G ( \mathbf { X } , \mathbf { z } )$ . We model $G$ as a fully connected neural network with weights $\phi$ .
|
| 109 |
+
|
| 110 |
+
# 4.2 DISCRIMINATOR
|
| 111 |
+
|
| 112 |
+
The main innovation of our paper is in defining the discriminator. Equation (1) imposes a condition on the joint distribution of $( \bar { \bf X } , \tilde { \bf X } )$ and as such we must define a discriminator with a loss that is (not necessarily uniquely) minimized only for joint distributions satisfying this condition. To that end, the discriminator, $D$ , will be a function $\overset { \cdot } { D } ( \cdot ; \psi ) : \overset { \cdot } { \chi } \times \overset { \chi } { \chi } \overset { \cdot } { [ 0 , \overset { . } { . } ] } ^ { d }$ that takes as input a swapped sample-knockoff pair $( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S ) }$ and outputs a vector in $[ 0 , 1 ] ^ { d }$ with the $i$ th component of $D ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S ) } )$ corresponding to the probability that $i \in S$ . The discriminator is attempting to detect which variables have been swapped and, intuitively, when the discriminator is unable to determine this, the swapped and unswapped joint distributions must be the same.
|
| 113 |
+
|
| 114 |
+
The loss we use to train the discriminator is the multi-output cross-entropy loss given by
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathcal { L } _ { D } = \sum _ { \mathbf { S } \in \{ 0 , 1 \} ^ { d } } \mathbb { E } _ { \mathbf { X } \sim \mathcal { P } _ { \mathbf { X } } } [ \mathbb { E } _ { { \tilde { \mathbf { X } } } \sim \mathcal { P } _ { \mathbf { X } } ( \mathbf { X } ) } [ \mathbf { S } \cdot \log ( D ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) _ { \operatorname { s w a p } ( S ) } ) ) + ( \mathbf { 1 } - \mathbf { S } ) \cdot \log ( 1 - D ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) _ { \operatorname { s w a p } ( S ) } ) ) ]
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\cdot$ is the standard dot, $\mathbf { 1 } = ( 1 , . . . , 1 )$ , $\mathbf { S } = ( S _ { 1 } , . . . , S _ { d } )$ with $S _ { i } = \mathbb { I } ( i \in S )$ $\mathbb { I }$ is the indicator function) and $\log$ is taken element-wise. The following theorem is our main theoretical result, which states that the training regime employed by KnockoffGAN will result in a procedure that generates valid knockoffs.
|
| 121 |
+
|
| 122 |
+
Theorem 2. Equation (4) is maximized (with respect to $G$ ) if and only if equation $( l )$ is satisfied by $G$ .
|
| 123 |
+
|
| 124 |
+
Proof. The proof, alongside supporting theoretical results, can be found in the Appendix.
|
| 125 |
+
|
| 126 |
+
In practice, the sum is too computationally expensive $( O ( 2 ^ { d } ) )$ to calculate and so we perform stochastic gradient descent using minibatches with S sampled uniformly from $\{ 0 , 1 \} ^ { d }$ , independently for each sample in the minibatch.
|
| 127 |
+
|
| 128 |
+
We also found that training with respect to the full loss resulted in a poor performance, particularly when $d$ is large. We found that the discriminator struggled to learn anything when asked to find the full swap vector, and the poor discriminator resulted in a poorly trained generator. In order to overcome this, we introduce a hint vector - first introduced in [38] - that we use to reveal partial information to the discriminator about the swap vector. We do this by using the hint to reveal some, but not all, of the components of $S$ to the discriminator. In doing so, we reduce the burden of the discriminator from needing to determine the entire swap vector to only needing to determine some of the swap vector.
|
| 129 |
+
|
| 130 |
+
Formally, the hint, $\mathbf { H }$ , will be a random variable depending on S, that we pass to the discriminator, alongside $( \mathbf { X } , \tilde { \mathbf { X } } ) _ { \mathrm { s w a p } ( S ) }$ . We use the hint to control the amount of information we pass to $D$ about S before asking $D$ to predict S. In practice, our hinting mechanism involves sampling a multivariate Bernoulli random variable, $\mathbf { B }$ from i.i.d. components, which each take value 1 with probability 0.9. The hint is then constructed by setting $H _ { i } = S _ { i }$ if $B _ { i } = 1$ and $H _ { i } = 0 . 5$ if $B _ { i } = 0$ . The discriminator is therefore being asked only to predict the values of S for which $B _ { i } = 0$ ; the others, $D$ is able to directly infer from $H _ { i }$ . In order to avoid overfitting to the hint, it becomes necessary to remove these terms from our loss. Our loss now becomes
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\begin{array} { r } { \mathcal { L } _ { D } = \displaystyle \sum _ { \mathbf { S } \in \{ 0 , 1 \} ^ { d } } \mathbb { E } _ { \mathbf { X } \sim \mathcal { P } _ { \mathbf { X } } } [ \mathbb { E } _ { { \bar { \mathbf { X } } } \sim \mathcal { P } _ { \mathbf { X } } ( \mathbf { X } ) } [ \mathbb { E } _ { \mathbf { H } \sim \mathcal { P } _ { \mathbf { H } | \mathbf { S } } } [ ( \mathbf { S } \odot ( \mathbf { 1 } - \mathbf { B } ) ) \cdot \log ( D ( ( \mathbf { X } , { \bar { \mathbf { X } } } ) _ { \mathrm { s w a p } ( S ) } , \mathbf { H } ) ) ( \mathbb { E } _ { \mathbf { X } \sim \mathcal { P } _ { \mathbf { X } } ( \mathbf { X } ) } [ ( \mathbf { X } \sim \mathbf { H } ) \cdot \mathbf { H } _ { \mathbf { H } \sim \mathbf { H } } ( \mathbf { X } ) \cdot \mathbf { H } _ { \mathbf { H } } ( \mathbf { X } ) \cdot \mathbf { H } _ { \mathbf { H } } ( \mathbf { X } ) ] ] } \\ { + ( ( \mathbf { 1 } - \mathbf { S } ) \odot ( \mathbf { 1 } - \mathbf { B } ) ) \cdot \log ( 1 - D ( ( \mathbf { X } , { \bar { \mathbf { X } } } ) _ { \mathrm { s w a p } ( S ) } , \mathbf { H } ) ) ] ] ] } \end{array}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $\odot$ denotes element-wise multiplication and the expectation over $\mathbf { B }$ is implicit in the expectation over $\mathbf { H }$ .
|
| 137 |
+
|
| 138 |
+
# 4.3 STABILITY
|
| 139 |
+
|
| 140 |
+
We found that adding a regularization term in the form of a Wasserstein GAN discriminator (with Gaussian Process (GP) regularization) [2], $f$ , aided performance. We note that when equation (1) holds, we must have that ${ \bf x } \ { \overset { d . } { = } } \ { \tilde { \bf X } }$ and so the addition of this regularizing term does not affect the optimal solution to our loss. We model $f$ as a fully connect neural network with weights $\nu$ . The loss is given by
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\mathcal { L } _ { f } = \mathbb { E } \left[ f ( \mathbf { X } ) - f ( \tilde { \mathbf { X } } ) - \eta ( | | \nabla _ { \hat { \mathbf { X } } } f ( \hat { \mathbf { X } } ) | | _ { 2 } - 1 ) ^ { 2 } \right]
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
where $\epsilon \sim \mathcal { U } [ 0 , 1 ]$ , $\hat { \mathbf { X } } = \epsilon \mathbf { X } + ( 1 - \epsilon ) \tilde { \mathbf { X } }$ and $\eta$ is a hyper-parameter (set to 10 in practice). Note that we have rewritten the loss to be the negative of the one given in [2], allowing us to write our overall objective as a minimax problem. This loss is added to the generator loss as an additional regularization term.
|
| 147 |
+
|
| 148 |
+
# 4.4 MAXIMIZING POWER
|
| 149 |
+
|
| 150 |
+
As noted in [7], it is intuitive that in order to maximize the power of the knockoff selection procedure, we wish to make $X _ { j }$ and $\tilde { X } _ { j }$ as ”independent” as possible. Doing so ensures that as little as possible of the dependence between the real feature and the label is present between the knockoff and the label; this allows us to determine whether or not the relationship between the feature and label is only through the feature’s correlation with other features, or is in fact a true signal.
|
| 151 |
+
|
| 152 |
+
In order to achieve maximal independence, we look to minimize the mutual information between each feature and its knockoff. Actually computing the true mutual information requires access to both the joint density of the feature-knockoff pairs and to the marginal densities of each feature and knockoff, which we do not have.
|
| 153 |
+
|
| 154 |
+
Instead, we look to a promising recent work, Mutual Information Neural Estimation (MINE [4]), that provides a framework for estimating the mutual information using neural networks. To do so, they estimate the mutual information between random variables $U$ and $V$ by performing gradient ascent on the following objective:
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\operatorname* { s u p } _ { \theta \in \Theta } \mathbb { E } _ { \mathbb { P } _ { U V } ^ { ( n ) } } [ T _ { \theta } ] - \log ( \mathbb { E } _ { \mathbb { P } _ { U } ^ { ( n ) } \otimes \mathbb { P } _ { V } ^ { ( n ) } } [ e ^ { T _ { \theta } } ] )
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where $\mathbb { P } _ { U V }$ denotes the joint measure of $( U , V )$ with $\begin{array} { r } { \mathbb { P } _ { U } = \int _ { \mathcal { V } } d \mathbb { P } _ { U V } } \end{array}$ and $\begin{array} { r } { \mathbb { P } _ { V } = \int _ { \mathcal { U } } d \mathbb { P } _ { U V } } \end{array}$ denoting the marginal measures. $( n )$ denotes the empircal distribution associated with $n$ i.i.d. samples.
|
| 161 |
+
|
| 162 |
+
Using MINE we approximate the mutual information between each pair $X _ { j }$ and $\tilde { X } _ { j }$ by using $d$ neural networks1, $T ^ { 1 } , . . . , T ^ { d }$ , each parametrized by $\theta _ { 1 } , . . . , \theta _ { d }$ , that we refer to collectively as the power network, and will write $P$ to denote the collection of networks $T ^ { 1 } , . . . , T ^ { d }$ . The mutual information is added using a trade-off parameter $\lambda$ to the loss for $G$ . Formally, define $\mathcal { L } _ { P }$ by
|
| 163 |
+
|
| 164 |
+
$$
|
| 165 |
+
\mathcal { L } _ { P } = \sum _ { j = 1 } ^ { d } \left( \sum _ { i = 1 } ^ { n } ( T _ { \theta _ { j } } ^ { j } ( x _ { j } ^ { ( i ) } , \tilde { x } _ { j } ^ { ( i ) } ) ) - \log ( \sum _ { i = 1 } ^ { n } \exp ( T _ { \theta _ { j } } ^ { j } ( x _ { j } ^ { ( \kappa ( i ) ) } , \tilde { x } _ { j } ^ { ( i ) } ) ) ) \right)
|
| 166 |
+
$$
|
| 167 |
+
|
| 168 |
+
where $\kappa$ is a random permutation of $[ n ] ^ { 2 }$ and $( i )$ denotes the ith sample - noting that dependence on $G$ is through $\tilde { \mathbf { X } }$ .
|
| 169 |
+
|
| 170 |
+
# 4.5 FINAL OBJECTIVE
|
| 171 |
+
|
| 172 |
+
The resulting minimax game played by $G , D , W$ and $P$ is given by
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\operatorname* { m i n } _ { G } \left( \operatorname* { m a x } _ { D } ( \mathcal { L } _ { D } ) + \lambda \operatorname* { m a x } _ { P } ( \mathcal { L } _ { P } ) + \mu \operatorname* { m a x } _ { f } ( \mathcal { L } _ { f } ) \right)
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
where $\lambda , \mu$ are hyper-parameters (set to 1 in the experiments section).
|
| 179 |
+
|
| 180 |
+
We train each of $G , D , W$ and $P$ iteratively. Pseudo-code of our knockoff construction algorithm can be found in Algorithm 1 and a visual representation of our architecture in Fig. 1.
|
| 181 |
+
|
| 182 |
+
After generating knockoffs, feature statistics are computed according to some procedure (in the synthetic experiments we use LASSO and in the real data experiment we use a Random Forestbased statistic [37]). Features are then selected based on these statistics according to Theorem 1.
|
| 183 |
+
|
| 184 |
+
# 5 EXPERIMENTS
|
| 185 |
+
|
| 186 |
+
In this section we demonstrate the capability of our method to match the results of [7] in settings where their model is correctly specified (i.e. when the underlying feature distribution is Gaussian) and then go on to show, in settings where the underlying feature distribution is non-Gaussian, that our method is able to outperform their Gaussian approximation. We compare to two versions of the BHq method [5; 6] to provide a baseline.
|
| 187 |
+
|
| 188 |
+
We also perform a qualitative analysis of KnockoffGAN on a real-world dataset. We compare features found by KnockoffGAN to PubMed literature and show that KnockoffGAN discovers several meaningful features for 2 different disease outcomes.
|
| 189 |
+
|
| 190 |
+
# Algorithm 1 Pseudo-code of KnockoffGAN
|
| 191 |
+
|
| 192 |
+
1: Inputs: mini-batch size $n _ { m b } > 0$ , Initialize parameters $\phi , \psi , \nu , \theta _ { 1 } , . . . , \theta _ { d }$
|
| 193 |
+
2: while Converge do
|
| 194 |
+
3: Discriminator Update
|
| 195 |
+
4: Sample $\mathbf { x } _ { 1 } , . . . , \mathbf { x } _ { n _ { m b } }$ from D $\mathbf { \Sigma } ) , \mathbf { z } _ { 1 } , . . . , \mathbf { z } _ { n _ { m b } } \sim \mathbb { P } _ { Z }$
|
| 196 |
+
5: Sample $\mathbf { S } _ { 1 } , . . . , \mathbf { S } _ { n _ { m b } } \overset { i . i . d } { \sim } \mathcal { U } ( \{ 0 , 1 \} ^ { d } ) , \mathbf { b } _ { 1 } , . . . , \mathbf { b } _ { n _ { m b } } \sim \mathbf { B e r } ( 0 . 9 )$
|
| 197 |
+
6: for $i = 1 , . . . , n _ { m b }$ do
|
| 198 |
+
7: x˜i ← G(xi, zi; φ)
|
| 199 |
+
8: $\mathbf { h } _ { i } = \mathbf { S } _ { i } \odot \mathbf { b } _ { i } + 0 . 5 ( \mathbf { 1 } - \mathbf { b } _ { i } )$
|
| 200 |
+
|
| 201 |
+
9: Update $D$ by ascending its stochastic gradient
|
| 202 |
+
|
| 203 |
+
$$
|
| 204 |
+
\begin{array} { r l } { { \nabla _ { \psi } \sum _ { i = 1 } ^ { n _ { m b } } \Big [ \big ( \mathbf S _ { i } \odot ( \mathbf 1 - \mathbf b _ { i } ) \big ) \cdot \log \big ( D \big ( ( \mathbf x _ { i } , \tilde { \mathbf x } _ { i } ) _ { \mathrm { s w a p } ( \mathbf S ) } \big ) , \mathbf h _ { i } \big ) } \quad } & { } \\ & { \qquad + ( ( \mathbf 1 - \mathbf S _ { i } ) \odot ( \mathbf 1 - \mathbf b _ { i } ) ) \cdot \log \big ( \mathbf 1 - D \big ( ( \mathbf x _ { i } , \tilde { \mathbf x } _ { i } ) _ { \mathrm { s w a p } ( \mathbf S ) } , \mathbf h _ { i } \big ) \big ) \Big ] } \end{array}
|
| 205 |
+
$$
|
| 206 |
+
|
| 207 |
+
# 10: MINE Update
|
| 208 |
+
|
| 209 |
+
11: Sample $\mathbf { x } _ { 1 } , . . . , \mathbf { x } _ { n _ { m b } }$ from $\mathcal { D } , \mathbf { z } _ { 1 } , . . . , \mathbf { z } _ { n _ { m b } } \sim \mathbb { P } _ { Z }$ , $\kappa \sim \mathcal { U } ( S _ { n _ { m b } } )$
|
| 210 |
+
12: for $i = 1 , . . . , n _ { m b }$ do
|
| 211 |
+
13: $\tilde { \mathbf { x } } _ { i } \gets G ( \mathbf { x } _ { i } , \mathbf { z } _ { i } ; \phi )$
|
| 212 |
+
14: for $j = 1 , . . . , d$ do
|
| 213 |
+
15: Update $T _ { j }$ by ascending its stochastic gradient
|
| 214 |
+
$\begin{array} { r } { \nabla _ { \theta _ { j } } \Big ( \sum _ { i = 1 } ^ { n _ { m b } } T _ { \theta _ { j } } ^ { j } ( x _ { j } ^ { ( i ) } , \tilde { x } _ { j } ^ { ( i ) } ) \Big ) - \log \Big ( \sum _ { i = 1 } ^ { n _ { m b } } \exp ( T _ { \theta _ { j } } ^ { j } ( x _ { j } ^ { ( i ) } , \tilde { x } _ { j } ^ { ( \kappa ( i ) ) } ) ) \Big ) } \end{array}$
|
| 215 |
+
|
| 216 |
+
# 16: WGAN-GP Update
|
| 217 |
+
|
| 218 |
+
17: Sample $\mathbf { x } _ { 1 } , . . . , \mathbf { x } _ { n _ { m b } }$ from $D , \mathbf { z } _ { 1 } , . . . , \mathbf { z } _ { n _ { m b } } \sim \mathbb { P } _ { Z }$
|
| 219 |
+
18: for $i = 1 , . . . , n _ { m b }$ do
|
| 220 |
+
19: Sample $\epsilon \sim \mathcal { U } [ 0 , 1 ]$
|
| 221 |
+
20: $\begin{array} { r l } & { \tilde { \mathbf { x } } _ { i } G ( \mathbf { x } _ { i } , \mathbf { z } _ { i } ; \boldsymbol { \phi } ) ^ { \cdot } } \\ & { \hat { \mathbf { x } } _ { i } = \epsilon \mathbf { x } _ { i } + ( 1 - \epsilon ) \tilde { \mathbf { x } } _ { i } } \end{array}$
|
| 222 |
+
21:
|
| 223 |
+
|
| 224 |
+
22: Update $f$ by ascending its stochastic gradient
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
\begin{array} { r } { \nabla _ { \nu } \sum _ { i = 1 } ^ { n _ { m b } } \left[ f ( \mathbf { x } _ { i } ) - f ( \tilde { \mathbf { x } } _ { i } ) - \eta ( | | \nabla _ { \hat { \mathbf { x } } _ { i } } f ( \hat { \mathbf { x } } _ { i } ) | | _ { 2 } - 1 ) ^ { 2 } \right] } \end{array}
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
# 23: Generator Update
|
| 231 |
+
|
| 232 |
+
24: Sample $\mathbf { x } _ { 1 } , . . . , \mathbf { x } _ { n _ { m b } }$ from D, z1, ..., znmb ∼ PZ
|
| 233 |
+
25: Sample S1, ..., Snmb $\mathbf { S } _ { 1 } , . . . , \mathbf { S } _ { n _ { m b } } \overset { i . i . d } { \sim } \mathcal { U } ( \{ 0 , 1 \} ^ { d } ) , \kappa \sim \mathcal { U } ( S _ { n _ { m b } } )$
|
| 234 |
+
26: for $i = 1 , . . . , n _ { m b }$ do
|
| 235 |
+
27: $\tilde { \mathbf { x } } _ { i } G ( \mathbf { x } _ { i } , \mathbf { z } _ { i } ; \phi )$
|
| 236 |
+
28: Update $G$ by descending its stochastic gradient
|
| 237 |
+
|
| 238 |
+
$$
|
| 239 |
+
\nabla _ { \phi } ( \mathcal { L } _ { D } + \lambda \mathcal { L } _ { P } + \mu \mathcal { L } _ { f } )
|
| 240 |
+
$$
|
| 241 |
+
|
| 242 |
+
# 5.1 SYNTHETIC DATA EXPERIMENTS
|
| 243 |
+
|
| 244 |
+
# 5.1.1 SIMULATION SETTINGS
|
| 245 |
+
|
| 246 |
+
Evaluating feature selection methods on real data is difficult as we do not have access to the ground truth. To evaluate KnockoffGAN, we conduct a series of experiments using synthetic data, replicating those carried out in [7] and extending them to more general settings. In each of the following synthetic experiments, we set the feature dimension to be $d = 1 0 0 0$ and the number of samples to be $n = 3 0 0 0$ . For each feature distribution we perform two experiments:
|
| 247 |
+
|
| 248 |
+
1. Y-Logit: P (Y = 1|X) = exp(m(X))(1+exp(m(X)))
|
| 249 |
+
2. Y-Gaussian: $Y \sim \mathcal { N } ( m ( \mathbf { X } ) , 1 )$
|
| 250 |
+
|
| 251 |
+
where $\begin{array} { r } { m ( \mathbf { X } ) = \sum _ { i = 1 } ^ { 6 0 } \alpha \delta _ { i } X _ { i } } \end{array}$ with $\delta _ { i } \in \{ - 1 , 1 \}$ sampled uniformly and then fixed for each experiment. $\alpha$ controls the strength of the influence that $\mathbf { X }$ has on $Y$ , and in the experiments we vary this (as in [7]). Note that for the auto-regressive settings (found in Section 5.1.2 and the Appendix) the relevant variables are sampled uniformly at random from among the 1000 features (rather than being the first 60); in the non-auto-regressive settings this is not necessary.
|
| 252 |
+
|
| 253 |
+
We report the True Positive Rate (TPR), which is also commonly referred to as the power, defined as
|
| 254 |
+
|
| 255 |
+
$$
|
| 256 |
+
\mathrm { T P R } = \frac { | \hat { S } \cap S ^ { * } | } { | S ^ { * } | }
|
| 257 |
+
$$
|
| 258 |
+
|
| 259 |
+
where $S ^ { * } = \left\{ 1 , . . . , d \right\} \backslash \mathcal { H } _ { 0 }$ is the set of all non-null features. We also report the FDR to verify that the methods do indeed control it at the specified level which we set to be $10 \%$ . Note that we are not using FDR as a metric - a lower FDR is not desirable when we set the threshold to $10 \%$ . In fact, we want the methods to be as close to $10 \%$ as possible (so that they are achieving maximum power). We perform 100 replications of each experiment and report the average TPR and FDR.
|
| 260 |
+
|
| 261 |
+
# 5.1.2 GAUSSIAN SETTINGS
|
| 262 |
+
|
| 263 |
+
We begin by replicating the setup from [7] in which the underlying feature distribution is Gaussian. In this setting, we do not expect KnockoffGAN to perform better than the original knockoff framework as the original framework assumes a Gaussian distribution. Our goal here is simply to achieve a similar performance, demonstrating that little performance is lost even when the distribution is known to be Gaussian.
|
| 264 |
+
|
| 265 |
+
In the first experiment that we replicate from [7], the features are set to be auto-regressive (AR(1)) with Gaussian marginal distributions, i.e. $X _ { i } = \phi X _ { i - 1 } + Z _ { i }$ with $Z _ { i }$ being chosen such that $X _ { i } \stackrel { i . i . d } { \sim }$ . $\textstyle { \mathcal { N } } ( 0 , { \frac { 1 } { n } } )$ . In this experiment we vary $\phi$ , which determines the correlation between features, rather than $\alpha$ . We fix $\alpha = 3 . 5$ for Y-Gaussian and $\alpha = 1 0$ for Y-Logit. The results are reported in Fig. 2.
|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
Figure 2: Comparison of KnockoffGAN with the benchmarks for X distributed as an auto-regressive distribution with Gaussian marginal distributions. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 269 |
+
|
| 270 |
+
As in [7], we observe that BHq Marginal, which tests for marginal independence of the feature from $Y$ , suffers from severely increased FDR as we increase the correlation, invalidating the seemingly good TPR. To make the remaining results clearer, we omit $\mathrm { B H q }$ marginal from the rest of this section. Aside from this, we see in Fig. 2, that the other methods control the FDR at or very close to the specified $10 \%$ threshold. We also see that across the entire range of $\alpha$ , KnockoffGAN achieves a very similar TPR to the original Knockoff framework.
|
| 271 |
+
|
| 272 |
+
In the second experiment, we set the underlying feature distribution to be i.i.d. Gaussian. We found in this case also that KnockoffGAN was able to control the FDR and achieve a similar TPR to the original knockoff framework. More details of this experiment and the results for it can be found in the Appendix
|
| 273 |
+
|
| 274 |
+
# 5.1.3 NON-GAUSSIAN SETTINGS
|
| 275 |
+
|
| 276 |
+
We now move on to the key results for the paper in which the underlying feature distribution is no longer Gaussian. In this setting, we expect to outperform the original Knockoff framework due to the fact that they approximate the distribution as Gaussian. In particular, when this approximation is poor, the knockoffs are no longer valid and as such no FDR guarantees can be given. On the other hand, KnockoffGAN does not place any requirements on the distribution of the features and as such is able to generate valid knockoffs.
|
| 277 |
+
|
| 278 |
+
We performed experiments for several different underlying feature distributions, and found that KnockoffGAN achieved a higher TPR than the original knockoff framework in all cases, while controlling the FDR at the specified level. We give the results for $\mathbf { X }$ coming from a 4-Gaussian mixture model in Fig. 3 - results for Uniform, Dirichlet, and other (2 and 3) Gaussian mixture models can be found in the Appendix.
|
| 279 |
+
|
| 280 |
+
To create our 4-mixture model, we set the means $( \mathbf { m } ^ { 1 } , \mathbf { m } ^ { 2 } , \mathbf { m } ^ { 3 } , \mathbf { m } ^ { 4 } )$ of the 4 Gaussians to be:
|
| 281 |
+
|
| 282 |
+
• $m _ { i } ^ { 1 } = 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000,
|
| 283 |
+
• $m _ { i } ^ { 2 } = 1$ for $i = 1$ to 50 and $^ { - 1 }$ for $i = 5 1$ to 100 and 0 for $i = 1 0 1$ to 1000, • $m _ { i } ^ { 3 } = - 1$ for $i = 1$ to 50 and 1 for $i = 5 1$ to 100 and 0 for $i = 1 0 1$ to 1000, • $m _ { i } ^ { 4 } = - 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000.
|
| 284 |
+
|
| 285 |
+
We scale the variance of each Gaussian to be such that the overall variance of each feature is $\textstyle { \frac { 1 } { n } }$
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
Figure 3: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X }$ distributed as a 4-mixture Gaussian mixture model. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 289 |
+
|
| 290 |
+
We see in Fig. 3 that KnockoffGAN consistently outperforms the original knockoff framework, achieving a higher TPR across the entire range of $\alpha$ while consistently controlling the FDR at $10 \%$ . In fact, in the $Y$ -Gaussian setting we see that the original knockoff framework performs almost identically to BHq Maximum Likelihood.
|
| 291 |
+
|
| 292 |
+
# 5.1.4 IMPACT OF WGAN REGULARIZATION
|
| 293 |
+
|
| 294 |
+
We conclude the synthetic experiments by demonstrating the effect of the WGAN regularizer3. We conduct this experiment using an auto-regressive model with $\mathcal { U } ( - \sqrt { 3 / n } , \sqrt { 3 / n } )$ marginal distributions. We fix $\alpha = 5$ for Y-Logit and $\alpha = 2 . 5$ for Y-Gauss.
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 4: A comparison of the performance of KnockoffGAN with and without the WGAN regularizer for $\mathbf { X }$ distributed as an auto-regressive distribution with $\mathcal { U } ( - \sqrt { 3 / n } , \sqrt { 3 / n } )$ marginal distributions. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 298 |
+
|
| 299 |
+
As we see in Fig. 4, the WGAN regularizer has a significant effect on the results, with the improvement in some places being almost as much as KnockoffGAN without WGAN makes over the original knockoff framework. As noted in Section 4.3, there is no trade-off introduced by the inclusion of this regularizer; the optimal solution to the loss is unchanged and therefore this regularization is ”free” in terms of FDR control, but as demonstrated improves TPR performance.
|
| 300 |
+
|
| 301 |
+
# 5.2 REAL DATA EXPERIMENT
|
| 302 |
+
|
| 303 |
+
In this section we use a biobank dataset (with 387 dimensions) to qualitatively analyze the performance of KnockoffGAN. We use KnockoffGAN to select features for two different outcomes: (1) Cardiovascular Disease (CVD) and (2) Diabetes and then use PubMed literature to asses the validity of the selected features.
|
| 304 |
+
|
| 305 |
+
We found that the original knockoff framework was unable to select even the most well-known features (such as Age and Sex for CVD [15]), even when the FDR threshold was increased to $20 \%$ . Therefore, there are no relevant features to report for the original knockoff framework and so Table 1 contains only the features selected by KnockoffGAN that were deemed relevant by PubMed literature. For this the FDR threshold was set to $5 \%$ so that the number of discoveries was manageable for cross-reference with PubMed.
|
| 306 |
+
|
| 307 |
+
<table><tr><td>No</td><td>Cardiovascular Disease</td><td>PubMed ref.</td><td>Diabetes</td><td>PubMed ref.</td></tr><tr><td>1 2</td><td>Age Sex</td><td>[15]</td><td>Lipid-lowering drugs</td><td>[35]</td></tr><tr><td></td><td>Daily smoking</td><td>[15] [1]</td><td>Comparative body size Home owned</td><td>[27]</td></tr><tr><td>34</td><td>FEV1</td><td>[28]</td><td>Insomnia</td><td>[13]</td></tr><tr><td>5</td><td></td><td></td><td></td><td>[34]</td></tr><tr><td></td><td>Diastolic blood pressure</td><td>[33]</td><td>Anti-hypertensive drugs</td><td>[8]</td></tr><tr><td>6</td><td>Diabetes</td><td>[29]</td><td>Asthma</td><td>[30]</td></tr><tr><td>7</td><td>Father chronic bronchitis</td><td>[14; 23]</td><td>Height</td><td>[19;27]</td></tr><tr><td>8</td><td>Alcohol intake</td><td>[21]</td><td>Alcohol intake</td><td>[36]</td></tr><tr><td>9</td><td>Long-standing illness</td><td></td><td></td><td></td></tr></table>
|
| 308 |
+
|
| 309 |
+
Table 1: Discovered features using KnockoffGAN framework, verified using PubMed literature. The FDR threshold was set to $5 \%$ .
|
| 310 |
+
|
| 311 |
+
As we see in Table 1, KnockoffGAN discovers 9 relevant features for CVD and 8 relevant features for diabetes. Some of the relevant features, such as Age, Sex and Long-standing illness for CVD are well-known relevant features. The remaining features are all supported by the literature in PubMed. While this is a qualitative result (it relies on using PubMed as the ground truth), we do believe this demonstrates that KnockoffGAN is a significant improvement over the original knockoff generation procedure.
|
| 312 |
+
|
| 313 |
+
# 6 CONCLUSION
|
| 314 |
+
|
| 315 |
+
In this paper we built on the knockoff framework introduced in [3] by developing a novel GAN framework, KnockoffGAN, capable of generating knockoffs with no assumptions on the underlying data. We demonstrated through a series of experiments on a range of synthetic datasets and on a real world dataset that our method improves on the performance of the original knockoff framework.
|
| 316 |
+
|
| 317 |
+
While we feel this is a significant step towards being able to generate knockoffs for any data, there is still more work to be done. In particular, generalizing this method to time-series data would be non-trivial, and would be an interesting avenue for further investigation.
|
| 318 |
+
|
| 319 |
+
# ACKNOWLEDGEMENT
|
| 320 |
+
|
| 321 |
+
The authors would like to thank the reviewers for their helpful comments. The research presented in this paper was supported by the Office of Naval Research (ONR) and the NSF (Grant number: ECCS1462245, ECCS1533983, and ECCS1407712).
|
| 322 |
+
|
| 323 |
+
# REFERENCES
|
| 324 |
+
|
| 325 |
+
[1] John A Ambrose and Rajat S Barua. The pathophysiology of cigarette smoking and cardiovascular disease: an update. Journal of the American college of cardiology, 43(10):1731–1737, 2004.
|
| 326 |
+
[2] Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 327 |
+
[3] Rina Foygel Barber and Emmanuel J Candes. A knockoff filter for high-dimensional selective inference. arXiv preprint arXiv:1602.03574, 2016.
|
| 328 |
+
[4] Mohamed Ishmael Belghazi, Aristide Baratin, Sai Rajeshwar, Sherjil Ozair, Yoshua Bengio, Devon Hjelm, and Aaron Courville. Mutual information neural estimation. In Proceedings of the 35th International Conference on Machine Learning, pp. 530–539, 2018.
|
| 329 |
+
[5] Yoav Benjamini and Yosef Hochberg. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the royal statistical society. Series B (Methodological), pp. 289–300, 1995.
|
| 330 |
+
[6] Yoav Benjamini and Daniel Yekutieli. The control of the false discovery rate in multiple testing under dependency. Annals of statistics, pp. 1165–1188, 2001.
|
| 331 |
+
[7] Emmanuel Candes, Yingying Fan, Lucas Janson, and Jinchi Lv. Panning for gold: \` Model-free knockoffs for high-dimensional controlled variable selection. arXiv preprint arXiv:1610.02351, 2016.
|
| 332 |
+
[8] Antonio Ceriello, Dario Giugliano, Antonio Quatraro, and Pierre J Lefebvre. Anti-oxidants show an anti-hypertensive effect in diabetic and hypertensive subjects. Clinical Science, 81(6): 739–742, 1991.
|
| 333 |
+
[9] Yingying Fan, Emre Demirkaya, Gaorong Li, and Jinchi Lv. Rank: large-scale inference with graphical nonlinear knockoffs. arXiv preprint arXiv:1709.00092, 2017.
|
| 334 |
+
[10] Jaime Roquero Gimenez, Amirata Ghorbani, and James Zou. Knockoffs for the mass: new feature importance statistics with false discovery guarantees. arXiv preprint arXiv:1807.06214, 2018.
|
| 335 |
+
[11] 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.
|
| 336 |
+
[12] Isabelle Guyon and Andre Elisseeff. An introduction to variable and feature selection. ´ Journal of machine learning research, 3(Mar):1157–1182, 2003.
|
| 337 |
+
[13] C Jaffiol, F Thomas, K Bean, B Jego, and N Danchin. Impact of socioeconomic status on dia- ´ betes and cardiovascular risk factors: results of a large french survey. Diabetes & metabolism, 39(1):56–62, 2013.
|
| 338 |
+
[14] Pekka Jousilahti, Erkki Vartiainen, Jaakko Tuomilehto, and Pekka Puska. Symptoms of chronic bronchitis and the risk of coronary disease. The Lancet, 348(9027):567–572, 1996.
|
| 339 |
+
[15] Pekka Jousilahti, Erkki Vartiainen, Jaakko Tuomilehto, and Pekka Puska. Sex, age, cardiovascular risk factors, and coronary heart disease: a prospective follow-up study of 14 786 middle-aged men and women in finland. Circulation, 99(9):1165–1172, 1999.
|
| 340 |
+
[16] Alan Jovic, Karla Brki ´ c, and Nikola Bogunovi ´ c. A review of feature selection methods with ´ applications. In Information and Communication Technology, Electronics and Microelectronics (MIPRO), 2015 38th International Convention on, pp. 1200–1205. IEEE, 2015.
|
| 341 |
+
[17] Alan Jovic, Karla Brki ´ c, and Nikola Bogunovi ´ c. A review of feature selection methods with ´ applications. In Information and Communication Technology, Electronics and Microelectronics (MIPRO), 2015 38th International Convention on, pp. 1200–1205. IEEE, 2015.
|
| 342 |
+
[18] Eugene Katsevich and Chiara Sabatti. Multilayer knockoff filter: Controlled variable selection at multiple resolutions. arXiv preprint arXiv:1706.09375, 2017.
|
| 343 |
+
[19] D Lawlor, S Ebrahim, and G Davey Smith. The association between components of adult height and type ii diabetes and insulin resistance: British women’s heart and health study. Diabetologia, 45(8):1097–1106, 2002.
|
| 344 |
+
[20] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew Cunningham, Alejandro ´ Acosta, Andrew P Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. In CVPR, volume 2, pp. 4, 2017.
|
| 345 |
+
[21] Michael Marmot and Eric Brunner. Alcohol and cardiovascular disease: the status of the u shaped curve. BMJ: British Medical Journal, 303(6802):565, 1991.
|
| 346 |
+
[22] Tahir Mehmood, Kristian Hovde Liland, Lars Snipen, and Solve Sæbø. A review of variable selection methods in partial least squares regression. Chemometrics and Intelligent Laboratory Systems, 118:62–69, 2012.
|
| 347 |
+
[23] Howraman Meteran, Vibeke Backer, Kirsten Ohm Kyvik, Axel Skytthe, and Simon Francis Thomsen. Heredity of chronic bronchitis: a registry-based twin study. Respiratory medicine, 108(9):1321–1326, 2014.
|
| 348 |
+
[24] Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016.
|
| 349 |
+
[25] Carl Rietschel, Jinsung Yoon, and Mihaela van der Schaar. Feature selection for survival analysis with competing risks using deep learning. arXiv preprint arXiv:1811.09317, 2018.
|
| 350 |
+
[26] Matteo Sesia, Chiara Sabatti, and Emmanuel J Candes. Gene hunting with knockoffs for \` hidden markov models. arXiv preprint arXiv:1706.04677, 2017.
|
| 351 |
+
[27] Suzanne M Shoff and Polly A Newcomb. Diabetes, body size, and risk of endometrial cancer. American journal of epidemiology, 148(3):234–240, 1998.
|
| 352 |
+
[28] Don D Sin and SF Paul Man. Chronic obstructive pulmonary disease: a novel risk factor for cardiovascular disease. Canadian journal of physiology and pharmacology, 83(1):8–13, 2005.
|
| 353 |
+
[29] James R Sowers and Melvin A Lester. Diabetes and cardiovascular disease. Diabetes care, 22: C14, 1999.
|
| 354 |
+
[30] Lars C Stene and Per Nafstad. Relation between occurrence of type 1 diabetes and asthma. The Lancet, 357(9256):607–608, 2001.
|
| 355 |
+
[31] Jiliang Tang, Salem Alelyani, and Huan Liu. Feature selection for classification: A review. Data classification: Algorithms and applications, pp. 37, 2014.
|
| 356 |
+
[32] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pp. 267–288, 1996.
|
| 357 |
+
[33] Ramachandran S Vasan, Martin G Larson, Eric P Leip, Jane C Evans, Christopher J O’donnell, William B Kannel, and Daniel Levy. Impact of high-normal blood pressure on the risk of cardiovascular disease. New England journal of medicine, 345(18):1291–1297, 2001.
|
| 358 |
+
[34] Alexandros N Vgontzas, Duanping Liao, Slobodanka Pejovic, Susan Calhoun, Maria Karataraki, and Edward O Bixler. Insomnia with objective short sleep duration is associated with type 2 diabetes: a population-based study. Diabetes care, 2009.
|
| 359 |
+
[35] Sandeep Vijan and Rodney A Hayward. Pharmacologic lipid-lowering therapy in type 2 diabetes mellitus: background paper for the american college of physicians. Annals of Internal Medicine, 140(8):650–658, 2004.
|
| 360 |
+
[36] SG Wannamethee, AG Shaper, IJ Perry, and KGMM Alberti. Alcohol consumption and the incidence of type ii diabetes. Journal of Epidemiology & Community Health, 56(7):542–548, 2002.
|
| 361 |
+
[37] Marvin N Wright, Theresa Dankowski, and Andreas Ziegler. Unbiased split variable selection for random survival forests using maximally selected rank statistics. Statistics in medicine, 36 (8):1272–1284, 2017.
|
| 362 |
+
[38] Jinsung Yoon, James Jordon, and Mihaela van der Schaar. GAIN: Missing data imputation using generative adversarial nets. In Proceedings of the 35th International Conference on Machine Learning, pp. 5689–5698, 2018.
|
| 363 |
+
|
| 364 |
+
# APPENDIX
|
| 365 |
+
|
| 366 |
+
# THEORETICAL RESULTS
|
| 367 |
+
|
| 368 |
+
In order to prove Theorem 2, we use similar techniques to those used in the original GAN paper [11]. In what follows, we analyze the minimax game defined by:
|
| 369 |
+
|
| 370 |
+
$$
|
| 371 |
+
\operatorname* { n i n } _ { G } \operatorname* { m a x } _ { D } \sum _ { \mathbf { S } \in \{ 0 , 1 \} ^ { d } } \mathbb { E } _ { \mathbf { X } \sim \mathcal { P } _ { \mathbf { X } } } [ \mathbb { E } _ { { \bar { \mathbf { X } } } \sim \mathcal { P } _ { \mathbf { X } } ( \mathbf { X } ) } [ \mathbf { S } \cdot \log ( D ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) _ { \operatorname { s w a p } ( S ) } ) ) + ( \mathbf { 1 } - \mathbf { S } ) \cdot \log ( 1 - D ( ( \mathbf { X } , { \tilde { \mathbf { X } } } ) _ { \operatorname { s w a p } ( S ) } ) ) ] ]
|
| 372 |
+
$$
|
| 373 |
+
|
| 374 |
+
where we have used the version of $\mathcal { L } _ { D }$ given by equation (4) in the main manuscript (i.e. without hinting). The theoretical results that follow are proven only for this version of the loss, though we do believe that the theorem holds more generally for the hinting version of the loss - this is backed up by our empirical results demonstrating strict FDR control while using the hint mechanism. After proving that the optimal solution to this game does indeed provide us with valid knockoffs, we will then show that the additional term $\mathcal { L } _ { f }$ does not change the optimal solution. Let $p$ be the density of $( \mathbf { X } , \tilde { \mathbf { X } } )$ .
|
| 375 |
+
|
| 376 |
+
We begin by stating a lemma, that follows from a similar proof to Proposition 1 in [11].
|
| 377 |
+
|
| 378 |
+
Lemma 1. Let $( \mathbf { x } , \tilde { \mathbf { x } } ) \in \mathcal { X } \times \mathcal { X }$ . Then for a fixed generator, $G$ , the $i ^ { t h }$ component of the optimal discriminator, $D ^ { * } \big ( ( { \bf x } , \tilde { { \bf x } } ) \big )$ is given by
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
D ^ { * } ( ( \mathbf { x } , \tilde { \mathbf { x } } ) ) _ { i } = \frac { p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { s w a p ( \{ i \} ) } ) } { p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { s w a p ( \{ i \} ) } ) + p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) ) }
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
for each $i \in \{ 1 , . . . , d \}$ .
|
| 385 |
+
|
| 386 |
+
Proof. The proof of this involves some basic integral manipulation to get that the objective in (7) can be rewritten as
|
| 387 |
+
|
| 388 |
+
$$
|
| 389 |
+
\sum _ { i = 1 } ^ { d } \int _ { \chi \times \chi } \log D ( ( { \bf x } , \tilde { \bf x } ) ) _ { i } p ( ( { \bf x } , \tilde { \bf x } ) _ { \mathrm { s w a p } ( \{ i \} ) } ) + \log ( 1 - D ( ( { \bf x } , \tilde { \bf x } ) ) _ { i } ) p ( ( { \bf x } , \tilde { \bf x } ) ) \mathrm { d } { \bf x } .
|
| 390 |
+
$$
|
| 391 |
+
|
| 392 |
+
We then observe that $y \mapsto a \log y + b \log ( 1 - y )$ achieves its maximum in $[ 0 , 1 ]$ at $\frac { a } { a + b }$ and so the objective is maximized (with respect to $D$ , for fixed $G$ ) when
|
| 393 |
+
|
| 394 |
+
$$
|
| 395 |
+
D ^ { * } ( ( \mathbf { x } , \tilde { \mathbf { x } } ) ) _ { i } = \frac { p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( \{ i \} ) } ) } { p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( \{ i \} ) } ) + p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) ) }
|
| 396 |
+
$$
|
| 397 |
+
|
| 398 |
+
for each $i \in \{ 1 , . . . , d \}$
|
| 399 |
+
|
| 400 |
+
With this lemma, we are now able to prove our key result.
|
| 401 |
+
|
| 402 |
+
Theorem 3. Equation (7) is maximized (with respect to $G$ ) if and only if equation $( l )$ (in the main paper) is satisfied by $G$ .
|
| 403 |
+
|
| 404 |
+
Proof. We begin by rewriting our loss, substituting in $D ^ { * }$ , to give us the following loss for $G$ :
|
| 405 |
+
|
| 406 |
+
$$
|
| 407 |
+
\begin{array} { r l } { \mathcal { L } _ { G } = \displaystyle \sum _ { S \subset \{ 1 , \ldots , d \} } \mathbb { E } _ { \mathbf { x } , \bar { \mathbf { x } } } \Big ( \displaystyle \sum _ { i \in S } \log \frac { p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S \backslash i ) } \big ) } { p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S \backslash i ) } \big ) + p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S ) } \big ) } } & { } \\ { + \displaystyle \sum _ { i \notin S } \log \frac { p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S ) } \big ) } { p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S \cup i ) } \big ) + p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \operatorname { s w a p } ( S ) } \big ) } \Big ) } & { } \end{array}
|
| 408 |
+
$$
|
| 409 |
+
|
| 410 |
+
where we note that
|
| 411 |
+
|
| 412 |
+
$$
|
| 413 |
+
( ( \mathbf { x } , { \tilde { \mathbf { x } } } ) _ { \operatorname { s w a p } ( S ) } ) _ { \operatorname { s w a p } ( \{ i \} ) } = { \biggl \{ } { \bigl ( } \mathbf { x } , { \tilde { \mathbf { x } } } { \bigr ) } _ { \operatorname { s w a p } ( S \backslash i ) } { \mathrm { ~ i f ~ } } i \in S
|
| 414 |
+
$$
|
| 415 |
+
|
| 416 |
+
Then by inspecting each term in the sum, we see that each term is a KL-divergence term that is minimized only when
|
| 417 |
+
|
| 418 |
+
$$
|
| 419 |
+
p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( \{ S \backslash i \} ) } ) = p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S ) } )
|
| 420 |
+
$$
|
| 421 |
+
|
| 422 |
+
and
|
| 423 |
+
|
| 424 |
+
$$
|
| 425 |
+
p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( \{ S \cup i \} ) } \big ) = p \big ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S ) } \big )
|
| 426 |
+
$$
|
| 427 |
+
|
| 428 |
+
for every $i \in \{ 1 , . . . , d \}$ , every $S \subset \{ 1 , . . . , d \}$ and each $( \mathbf { x } , \tilde { \mathbf { x } } ) \in \mathcal { X } \times \mathcal { X }$ .
|
| 429 |
+
|
| 430 |
+
By iteratively applying equation (9), we get that
|
| 431 |
+
|
| 432 |
+
$$
|
| 433 |
+
\begin{array} { r l } & { p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S ) } ) = p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S \setminus 1 ) } ) = \ldots = p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S \setminus \{ 1 , \ldots , d - 1 \} ) } ) } \\ & { \qquad = p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) _ { \mathrm { s w a p } ( S \setminus \{ 1 , \ldots , d \} ) } ) = p ( ( \mathbf { x } , \tilde { \mathbf { x } } ) } \end{array}
|
| 434 |
+
$$
|
| 435 |
+
|
| 436 |
+
proving the theorem.
|
| 437 |
+
|
| 438 |
+
Lemma 2. The addition of the term $\mathcal { L } _ { f }$ to our loss, does not affect the optimal solution to it.
|
| 439 |
+
|
| 440 |
+
Proof. By theorem 2, it suffices to show that any distribution satisfying equation (1) also minimizes $\operatorname* { m a x } _ { f } \mathcal { L } _ { f }$ . But we note that, as shown in [2], $\operatorname* { m a x } _ { f } \mathcal { L } _ { f }$ (or rather $\operatorname* { s u p } _ { f } \mathcal { L } _ { f } )$ is the Wasserstein distance between $\mathbf { X }$ and $\tilde { \mathbf { X } }$ , which is 0 (and minimal) when ${ \bf x } \ { \overset { d . } { = } } \ { \tilde { \bf X } }$ . It therefore suffices to show that equation (1) implies ${ \bf X } \overset { d . } { = } \tilde { \bf X }$ .
|
| 441 |
+
|
| 442 |
+
Let $S = \{ 1 , . . . , d \}$ . Then if $( \mathbf { X } , \tilde { \mathbf { X } } )$ satisfy equation (1), we get that $( { \bf X } , \tilde { \bf X } ) \stackrel { d . } { = } ( \tilde { \bf X } , { \bf X } )$ . Since the joint distributions are equal, it follows that the marginal distributions are equal and so by projecting onto the first $d$ variables, we get that ${ \bf x } \stackrel { d . } { = } \tilde { \bf X }$ . □
|
| 443 |
+
|
| 444 |
+
# MINE
|
| 445 |
+
|
| 446 |
+
We state the key theory used by MINE to estimate the mutual information. For full details see the original paper, [4].
|
| 447 |
+
|
| 448 |
+
The mutual information is defined as
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
I ( U ; V ) = \int _ { U \times \mathcal { V } } \log \frac { d \mathbb { P } _ { U V } } { d \mathbb { P } _ { U } \otimes d \mathbb { P } _ { V } } d \mathbb { P } _ { U V }
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
where $U$ and $V$ are random variables over some spaces $\mathcal { U }$ and $\nu$ , respectively with joint measure $\mathbb { P } _ { U V }$ and marginal measures $\begin{array} { r } { \mathbb { P } _ { U } = \int _ { \mathcal { V } } d \mathbb { P } _ { U V } } \end{array}$ and $\begin{array} { r } { \bar { \mathbb { P } _ { V } } = \int _ { \mathcal { U } } d \mathbb { P } _ { U V } } \end{array}$ , respectively.
|
| 455 |
+
|
| 456 |
+
The mutual information can also be characterized by the Kullback-Leibler divergence, $D _ { K L }$ , as
|
| 457 |
+
|
| 458 |
+
$$
|
| 459 |
+
I ( U ; V ) = D _ { K L } ( \mathbb { P } _ { U V } | | \mathbb { P } _ { U } \otimes \mathbb { P } _ { V } )
|
| 460 |
+
$$
|
| 461 |
+
|
| 462 |
+
The Donsker-Varadhan representation then gives us for any two probability measures $\mathbb { P }$ and $\mathbb { Q }$ over a probability space $\Omega$
|
| 463 |
+
|
| 464 |
+
$$
|
| 465 |
+
D _ { K L } ( \mathbb { P } | | \mathbb { Q } ) = \operatorname* { s u p } _ { T : \Omega \to \mathbb { R } } \mathbb { E } _ { \mathbb { P } } [ T ] - \log ( \mathbb { E } _ { \mathbb { Q } } [ e ^ { T } ] )
|
| 466 |
+
$$
|
| 467 |
+
|
| 468 |
+
where the supremum is taken over all functions $\mathrm { T }$ such that the two expectations are finite.
|
| 469 |
+
|
| 470 |
+
A simple corollary of this is that fixing a class $\mathcal { F }$ of functions (such as a parametrized class $\{ T _ { \theta } : \theta \in$ $\Theta \}$ ) over which the supremum is taken will provide us with a lower bound for the mutual information that approaches the true mutual information as the class becomes sufficiently rich. MINE [4] fix the class to be parametric in this way - given a fixed neural network architecture, they let ${ \mathcal F } = \{ T _ { \theta } :$ $\theta \in \Theta \}$ be the set of all functions parametrized by this network.
|
| 471 |
+
|
| 472 |
+
# IMPLEMENTATION OF KNOCKOFFGAN
|
| 473 |
+
|
| 474 |
+
In the experiments, the depth of the generator, discriminator and WGAN-GP networks is set to 4 and power network is set to 3. The number of hidden nodes in each layer is $d / 4 , d / 1 6 d / 4$ for the generator, discriminator, and WGAN-GP, respectively. For the power network, we use 2 diagonal matrices for each layer to make two hidden nodes for each feature separately. We use ReLu and tanh as the activation functions for each layer except for the output layer where we use a linear activation function for the generator, power network and WGAN-GP networks and sigmoid activation function for the discriminator network. The number of samples in each mini-batch is 128. KnockoffGAN is implemented in tensorflow.
|
| 475 |
+
|
| 476 |
+
# DETAILS OF BENCHMARKS
|
| 477 |
+
|
| 478 |
+
We use the following links for the implementations of 3 benchmarks.
|
| 479 |
+
|
| 480 |
+
• Knockoff: http://web.stanford.edu/group/candes/knockoffs/ software/knockoff/index.html
|
| 481 |
+
• BHq Max: http://web.stanford.edu/group/candes/knockoffs/ software/knockoff/tutorial-4-r.html
|
| 482 |
+
• BHq Marginal: Modifying the original code of BHq Max in http://web.stanford. edu/group/candes/knockoffs/software/knockoff/tutorial-4-r. html
|
| 483 |
+
|
| 484 |
+
Except for the knockoff generation step, KnockoffGAN follows the same procedures as the original knockoff framework described at http://web.stanford.edu/group/candes/ knockoffs/software/knockoff/tutorial-2-r.html to select features.
|
| 485 |
+
|
| 486 |
+
# ADDITIONAL EXPERIMENTS
|
| 487 |
+
|
| 488 |
+
INDEPENDENT GAUSSIANS
|
| 489 |
+
|
| 490 |
+
In the following experiment, features were taken to be i.i.d. Gaussian, with mean 0 and variance $\textstyle { \frac { 1 } { n } }$ , i.e. $\mathbf { X } \sim { \mathcal { N } } ( 0 , { \textstyle { \frac { 1 } { n } } } \mathbf { I } _ { n } )$ . The results are reported in Fig. 5.
|
| 491 |
+
|
| 492 |
+

|
| 493 |
+
Figure 5: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X } \sim { \mathcal { N } } ( 0 , { \textstyle { \frac { 1 } { n } } } \mathbf { I } _ { n } )$ . TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 \dot { 0 } \% )$ .
|
| 494 |
+
|
| 495 |
+
As we see in Fig. 5, all methods control the FDR at or very close to the specified $10 \%$ threshold. We also see that across the entire range of $\alpha$ , KnockoffGAN achieves a very similar TPR to the original knockoff framework.
|
| 496 |
+
|
| 497 |
+
# NON-GAUSSIAN SETTINGS
|
| 498 |
+
|
| 499 |
+
INDEPENDENT UNIFORM
|
| 500 |
+
|
| 501 |
+
In this experiment we set the feature distribution to be a Uniform distribution with mean 0 and variance $\frac { \mathbf { i } } { n }$ (to be consistent with the Gaussian experiments). Fig. 6 displays the results for each component of $\mathbf { X }$ being i.i.d. $\mathcal { U } ( - \sqrt { 3 / n } , \sqrt { 3 / n } )$ . Once again we see that KnockoffGAN consistently outperforms the original knockoff framework, achieving a higher TPR across the entire range of $\alpha$ in both settings.
|
| 502 |
+
|
| 503 |
+

|
| 504 |
+
Figure 6: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X } \sim { \mathcal { U } } ( - { \sqrt { 3 / n } } , { \sqrt { 3 / n } } )$ . TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 505 |
+
|
| 506 |
+
# DIRICHLET
|
| 507 |
+
|
| 508 |
+
In this experiment we set the feature distribution to be a Dirichlet $( 1 , . . . , 1 )$ distribution - i.e. the uniform distribution over the $( d - 1 )$ -simplex. Correlation here exists through the requirement that $\textstyle \sum _ { i = 1 } ^ { d } X _ { i } = 1$ .
|
| 509 |
+
|
| 510 |
+

|
| 511 |
+
Figure 7: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X } \sim$ Dirichlet $( 1 , . . . , 1 )$ . TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 512 |
+
|
| 513 |
+
# GAUSSIAN MIXTURE MODELS
|
| 514 |
+
|
| 515 |
+
For the GMM2 model we set the means $( \mathbf { m } ^ { 1 } , \mathbf { m } ^ { 2 } )$ of the 2 Gaussians to be:
|
| 516 |
+
|
| 517 |
+
• $m _ { i } ^ { 1 } = 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000, • $m _ { i } ^ { 2 } = - 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000.
|
| 518 |
+
|
| 519 |
+

|
| 520 |
+
Figure 8: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X } \ \sim \ \mathbf { G M M } 2$ . TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 521 |
+
|
| 522 |
+
For the GMM3 model we set the means $( \mathbf { m } ^ { 1 } , \mathbf { m } ^ { 2 } , \mathbf { m } ^ { 3 } )$ of the 3 Gaussians to be:
|
| 523 |
+
|
| 524 |
+
• $m _ { i } ^ { 1 } = 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000,
|
| 525 |
+
• $m _ { i } ^ { 2 } = 1$ for $i = 1$ to 50 and $^ { - 1 }$ for $i = 5 1$ to 100 and 0 for $i = 1 0 1$ to 1000, • $m _ { i } ^ { 3 } = - 1$ for $i = 1$ to 100 and 0 for $i = 1 0 1$ to 1000.
|
| 526 |
+
|
| 527 |
+

|
| 528 |
+
Figure 9: Comparison of KnockoffGAN with the benchmarks for $\mathbf { X } \sim \mathbf { G M M } 3$ . TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 1 0 \% )$ .
|
| 529 |
+
|
| 530 |
+
# HYPER-PARAMETER ANALYSIS
|
| 531 |
+
|
| 532 |
+
Hyper-parameter selection in the feature selection problem is difficult; hyper-parameter selection cannot be performed using cross-validation as we do not have access to ground truth. The hyperparameters must therefore be fixed a priori. For this we believe that $\lambda = 1$ and $\mu = 1$ are perhaps the most canonical choice we could make and thus these were used in the main manuscript. In the following experiments, we investigate the sensitivity of the results to various settings of $\lambda$ and $\mu$ . The results below are in the auto-regressive Uniform setting with Y-Logit and FDR set to $10 \%$ .
|
| 533 |
+
|
| 534 |
+
Table 2: Evaluation of the hyper-parameter $\lambda$ in the auto-regressive uniform setting with Y-Logit and FDR threshold $10 \%$
|
| 535 |
+
|
| 536 |
+
<table><tr><td rowspan=2 colspan=8>TPR 入0 0.1 0.5 1 5 10</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>10</td></tr><tr><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>0.10.20.40.8</td><td rowspan=1 colspan=1>70.368.742.422.4</td><td rowspan=1 colspan=1>76.272.655.127.4</td><td rowspan=1 colspan=1>75.771.951.125.3</td><td rowspan=1 colspan=1>77.072.753.127.7</td><td rowspan=1 colspan=1>75.172.953.827.5</td><td rowspan=1 colspan=1>76.073.753.227.6</td></tr></table>
|
| 537 |
+
|
| 538 |
+
Table 3: Evaluation of the hyper-parameter $\mu$ in the auto-regressive uniform setting with Y-Logit and FDR threshold $10 \%$
|
| 539 |
+
|
| 540 |
+
<table><tr><td rowspan=2 colspan=8>TPR 从0 0.1 0.5 1 5 10</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.5</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>10</td></tr><tr><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>0.10.20.40.8</td><td rowspan=1 colspan=1>70.368.742.422.4</td><td rowspan=1 colspan=1>76.272.655.127.4</td><td rowspan=1 colspan=1>75.771.951.125.3</td><td rowspan=1 colspan=1>77.072.753.127.7</td><td rowspan=1 colspan=1>75.172.953.827.5</td><td rowspan=1 colspan=1>76.073.753.227.6</td></tr></table>
|
| 541 |
+
|
| 542 |
+
As can be seen in Table 2 and 3, the performance of KnockoffGAN is not sensitive to the value of $\lambda$ and $\mu$ . The only significant difference can be seen when either $\lambda$ or $\mu$ is set to 0 which represents the exclusion of either the power network or WGAN-discriminator network, respectively, from the model. In particular, the lack of sensitivity to $\mu$ aligns with Lemma 2 in which we see that there is not a trade-off between $\mathcal { L } _ { f }$ and $\mathcal { L } _ { D }$ but rather the two can be simultaneously minimised.
|
| 543 |
+
|
| 544 |
+
To further understand the effects of the WGAN network, we report the final values of the other losses ( $\mathcal { L } _ { D }$ and $\mathcal { L } _ { P }$ ) when $\mu = 1$ and $\mu = 0$ (i.e. with and without the WGAN regularisation). The results are given below in the auto-regressive Uniform setting with Y-Logit and FDR set to $10 \%$ .
|
| 545 |
+
|
| 546 |
+
<table><tr><td rowspan=2 colspan=6>Loss LD Lpμ=0|μ=11|μ=0|μ=1</td></tr><tr><td rowspan=1 colspan=1>μ=0</td><td rowspan=1 colspan=1>μ=1</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0.1</td><td rowspan=1 colspan=1>0.6894</td><td rowspan=1 colspan=1>0.6962</td><td rowspan=1 colspan=1>0.0014</td><td rowspan=1 colspan=1>0.0203</td></tr><tr><td rowspan=2 colspan=1>?</td><td rowspan=2 colspan=1>0.20.4</td><td rowspan=1 colspan=1>0.7005</td><td rowspan=1 colspan=1>0.6964</td><td rowspan=1 colspan=1>0.0018</td><td rowspan=1 colspan=1>0.0115</td></tr><tr><td rowspan=1 colspan=1>0.6919</td><td rowspan=1 colspan=1>0.6955</td><td rowspan=1 colspan=1>0.0046</td><td rowspan=1 colspan=1>0.0180</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>0.7013</td><td rowspan=1 colspan=1>0.6960</td><td rowspan=1 colspan=1>0.0068</td><td rowspan=1 colspan=1>0.0311</td></tr></table>
|
| 547 |
+
|
| 548 |
+
Table 4: Final values of the other training losses when $\mu = 0$ or $\mu = 1$ in the auto-regressive uniform setting with Y-Logit and FDR threshold $10 \%$
|
| 549 |
+
|
| 550 |
+
As can be seen in Table 4, the inclusion of the WGAN network improves the final value of $\mathcal { L } _ { D }$ , bringing it significantly closer to its optimal value of $\log ( 2 ) \approx 0 . 6 9 3$ . On the other hand, the power network loss is increased, however, this trade-off is expected and acceptable - the FDR guarantees rely on the discriminator loss $( \mathcal { L } _ { D } )$ and not the power network. As we see in Table 3, the TPR does not suffer from this increased loss for the power network.
|
| 551 |
+
|
| 552 |
+
For our final hyper-parameter evaluation, we investigate the effect of varying the hinting probability, $p$ , which determines the probability with which $B _ { i } = 1$ . We note that this hyper-parameter is used to trade-off between speed of learning and optimality of the learned solution. A low probability makes for fast convergence, but suboptimal convergence whereas a high probability makes for slow convergence (but a more optimal solution). We chose 0.9 to balance this, following the implementation of [38]. To demonstrate this trade-off we vary this hyper-parameter (from 0 to 0.9). The results below are for the auto-regressive Uniform distribution with Y-Logit and FDR set to $10 \%$ .
|
| 553 |
+
|
| 554 |
+
<table><tr><td rowspan=2 colspan=2>TPR</td><td rowspan=1 colspan=6>TPR p</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0.2</td><td rowspan=1 colspan=1>0.4</td><td rowspan=1 colspan=1>0.6</td><td rowspan=1 colspan=1>0.8</td><td rowspan=1 colspan=1>0.9</td></tr><tr><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>0.10.20.40.8</td><td rowspan=1 colspan=1>73.367.751.218.0</td><td rowspan=1 colspan=1>74.768.451.620.4</td><td rowspan=1 colspan=1>75.069.151.721.4</td><td rowspan=1 colspan=1>75.369.751.922.4</td><td rowspan=1 colspan=1>75.772.452.925.4</td><td rowspan=1 colspan=1>77.072.753.127.7</td></tr></table>
|
| 555 |
+
|
| 556 |
+
# RESULTS WITH FDR THRESHOLD $5 \%$
|
| 557 |
+
|
| 558 |
+
In all of the synthetic experiments above, the FDR threshold is set to $10 \%$ (which is the level most thoroughly investigated by [3]). In this final experiment, we set the FDR threshold to $5 \%$ (which aligns with our real-world experiment) and verify that KnockoffGAN is capable of controlling the FDR at this level and still outperforms the original knockoff framework. We conduct the experiments on (1) an auto-regressive distribution with Gaussian marginal distributions, (2) an auto-regressive distribution with Uniform marginal distributions, and (3) a 4-mixture Gaussian mixture model.
|
| 559 |
+
|
| 560 |
+

|
| 561 |
+
Table 5: Evaluation of the hinting probability, $p$ , in the auto-regressive uniform setting with Y-Logit and FDR threshold $10 \%$
|
| 562 |
+
Figure 10: A comparison of the performance of KnockoffGAN for $\mathbf { X }$ distributed as an auto-regressive distribution with Gaussian marginal distributions. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 5 \% )$ .
|
| 563 |
+
|
| 564 |
+

|
| 565 |
+
Figure 11: A comparison of the performance of KnockoffGAN for $\mathbf { X }$ distributed as an auto-regressive distribution with Uniform marginal distributions. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 5 \% )$ .
|
| 566 |
+
|
| 567 |
+

|
| 568 |
+
Figure 12: A comparison of the performance of KnockoffGAN for X distributed as 4-mixture Gaussian mixture model. TPR is used to quantify performance and FDR is reported to verify that it is at the specified threshold $( 5 \% )$ .
|
| 569 |
+
|
| 570 |
+
# STATISTICS OF REAL-WORLD BIOBANK DATASET
|
| 571 |
+
|
| 572 |
+
To preserve anonymity of the authors, the full details of this dataset will be given upon acceptance of the paper. In Table 1, we provide the basic statistics of the real-world biobank dataset.
|
| 573 |
+
|
| 574 |
+
<table><tr><td rowspan=1 colspan=1> Staticstics</td><td rowspan=1 colspan=1>Values</td></tr><tr><td rowspan=1 colspan=1>No of patients</td><td rowspan=1 colspan=1>86082</td></tr><tr><td rowspan=1 colspan=1>No of features</td><td rowspan=1 colspan=1>387</td></tr><tr><td rowspan=1 colspan=1>Pearson correlation across the features</td><td rowspan=1 colspan=1>25%: 0.0042, 50%: 0.0120,75%: 0.0332</td></tr><tr><td rowspan=1 colspan=1>Pearson correlation with the outcome</td><td rowspan=1 colspan=1>CVD: 25%: 0.0033, 50%: 0.0091,75%: 0.0199Diabetes: 25%: 0.0068, 50%: 0.0179,75%: 0.0439</td></tr><tr><td rowspan=1 colspan=1>Label distribution</td><td rowspan=1 colspan=1>CVD: 1252 patients (1.5%)Diabetes: 3932 patients (4.6%)</td></tr></table>
|
| 575 |
+
|
| 576 |
+
Table 6: Basic statistics of real-world biobank dataset $\%$ means percentile in Pearson correlation rows)
|
md/train/BygWRaVYwH/BygWRaVYwH.md
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GENERALIZED INNER LOOP META-LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Many (but not all) approaches self-qualifying as “meta-learning” in deep learning and reinforcement learning fit a common pattern of approximating the solution to a nested optimization problem. In this paper, we give a formalization of this shared pattern, which we call GIMLI, prove its general requirements, and derive a general-purpose algorithm for implementing similar approaches. Based on this analysis and algorithm, we describe a library of our design, unnamedlib, which we share with the community to assist and enable future research into these kinds of meta-learning approaches. We end the paper by showcasing the practical applications of this framework and library through illustrative experiments and ablation studies which they facilitate.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Although it is by no means a new subfield of machine learning research (see e.g. Schmidhuber, 1987; Bengio, 2000; Hochreiter et al., 2001), there has recently been a surge of interest in metalearning (e.g. Maclaurin et al., 2015; Andrychowicz et al., 2016; Finn et al., 2017). This is due to the methods meta-learning provides, amongst other things, for producing models that perform well beyond the confines of a single task, outside the constraints of a static dataset, or simply with greater data efficiency or sample complexity. Due to the wealth of options in what could be considered “meta-” to a learning problem, the term itself may have been used with some degree of underspecification. However, it turns out that many meta-learning approaches, in particular in the recent literature, follow the pattern of optimizing the “meta-parameters” of the training process by nesting one or more inner loops in an outer training loop. Such nesting enables training a model for several steps, evaluating it, calculating or approximating the gradients of that evaluation with respect to the meta-parameters, and subsequently updating these meta-parameters.
|
| 12 |
+
|
| 13 |
+
This paper makes three contributions. First, we propose a formalization of this general process, which we call Generalized Inner Loop Meta-Learning (GIMLI), and show that it subsumes several recent approaches. The proposed formalism allows us to describe the meta-optimization process in general terms and analyse its requirements. Second, we derive a general algorithm that supports the implementation of various kinds of meta-learning fitting within the GIMLI framework and its requirements. Third, based on this analysis and algorithm, we describe a lightweight PyTorch library that enables the straightforward implementation of any meta-learning approach that fits within the GIMLI framework in canonical PyTorch, such that existing codebases require minimal changes, supporting third party module implementations and a variety of optimizers. Through a set of indicative experiments, we showcase the sort of research directions that are facilitated by our formalization and the corresponding library.
|
| 14 |
+
|
| 15 |
+
The overarching aim of this paper is not—emphatically—to purport some notion of ownership or precedence in any sense over existing efforts by virtue of having proposed a unifying formulation. Rather, in pointing out similarities under such unification, it provides theoretical and practical tools for facilitating further research in this exciting domain.
|
| 16 |
+
|
| 17 |
+
# 2 GENERALIZED INNER LOOP META-LEARNING
|
| 18 |
+
|
| 19 |
+
Whereby “meta-learning” is taken to mean the process of “learning to learn”, we can describe it as a nested optimization problem according to which an outer loop optimizes meta-variables controlling the optimization of model parameters within an inner loop. The aim of the outer loop should be to improve the meta-variables such that the inner loop produces models which are more suitable according to some criterion. In this section, we will formalize this process, which we call Generalized Inner Loop Meta-Learning (GIMLI). We will define our terms in Section 2.1, give a formal description of the inner and outer loop’s respective optimization problems in Section 2.2 and 2.3, followed by a description and proof of the requirements under which the process can be run in Section 2.4. Finally, in Section 2.5 we describe an algorithm which permits an efficient and exact implementation of GIMLI, agnostic to the model and optimizers used.
|
| 20 |
+
|
| 21 |
+
# 2.1 DEFINITIONS
|
| 22 |
+
|
| 23 |
+
Let us assume we wish to train a model parameterized by $\theta$ . Let $\varphi$ describe some collection of possibly unrelated “meta-parameters” describing some aspect of the process by which we train our model. These could be, for example the learning rate or some other real-valued hyperparameters, task loss weights in multi-task learning, or perhaps the initialization of the model weights at the beginning of training. For disambiguation, we will refer to the subset of $\varphi$ describing optimization parameters by $\varphi ^ { o p t }$ , and those meta-parameters which parameterize aspects of the training loss calculation at every step (e.g. the loss itself, the task mixture, regularization terms, etc) by $\varphi ^ { l o \overline { { s } } s }$ , i.e. $\varphi = \varphi ^ { o p t } \cup \varphi ^ { l o s s }$ . We will give several concrete examples in Section 3.
|
| 24 |
+
|
| 25 |
+
Let $\mathcal { L } ^ { t r a i n }$ be a function of $\theta$ and $\varphi$ corresponding to the overall training objective we seek to minimize directly or indirectly (e.g. via an upper bound, a Monte Carlo estimate of an expectation, etc). Other elements of the objective such as the dataset, and hyperparameters or other aspects of training not covered by $\varphi$ , are assumed to be implicit and held fixed in $\mathcal { L } ^ { t r a i n }$ for notational simplicity. With this, the process by which we train a model to obtain test-time parameters $\theta ^ { * }$ can be formalized as shown in Equation $1 ^ { 1 }$ .
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\theta ^ { * } = \operatorname * { a r g m i n } ( \theta ; \mathcal { L } ^ { t r a i n } ( \theta , \varphi ) )
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
We assume that this search will be performed using an iterative gradient-based method such as some form of gradient descent as formalized in Section 2.2, and thus that the derivative $\nabla _ { \boldsymbol { \theta } } \mathcal { L } ^ { t r a i n } ( \boldsymbol { \theta } , \boldsymbol { \varphi } )$ exists, as an obvious requirement.
|
| 32 |
+
|
| 33 |
+
Furthermore, let $\mathcal { L } ^ { v a l }$ be a function exclusively of $\theta$ (except the specific case where $\varphi$ describes some aspect of the model, e.g. initialization, as is done in MAML (Finn et al., 2017)) describing some objective we wish to measure the post-training performance of the model against. This could be a validation set from the same task the model was trained on, from a collection of other tasks, or some other measure of the quality of the model parameterized by $\theta ^ { * }$ . Typically, the aforementioned iterative process is not run to convergence, but rather to the point where an intermediate set of model parameters is considered satisfactory according to some criterion (e.g. best model under $\mathcal { L } ^ { v a l }$ for a fixed budget of training steps, or after no improvement is seen for a certain number of training steps, etc.), and these intermediate parameters will serve as $\theta ^ { * }$ .
|
| 34 |
+
|
| 35 |
+
# 2.2 TRAINING
|
| 36 |
+
|
| 37 |
+
The process by which we typically approximate $\theta ^ { * }$ against $\mathcal { L } ^ { t r a i n }$ decomposes into a sequence of updates of $\theta$ . At timestep $t$ , we compute $\theta _ { t + 1 }$ from $\theta _ { t }$ by first computing a step-specific loss $\ell _ { t } ^ { t r a i n } ( \theta _ { t } , \varphi ^ { l o s s } )$ . Note that this loss may itself also be a function of step-specific factors, such as the training data used for that timestep, which we leave implicit here for notational simplicity. Following this, we typically compute or approximate (e.g. as in reinforcement learning) the gradients $\nabla _ { \theta _ { t } } \mathcal { \bar { \ell } } _ { t } ^ { t r a i n } ( \theta _ { t } , \varphi ^ { \bar { l } \ o s s } )$ of this loss with regard to $\theta _ { t }$ , by using algorithms such as backpropagation (Rumelhart et al., 1985). We then typically use an optimizer to “apply” these gradients to the parameters $\theta _ { t }$ to obtain updated parameters $\theta _ { t + 1 }$ . As such, optimization processes such as e.g. Adagrad (Duchi et al., 2011) may be stateful, in that they exploit gradient history to produce adaptive “local” learning rates. Because some aspects of the optimization process may be covered by our choice of $\varphi$ , we denote this optimization step at time-step $t$ by $\mathbf { o p t } _ { t }$ as shown in Equation 2, where timestep-specific attributes of the optimizer are left implicit by our use of the step subscript.
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\theta _ { t + 1 } = { \mathbf { o p t } } _ { t } ( \theta _ { t } , \varphi ^ { o p t } , G _ { t } ) \quad \mathrm { w h e r e } \quad G _ { t } = \nabla _ { \theta _ { t } } \ell _ { t } ^ { t r a i n } ( \theta _ { t } , \varphi ^ { l o s s } )
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
For example, where we might use SGD as an optimizer, with the learning-rate being a meta-variable $\varphi ^ { o p t }$ , we could instantiate equation 2 as follows:
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\begin{array} { r } { \mathbf { o p t } _ { t } ( \theta _ { t } , \varphi ^ { o p t } , G _ { t } ) : = \theta _ { t } - \varphi ^ { o p t } \cdot G _ { t } \quad \mathrm { w h e r e } \quad G _ { t } = \nabla _ { \theta _ { t } } \ell _ { t } ^ { t r a i n } \big ( \theta _ { t } , \varphi ^ { l o s s } \big ) } \end{array}
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
The estimation of $\theta ^ { * }$ from Equation 1 using $T + 1$ training updates according to Equation 2 yields a double recurrence in both $\theta _ { t }$ and $G _ { t }$ (as it is a function of $\theta _ { t }$ , as outlined in Equation 3).
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\begin{array} { r l } & { \theta ^ { * } \approx \mathbf { o p t } _ { T } ( \theta _ { T } , \varphi ^ { o p t } , G _ { T } ) = \mathbf { o p t } _ { T } ( P _ { T } , \varphi ^ { o p t } , \nabla _ { \theta _ { T } } \ell _ { T } ^ { t r a i n } ( P _ { T } , \varphi ^ { l o s s } ) ) } \\ & { P _ { T } = \mathbf { o p t } _ { T - 1 } ( \theta _ { T - 1 } , \varphi ^ { o p t } , G _ { T - 1 } ) = \mathbf { o p t } _ { T - 1 } ( P _ { T - 1 } , \varphi ^ { o p t } , \nabla _ { \theta _ { T - 1 } } \ell _ { T - 1 } ^ { t r a i n } ( P _ { T - 1 } , \varphi ^ { l o s s } ) ) } \end{array}
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
P _ { 1 } = \mathbf { o p t } _ { 0 } ( \theta _ { 0 } , \varphi ^ { o p t } , G _ { 0 } ) = \mathbf { o p t } _ { 0 } ( \theta _ { 0 } , \varphi ^ { o p t } , \nabla _ { \theta _ { 0 } } \ell _ { 0 } ^ { t r a i n } ( \theta _ { 0 } , \varphi ^ { l o s s } ) )
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
From this we see that the optimization process used to train a variety of model types, with a variety of optimization methods, can be described as a function yielding test-time model parameters $\theta ^ { * }$ potentially as a function of parameter history $\theta _ { 1 } , \ldots , \theta _ { T }$ and of meta-parameters $\varphi$ (if any exist). While this may seem like a fairly trivial formalization of a ubiquitous training process, we will see in Section 2.4 that if a few key requirements are met, this process can be nested as the inner loop within an outer loop containing—amongst other things—a meta-training process. From this process, described in Section 2.3, we estimate values of $\varphi$ which improve our training process against some external metric.
|
| 60 |
+
|
| 61 |
+
# 2.3 META-TRAINING
|
| 62 |
+
|
| 63 |
+
We now describe the outer loop optimization problem which wraps around the inner loop described in Section 2.2. Through this process, we seek a value $\varphi ^ { * }$ which ensures that the training process $\mathcal { L } ^ { t r a i n } ( \theta , \varphi ^ { * } )$ produces parameters $\theta ^ { * }$ which perform best against some metric $\mathcal { L } ^ { v a l } ( \theta ^ { * } )$ which we care about. The formalization and decomposition of this “meta-training process” into nested optimization problems is shown in Equation 4.
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\begin{array} { r l } & { \boldsymbol { \varphi } ^ { * } = \operatorname * { a r g m i n } \left( \boldsymbol { \varphi } ; \mathcal { L } ^ { v a l } ( \boldsymbol { \theta } ^ { * } ) \right) } \\ & { \quad = \operatorname * { a r g m i n } \left( \boldsymbol { \varphi } ; \mathcal { L } ^ { v a l } \left( \operatorname * { a r g m i n } \left( \boldsymbol { \theta } ; \mathcal { L } ^ { t r a i n } \left( \boldsymbol { \theta } , \boldsymbol { \varphi } \right) \right) \right) \right) } \end{array}
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
In this section, we introduce a formalization of an iterative process allowing us to approximate this nested optimization process. Furthermore, we describe a general iterative algorithm by which the process in Equation 4 can be approximated by gradient-based methods while jointly estimating $\theta ^ { * }$ according to the process in Equation 1.
|
| 70 |
+
|
| 71 |
+
An iterative process by which we can estimate $\varphi ^ { * }$ given Equation 4 following the sort of decomposition of the training process described Equation 1 into the training process described in Equations $2 -$ 3 is described below. Essentially, an estimate of $\theta ^ { * }$ is obtained following $T + 1$ steps training as outlined in Equation 3, which is then evaluated against $\mathcal { L } ^ { v a l }$ . The gradient of this evaluation, $\nabla _ { \varphi } \mathcal { L } ^ { v a l } ( \theta ^ { * } )$ is then obtained through backpropagation, and used to update $\varphi$ . Using $\tau$ as time-step counter to symbolize the time-scale being different from that used in the “inner loop”, we formalize this update in Equation 5 where metaopt $\tau$ denotes the optimization process used to update $\varphi _ { \tau }$ using $M _ { \tau }$ at that time-step.
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\begin{array} { r l } & { \varphi _ { \tau + 1 } = \mathbf { m e t a o p t } _ { \tau } ( \varphi _ { \tau } , M _ { \tau } ) \quad \mathrm { w h e r e } \quad M _ { \tau } = \nabla _ { \varphi _ { \tau } } \mathcal { L } ^ { v a l } ( \theta ^ { * } ) } \\ & { \qquad = \mathbf { m e t a o p t } _ { \tau } ( \varphi _ { \tau } , \nabla _ { \varphi _ { \tau } } \mathcal { L } ^ { v a l } ( \mathbf { o p t } _ { T } ( P _ { T } , \varphi ^ { o p t } , G _ { T } ) ) ) } \\ & { \mathrm { r e } P _ { T } = \mathbf { o p t } _ { T - 1 } ( P _ { T - 1 } , \varphi ^ { o p t } , \nabla _ { \theta _ { T - 1 } } \ell _ { T - 1 } ^ { t r a i n } ( P _ { T - 1 } , \varphi ^ { l o s s } ) ) } \\ & { \qquad \vdots } \end{array}
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
# 2.4 KEY REQUIREMENTS
|
| 78 |
+
|
| 79 |
+
For gradient-based meta-learning as formalized in Section 2.3—in particular through the process formalized in Equation 5—to be possible, a few key requirements must be met. We enumerate them here, and then discuss the conditions under which they are met, either analytically or through choice of model, loss function, or optimizer.
|
| 80 |
+
|
| 81 |
+
I. $\mathcal { L } ^ { v a l }$ is a differentiable function of its input, i.e. the derivative $\nabla _ { \theta ^ { * } } \mathcal { L } ^ { v a l } ( \theta ^ { * } )$ exists.
|
| 82 |
+
|
| 83 |
+
II. The optimization process opt in Equation 2 is a differentiable2 function of $\theta$ and $G ^ { 3 }$
|
| 84 |
+
|
| 85 |
+
III. Either or both of the following conditions hold:
|
| 86 |
+
|
| 87 |
+
(a) there exist continuous optimization hyperparameters (e.g. a learning rate $\alpha$ ) covered by $\varphi ^ { o p t }$ (e.g. $\alpha \subseteq \varphi ^ { o p t } ,$ ) and opt in Equation 2 is a differentiable function of $\varphi ^ { o p t }$ , or
|
| 88 |
+
(b) the gradient $G _ { t }$ for one or more time-steps in Equations 1–3 is a function of $\varphi ^ { l o s s }$ (i.e. the derivative $\nabla _ { \varphi ^ { l o s s } } \ell ^ { t r a i n } ( \theta , \varphi ^ { l o s s } )$ exists).
|
| 89 |
+
|
| 90 |
+
In the remainder of this section, we show that based on the assumptions outlined in Section 2.1, namely the existence of gradients on the validation objective $\mathcal { L } ^ { v a l }$ with regard to model parameters $\theta$ and of gradients on the training objective $\mathcal { L } ^ { t r a i n }$ with regard to both model parameters $\theta$ and metaparameters $\varphi$ , there exist gradients on the validation objective $\mathcal { L } ^ { v a l }$ with regard to $\varphi$ . We will then, in the next section, demonstrate how to implement this process by specifying an update algorithm for meta-variables.
|
| 91 |
+
|
| 92 |
+
Implementing an iterative process as described in Equation 5 will exploit the chain rule for partial derivatives in order to run backpropagation. The structure of the recurrence means we need to ensure that $\nabla _ { \theta _ { t } } \mathcal { L } ^ { v a l } ( \theta ^ { * } )$ exists for $t \in \{ 0 , \ldots , T \}$ in order to compute, for all such $\theta _ { t }$ , gradient paths $( \nabla _ { \theta _ { t } } \mathcal { L } ^ { v \bar { a } l } ( \theta ^ { * } ) ) \cdot ( \nabla _ { \varphi } \theta _ { t } )$ . We can prove this exists in virtue of the chain rule for partial derivatives and the requirements above:
|
| 93 |
+
|
| 94 |
+
1. By the chain rule, $\nabla _ { \theta _ { t } } \mathcal { L } ^ { v a l } ( \theta _ { * } ) = \left( \nabla _ { \theta ^ { * } } \mathcal { L } ^ { v a l } ( \theta _ { * } ) \right) \cdot \left( \nabla _ { \theta _ { t } } \theta ^ { * } \right)$ exists if $\nabla _ { \theta ^ { * } } \mathcal { L } ^ { v a l } ( \theta _ { * } )$ exists (and it does, by Requirement I) and $\nabla _ { \theta _ { t } } \theta ^ { * } = \nabla _ { \theta _ { t } } \theta _ { T + 1 }$ exists. 2. Idem, $\nabla _ { \theta _ { t } } \theta _ { T + 1 } = ( \nabla _ { \theta _ { t + 1 } } \theta _ { T + 1 } ) \cdot \left( \nabla _ { \theta _ { t } } \theta _ { t + 1 } \right)$ exists by recursion over $t$ if for all $i \in [ 1 , T ]$ , $\nabla _ { { \boldsymbol { \theta } } _ { i } } \theta _ { i + 1 }$ exists, which is precisely what Requirement $\mathrm { I I }$ guarantees.
|
| 95 |
+
|
| 96 |
+
Therefore $\nabla _ { \theta _ { t } } \mathcal { L } ^ { v a l } ( \theta ^ { * } )$ exists for $t \in \{ 0 , \ldots , T \}$ , leaving us to demonstrate that $\nabla _ { \varphi } \theta _ { t }$ is defined for all relevant values of $t$ as a consequence of requirements I–III. We separately consider the case of $\varphi ^ { l o s s }$ and $\varphi ^ { o p t }$ as defined in Section 2.1:
|
| 97 |
+
|
| 98 |
+
1. For $\nabla _ { \varphi ^ { o p t } } \theta _ { t }$ , the gradients trivially exist as a consequence of Requirement IIIa. 2. For $\nabla _ { \varphi ^ { l o s s } } \theta _ { t }$ , by the chain rule, $\nabla _ { \varphi ^ { l o s s } } \theta _ { t } ~ = ~ \left( \nabla _ { G _ { t - 1 } } \theta _ { t } \right) \cdot \left( \nabla _ { \varphi ^ { l o s s } } G _ { t - 1 } \right)$ . From Requirement $\mathrm { I I }$ , it follows that $\nabla _ { G _ { t - 1 } } \theta _ { t }$ exists, and from Requirement IIIb, it follows that $\nabla _ { \varphi ^ { l o s s } } G _ { t - 1 }$ exists, therefore so does $\nabla _ { \varphi ^ { l o s s } } \theta _ { t }$ .
|
| 99 |
+
|
| 100 |
+
Putting these both together, and having covered the union of $\varphi ^ { o p t }$ and $\varphi ^ { l o s s }$ by exhaustion, we have shown that the gradients $\nabla _ { \varphi } \mathcal { L } ^ { v a l } ( \mathbf { \bar { \theta } } ^ { * } )$ can be obtained by composition over the gradient paths $( \nabla _ { \theta _ { t } } \mathcal { L } ^ { v a l } ( \theta ^ { * } ) ) ( \nabla _ { \varphi } \theta _ { t } )$ for all $t \in [ 1 , T ]$ . In Section 2.5 we show how to implement the exact and efficient calculation of $\nabla _ { \varphi } \mathcal { L } ^ { v a l } ( \theta ^ { * } )$ . To complete this section, we indicate the conditions under which requirements I–III hold in practice.
|
| 101 |
+
|
| 102 |
+
Requirement I is simply a function of the choice of evaluation metric used to evaluate the model after training as part of $\dot { \mathcal { L } } ^ { v a l }$ . If this is not a differentiable function of $\theta ^ { * }$ , e.g. BLEU (Papineni et al., 2002) in machine translation, then a proxy metric can be selected for meta-training (e.g. negative log-likelihood of held out data), or gradient estimation methods such as REINFORCE (Williams, 1992) can be used.
|
| 103 |
+
|
| 104 |
+
Requirement II is a function of the choice of optimizer, but is satisfied for most popular optimizers. We directly prove that this requirement holds for SGD (Robbins & Monro, 1951) and for ADAGRAD (Duchi et al., 2011) in Appendix A, and prove it by construction for a wider class of common optimizers in the implementation and tests of the software library described in Section 4.
|
| 105 |
+
|
| 106 |
+
Requirement IIIa is a function of the choice of hyperparameters and optimizer, but is satisfied for at least the learning rate in most popular optimizers. Requirement IIIb is a function of the choice of loss function $\ell ^ { t r a i n }$ (or class thereof), in that $\nabla _ { \theta _ { t } } \ell _ { t } ^ { t r a i n } ( \bar { \theta _ { t } } , \varphi ^ { l o s s } )$ needs to exist and be a differentiable function of $\varphi$ . Usually, this requirement is held where $\varphi$ is a multiplicative modifier of $\theta _ { t }$ . For algorithms such as Model Agnostic Meta-Learning (Finn et al., 2017, MAML), this requirement is equivalent to saying that the Hessian of the loss function with regard to the parameters exists.
|
| 107 |
+
|
| 108 |
+
# 2.5 THE GIMLI UPDATE ALGORITHM
|
| 109 |
+
|
| 110 |
+
In Algorithm 1, we present the algorithm which permits the computation of updates to metavariables through the nested iterative optimization process laid out above. To clearly disentangle different gradient paths, we employ the mathematical fiction that is the “stop-gradient” operator, which is defined as an operator which maintains the truth of the following expression:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\begin{array} { r l r } { \underline { { [ - ] } } } & { : } & { \forall f \left[ \left( \underline { { [ f ( x ) ] } } = f ( x ) \right) \wedge \left( \nabla _ { x } \underline { { [ f ( x ) ] } } = 0 \right) \right] } \\ { \mathbf { s t o p } ( x ) } & { } & \end{array}
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
As will be shown below, this will allow us to decompose the computation of updates to the metavariables through an arbitrarily complex training process, agnostic to the models and optimizers used (subject to the requirements of Section 2.4 being satisfied), into a series of local updates passing gradient with regard to the loss back through the inner loop steps. This is akin to backpropagation through time (BPTT; Rumelhart et al., 1985), a method which has been adapted to other nested optimization processes with various constraints or restrictions (Andrychowicz et al., 2016; Franceschi et al., 2017; 2018).
|
| 117 |
+
|
| 118 |
+
# Algorithm 1 The GIMLI update loop
|
| 119 |
+
|
| 120 |
+
Require: Current model parameters $\theta _ { t }$ , meta-parameters $\varphi _ { \tau }$
|
| 121 |
+
Require: Number of meta-parameter updates $I$ , length of unrolled inner loop $J$
|
| 122 |
+
1: for $i = 0$ to $I - 1$ do
|
| 123 |
+
2: Segment meta-parameters $\varphi _ { i } ^ { o p t } , \varphi _ { i } ^ { l o s s } \gets \mathbf { s p l i t } ( \varphi _ { \tau + i } )$
|
| 124 |
+
3: Copy model state ${ \theta } _ { 0 } ^ { \prime } \gets { \theta } _ { t }$ , optimizer state $\mathbf { o p t } _ { 0 } ^ { \prime } \mathbf { o p t } _ { t }$
|
| 125 |
+
4: 5: for $j = 0$ te in $J - 1$ gradodel and retain gradient graph state
|
| 126 |
+
$G _ { j } \gets \nabla _ { \theta _ { j } ^ { \prime } } \ell _ { t + j } ^ { t r a i n } ( \theta _ { j } ^ { \prime } , \varphi _ { i } ^ { l o s s } )$
|
| 127 |
+
$\theta _ { j + 1 } ^ { \prime } \mathbf { o p t } _ { j } ^ { \prime } ( \theta _ { j } ^ { \prime } , \varphi _ { i } ^ { o p t } , G _ { j } )$
|
| 128 |
+
7: end for
|
| 129 |
+
8: Initialize accumulators: $A _ { i } ^ { o p t } \gets \mathbf { z e r o s L i k e } ( \varphi _ { i } ^ { o p t } ) ; A _ { i } ^ { l o s s } \gets \mathbf { z e r o s L i k e } ( \varphi _ { i } ^ { l o s s } )$
|
| 130 |
+
9: Compute $B _ { J } \nabla _ { \theta _ { J } ^ { \prime } } \mathcal { L } ^ { v a l } ( \theta _ { J } ^ { \prime } )$
|
| 131 |
+
10: for $j ^ { \prime } = J - 1$ to 0 do
|
| 132 |
+
11: Compute optimizer-gradient derivative $O _ { j ^ { \prime } } \gets \nabla _ { G _ { j ^ { \prime } } } \mathbf { o p t } _ { j ^ { \prime } } ^ { \prime } ( \theta _ { j ^ { \prime } } ^ { \prime } , \varphi _ { i } ^ { o p t } , G _ { j ^ { \prime } } )$
|
| 133 |
+
12: $\begin{array} { r l } & { \mathrm { U p d a t e \ } A _ { i } ^ { o p t } \gets A _ { i } ^ { o p t } + B _ { j ^ { \prime } + 1 } \cdot ( \nabla _ { \varphi _ { i } ^ { o p t } } \mathrm { o p t } _ { j ^ { \prime } } ^ { \prime } ( \mathrm { \small { \texttt { [ \theta ] } } } _ { y } ^ { \prime } , \mathrm { \small { \texttt { [ \varphi ] } } } _ { i } ^ { \prime , o p t } , \mathrm { \small { \texttt { [ \varphi ] } } } _ { 5 } ^ { \prime , o p t } ) ) } \\ & { \mathrm { U p d a t e \ } A _ { i } ^ { l o s s } \gets A _ { i } ^ { l o s s } + B _ { j ^ { \prime } + 1 } \cdot O _ { j ^ { \prime } } \cdot ( \nabla _ { \varphi _ { i } ^ { l o s s } } \nabla _ { \theta _ { j ^ { \prime } } ^ { \prime } } \ell _ { t + j ^ { \prime } } ^ { t r a i n } ( \mathrm { \small { \texttt { [ \theta ] } } } _ { y } ^ { \prime , o p t } ) } \\ & { \mathrm { C o m p u t e \ } B _ { j ^ { \prime } } \gets B _ { j ^ { \prime } + 1 } \cdot ( ( \nabla _ { \theta _ { j ^ { \prime } } } \mathrm { o p t } _ { j ^ { \prime } } ^ { \prime } ( \theta _ { j ^ { \prime } } ^ { \prime } , \varphi _ { i } ^ { o p t } , \mathrm { \small { \texttt { [ \theta ] } } } _ { \mathrm { s t o p } ( \theta _ { j ^ { \prime } } ) } ^ { \prime } ) ) ) + O _ { j ^ { \prime } } \cdot ( \nabla _ { \theta _ { j ^ { \prime } } ^ { \prime } } ^ { 2 } \ell _ { t + j ^ { \prime } } ^ { t r a i n } ( \theta _ { j ^ { \prime } } ^ { \prime } , \varphi _ { i } ^ { l o s s } ) ) ) } \\ & \mathrm { c o m p u t e \ } B _ { j ^ { \prime } } \gets B _ { j ^ { \prime } + 1 } \cdot ( ( \nabla _ { \theta _ { j ^ { \prime } } } \mathrm { o p t } _ { j ^ { \prime } } ^ { \prime } ( \theta _ { j ^ { \prime } } ^ { \prime } , \varphi _ { i } ^ { o p t } , \mathrm { \small { \texttt { [ \theta ] } } } _ { \mathrm { s t o p } ( \theta _ { j ^ { \prime } } ) } ^ { \prime } ) ) + O _ { j ^ { \prime } } \cdot ( \nabla _ { \theta _ { j ^ { \prime } } ^ { \prime } } ^ { 2 } \end{array}$
|
| 134 |
+
13:
|
| 135 |
+
14:
|
| 136 |
+
15: end for
|
| 137 |
+
16: Update meta-parameters $\varphi _ { \tau + i + 1 } \gets \mathbf { m e t a o p t } ( \varphi _ { \tau + i } , \mathbf { j o i n } ( A _ { i } ^ { o p t } , A _ { i } ^ { l o s s } ) )$
|
| 138 |
+
17: end for
|
| 139 |
+
18: return Updated meta-parameters $\varphi _ { \tau + I }$
|
| 140 |
+
|
| 141 |
+
Each iteration through the loop defined by lines 1–17 does one gradient-based update of metaparameters $\varphi$ using the optimizer employed in line 16. Each such iteration, we first (line 3) copy the model and optimizer state (generally updated through some outer loop within which this update loop sits). We then (lines 4–7) compute a series of $J$ updates on a copy of the model, preserving the intermediate gradient computations $G _ { 0 } , \ldots , G _ { J - 1 }$ , intermediate model parameters ${ \bar { \theta } } _ { 0 } ^ { \prime } , \dots , \bar { \theta } _ { J } ^ { \prime }$ (sometimes confusingly referred to as “fast weights”, following Hinton $\&$ Plaut (1987), within the meta-learning literature), and all associated activations. These will be reused in the second stage (lines 10–15) to backpropagate higher-order gradients of the meta-loss, computed on line 9 through the optimization process that was run in lines 4–7. In particular, in lines 12 and 13, local (i.e. time step-specific) gradient calculations compute part of the gradient of $\nabla _ { \varphi _ { i } ^ { o p t } } \mathcal { L } ^ { v a l } ( \theta _ { J } ^ { \prime } )$ and $\nabla _ { \varphi _ { i } ^ { l o s s } } \mathcal { L } ^ { v a l } ( \theta _ { J } ^ { \prime } )$ , which is stored in accumulators which contain the exact respective gradients by the end of loop. What permits this efficient local computation is the dynamic programming calculation of the partial derivative $B _ { j ^ { \prime } } = \nabla _ { \theta _ { j ^ { \prime } } ^ { \prime } }$ as function of only $B _ { j ^ { \prime } + 1 }$ and timestep-specific gradients, implementing a second-order variant of BPTT through reverse-mode differentiation.
|
| 142 |
+
|
| 143 |
+
# 3 EXAMPLES AND RELATED WORK
|
| 144 |
+
|
| 145 |
+
In this section, we highlight some instances of meta-learning which are instances of GIMLI, before discussing related approaches involving support for nested optimization, with applications to similar problems. The aim is not to provide a comprehensive literature review, which space would not permit. Rather, in pointing out similarity under our GIMLI formulation, we aim to showcase that rich and diverse research has been done using this class of approaches, where yet more progress indubitably remains to be made. This is, we believe, the strongest motivation for the development of libraries such as the one we present in Section 4 to support the implementation of algorithms that fall under the general algorithm derived in Section 2.
|
| 146 |
+
|
| 147 |
+
# 3.1 EXAMPLES
|
| 148 |
+
|
| 149 |
+
Many of the papers referenced below contain excellent and thorough reviews of the literature most related to the type of meta-learning they approach. In the interest of brevity, we will not attempt such a review here, but rather focus on giving examples of a few forms of meta-learning that fit the GIMLI framework (and thus are supported by the library presented in Section 4), and briefly explain why.
|
| 150 |
+
|
| 151 |
+
One popular meta-learning problem is that of learning to optimize hyperparameters through gradient-based methods (Bengio, 2000; Maclaurin et al., 2015; Luketina et al., 2016; Franceschi et al., 2017), as an alternative to grid/random search (Bergstra & Bengio, 2012) or Bayesian Optimization (Mockus et al., 1978; Pelikan et al., 1999; Bergstra et al., 2011; Snoek et al., 2012). Here, select continuous-valued hyperparameters are meta-optimized against a meta-objective, subject to the differentiability of the optimization step, and, where relevant, the loss function. This corresponds to Requirements $\mathrm { I I }$ and IIIa of Section 2.4 being met, i.e. GIMLI being run with select optimizer hyperparameters as part of $\varphi ^ { o p t }$ . To give a simple concrete example, in the approaches of Bengio (2000) and Maclaurin et al. (2015), the only meta-variable is the learning rate $\alpha$ , i.e. $\varphi = \varphi ^ { o p t } = \bar { \alpha }$ .
|
| 152 |
+
|
| 153 |
+
A related problem is that of learning the optimizer wholesale as a parametric model (Hochreiter et al., 2001; Andrychowicz et al., 2016; Duan et al., 2016), typically based on recurrent architectures. Again, here the optimizer’s own parameters are the optimizer hyperparameters, and constitute the entirety of $\varphi ^ { o p t }$ as used within GIMLI. Requirements II and IIIa are trivially met through the precondition that such optimizers models have parameters with regard to which their output (and losses that are a function thereof) is differentiable. As a concrete example, in the work of Andrychowicz et al. (2016), an RNN with parameters $\phi$ is meta-learned, and models the updates made to parameters during training. In our formalism, this would correspond to setting as meta-variable the parameters of this update network, i.e. $\varphi ^ { o p t } = \phi$ .
|
| 154 |
+
|
| 155 |
+
More recently, meta-learning approaches such as MAML (Finn et al., 2017; Antoniou et al., 2018) and its variants/extensions have sought to use higher-order gradients to meta-learn model/policy initializations in few-shot learning settings. In GIMLI, this corresponds to setting $\theta _ { 0 } = \varphi ^ { l o s s }$ , which then is not an explicit function of $\ell ^ { t r a i n }$ in Equation 3, but rather is implicitly its argument through updates to the inner model over the unrolled optimization. All requirements in Section 2.4 must be satisfied (save IIIa, with Requirement IIIb further entailing that $\bar { \ell } ^ { t r a i n }$ be defined such that the second derivative of the function with regard to $\theta$ exists (i.e. is non-zero).
|
| 156 |
+
|
| 157 |
+
Finally, recent work by Chebotar et al. (2019) has introduced the $\mathrm { { \bf M L } ^ { 3 } }$ framework for learning unconstrained loss functions as parametric models, through exploiting second-order gradients of a meta-loss with regard to the parameters of the inner loss. This corresponds, in GIMLI, to learning a parametric model of the loss parameterized by $\varphi ^ { l o s s }$ .
|
| 158 |
+
|
| 159 |
+
# 3.2 RELATED WORK
|
| 160 |
+
|
| 161 |
+
In a sense, many if not all of the approaches discussed in Section 3.1 qualify as “related work”, but here we will briefly discuss approaches to the general problem of formalizing and supporting implementations of problems that fit within the nested optimization specified by GIMLI.
|
| 162 |
+
|
| 163 |
+
The first is work by Franceschi et al. (2018) which describes how several meta-learning and hyperparameter optimization approaches can be cast as a bi-level optimization process, akin to our own formalization in 2.3. This fascinating and relevant work is highly complementary to the formalization and discussion presented in our paper. Whereas we focus on the requirements according to which gradient-based solutions to approaches based on nested optimization problems can be found in order to drive the development of a library which permits such approaches to be easily and scalably implemented, their work focuses on analysis of the conditions under which exact gradient-based solutions to bi-level optimization processes can be approximated, and what convergence guarantees exist for such guarantees. In this sense, this is more relevant to those who wish to analyze and extend alternatives to first-order approximations of algorithms such as MAML, e.g. see work of Nichol & Schulman (2018) or Rajeswaran et al. (2019).
|
| 164 |
+
|
| 165 |
+
On the software front, the library learn2learn (Arnold et al., 2019) addresses similar problems to that which we will present in Section 4. This library focuses primarily on providing implementations of existing meta-learning algorithms and their training loops that can be extended with new models. In contrast, the library we present in Section 4 is “closer to the metal”, aiming to support the development of new meta-learning algorithms fitting the GIMLI definitions with as little resort to non-canonical PyTorch as possible. A recent parallel effort, Torchmeta (Deleu et al., 2019) also provides a library aiming to assist the implementation of meta-learning algorithms, supplying useful data-loaders for meta-training. However, unlike our approach described in 4, it requires re-implementation of models using their functional/stateless building blocks, and for users to reimplement the optimizers in a differentiable manner.
|
| 166 |
+
|
| 167 |
+
# 4 THE unnamedlib LIBRARY
|
| 168 |
+
|
| 169 |
+
In this section, we provide a high-level description of the design and capabilities of unnamedlib,4 a PyTorch (Paszke et al., 2017) library aimed at enabling implementations of GIMLI with as little reliance on non-vanilla PyTorch as possible. In this section, we first discuss the obstacles that would prevent us from implementing this in popular deep learning frameworks, how we overcame these in PyTorch to implement GIMLI. Additional features, helper functions, and other considerations when using/extending the library are provided in its documentation.
|
| 170 |
+
|
| 171 |
+
# 4.1 OBSTACLES
|
| 172 |
+
|
| 173 |
+
Many deep learning frameworks offer the technical functionality required to implement GIMLI, namely the ability to take gradients of gradients. However, there are two aspects of how we implement and train parametric models in such frameworks which inhibit our ability to flexibly implement Algorithm 1.
|
| 174 |
+
|
| 175 |
+
The first obstacle is that models are typically implemented statefully (e.g. torch.nn in PyTorch, keras.layers in Keras (Chollet et al., 2015), etc.), meaning that the model’s parameters are encapsulated in the model implementation, and are implicitly relied upon during the forward pass. Therefore while such models can be considered as functions theoretically, they are not pure functions practically, as their output is not uniquely determined by their explicit input, and equivalently the parameters for a particular forward pass typically cannot be trivially overridden or supplied at call time. This prevents us from tracking and backpropagating over the successive values of the model parameters $\theta$ within the inner loop described by Equation 3, through an implicit or explicit graph.
|
| 176 |
+
|
| 177 |
+
The second issue is that, as discussed at the end of Section 2.4 and in Appendix A, even though the operations used within popular optimizers are mathematically differentiable functions of the parameters, gradients, and select hyperparameters, these operations are not tracked in various framework’s implicit or explicit graph/gradient tape implementations when an optimization step is run. This is with good reason: updating model parameters in-place is memory efficient, as typically there is no need to keep references to the previous version of parameters. Ignoring the gradient dependency formed by allowing backpropagation through an optimization step essentially makes it safe to release memory allocated to historical parameters and intermediate model states once an update has been completed. Together, these obstacles essentially prevent us from practically satisfying Requirement II of Section 2.4.
|
| 178 |
+
|
| 179 |
+
# 4.2 MAKING STATEFUL MODULES STATELESS
|
| 180 |
+
|
| 181 |
+
As we wish to track and backpropagate through intermediate states of parameters during the inner loop, we keep a record of such states which can be referenced during the backward pass stage of the outer loop in Algorithm 1. The typical way this is done in implementations of meta-learning algorithms such as MAML is to rewrite a “stateless” version of the inner loop’s model, permitting the use, in each invocation of the model’s forward pass, of weights which are otherwise tracked on the gradient graph/tape. While this addresses the issue, it is an onerous and limiting solution, as exploring new models within such algorithms invariably requires their reimplementation in a stateless style. This typically prevents the researcher from experimenting with third-party codebases, complicated models, or those which requiring loading pre-trained weights, without addressing a significant and unwelcome engineering challenge.
|
| 182 |
+
|
| 183 |
+
A more generic solution, permitting the use of existing stateful modules (including with pre-loaded activations), agnostic to the complexity or origin of the code which defines them, is to modify the run-time instance of the model’s parent class to render them effectively function, a technique often referred to as “monkey-patching”. The high-level function unnamedlib.monkeypatch() does this by taking as argument a torch.nn.Module instance and the structure of its nested sub-modules. As it traverses this structure, it clones the parent classes of submodule instances, leaving their functionality intact save for that of the forward method which implements the forward pass. Here, it replaces the call to the forward method with one which first replaces the stateful parameters of the submodule with ones provided as additional arguments to the patched forward, before calling the original class’s bound forward method, which will now used the parameters provided at call time. This method is generic and derived from first-principles analysis of the torch.nn.Module implementation, ensuring that any first or third-party implementation of parametric models which are subclasses of torch.nn.Module and do not abuse the parent class at runtime will be supported by this recursive patching process.
|
| 184 |
+
|
| 185 |
+
# 4.3 MAKING OPTIMIZERS DIFFERENTIABLE
|
| 186 |
+
|
| 187 |
+
Again, as part of our need to make the optimization process differentiable in order to satisfy Requirement II of Section 2.4, the typical solution is to write a version of SGD which does not modify parameters in-place, but treated as a differentiable function of the input parameters and hyperparameters akin to any other module in the training process. While this, again, is often considered a satisfactory solution in the meta-learning literature due to its simplicity, it too is limiting. Not only does the inability to experiment with other inner loop optimizers prevent research into the applicability of meta-learning algorithms to other optimization processes, the restriction to SGD also means that existing state-of-the-art methods used in practical domains cannot be extended using meta-learning methods such as those described in Section 3, lest they perform competitively when trained with SGD.
|
| 188 |
+
|
| 189 |
+
Here, while less generic, the solution provided by the high-level function unnamedlib.get diff optim() is to render a PyTorch optimizer instance differentiable by mapping its parent class to a differentiable reimplementation of the instance’s parent class. The reimplementation is typically a copy of the optimizer’s step logic, with in-place operations being replaced with gradient-tracking ones (a process which is syntactically simple to execute in PyTorch).
|
| 190 |
+
|
| 191 |
+
To this, we add wrapper code which copies the optimizer’s state, and allows safe branching off of it, to permit “unrolling” of the optimization process within an inner loop (cf. the recurrence from Equation 3) without modifying the initial state of the optimizer (e.g. to permit several such unrolls, or to preserve state if inner loop optimizer is used elsewhere in the outer loop). Most of the optimizers in torch.optim are covered by this method. Here too, a runtime modification of the parent optimizer class could possibly be employed as was done for torch.nn.Modules, but this would involve modifying Python objects at a far finer level of granularity. We find that supporting a wide and varied class of optimizers is a sufficient compromise to enable further research.5
|
| 192 |
+
|
| 193 |
+
# 5 EXPERIMENTS
|
| 194 |
+
|
| 195 |
+
In this section, we briefly present some results of experiments using select existing methods from Section 3.1, to show case how unnamedlib can be used to simply implement ablation studies and searches over model architectures, optimizers, and other aspects of an experiment. This could, naturally, be done without appeal to the library. However, in such cases, changing the model architecture or optimizer requires re-implementing the model functionally or optimization step differentiably. Here such changes require writing no new code (excluding the line where the model is defined).
|
| 196 |
+
|
| 197 |
+
# 5.1 META-LEARNING LEARNING RATES WITH HIGHER GRANULARITY
|
| 198 |
+
|
| 199 |
+
As the first application for unnamedlib, we set up a simple meta-learning task where we metaoptimize the learning rate. Employing a handcrafted annealing schedule for learning rates has been the de facto approach to improving a learning algorithm. While scheduled annealing can help to boost the final performance, it usually requires significant hand-tuning of the schedule. In contrast, we adjust learning rates automatically using meta-learning, which unnamedlib enables for arbitary models and optimizers.
|
| 200 |
+
|
| 201 |
+
We take an image classification model DenseNet-BC( $k { = } 1 2$ ) (Huang et al., 2016), that provides competitive state-of-the-art results on CIFAR10, and modify its training procedure by replacing the multi-step annealing schedule of learning rate with a meta-optimizer. Specifically, we treat learning rate for each inner optimizer’s parameter group as a separate meta-parameter that we will metalearn. Doing so allows individual model parameters to have finer learning rates, that are adjusted automatically. The GIMLI algorithm provides for a clean implementation of such training procedure.
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
Figure 1: Comparison of meta-learned learning rates against fixed and multi-step annealed for training DenseNet-BC( $_ { \mathrm { k = } 1 2 }$ ) on CIFAR10. We observe convergence near state-of-the-art with better sample complexity that using a hand-designed annealing schedule.
|
| 205 |
+
|
| 206 |
+
We first train two baseline variants of DenseNet-BC( $\mathtt { k } = \mathtt { l } 2$ ) using setup from (Huang et al., 2016). In the first variant we keep the learning rate fixed to 0.1 for all 300 epochs, while the second configuration takes advantage of a manually designed multi-step annealing schedule, which drops learning rate by 10 after 150 and 225 epochs. For the meta-learning variant, we split the training set into two disjoint pieces, one for training and another for validation, in proportion of $9 9 : 1$ . We then use per parameter group learning rates (299 in total) for meta-optimization, initializing each learning rate to 0.1. We perform one meta-update step after each epoch, where we unroll inner optimizer for
|
| 207 |
+
|
| 208 |
+
Table 1: Results from ablating $\mathbf { M A M L + + }$ architecture and inner optimizers. “Our base” results are from our VGG model trained with SGD in our $\mathbf { M A M L + }$ variant, and “our best” results show the best test accuracy found, with the best model/optimizer combination shown in the text below.
|
| 209 |
+
|
| 210 |
+
<table><tr><td rowspan="2"></td><td colspan="4">omniglot test accuracy</td><td colspan="2">miniImageNet test accuracy</td></tr><tr><td>5Way</td><td></td><td>20Way</td><td></td><td>5Way</td><td></td></tr><tr><td>Approach</td><td>1 Shot</td><td>5 Shot</td><td>1 Shot</td><td>5 Shot</td><td>1 Shot</td><td>5 Shot</td></tr><tr><td>MAML++ (Antoniou et al., 2018)</td><td>99.53 ± 0.26%</td><td>99.93 ± 0.09%</td><td>97.65 ± 0.05%</td><td>99.33±0.03%</td><td>52.15± 0.26%</td><td>68.32±0.44</td></tr><tr><td>MAML++ (Our base)</td><td>99.62 ± 0.08%</td><td>99.86 ± 0.02%</td><td>97.21 ± 0.11%</td><td>99.13 ±0.13%</td><td>56.33 ± 0.27%</td><td>75.13 ± 0.67%</td></tr><tr><td>MAML++ (Our best)</td><td>99.91 ± 0.05%</td><td>99.87 ± 0.03%</td><td>99.00 ± 0.33%</td><td>99.76 ± 0.01%</td><td>56.33 ± 0.27%</td><td>76.73 ± 0.52%</td></tr><tr><td></td><td>resnet-4+SGD</td><td>resnet-4+SGD</td><td>resnet-12+SGD</td><td>resnet-8+SGD</td><td>vgg+SGD</td><td>resnet-8+SGD</td></tr></table>
|
| 211 |
+
|
| 212 |
+
15 steps using batches from the training set, and compute meta-test error on the validation set over 10 batches from the validation set. We use batch size of 16 for meta-update, rather than 64 as in the base training loop. We use Adam (Kingma & Ba, 2014) with default parameters as a choice for meta-optimizer. We average results over 3 random seeds. Figure 1 demonstrates that our method is able reach the state-of-the-art performance faster.
|
| 213 |
+
|
| 214 |
+
# 5.2 ABLATING MAML’S MODEL ARCHITECTURE AND INNER OPTIMIZER
|
| 215 |
+
|
| 216 |
+
The unnamedlib library enables the exploration of new MAML-like models and inner-loop optimizers, which historically has required non-trivial implementations of the fast-weights for the model parameters and inner optimizers as done in Antoniou et al. (2018); Deleu et al. (2019). These ablations can be important for squeezing the last few bits of accuracy on well-established tasks and baselines that are already near-optimal as shown in Chen et al. (2019), and is even more important for developing new approaches and tasks that deal with different kinds of data and require adaptation to be done over non-standard operations.
|
| 217 |
+
|
| 218 |
+
To illustrate how easy unnamedlib makes these ablations, in this section we take a closer look at different model architecture and optimizer choices for the $\mathbf { M A M L + + }$ approach (Antoniou et al., 2018). MAML $^ { + + }$ uses a VGG network with a SGD inner optimizer for the the Omniglot (Lake et al., 2015) and Mini-Imagenet (Vinyals et al., 2016; Ravi & Larochelle, 2016) tasks. We start with the official $\mathbf { M A M L + + }$ code and evaluation procedure and use unnamedlib to ablate across VGG, ResNet, and DenseNet models and SGD and Adam optimizers. We provide more details about these in Appendix B. We denote the combination of model and inner optimizer choice with $< \mathrm { m o d e l } > + < \mathrm { o p t } >$ . One finding of standalone interest is that we have kept most of the features from $\mathbf { M A M L + }$ , except we significantly increase the base $\mathtt { V G G + S G D }$ performance by using batch normalization in training mode everywhere as in (Finn et al., 2017) instead of using per-timestep statistics and parameters as $\mathbf { M A M L + }$ proposes. In theory, this enables more inner optimization steps to be rolled out at test time, which otherwise is not possible with $\mathbf { M A M L + } +$ because of the pertimestep information, for simplicity in this paper we have not explored this and keep every algorithm, optimizer, and mode to five inner optimization steps. When using Adam as the inner optimizer, we initialize the first and second moment statistics to the statistics from the outer optimizer, which is also Adam, and learn per-parameter-group learning rates and rolling average $\beta$ coefficients. Our results in Table 1 show that we are able to push the accuracy of $\mathbf { M A M L + + }$ slightly up with this ablation. We note that this pushes the performance of $\mathbf { M A M L + } +$ closer to that of state-of-the-art methods such as LEO (Rusu et al., 2018). Appendix B shows our full experimental results, and we note that in some cases Adam slightly outperforms SGD for a particular model.
|
| 219 |
+
|
| 220 |
+
# 6 CONCLUSION
|
| 221 |
+
|
| 222 |
+
To summarize, we have presented GIMLI, a general formulation of a wide class of existing and potential meta-learning approaches, listed and proved the requirements that must be satisfied for such approaches to be possible, and specified a general algorithmic formulation of such approaches. We’ve described a lightweight library, unnamedlib, which extends PyTorch to enable the easy and natural implementation of such meta-learning approaches at scale. Finally we’ve demonstrated some of its potential applications. We hope to have made the case not only for the use of the mathematical and software tools we present here, but have also provided suitable encouragement for other researchers to use them and explore the boundaries of what can be done within this broad class of meta-learning approaches.
|
| 223 |
+
|
| 224 |
+
# REFERENCES
|
| 225 |
+
|
| 226 |
+
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.
|
| 227 |
+
|
| 228 |
+
Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint arXiv:1810.09502, 2018.
|
| 229 |
+
|
| 230 |
+
Seb Arnold, Praateek Mahajan, Debajyoti Datta, and Ian Bunner. learn2learn. ´ https:// github.com/learnables/learn2learn, 2019.
|
| 231 |
+
|
| 232 |
+
Yoshua Bengio. Gradient-based optimization of hyperparameters. Neural computation, 12(8):1889– 1900, 2000.
|
| 233 |
+
|
| 234 |
+
James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(Feb):281–305, 2012.
|
| 235 |
+
|
| 236 |
+
James S Bergstra, Remi Bardenet, Yoshua Bengio, and Bal ´ azs K ´ egl. Algorithms for hyper-parameter ´ optimization. In Advances in neural information processing systems, pp. 2546–2554, 2011.
|
| 237 |
+
|
| 238 |
+
Yevgen Chebotar, Artem Molchanov, Sarah Bechtle, Ludovic Righetti, Franziska Meier, and Gaurav Sukhatme. Meta-learning via learned loss. arXiv preprint arXiv:1906.05374, 2019.
|
| 239 |
+
|
| 240 |
+
Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification, 2019.
|
| 241 |
+
|
| 242 |
+
Franc¸ois Chollet et al. Keras, 2015.
|
| 243 |
+
|
| 244 |
+
Tristan Deleu, Tobias Wurfl, Mandana Samiei, Joseph Paul Cohen, and Yoshua Bengio. Torch- ¨ meta: A Meta-Learning library for PyTorch, 2019. URL https://arxiv.org/abs/1909. 06576. Available at: https://github.com/tristandeleu/pytorch-meta.
|
| 245 |
+
|
| 246 |
+
Yan Duan, John Schulman, Xi Chen, Peter L Bartlett, Ilya Sutskever, and Pieter Abbeel. Rl2: Fast reinforcement learning via slow reinforcement learning. arXiv preprint arXiv:1611.02779, 2016.
|
| 247 |
+
|
| 248 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12(Jul):2121–2159, 2011.
|
| 249 |
+
|
| 250 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine LearningVolume 70, pp. 1126–1135. JMLR. org, 2017.
|
| 251 |
+
|
| 252 |
+
Luca Franceschi, Michele Donini, Paolo Frasconi, and Massimiliano Pontil. Forward and reverse gradient-based hyperparameter optimization. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1165–1173. JMLR. org, 2017.
|
| 253 |
+
|
| 254 |
+
Luca Franceschi, Paolo Frasconi, Saverio Salzo, Riccardo Grazzi, and Massimilano Pontil. Bilevel programming for hyperparameter optimization and meta-learning. arXiv preprint arXiv:1806.04910, 2018.
|
| 255 |
+
|
| 256 |
+
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.
|
| 257 |
+
|
| 258 |
+
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.
|
| 259 |
+
|
| 260 |
+
Sepp Hochreiter, A Steven Younger, and Peter R Conwell. Learning to learn using gradient descent. In International Conference on Artificial Neural Networks, pp. 87–94. Springer, 2001.
|
| 261 |
+
|
| 262 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. CoRR, 2016.
|
| 263 |
+
|
| 264 |
+
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4700–4708, 2017.
|
| 265 |
+
|
| 266 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 267 |
+
|
| 268 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 269 |
+
|
| 270 |
+
Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
|
| 271 |
+
|
| 272 |
+
Jelena Luketina, Mathias Berglund, Klaus Greff, and Tapani Raiko. Scalable gradient-based tuning of continuous regularization hyperparameters. In International conference on machine learning, pp. 2952–2960, 2016.
|
| 273 |
+
|
| 274 |
+
Dougal Maclaurin, David Duvenaud, and Ryan Adams. Gradient-based hyperparameter optimization through reversible learning. In International Conference on Machine Learning, pp. 2113– 2122, 2015.
|
| 275 |
+
|
| 276 |
+
Jonas Mockus, Vytautas Tiesis, and Antanas Zilinskas. The application of bayesian methods for seeking the extremum. Towards global optimization, 2(117-129):2, 1978.
|
| 277 |
+
|
| 278 |
+
Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2, 2018.
|
| 279 |
+
|
| 280 |
+
Boris Oreshkin, Pau Rodr´ıguez Lopez, and Alexandre Lacoste. Tadam: Task dependent adaptive ´ metric for improved few-shot learning. In Advances in Neural Information Processing Systems, pp. 721–731, 2018.
|
| 281 |
+
|
| 282 |
+
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.
|
| 283 |
+
|
| 284 |
+
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. In NIPS Autodiff Workshop, 2017.
|
| 285 |
+
|
| 286 |
+
Martin Pelikan, David E Goldberg, and Erick Cantu-Paz. Boa: The bayesian optimization algorithm. ´ In Proceedings of the 1st Annual Conference on Genetic and Evolutionary Computation-Volume 1, pp. 525–532. Morgan Kaufmann Publishers Inc., 1999.
|
| 287 |
+
|
| 288 |
+
Aravind Rajeswaran, Chelsea Finn, Sham Kakade, and Sergey Levine. Meta-learning with implicit gradients. arXiv preprint arXiv:1909.04630, 2019.
|
| 289 |
+
|
| 290 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. CoRR, 2016.
|
| 291 |
+
|
| 292 |
+
Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pp. 400–407, 1951.
|
| 293 |
+
|
| 294 |
+
David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning internal representations by error propagation. Technical report, California Univ San Diego La Jolla Inst for Cognitive Science, 1985.
|
| 295 |
+
|
| 296 |
+
Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. arXiv preprint arXiv:1807.05960, 2018.
|
| 297 |
+
|
| 298 |
+
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. ¨
|
| 299 |
+
|
| 300 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 301 |
+
|
| 302 |
+
Jasper Snoek, Hugo Larochelle, and Ryan P Adams. Practical bayesian optimization of machine learning algorithms. In Advances in neural information processing systems, pp. 2951–2959, 2012.
|
| 303 |
+
|
| 304 |
+
Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pp. 3630–3638, 2016.
|
| 305 |
+
|
| 306 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 307 |
+
|
| 308 |
+
# A OPTIMIZER DIFFERENTIABILITY
|
| 309 |
+
|
| 310 |
+
A.1 SGD
|
| 311 |
+
|
| 312 |
+
$\nabla _ { \varphi } \theta _ { t + 1 } = \nabla _ { \varphi } \mathbf { S } \mathbf { G } \mathbf { D } ( \theta _ { t } , G _ { t } ) = \nabla _ { \varphi } [ \theta _ { t } - \alpha G _ { t } ] = \nabla _ { \varphi } \theta _ { t } - G _ { t } \nabla _ { \varphi } \alpha - \alpha \nabla _ { \varphi } G _ { t }$ where $\alpha$ is the learning rate, and $\nabla _ { \varphi } \alpha$ is defined iff $\alpha \subseteq \varphi$ else $G _ { t } \nabla _ { \varphi } \alpha = 0$
|
| 313 |
+
|
| 314 |
+
$$
|
| 315 |
+
\nabla _ { \theta _ { t } } \theta _ { t + 1 } = \nabla _ { \theta _ { t } } \mathbf { S } \mathbf { G } \mathbf { D } ( \theta _ { t } , G _ { t } ) = \nabla _ { \theta _ { t } } [ \theta _ { t } - \alpha G _ { t } ] = \nabla _ { \theta _ { t } } \theta _ { t } - \alpha \nabla _ { \theta _ { t } } G _ { t } = 1 - \alpha \nabla _ { \theta _ { t } } ^ { 2 } \ell _ { t } ^ { t r a i n } ( \theta _ { t } , \varphi )
|
| 316 |
+
$$
|
| 317 |
+
|
| 318 |
+
A.2 ADAGRAD
|
| 319 |
+
|
| 320 |
+
$$
|
| 321 |
+
\begin{array} { r l } & { \nabla _ { \varphi } \theta _ { t + 1 } = \nabla _ { \varphi } \mathbf { A } \mathbf { d a g r a d } ( \theta _ { t } , G _ { t } ) = \nabla _ { \varphi } [ \theta _ { t } - \frac { \eta } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } G _ { t } ] } \\ & { \qquad = \nabla _ { \varphi } \theta _ { t } - \frac { \eta \nabla _ { \varphi } G _ { t } } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } - \frac { G _ { t } \nabla _ { \varphi } \eta } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } + \frac { \eta G _ { t } \sum _ { i = 1 } ^ { t } G _ { i } \nabla _ { \varphi } G _ { i } } { \left( \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } \right) ^ { \frac { 3 } { 2 } } } } \end{array}
|
| 322 |
+
$$
|
| 323 |
+
|
| 324 |
+
where $\eta$ is the global learning rate, and $\nabla _ { \varphi } \eta$ is defined iff $\eta \subseteq \varphi$ else $\frac { \mathrm { \Delta } G _ { t } \nabla _ { \varphi } \eta } { \sqrt { \sum _ { i = 1 } ^ { t } { G _ { i } ^ { 2 } } } } = 0$
|
| 325 |
+
|
| 326 |
+
$$
|
| 327 |
+
\begin{array} { r l r } & { \nabla _ { \theta _ { t } } \theta _ { t + 1 } = \nabla _ { \theta _ { t } } \mathbf { A } \mathbf { d a } \mathbf { g r a d } ( \theta _ { t } , G _ { t } ) = \nabla _ { \theta _ { t } } [ \theta _ { t } - \frac { \eta } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } G _ { i } ] } & \\ & { } & { \qquad = \nabla _ { \theta _ { t } } \theta _ { t } - \frac { \eta \nabla _ { \theta _ { t } } G _ { t } } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } + \frac { \eta G _ { t } ^ { 2 } \nabla _ { \theta _ { t } } G _ { t } } { \left( \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } \right) ^ { \frac { 3 } { 2 } } } } \\ & { } & { \qquad = 1 - \frac { \eta \nabla _ { \theta _ { t } } ^ { 2 } \ell _ { t } ^ { t r a i n } \left( \theta _ { t } , \varphi \right) } { \sqrt { \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } } } + \frac { \eta G _ { t } ^ { 2 } \nabla _ { \theta _ { t } } ^ { 2 } \ell _ { t } ^ { t r a i n } \left( \theta _ { t } , \varphi \right) } { \left( \sum _ { i = 1 } ^ { t } G _ { i } ^ { 2 } \right) ^ { \frac { 3 } { 2 } } } } \end{array}
|
| 328 |
+
$$
|
| 329 |
+
|
| 330 |
+
# B MAML $^ { + + }$ EXPERIMENTS: ADDITIONAL INFORMATION
|
| 331 |
+
|
| 332 |
+
Table 2 shows all of the architectures and optimizers we ablated. The table is missing some rows as we only report the results that successfully completed running three seeds within three days on our cluster.
|
| 333 |
+
|
| 334 |
+
We use the following model architectures, which closely resemble the vanilla PyTorch examples for these architectures but are modified to be smaller for the few-shot classification setting:
|
| 335 |
+
|
| 336 |
+
• vgg is the VGG architecture (Simonyan & Zisserman, 2014) variant used in MAML $^ { + + }$ (Antoniou et al., 2018)
|
| 337 |
+
• resnet $- \mathbb { N }$ is the ResNet architecture (He et al., 2016). resnet-4 corresponds to the four blocks having just a single layer, and resnet-8 and resnet-12 have respectively 2 and 3 layers in each block
|
| 338 |
+
• densenet-8 is the DenseNet architecture (Huang et al., 2017) with 2 layers in each block
|
| 339 |
+
|
| 340 |
+
We follow TADAM (Oreshkin et al., 2018) and do not use the initial convolutional projection layer common in the full-size variants of the ResNet and DenseNet.
|
| 341 |
+
|
| 342 |
+
We can also visualize how the learning rates and rolling momentum terms (with Adam) change over time when they are being learned. We show this in Figure 2 and Figure 3 for the 20-way 1-shot Omniglot experiment with the resnet-4 architecture, which is especially interesting as Adam outperforms SGD in this case. We find that most of the SGD learning rates are decreased to near-zero except for a few select few that seem especially important for the adaptation. Adam exhibits similar behavior with the learning rates where most except for a select for are zeroed for the adaptation, and the rolling moment coefficients are particularly interesting where the first moment coefficient $\beta _ { 1 }$ becomes relatively evenly spread throughout the space while $\beta _ { 2 }$ splits many parameter groups between low and high regions of the space.
|
| 343 |
+
|
| 344 |
+
Table 2: Full MAML $^ { + + }$ model and inner optimizer sweep search results.
|
| 345 |
+
|
| 346 |
+
<table><tr><td colspan="5"></td><td rowspan="2">mean acc</td><td rowspan="2">std</td></tr><tr><td>dataset</td><td>nway</td><td>kshot</td><td>model</td><td>inner_optim</td></tr><tr><td>mini_imagenet_full_size</td><td>5</td><td>1</td><td>densenet-8</td><td>SGD</td><td>46.08</td><td>1.40</td></tr><tr><td></td><td></td><td></td><td>resnet-12</td><td>SGD</td><td>51.06</td><td>1.51</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>Adam</td><td>49.71</td><td>3.71</td></tr><tr><td></td><td></td><td></td><td></td><td>SGD</td><td>54.36</td><td>0.23</td></tr><tr><td></td><td></td><td></td><td>resnet-8</td><td>SGD</td><td>54.16</td><td>1.35</td></tr><tr><td></td><td></td><td></td><td>vgg</td><td>Adam</td><td>47.93</td><td>11.64</td></tr><tr><td></td><td></td><td>5</td><td>densenet-8</td><td>SGD</td><td>56.33</td><td>0.27</td></tr><tr><td></td><td></td><td></td><td>resnet-12</td><td>SGD</td><td>65.29</td><td>0.98</td></tr><tr><td></td><td></td><td></td><td></td><td>Adam</td><td>37.40</td><td>3.64</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>SGD</td><td>69.14</td><td>3.19</td></tr><tr><td></td><td></td><td></td><td></td><td>Adam</td><td>76.33</td><td>0.71</td></tr><tr><td></td><td></td><td></td><td>resnet-8</td><td>SGD</td><td>74.48</td><td>0.77</td></tr><tr><td></td><td></td><td></td><td></td><td>Adam</td><td>68.03</td><td>15.19</td></tr><tr><td></td><td></td><td></td><td></td><td>SGD</td><td>76.73</td><td>0.52</td></tr><tr><td>omniglot_dataset</td><td></td><td></td><td>vgg</td><td>Adam SGD</td><td>72.82</td><td>2.36</td></tr><tr><td></td><td>5</td><td>1</td><td>densenet-8</td><td>SGD</td><td>75.13</td><td>0.67</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>SGD</td><td>99.54</td><td>0.33</td></tr><tr><td></td><td></td><td></td><td></td><td>Adam</td><td>99.91</td><td>0.05</td></tr><tr><td></td><td></td><td></td><td>vgg</td><td>SGD</td><td>99.62</td><td>0.08</td></tr><tr><td></td><td></td><td>5</td><td>densenet-8</td><td>SGD</td><td>99.62</td><td>0.08</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>99.86</td><td>0.05</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>SGD</td><td>99.87</td><td>0.03</td></tr><tr><td></td><td></td><td></td><td>vgg</td><td>Adam</td><td>99.86</td><td>0.04</td></tr><tr><td></td><td>20</td><td>1</td><td></td><td>SGD</td><td>99.86</td><td>0.02</td></tr><tr><td></td><td></td><td></td><td>densenet-8</td><td>SGD</td><td>93.20</td><td>0.32</td></tr><tr><td></td><td></td><td></td><td>resnet-12</td><td>SGD</td><td>99.00</td><td>0.33</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>Adam</td><td>98.31</td><td>0.09</td></tr><tr><td></td><td></td><td></td><td></td><td>SGD</td><td>96.31</td><td>0.15</td></tr><tr><td></td><td></td><td></td><td>resnet-8</td><td>SGD</td><td>98.50</td><td>0.15</td></tr><tr><td></td><td></td><td></td><td>vgg</td><td>Adam</td><td>96.15</td><td>0.16</td></tr><tr><td></td><td></td><td>5</td><td></td><td>SGD</td><td>97.21</td><td>0.11</td></tr><tr><td></td><td></td><td></td><td>densenet-8</td><td>SGD</td><td>97.24</td><td>0.26</td></tr><tr><td></td><td></td><td></td><td>resnet-12</td><td>SGD</td><td>99.69</td><td>0.17</td></tr><tr><td></td><td></td><td></td><td>resnet-4</td><td>Adam</td><td>99.44</td><td>0.23</td></tr><tr><td></td><td></td><td></td><td></td><td>SGD</td><td>99.71</td><td>0.03</td></tr><tr><td></td><td></td><td></td><td>resnet-8</td><td>SGD</td><td>99.76</td><td>0.01</td></tr><tr><td></td><td></td><td></td><td>vgg</td><td>Adam</td><td>98.74</td><td>0.04</td></tr><tr><td></td><td></td><td></td><td></td><td>SGD</td><td>99.13</td><td>0.13</td></tr></table>
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Figure 2: The learning rates during a training run of a VGG network with SGD as the inner optimizer for 20-way 1-shot mini-imagenet classification. The colors show the parameter groups within the model.
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
Figure 3: The learning rates during a training run of a VGG network with Adam as the inner optimizer for 20-way 1-shot mini-imagenet classification. The colors show the parameter groups within the model.
|
md/train/Bygq-H9eg/Bygq-H9eg.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AN ANALYSIS OF DEEP NEURAL NETWORK MODELS FOR PRACTICAL APPLICATIONS
|
| 2 |
+
|
| 3 |
+
# Adam Paszke
|
| 4 |
+
|
| 5 |
+
Alfredo Canziani & Eugenio Culurciello Weldon School of Biomedical Engineering Purdue University {canziani,euge}@purdue.edu
|
| 6 |
+
|
| 7 |
+
Faculty of Mathematics, Informatics and Mechanics University of Warsaw a.paszke@students.mimuw.edu.pl
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Since the emergence of Deep Neural Networks (DNNs) as a prominent technique in the field of computer vision, the ImageNet classification challenge has played a major role in advancing the state-of-the-art. While accuracy figures have steadily increased, the resource utilisation of winning models has not been properly taken into account. In this work, we present a comprehensive analysis of important metrics in practical applications: accuracy, memory footprint, parameters, operations count, inference time and power consumption. Key findings are: (1) power consumption is independent of batch size and architecture; (2) accuracy and inference time are in a hyperbolic relationship; (3) energy constraint are an upper bound on the maximum achievable accuracy and model complexity; (4) the number of operations is a reliable estimate of the inference time. We believe our analysis provides a compelling set of information that helps design and engineer efficient DNNs.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Since the breakthrough in 2012 ImageNet competition (Russakovsky et al., 2015) achieved by AlexNet (Krizhevsky et al., 2012) — the first entry that used a Deep Neural Network (DNN) — several other DNNs with increasing complexity have been submitted to the challenge in order to achieve better performance.
|
| 16 |
+
|
| 17 |
+
In the ImageNet classification challenge, the ultimate goal is to obtain the highest accuracy in a multi-class classification problem framework, regardless of the actual inference time. We believe that this has given rise to several problems. Firstly, it is now normal practice to run several trained instances of a given model over multiple similar instances of each validation image. This practice, also know as model averaging or ensemble of DNNs, dramatically increases the amount of computation required at inference time to achieve the published accuracy. Secondly, model selection is hindered by the fact that different submissions are evaluating their (ensemble of) models a different number of times on the validation images, and therefore the reported accuracy is biased on the specific sampling technique (and ensemble size). Thirdly, there is currently no incentive in speeding up inference time, which is a key element in practical applications of these models, and affects resource utilisation, power-consumption, and latency.
|
| 18 |
+
|
| 19 |
+
This article aims to compare state-of-the-art DNN architectures, submitted for the ImageNet challenge over the last 4 years, in terms of computational requirements and accuracy. We compare these architectures on multiple metrics related to resource utilisation in actual deployments: accuracy, memory footprint, parameters, operations count, inference time and power consumption. The purpose of this paper is to stress the importance of these figures, which are essential hard constraints for the optimisation of these networks in practical deployments and applications.
|
| 20 |
+
|
| 21 |
+
# 2 METHODS
|
| 22 |
+
|
| 23 |
+
In order to compare the quality of different models, we collected and analysed the accuracy values reported in the literature. We immediately found that different sampling techniques do not allow for a direct comparison of resource utilisation. For example, central-crop (top-5 validation) errors of a single run of $\mathrm { V G G } { - 1 6 } ^ { 1 }$ (Simonyan & Zisserman, 2014) and GoogLeNet (Szegedy et al., 2014) are $8 . 7 0 \%$ and $1 0 . 0 7 \%$ respectively, revealing that VGG-16 performs better than GoogLeNet. When models are run with 10-crop sampling,2 then the errors become $9 . 3 3 \%$ and $9 . 1 5 \%$ respectively, and therefore VGG-16 will perform worse than GoogLeNet, using a single central-crop. For this reason, we decided to base our analysis on re-evaluations of top-1 accuracies3 for all networks with a single central-crop sampling technique (Zagoruyko, 2016).
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: Top1 vs. network. Single-crop top-1 validation accuracies for top scoring single-model architectures. We introduce with this chart our choice of colour scheme, which will be used throughout this publication to distinguish effectively different architectures and their correspondent authors. Notice that networks of the same group share the same hue, for example ResNet are all variations of pink.
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 2: Top1 vs. operations, size $\propto$ parameters. Top-1 one-crop accuracy versus amount of operations required for a single forward pass. The size of the blobs is proportional to the number of network parameters; a legend is reported in the bottom right corner, spanning from $5 \times \mathrm { i 0 } ^ { 6 }$ to $1 5 5 \times { { 1 0 } ^ { 6 } }$ params. Both these figures share the same $y$ -axis, and the grey dots highlight the centre of the blobs.
|
| 30 |
+
|
| 31 |
+
For inference time and memory usage measurements we have used Torch7 (Collobert et al., 2011) with cuDNN-v5 (Chetlur et al., 2014) and CUDA-v8 back-end. All experiments were conducted on a JetPack-2.3 NVIDIA Jetson TX1 board (nVIDIA): an embedded visual computing system with a 64-bit $\mathbf { A R M } ( \mathbf { R } )$ A57 CPU, a 1 T-Flop/s 256-core NVIDIA Maxwell GPU and 4 GB LPDDR4 of shared RAM. We use this resource-limited device to better underline the differences between network architecture, but similar results can be obtained on most recent GPUs, such as the NVIDIA K40 or Titan X, to name a few. Operation counts were obtained using an open-source tool that we developed (Paszke, 2016). For measuring the power consumption, a Keysight 1146B Hall effect current probe has been used with a Keysight MSO-X 2024A 200 MHz digital oscilloscope with a sampling period of $2 \mathrm { s }$ and $5 0 \mathrm { k S a } / \mathrm { s }$ sample rate. The system was powered by a Keysight E3645A GPIB controlled DC power supply.
|
| 32 |
+
|
| 33 |
+
# 3 RESULTS
|
| 34 |
+
|
| 35 |
+
In this section we report our results and comparisons. We analysed the following DDNs: AlexNet (Krizhevsky et al., 2012), batch normalised AlexNet (Zagoruyko, 2016), batch normalised Network In Network (NIN) (Lin et al., 2013), ENet (Paszke et al., 2016) for ImageNet (Culurciello, 2016), GoogLeNet (Szegedy et al., 2014), VGG-16 and -19 (Simonyan & Zisserman, 2014), ResNet-18, -34, -50, -101 and -152 (He et al., 2015), Inception-v3 (Szegedy et al., 2015) and Inception-v4 (Szegedy et al., 2016) since they obtained the highest performance, in these four years, on the ImageNet (Russakovsky et al., 2015) challenge.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 3: Inference time vs. batch size. This chart show inference time across different batch sizes with a logarithmic ordinate and logarithmic abscissa. Missing data points are due to lack of enough system memory required to process larger batches. A speed up of $3 \times$ is achieved by AlexNet due to better optimisation of its fully connected layers for larger batches.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 4: Power vs. batch size. Net power consumption (due only to the forward processing of several DNNs) for different batch sizes. The idle power of the TX1 board, with no HDMI screen connected, was $1 . 3 0 \mathrm { W }$ on average. The max frequency component of power supply current was $1 . 4 \mathrm { k } \mathrm { \bar { H } z }$ , corresponding to a Nyquist sampling frequency of $2 . 8 \mathrm { k H z }$ .
|
| 42 |
+
|
| 43 |
+
# 3.1 ACCURACY
|
| 44 |
+
|
| 45 |
+
Figure 1 shows one-crop accuracies of the most relevant entries submitted to the ImageNet challenge, from the AlexNet (Krizhevsky et al., 2012), on the far left, to the best performing Inception-v4 (Szegedy et al., 2016). The newest ResNet and Inception architectures surpass all other architectures by a significant margin of at least $7 \%$ .
|
| 46 |
+
|
| 47 |
+
Figure 2 provides a different, but more informative view of the accuracy values, because it also visualises computational cost and number of network’s parameters. The first thing that is very apparent is that VGG, even though it is widely used in many applications, is by far the most expensive architecture — both in terms of computational requirements and number of parameters. Its 16- and 19-layer implementations are in fact isolated from all other networks. The other architectures form a steep straight line, that seems to start to flatten with the latest incarnations of Inception and ResNet. This might suggest that models are reaching an inflection point on this data set. At this inflection point, the costs — in terms of complexity — start to outweigh gains in accuracy. We will later show that this trend is hyperbolic.
|
| 48 |
+
|
| 49 |
+
# 3.2 INFERENCE TIME
|
| 50 |
+
|
| 51 |
+
Figure 3 reports inference time per image on each architecture, as a function of image batch size (from 1 to 64). We notice that VGG processes one image in a fifth of a second, making it a less likely contender in real-time applications on an NVIDIA TX1. AlexNet shows a speed up of roughly $3 \times$ going from batch of 1 to 64 images, due to weak optimisation of its fully connected layers. It is a very surprising finding, that will be further discussed in the next subsection.
|
| 52 |
+
|
| 53 |
+
# 3.3 POWER
|
| 54 |
+
|
| 55 |
+
Power measurements are complicated by the high frequency swings in current consumption, which required high sampling current read-out to avoid aliasing. In this work, we used a $2 0 0 \mathrm { \bar { M H z } }$ digital oscilloscope with a current probe, as reported in section 2. Other measuring instruments, such as an AC power strip with $2 \mathrm { H z }$ sampling rate, or a GPIB controlled DC power supply with $1 2 \mathrm { H z }$ sampling rate, did not provide enough bandwidth to properly conduct power measurements.
|
| 56 |
+
|
| 57 |
+
In figure 4 we see that the power consumption is mostly independent with the batch size. Low power values for AlexNet (batch of 1) and VGG (batch of 2) are associated to slower forward times per image, as shown in figure 3.
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 5: Memory vs. batch size. Maximum system memory utilisation for batches of different sizes. Memory usage shows a knee graph, due to the network model memory static allocation and the variable memory used by batch size.
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 6: Memory vs. parameters count. Detailed view on static parameters allocation and corresponding memory utilisation. Minimum memory of $\bar { 2 } 0 0 \mathrm { M B }$ , linear afterwards with slope 1.30.
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 7: Operations vs. inference time, size $\propto$ parameters. Relationship between operations and inference time, for batches of size 1 and 16 (biggest size for which all architectures can still run). Not surprisingly, we notice a linear trend, and therefore operations count represent a good estimation of inference time. Furthermore, we can notice an increase in the slope of the trend for larger batches, which correspond to shorter inference time due to batch processing optimisation.
|
| 67 |
+
|
| 68 |
+
# 3.4 MEMORY
|
| 69 |
+
|
| 70 |
+
We analysed system memory consumption of the TX1 device, which uses shared memory for both CPU and GPU. Figure 5 shows that the maximum system memory usage is initially constant and then raises with the batch size. This is due the initial memory allocation of the network model — which is the large static component — and the contribution of the memory required while processing the batch, proportionally increasing with the number of images. In figure 6 we can also notice that the initial allocation never drops below $2 0 0 \mathrm { M B }$ , for network sized below $1 0 0 \mathrm { M B }$ , and it is linear afterwards, with respect to the parameters and a slope of 1.30.
|
| 71 |
+
|
| 72 |
+
# 3.5 OPERATIONS
|
| 73 |
+
|
| 74 |
+
Operations count is essential for establishing a rough estimate of inference time and hardware circuit size, in case of custom implementation of neural network accelerators. In figure 7, for a batch of 16 images, there is a linear relationship between operations count and inference time per image. Therefore, at design time, we can pose a constraint on the number of operation to keep processing speed in a usable range for real-time applications or resource-limited deployments.
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
Figure 8: Operations vs. power consumption, size $\propto$ parameters. Independency of power and operations is shown by a lack of directionality of the distributions shown in these scatter charts. Full resources utilisation and lower inference time for AlexNet architecture is reached with larger batches.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 9: Accuracy vs. inferences per second, size $\propto$ operations. Non trivial linear upper bound is shown in these scatter plots, illustrating the relationship between prediction accuracy and throughput of all examined architectures. These are the first charts in which the area of the blobs is proportional to the amount of operations, instead of the parameters count. We can notice that larger blobs are concentrated on the left side of the charts, in correspondence of low throughput, i.e. longer inference times. Most of the architectures lay on the linear interface between the grey and white areas. If a network falls in the shaded area, it means it achieves exceptional accuracy or inference speed. The white area indicates a suboptimal region. E.g. both AlexNet architectures improve processing speed as larger batches are adopted, gaining $8 0 \mathrm { H z }$ .
|
| 81 |
+
|
| 82 |
+
# 3.6 OPERATIONS AND POWER
|
| 83 |
+
|
| 84 |
+
In this section we analyse the relationship between power consumption and number of operations required by a given model. Figure 8 reports that there is no specific power footprint for different architectures. When full resources utilisation is reached, generally with larger batch sizes, all networks consume roughly an additional $1 1 . 8 \mathrm { W }$ , with a standard deviation of $0 . 7 \mathrm { W }$ . Idle power is $1 . 3 0 \mathrm { W }$ . This corresponds to the maximum system power at full utilisation. Therefore, if energy consumption is one of our concerns, for example for battery-powered devices, one can simply choose the slowest architecture which satisfies the application minimum requirements.
|
| 85 |
+
|
| 86 |
+
# 3.7 ACCURACY AND THROUGHPUT
|
| 87 |
+
|
| 88 |
+
We note that there is a non-trivial linear upper bound between accuracy and number of inferences per unit time. Figure 9 illustrates that for a given frame rate, the maximum accuracy that can be achieved is linearly proportional to the frame rate itself. All networks analysed here come from several publications, and have been independently trained by other research groups. A linear fit of the accuracy shows all architecture trade accuracy vs. speed. Moreover, chosen a specific inference time, one can now come up with the theoretical accuracy upper bound when resources are fully utilised, as seen in section 3.6. Since the power consumption is constant, we can even go one step further, and obtain an upper bound in accuracy even for an energetic constraint, which could possibly be an essential designing factor for a network that needs to run on an embedded system.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 10: Accuracy per parameter vs. network. Information density (accuracy per parameters) is an efficiency metric that highlight that capacity of a specific architecture to better utilise its parametric space. Models like VGG and AlexNet are clearly oversized, and do not take fully advantage of their potential learning ability. On the far right, ResNet-18, BN-NIN, GoogLeNet and ENet (marked by grey arrows) do a better job at “squeezing” all their neurons to learn the given task, and are the winners of this section.
|
| 92 |
+
|
| 93 |
+
As the spoiler in section 3.1 gave already away, the linear nature of the accuracy vs. throughput relationship translates into a hyperbolical one when the forward inference time is considered instead. Then, given that the operations count is linear with the inference time, we get that the accuracy has an hyperbolical dependency on the amount of computations that a network requires.
|
| 94 |
+
|
| 95 |
+
# 3.8 PARAMETERS UTILISATION
|
| 96 |
+
|
| 97 |
+
DNNs are known to be highly inefficient in utilising their full learning power (number of parameters / degrees of freedom). Prominent work (Han et al., 2015) exploits this flaw to reduce network file size up to $5 0 \times$ , using weights pruning, quantisation and variable-length symbol encoding. It is worth noticing that, using more efficient architectures to begin with may produce even more compact representations. In figure 10 we clearly see that, although VGG has a better accuracy than AlexNet (as shown by figure 1), its information density is worse. This means that the amount of degrees of freedom introduced in the VGG architecture bring a lesser improvement in terms of accuracy. Moreover, ENet (Paszke et al., 2016) — which we have specifically designed to be highly efficient and it has been adapted and retrained on ImageNet (Culurciello, 2016) for this work — achieves the highest score, showing that $2 4 \times$ less parameters are sufficient to provide state-of-the-art results.
|
| 98 |
+
|
| 99 |
+
# 4 CONCLUSIONS
|
| 100 |
+
|
| 101 |
+
In this paper we analysed multiple state-of-the-art deep neural networks submitted to the ImageNet challenge, in terms of accuracy, memory footprint, parameters, operations count, inference time and power consumption. Our goal is to provide insights into the design choices that can lead to efficient neural networks for practical application, and optimisation of the often-limited resources in actual deployments, which lead us to the creation of ENet — or Efficient-Network — for ImageNet. We show that accuracy and inference time are in a hyperbolic relationship: a little increment in accuracy costs a lot of computational time. We show that number of operations in a network model can effectively estimate inference time. We show that an energy constraint will set a specific upper bound on the maximum achievable accuracy and model complexity, in terms of operations counts. Finally, we show that ENet is the best architecture in terms of parameters space utilisation, squeezing up to $1 3 \times$ more information per parameter used respect to the reference model AlexNet, and $2 4 \times$ respect VGG-19.
|
| 102 |
+
|
| 103 |
+
# ACKNOWLEDGMENTS
|
| 104 |
+
|
| 105 |
+
This paper would have not look so pretty without the Python Software Foundation, the matplotlib library and the communities of stackoverflow and $\mathrm { T } \mathrm { E } ^ { \mathrm { X } }$ of StackExchange which I ought to thank. This work is partly supported by the Office of Naval Research (ONR) grants N00014-12-1- 0167, N00014-15-1-2791 and MURI N00014-10-1-0278. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the TX1, Titan X, K40 GPUs used for this research.
|
| 106 |
+
|
| 107 |
+
# REFERENCES
|
| 108 |
+
|
| 109 |
+
Sharan Chetlur, Cliff Woolley, Philippe Vandermersch, Jonathan Cohen, John Tran, Bryan Catanzaro, and Evan Shelhamer. cuDNN: Efficient Primitives for Deep Learning. arXiv.org arXiv:1410.0759, 2014.
|
| 110 |
+
|
| 111 |
+
Ronan Collobert, Koray Kavukcuoglu, and Clement Farabet. Torch7: A matlab-like environment for machine ´ learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011.
|
| 112 |
+
|
| 113 |
+
Eugenio Culurciello. Training enet. https://culurciello.github.io/tech/2016/06/20/ training-enet.html, 2016.
|
| 114 |
+
|
| 115 |
+
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015.
|
| 116 |
+
|
| 117 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015.
|
| 118 |
+
|
| 119 |
+
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.
|
| 120 |
+
|
| 121 |
+
Min Lin, Qiang Chen, and Shuicheng Yan. Network in network. arXiv preprint arXiv:1312.4400, 2013.
|
| 122 |
+
|
| 123 |
+
nVIDIA. Jetson tx1 module. http://www.nvidia.com/object/jetson-tx1-module.html.
|
| 124 |
+
|
| 125 |
+
Adam Paszke. torch-opcounter. https://github.com/apaszke/torch-opCounter, 2016.
|
| 126 |
+
|
| 127 |
+
Adam Paszke, Abhishek Chaurasia, Sangpil Kim, and Eugenio Culurciello. Enet: A deep neural network architecture for real-time semantic segmentation. arXiv preprint arXiv:1606.02147, 2016.
|
| 128 |
+
|
| 129 |
+
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.
|
| 130 |
+
|
| 131 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 132 |
+
|
| 133 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. arXiv preprint arXiv:1409.4842, 2014.
|
| 134 |
+
|
| 135 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. arXiv preprint arXiv:1512.00567, 2015.
|
| 136 |
+
|
| 137 |
+
Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. arXiv preprint arXiv:1602.07261, 2016.
|
| 138 |
+
|
| 139 |
+
Sergey Zagoruyko. imagenet-validation.torch. https://github.com/szagoruyko/imagenetvalidation.torch, 2016.
|
md/train/Bys_NzbC-/Bys_NzbC-.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ACHIEVING STRONG REGULARIZATION FOR DEEP NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
L1 and L2 regularizers are critical tools in machine learning due to their ability to simplify solutions. However, imposing strong L1 or L2 regularization with gradient descent method easily fails, and this limits the generalization ability of the underlying neural networks. To understand this phenomenon, we investigate how and why learning fails for strong regularization. Specifically, we examine how gradients change over time for different regularization strength and provide an analysis why the gradients diminish so fast when strong regularization is imposed. We find that there exists a tolerance level of regularization strength, where the learning completely fails if the regularization strength goes beyond it. We propose a simple but novel method, Delayed Strong Regularization, in order to moderate the tolerance level. Experiment results show that our proposed approach indeed achieves strong regularization for both L1 and L2 regularizers and improves both accuracy and sparsity on public data sets. Our source code is published.1
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Regularization has been very common for machine learning to prevent over-fitting and to obtain sparse solutions. Deep neural networks (DNNs), which have shown huge success in many tasks such as computer vision (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014; He et al., 2016) and speech recognition (Hinton et al., 2012), often contain a number of parameters in multiple layers with non-linear activation functions, in order to gain enough expressive power. However, DNNs with many parameters are often prone to over-fitting, so the need for regularization has been emphasized. While new regularization techniques such as dropout (Srivastava et al., 2014) and pruning (Han et al., 2015) have been proposed to solve the problem, the traditional regularization techniques using L1 or L2 norms have cooperated with them to further improve the performance significantly. L1 regularization, often called Lasso (Tibshirani, 1996), obtains sparse solutions so that the required memory and power consumption are reduced while keeping reasonable accuracy. On the other hand, L2 regularization smooths the parameter distribution and reduces the magnitude of parameters, so the resulting solution is simple (i.e., less prone to over-fitting) and effective. Indeed, our empirical results show that applying strong L2 regularization to the deep neural networks that already has dropout layers can reduce the error rate by up to $24 \%$ on a public data set.
|
| 12 |
+
|
| 13 |
+
Strong regularization is especially desired when the model contains too many parameters for the given amount of training data. This is often the case for deep learning tasks in practice because DNNs often contain millions of parameters while labeled training data set is limited and expensive. However, imposing strong L1 or L2 regularization on DNNs is difficult for gradient descent method due to the vanishing gradient problem. If we impose too strong regularization, the gradient from regularization becomes dominant, and DNNs stop learning. In this paper, we first study the interesting phenomenon that strong regularization fails in learning. We also provide an analysis why the gradients diminish so quickly that learning completely fails. Then, we propose a simple yet effective solution, Delayed Strong Regularization, which carries a time-dependent schedule of regularization strength. We find that we can overcome the failure in learning by waiting for the model to reach an “active learning” phase, where the gradients’ magnitudes are significant, and then enforcing strong regularization. Delayed Strong Regularization enables us to obtain the superior performance that is otherwise hidden by learning failure in deep networks. The proposed approach is general and does not require any additional computation. The experiment results indicate that the proposed approach indeed achieves strong regularization, consistently yielding even higher accuracy and higher compression rate that could not be achieved.
|
| 14 |
+
|
| 15 |
+
# 2 PROBLEM ANALYSIS
|
| 16 |
+
|
| 17 |
+
# 2.1 BACKGROUND
|
| 18 |
+
|
| 19 |
+
Let us denote a generic DNN by $\mathbf { y } = f ( \mathbf { x } ; \mathbf { w } )$ where $\mathbf { x } \in \mathbb { R } ^ { d }$ is an input vector, $\mathbf { w } \in \mathbb { R } ^ { n }$ is a flattened vector of all parameters in the network $f$ , and $\mathbf { y } \in \mathbb { R } ^ { c }$ is an output vector after feed-forwarding $\mathbf { x }$ through multiple layers in $f$ . The network $f$ is trained by finding optimal set of w by minimizing the cost function within the training data $\{ \mathbf { x } _ { i } , \mathbf { d } _ { i } \} _ { i = 1 } ^ { m }$ as follows.
|
| 20 |
+
|
| 21 |
+
$$
|
| 22 |
+
\mathbf { w } ^ { * } = \mathop { \arg \operatorname* { m i n } } _ { \mathbf { w } } \frac { 1 } { m } \sum _ { i = 1 } ^ { m } \mathcal { L } ( f ( \mathbf { x } _ { i } ; \mathbf { w } ) , \mathbf { d } _ { i } ) + \lambda \Omega ( \mathbf { w } )
|
| 23 |
+
$$
|
| 24 |
+
|
| 25 |
+
where $\mathcal { L }$ is the loss function, which is usually cross-entropy loss for classification tasks. Here, the regularization term $\lambda \Omega ( \mathbf { w } )$ is added to simplify the solution, and $\lambda$ is set to zero for non-regularized cost function. A higher value of $\lambda$ means that stronger regularization is imposed.
|
| 26 |
+
|
| 27 |
+
The most commonly used regularization function is a squared L2 norm: $\Omega ( \mathbf { w } ) = \lvert \lvert \mathbf { w } \rvert \rvert _ { 2 } ^ { 2 }$ , which is also called as weight decay in deep learning literature. This L2 regularizer has an effect of reducing the magnitude of the parameters w, and the simpler solution becomes less prone to over-fitting. On the other hand, the L1 regularizer $\Omega ( \mathbf { w } ) = | | \mathbf { w } | | _ { 1 }$ is often employed to induce sparsity in the model (i.e., make a portion of w zero). The sparse solution is often preferred to reduce computation time and memory consumption for deep learning since DNNs often require heavy computation and big memory space.
|
| 28 |
+
|
| 29 |
+
With the gradient descent method, each model parameter at time $t$ , $\mathbf { w } _ { i } ^ { ( t ) }$ , is updated with the following formula:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\mathbf { w } _ { i } ^ { ( t + 1 ) } = \mathbf { w } _ { i } ^ { ( t ) } - \alpha \left. \left( \frac { \partial \mathcal { L } } { \partial \mathbf { w } _ { i } } + \lambda \frac { \partial \Omega } { \partial \mathbf { w } _ { i } } \right) \right| _ { \mathbf { w } _ { i } = \mathbf { w } _ { i } ^ { ( t ) } }
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\frac { \partial \Omega } { \partial \mathbf { w } _ { i } } = \left\{ \begin{array} { l l } { 2 \times \mathbf { w } _ { i } ^ { ( t ) } , } & { \mathrm { i f } \ \Omega ( \mathbf { w } ) = | | \mathbf { w } | | _ { 2 } ^ { 2 } } \\ { 1 \times \mathrm { s i g n } ( \mathbf { w } _ { i } ^ { ( t ) } ) , } & { \mathrm { i f } \ \Omega ( \mathbf { w } ) = | | \mathbf { w } | | _ { 1 } \ \mathrm { a n d } \ \mathbf { w } _ { i } ^ { ( t ) } \neq 0 } \end{array} \right.
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
where $\alpha$ is a learning rate. As L1 norm is not differentiable at 0, the formula doesn’t have value when $\mathbf { w } _ { i } ^ { ( t ) } = 0$ , but in practice, the subgradient 0 is often used. Please see Section 2.3 for more details. From the formula, we can see that L2 regularizer continuously reduces the magnitude of a parameter proportionally to it while L1 regularizer reduces the magnitude by a constant. In both regularizers, strong regularization thus means greatly reducing the magnitude of parameters.
|
| 40 |
+
|
| 41 |
+
# 2.2 IMPOSING STRONG REGULARIZATION MAKES LEARNING FAIL.
|
| 42 |
+
|
| 43 |
+
Strong regularization is especially useful for deep learning because the DNNs often contain a large number of parameters while the training data is limited in practice. However, we have observed a phenomenon where learning suddenly fails when strong regularization is imposed for gradient descent method, which is the most commonly used solver for deep learning. The example of the phenomenon is depicted in Figure 1. In the example, the architectures VGG-16 (Simonyan & Zisserman, 2014) and AlexNet (Krizhevsky et al., 2012) were employed for the data set CIFAR-100 (Krizhevsky & Hinton, 2009).2 As shown, the accuracy increases as we enforce more regularization. However, it suddenly drops to $1 . 0 \%$ after enforcing a little more regularization, which means that the model entirely fails to learn. The depicted training loss also indicates that it indeed learns faster with stronger regularization $\langle \lambda = 1 \overset { \overline { { \mathbf { \sigma } } } } { \times } 1 0 ^ { - 3 } \rangle$ ), but the training loss does not improve at all when even stronger regularization is imposed $( \lambda = 2 \times 1 0 ^ { - 3 }$ ).
|
| 44 |
+
|
| 45 |
+
In order to look at this phenomenon in more detail, we show how gradients and their proportion change in Figure 2. As depicted in Figure 2a, a model with moderate L2 regularization $\lambda = 1 \times$
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 1: (a,b) Validation accuracies for different $\lambda$ when L1 and L2 regularization is applied to VGG-16 and AlexNet on the CIFAR-100 data set. Note the sharp accuracy drop. (c) Training loss when different $\lambda$ for L2 regularization is used for VGG-16 on CIFAR-100. Note that the regularization loss is excluded from the training loss. Best shown in color.
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2: Gradients for different $\lambda$ by VGG-16 on CIFAR-100. (a) Average amount of gradient from $\mathcal { L }$ when L2 regularization is applied. (b) A close-up version of (a) with y-axis in log-scale. (c) The proportion of gradients from $\mathcal { L }$ to all gradients. Best shown in color.
|
| 52 |
+
|
| 53 |
+
$1 0 ^ { - 3 }$ ) follows a path that has a relatively steep slope during the first 150 epoch, and then it converges with a gentle slope. However, a model with a little stronger L2 regularization $( \lambda = 2 \times 1 0 ^ { - 3 }$ ) does not follow a path that has a good slope, so it does not really have a chance to learn from gradients. A close-up view of this in the first 20 epochs is depicted in Figure 2b. The models with moderate L1 and L2 regularization seem to follow a good path in a couple of epochs. Through following the good path, the models keep the proportion of the gradients from $\mathcal { L }$ to all gradients dominant, especially for the first 150 epochs (Figure 2c). On the other hand, the models with a little stronger regularization fail to follow such path and the gradients from $\mathcal { L }$ decrease exponentially (Figure 2b). Since the magnitude of gradients from $\mathcal { L }$ decreases faster than that from $\Omega$ , the proportion of the latter to all gradients becomes dominant (Figure 2c), and it results in failure in learning. From this observation, we can see that there exists a tolerance level of regularization strength, which decides success or failure of entire learning.
|
| 54 |
+
|
| 55 |
+
Why does the magnitude of the gradient from $\mathcal { L }$ decrease so fast? It is not difficult to see why the magnitude of $\frac { \triangledown \mathcal { L } } { \partial \mathbf { w } _ { i } }$ decreases so fast when the regularization is strong. In deep neural networks, the gradients are dictated by back-propagation. It is well known that the gradients at the $l ^ { \mathrm { t h } }$ layer are given by
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\frac { \partial \mathcal { L } } { \partial \mathbf { w } ^ { ( l ) } } = \pmb { \delta } ^ { ( l ) } ( \mathbf { a } ^ { ( l - 1 ) } ) ^ { T }
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\mathbf { a } ^ { ( l - 1 ) }$ is the output of the neurons at the $( l - 1 ) ^ { \mathrm { t h } }$ layer and $\delta ^ { ( l ) }$ is the $l ^ { \mathrm { t h } }$ -layer residual which follows the recursive relation
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\pmb { \delta } ^ { ( l ) } = ( \mathbf { w } ^ { ( l + 1 ) } ) ^ { T } \pmb { \delta } ^ { ( l + 1 ) } \odot \mathbf { a } ^ { \prime ( l ) }
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $\odot$ and $\mathbf { a } ^ { \prime }$ denote the element-wise multiplications and derivatives of the activation function respectively.
|
| 68 |
+
|
| 69 |
+
Using the recursive relation, we obtain
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { r c l } { \displaystyle \frac { \partial \mathcal { L } } { \partial \mathbf { w } ^ { ( l ) } } } & { = } & { \displaystyle ( \mathbf { w } ^ { ( l + 1 ) } ) ^ { T } \left( \mathbf { w } ^ { ( l + 2 ) } \right) ^ { T } \cdot \cdot \cdot \cdot \left( \mathbf { w } ^ { ( L ) } \right) ^ { T } \delta ^ { ( L ) } } \\ & & { \qquad \odot \mathbf { a } ^ { \prime ( L - 1 ) } \odot \mathbf { a } ^ { \prime ( L - 2 ) } \odot \cdots \odot \mathbf { a } ^ { \prime ( l + 1 ) } \odot \mathbf { a } ^ { \prime ( l ) } ( \mathbf { a } ^ { ( l - 1 ) } ) ^ { T } } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
If the regularization is too strong, the weights would be significantly suppressed as shown in Figure 5b. From (5), since the gradients are proportional to the product of the weights at later layers (whose magnitudes are typically much less than 1 for strong regularization), they are even more suppressed.
|
| 76 |
+
|
| 77 |
+
In fact, the suppression is more severe than what we have deduced above. The factor $\mathbf { a } ^ { ( l - 1 ) }$ in (5) could actually lead to further suppression to the gradients when the weights are very small, for the following reasons. First of all, we use ReLU as the activation function and it could be written as
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\operatorname { R e L U } ( x ) = x \ \Theta ( x )
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\Theta ( x )$ is the Heaviside step function. Using this, we could write
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\mathbf { a } ^ { ( l - 1 ) } = \left( \mathbf { w } ^ { ( l - 1 ) } \mathbf { a } ^ { ( l - 2 ) } \right) \odot \Theta \left( \mathbf { w } ^ { ( l - 1 ) } \mathbf { a } ^ { ( l - 2 ) } \right)
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
Applying (7) recursively, we can see that $\mathbf { a } ^ { ( l - 1 ) }$ is proportional to the product of the weights at previous layers. Again, when the weights are suppressed by strong regularization, $\mathbf { a } ^ { ( l - 1 ) }$ would be suppressed correspondingly. Putting everything together, we can conclude that in the presence of strong regularization, the gradients are far more suppressed than the weights.
|
| 90 |
+
|
| 91 |
+
Strictly speaking, the derivations above are valid only for fully-connected layers. For convolutional layers, the derivations are more complicated but similar. Our conclusions above would still be valid.
|
| 92 |
+
|
| 93 |
+
Normalization Normalization techniques such as batch normalization (Ioffe & Szegedy, 2015) and weight normalization (Salimans & Kingma, 2016) can be possible approaches to prevent the $\mathcal { L }$ gradients from diminishing quickly. However, it has been shown that L2 regularization has no regularizing effect when combined with normalization but only influences on the effective learning rate, resulting in good performance (van Laarhoven, 2017). In other words, the normalization techniques do not really simplify the solution as the decrease of parameter magnitude is canceled by normalization. This does not meet our goal, which is to heavily simplify solutions to reduce over-fitting, so we propose an approach that meets our goal.
|
| 94 |
+
|
| 95 |
+
# 2.3 OUR PROPOSED APPROACH: DELAYED STRONG REGULARIZATION
|
| 96 |
+
|
| 97 |
+
Since we have seen that stronger regularization can result in better performance in Figure 1, we propose a method that is able to accommodate strong regularization. Specifically, we introduce a time-dependent regularization strength, $\lambda _ { t }$ , to the equation (2), and it is defined as
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\lambda _ { t } = { \left\{ \begin{array} { l l } { 0 } & { { \mathrm { i f ~ e p o c h } } ( t ) < \gamma } \\ { \lambda } & { { \mathrm { o t h e r w i s e } } } \end{array} \right. }
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
where epoch $( t )$ gets the epoch number of the time step $t$ , and $\gamma$ is a hyper-parameter that is set through cross-validation. The formula means that we do not impose any regularization until $\gamma ^ { \mathrm { t h } }$ epoch, and then impose the strong regularization in each training step. The underlying hypothesis is that once the model follows a good learning path, i.e., the gradient from $\mathcal { L }$ is big enough, it won’t easily change its direction because of the steep slope, and thus, it can learn without failure. We empirically verify our hypothesis in the experiment section. The hyper-parameter $\gamma$ is relatively easy to set because the models often follow the good path in a couple of epochs, and once they follow such path, learning does not fail. We recommend using $2 \leq \gamma \leq 2 0$ . Please note that our approach is different from imposing a slightly weaker regularization throughout the whole training. The reduced amount by not skipping regularization for the first few epochs is negligible compared to the total reduced amount by regularization. In addition, we empirically show that our approach can achieve a much higher sparsity than the baseline in the parameter space.
|
| 104 |
+
|
| 105 |
+
The proposed method is easy to implement, and the hyper-parameter is easy to set. Also, the method is very close to the traditional regularization method so that it inherits the traditional one’s good performance for non-strong regularization while it also achieves strong regularization. Although the method is very simple, we found that it shows the best accuracy among the approaches we tried in our preliminary experiments while it is the simplest. The preliminary experiments are further discussed in Appendix B.
|
| 106 |
+
|
| 107 |
+
Proximal gradient algorithm for L1 regularizer Meanwhile, since L1 norm is not differentiable at zero, we employ the proximal gradient algorithm (Parikh et al., 2014), which enables us to obtain proper sparsity (i.e., guaranteed convergence) for non-smooth regularizers. We use the following update formulae:
|
| 108 |
+
|
| 109 |
+
$$
|
| 110 |
+
\begin{array} { r l } & { \mathbf { w } _ { i } ^ { ( t ^ { \prime } ) } = \mathbf { w } _ { i } ^ { ( t ) } - \alpha \ \frac { \partial \mathcal { L } } { \partial \mathbf { w } _ { i } } \bigg | _ { \mathbf { w } _ { i } = \mathbf { w } _ { i } ^ { ( t ) } } } \\ & { \mathbf { w } _ { i } ^ { ( t + 1 ) } = \mathrm { p r o x } _ { \alpha \lambda \Omega } ( \mathbf { w } _ { i } ^ { ( t ^ { \prime } ) } ) = S ( \mathbf { w } _ { i } ^ { ( t ^ { \prime } ) } , \alpha \lambda ) } \\ & { S ( a , z ) = \left\{ \begin{array} { l l } { a - z } & { \mathrm { i f ~ } a > z } \\ { a + z } & { \mathrm { i f ~ } a < - z } \\ { 0 } & { \mathrm { o t h e r w i s e } } \end{array} \right. } \end{array}
|
| 111 |
+
$$
|
| 112 |
+
|
| 113 |
+
where $S$ is a soft-thresholding operator. Basically, the algorithm assigns zero to a parameter if its next updated value is smaller than $\alpha \lambda$ . In other cases, it just decreases the magnitude of the parameter as usual.
|
| 114 |
+
|
| 115 |
+
# 3 EXPERIMENTS
|
| 116 |
+
|
| 117 |
+
We first evaluate the effectiveness of our proposed method with popular architectures, AlexNet (Krizhevsky et al., 2012) and VGG-16 (Simonyan & Zisserman, 2014) on the public data sets CIFAR-10 and CIFAR-100 (Krizhevsky & Hinton, 2009). Then, we employ variations of VGG on another public data set SVHN (Netzer et al., 2011), in order to see the effect of the number of hidden layers on the tolerance level. Please note that we do not employ architectures that contain normalization techniques such as batch normalization (Ioffe & Szegedy, 2015), for the reason described in Section 2.2. The data set statistics are described in Table 1. VGG-11 and VGG-19 for SVHN contain 9.8 and 20.6 millions of parameters.
|
| 118 |
+
|
| 119 |
+
Table 1: Data set statistics for CIFAR-10 and CIFAR-100.
|
| 120 |
+
|
| 121 |
+
<table><tr><td>Data Set</td><td>Image Resolution</td><td>Classes</td><td>Training Images per Class</td><td>Test Images per Class</td><td>AlexNet Parameters</td><td>VGG-16 Parameters</td></tr><tr><td>CIFAR-10</td><td>32×32</td><td>10</td><td>5000</td><td>1000</td><td>2.6M</td><td>15.2M</td></tr><tr><td>CIFAR-100</td><td>32×32</td><td>100</td><td>500</td><td>100</td><td>2.6M</td><td>15.3M</td></tr><tr><td>SVHN</td><td>32×32</td><td>10</td><td>7325.7 (avg.)</td><td>2603.2 (avg.)</td><td>1</td><td>15.2M</td></tr></table>
|
| 122 |
+
|
| 123 |
+
Regularization is applied to all network parameters except bias terms. We use PyTorch3 framework for all experiments, and we use its official computer vision library4 for the implementations of the networks. In order to accommodate the data sets, we made some modifications to the networks. The kernel size of AlexNet’s max-pooling layers is changed from 3 to 2, and the first convolution layer’s padding size is changed from 2 to 5. All of its fully connected layers are modified to have 256 neurons. For VGG, we modified the fully connected layers to have 512 neurons. The output layers of both networks have 10 neurons for CIFAR-10 and SVHN, and 100 neurons for CIFAR100. The networks are learned by stochastic gradient descent algorithm with momentum of 0.9. The parameters are initialized according to He et al. (2015). The batch size is set to 128, and the initial learning rate is set to 0.05 and decays by a factor of 2 every 30 epochs during the whole 300-epoch training. In all experiments, we set $\gamma = 5$ . We did not find significantly different results for $2 \leq \gamma \leq 2 0$ . Please note that we still use drop out layers (with drop probability 0.5) and preprocess training data5 in order to report the extra performance boost on top of common regularization techniques.
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 3: Accuracies obtained by VGG-16 with L1 and L2 regularization on CIFAR-100 (a,b,c) and CIFAR-10 (d,e,f). A green dotted horizontal line is an accuracy obtained by a model without L1/L2 regularization (but with dropout). Accuracy for different sparsity is shown in (c) and (f). The error bars indicate $9 5 \%$ confidence interval.
|
| 127 |
+
|
| 128 |
+
AlexNet and VGG-16 are experimented for different regularization methods (L1 and L2) and different data sets (CIFAR-10 and CIFAR-100), yielding 8 combinations of experiment sets. Then, VGG-11, VGG-16, and VGG-19 are experimented for L1 and L2 regularization methods on SVHN, yielding 6 experiment sets. For each experiment set, we set the baseline method as the one with well-tuned L1 or L2 regularization but without our time-dependent regularization strength. For each regularization, we try more than 10 different values of $\lambda$ , and for each value, we report average accuracy of three independent runs and report $9 5 \%$ confidence interval. We perform statistical significance test (t-test) for the improvement over the baseline method and report the p-value. We also report sparsity of each trained model, which is the proportion of the number of zero-valued parameters to the number of all parameters. Please note that we mean the sparsity by the one actually derived by the models, not by pruning parameters with threshold after training.
|
| 129 |
+
|
| 130 |
+
# 3.1 EXPERIMENT RESULTS ON CIFAR-10 AND CIFAR-100
|
| 131 |
+
|
| 132 |
+
The experiment results by VGG-16 are depicted in Figure 3. As we investigated in Section 2.2, the baseline method suddenly fails beyond certain values of tolerance level. However, our proposed method does not fail for higher values of $\lambda$ . As a result, our model can achieve higher accuracy as well as higher sparsity. In practice, L2 regularization is used more often than L1 regularization due to its superior performance, and this is true for our VGG-16 experiments too. Using L2 regularization, our model improves the model without L1 or L2 regularization but with dropout, by $1 4 . 4 \%$ in accuracy, which is about $24 \%$ of error rate improvement. Tuning L2 regularization parameter is difficult as the curves have somewhat sharp peak, but our proposed method ease the problem to some extent by preventing the sharp drop. Our L1 regularizer obtains much better sparsity for the similar level of accuracy (Figure 3c), which means that strong regularization plays an important role in compressing neural networks. The improvement is more prominent on CIFAR-100 than on
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4: Accuracies obtained by AlexNet with L1 and L2 regularization on CIFAR-100 (a,b,c) and CIFAR-10 (d,e,f). A green dotted horizontal line is an accuracy obtained by a model without L1/L2 regularization (but with dropout). Accuracy for different sparsity is shown in (c) and (f). The error bars indicate $9 5 \%$ confidence interval.
|
| 136 |
+
|
| 137 |
+
CIFAR-10, and we think this is because over-fitting can more likely occur on CIFAR-100 as there are less images per class than on CIFAR-10.
|
| 138 |
+
|
| 139 |
+
The experiment results by AlexNet are depicted in Figure 4. Again, our proposed method achieves higher accuracy and sparsity in general. Unlike VGG-16, we obtain more improvement over baseline with L1 regularization than with L2 regularization. In addition, the curves make sharper peaks than those by VGG-16 especially for the sparsity regularizer (L1).
|
| 140 |
+
|
| 141 |
+
Interestingly, our proposed method often obtains higher accuracy even when the baseline does not fail on CIFAR-10, and this is only prominent when the regularization strength is relatively strong (better shown in Figure 3f, 4c, 4f). This may be because avoiding strong regularization in the early stage of training can help the model to explore more spaces freely, and the better exploration results in finding superior local optima.
|
| 142 |
+
|
| 143 |
+
The overall experiment results are shown in Table 2. It shows that there is more performance improvement by L1/L2 regularization on VGG-16 than on AlexNet, which is reasonable since VGG-16 contains about 6 times more parameters so that it is more prone to over-fitting. Our proposed model always improves the baselines by up to $3 . 8 9 \%$ , except AlexNet with L1 regularization on CIFAR10, and most (6 out of 7) improvements are statistically significant $( \mathrm { p } ; 0 . 0 5 )$ . Our L1 regularization models always obtain higher sparsity with compression rate up to $4 . 2 \times$ than baselines, meaning that our model is promising for compressing neural networks.
|
| 144 |
+
|
| 145 |
+
We also show in Figure 5 how gradients and weights change when our method and the baseline are applied. We hypothesized that if the model reaches an “active learning” phase with an elevated gradient amount, it does not suffer from vanishing gradients any more even when strong regularization is enforced. The Figure 5a shows that our model indeed reaches there by skipping strong regularization for the first five epochs, and and it keeps learning even after strong regularization is enforced. In Figure 5b, although the same strong regularization is enforced since epoch 5, the magnitude of weights in our model stops decreasing around epoch 20, while that in baseline (green dotted line) keeps decreasing towards zero. This means that our model can cope with strong regularization, and it maintains its equilibrium between gradients from $\mathcal { L }$ and those from regularization.
|
| 146 |
+
|
| 147 |
+
Table 2: Overall experiment results. The $9 5 \%$ confidence interval is reported after $\pm$ symbol. The improvement is calculated by comparing with baseline methods. Compression rate is calculated by how much the regularization reduces the number of non-zero-valued parameters while having an accuracy similar to L1 baseline. Note that when no L1/L2 regularization is imposed, dropout is still employed.
|
| 148 |
+
|
| 149 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">CIFAR-100</td><td colspan="2">CIFAR-10</td></tr><tr><td></td><td>Sparsity</td><td>Acc. (%)</td><td>Sparsity</td><td>Acc. (%)</td></tr><tr><td rowspan="9">VGG-16</td><td>No L1/L2</td><td>0</td><td>62.08 ± 0.81</td><td>0</td><td>90.80± 0.23</td></tr><tr><td>L2baseline</td><td>0</td><td>69.16± 0.46</td><td>0</td><td>92.42 ± 0.16</td></tr><tr><td>L2 ours</td><td>0</td><td>71.01 ± 0.33</td><td>0</td><td>92.60 ± 0.16</td></tr><tr><td>Acc.improvement</td><td>1</td><td>+2.67% (p=0.002)</td><td>1</td><td>+0.19% (p=0.103)</td></tr><tr><td>L1baseline</td><td>0.269</td><td>66.94 ± 0.24</td><td>0.808</td><td>91.29± 0.16</td></tr><tr><td>L1 ours</td><td>0.303</td><td>67.55 ± 0.12</td><td>0.845</td><td>91.55 ± 0.10</td></tr><tr><td>Acc.improvement</td><td></td><td>+0.91% (p=0.011)</td><td></td><td>+0.28% (p=0.037)</td></tr><tr><td>Li ours (sparse) Compression rate over</td><td>0.697</td><td>67.06± 0.62</td><td>0.926</td><td>91.38± 0.05</td></tr><tr><td>L1 baseline</td><td>2.4×</td><td></td><td>2.6×</td><td></td></tr><tr><td rowspan="8">AlexNet</td><td>No L1/L2</td><td>0</td><td>43.09±0.25</td><td>0</td><td>75.05± 0.20</td></tr><tr><td>L2 baseline</td><td>0</td><td>46.91 ± 0.15</td><td>0</td><td>78.66 ± 0.17</td></tr><tr><td>L2 ours</td><td>0</td><td>47.64 ± 0.33</td><td>0</td><td>78.65 ± 0.29</td></tr><tr><td>Acc.improvement</td><td>-</td><td>+1.56% (p=0.017)</td><td>1</td><td>-0.01%</td></tr><tr><td>L1baseline</td><td>0.219</td><td>45.70± 0.10</td><td>0.766</td><td>76.87 ± 0.24</td></tr><tr><td>L1 ours</td><td>0.632</td><td>47.48 ± 0.29</td><td>0.794</td><td>77.63 ± 0.34</td></tr><tr><td>Acc.improvement</td><td>1</td><td>+3.89% (p=0.002)</td><td>1</td><td>+0.99% (p=0.013)</td></tr><tr><td>Lf ours (sparse)</td><td>0.814</td><td>45.77±0.32</td><td>0.877</td><td>76.90± 0.227</td></tr><tr><td></td><td>Compression rate over L1 baseline</td><td>4.2×</td><td></td><td>1.9×</td><td></td></tr></table>
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 5: Experiment results by L2 regularization with VGG-16 on CIFAR-100. The results are from baseline method unless it is labeled as “ours”. Our proposed Delayed Strong Regularization does not fail in learning.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 6: Accuracies obtained by variations of VGG with L2 regularization on SVHN. A green dotted horizontal line is an accuracy obtained by a model without L2 regularization (but with dropout). The error bars indicate $9 5 \%$ confidence interval.
|
| 156 |
+
|
| 157 |
+
Table 3: Experiment results on SVHN. The improvement is calculated by comparing with baseline methods. Note that when no L1/L2 regularization is imposed, dropout is still employed.
|
| 158 |
+
|
| 159 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">VGG-11</td><td colspan="2">VGG-16</td><td colspan="2">VGG-19</td></tr><tr><td>Sparsity</td><td>Acc. (%)</td><td>Sparsity</td><td>Acc. (%)</td><td>Sparsity</td><td>Acc. (%)</td></tr><tr><td>No L1/L2</td><td>0</td><td>94.27 ± 0.13</td><td>0</td><td>95.10± 0.22</td><td>0</td><td>95.20± 0.10</td></tr><tr><td>L2 baseline</td><td>0</td><td>94.82 ± 0.02</td><td>0</td><td>95.38± 0.10</td><td>0</td><td>95.45± 0.14</td></tr><tr><td>L2 ours</td><td>0</td><td>94.84 ± 0.04</td><td>0</td><td>95.53 ± 0.07</td><td>0</td><td>95.74 ± 0.07</td></tr><tr><td>Acc.improvement</td><td>-</td><td>+0.02% (p=0.200)</td><td>-</td><td>+0.16% (p=0.047)</td><td>-</td><td>+0.30% (p=0.019)</td></tr><tr><td>L1 baseline</td><td>0.519</td><td>94.68±0.08</td><td>0.450</td><td>95.34 ± 0.11</td><td>0.122</td><td>95.37 ± 0.11</td></tr><tr><td>Ll ours</td><td>0.621</td><td>94.78 ± 0.07</td><td>0.795</td><td>95.38 ± 0.11</td><td>0.518</td><td>95.50 ± 0.15</td></tr><tr><td>Acc.improvement</td><td></td><td>+0.11% (p=0.056)</td><td>=</td><td>+0.04% (p=0.324)</td><td>=</td><td>+0.13% (p=0.180)</td></tr><tr><td>L1 ours (sparse) Compression rate over</td><td>0.845</td><td>94.710.01</td><td>70.795</td><td>95.38±0.11</td><td>0.911</td><td>95.410.07</td></tr><tr><td>L1 baseline</td><td>3.1×</td><td></td><td>2.7×</td><td></td><td>9.9×</td><td></td></tr></table>
|
| 160 |
+
|
| 161 |
+
# 3.2 EXPERIMENT RESULTS ON SVHN
|
| 162 |
+
|
| 163 |
+
The analysis in Section 2.2 implies that the number of hidden layers would affect the tolerance level when strong regularization is imposed. That is, if there are more hidden layers in the neural network architecture, the learning will fail more easily by strong regularization. In order to check the hypothesis empirically, we employ variations of the VGG architecture, i.e., VGG-11, VGG-16, and VGG-19, which contain 11, 16, and 19 hidden layers, respectively. We experiment them on the SVHN data set.
|
| 164 |
+
|
| 165 |
+
The results by L2 regularization are depicted in Figure 6. As shown, the peak of our method’s performance is formed around $\lambda = 1 \times \bar { 1 } 0 ^ { - 3 }$ . As more hidden layers are added to the network, the tolerance level where the performance suddenly drops by the baseline is shifted to left, as hypothesized by our analysis. The results by L1 regularization are in Appendix A, and it is shown that VGG-19 more easily fails as the parameters become more sparse. The overall experiment results are shown in Table 3. As the method without L1/L2 regularization already performs well on this data set and there are relatively many training images per class, the improvement by L1/L2 regularization is not big. Our method still outperforms the baseline in all experiments (6 out of 6), but the improvement is less statistically significant compared to CIFAR-10 and CIFAR-100 data sets. The compression rate is especially good for VGG-19 mainly because its tolerance level is low so that the baseline can only achieve low sparsity.
|
| 166 |
+
|
| 167 |
+
# 4 RELATED WORK
|
| 168 |
+
|
| 169 |
+
The related work is partially covered in Section 1, and we extend other related work here. It has been shown that L2 regularization is important for training DNNs (Krizhevsky et al., 2012; Deng et al., 2013). Although there has been a new regularization method such as dropout, L2 regularization has been shown to reduce the test error effectively when combined with dropout (Srivastava et al., 2014). Meanwhile, L1 regularization has also been used often in order to obtain sparse solutions. To reduce computation and power consumption, L1 regularization and its variations such as group sparsity regularization has been promising for deep neural networks (Wen et al., 2016; Scardapane et al., 2017; Yoon & Hwang, 2017). However, for both L1 and L2 regularization, the phenomenon that learning fails with strong regularization has not been emphasized previously. Bergstra & Bengio (2012) showed that tuning hyper-parameters such as L2 regularization strength can be effectively done through random search instead of grid search, but they did not study how and why learning fails or how strong regularization can be successfully achieved. Yosinski et al. (2015) visualized activations to understand deep neural networks and showed that strong L2 regularization fails to learn. However, it was still not shown how and why learning fails and how strong regularization can be achieved. To the best of our knowledge, there is no existing work that is dedicated to studying the phenomenon that learning fails with strong regularization and to proposing a method that can avoid the failure.
|
| 170 |
+
|
| 171 |
+
# 5 DISCUSSION
|
| 172 |
+
|
| 173 |
+
In this work, we studied the problem of achieving strong regularization for deep neural networks. Strong regularization with gradient descent algorithm easily fails for deep neural networks, but few work addressed this phenomenon in detail. We provided investigation and analysis of the phenomenon, and we found that there is a strict tolerance level of regularization strength. To avoid this problem, we proposed a novel but simple method: Delayed Strong Regularization. We performed experiments with fine tuning of regularization strength. Evaluation results show that (1) our model successfully achieves strong regularization on deep neural networks, verifying our hypothesis that the model will keep learning once it reaches an “active learning” phase, (2) with strong regularization, our model obtains higher accuracy and sparsity, (3) the number of hidden layers in neural networks affects the tolerance level, and (4) L1/L2 regularization is difficult to tune, but it can yield great performance boost when tuned well.
|
| 174 |
+
|
| 175 |
+
There are limitations in this work. Our proposed method can be especially useful when strong regularization is desired. For example, deep learning projects that cannot afford a huge labeled data set can benefit from our method. However, strong regularization may not be necessary in some other cases where the large labeled data set is available or the networks do not contain many parameters. In addition, our experiments were not performed on a bigger data set such as ImageNet data set. We need to fine-tune the models with different regularization parameters, and we also need multiple training sessions of each model to obtain confidence interval. For example, the experiment results in Figure 3 and 4 include 750 training sessions in total. This is something we cannot afford with ImageNet data set, which requires several weeks of training for EACH session (unless we have GPU clusters). Our approach cannot be applied to architectures containing normalization techniques for the reason in Section 2.2. We actually tried to intentionally exclude normalization part from Residual Networks (He et al., 2016) and train the model to see if we can apply our method to non-normalized Residual Networks. However, we could not control the exploding gradients caused by the exclusion of normalization.
|
| 176 |
+
|
| 177 |
+
Our work can be further extended in several ways. Since our model can achieve strong regularization, it will be interesting to see how the strongly regularized model performs if combined with pruning-related methods (Han et al., 2015; 2016). We applied our approach to only L1 and L2 regularizers, but applying it to other regularizers such as group sparsity regularizers will be promising as they are often employed for DNNs to compress networks. Lastly, our proposed Delayed Strong Regularization is very simple, so one can easily extend it to more complicated methods. All these directions are left as our future work.
|
| 178 |
+
|
| 179 |
+
# REFERENCES
|
| 180 |
+
|
| 181 |
+
James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(Feb):281–305, 2012.
|
| 182 |
+
|
| 183 |
+
Li Deng, Geoffrey Hinton, and Brian Kingsbury. New types of deep neural network learning for speech recognition and related applications: An overview. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pp. 8599–8603. IEEE, 2013.
|
| 184 |
+
|
| 185 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in Neural Information Processing Systems, pp. 1135–1143, 2015.
|
| 186 |
+
|
| 187 |
+
Song Han, Jeff Pool, Sharan Narang, Huizi Mao, Shijian Tang, Erich Elsen, Bryan Catanzaro, John Tran, and William J Dally. Dsd: Regularizing deep neural networks with dense-sparse-dense training flow. arXiv preprint arXiv:1607.04381, 2016.
|
| 188 |
+
|
| 189 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pp. 1026–1034, 2015.
|
| 190 |
+
|
| 191 |
+
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.
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
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.
|
| 196 |
+
|
| 197 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 198 |
+
|
| 199 |
+
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.
|
| 200 |
+
|
| 201 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, pp. 5, 2011.
|
| 202 |
+
|
| 203 |
+
Neal Parikh, Stephen Boyd, et al. Proximal algorithms. Foundations and Trends $\textsuperscript { \textregistered }$ in Optimization, 1(3):127–239, 2014.
|
| 204 |
+
|
| 205 |
+
Kristiaan Pelckmans, Johan AK Suykens, and Bart De Moor. Morozov, ivanov and tikhonov regularization based ls-svms. In International Conference on Neural Information Processing, pp. 1216–1222. Springer, 2004.
|
| 206 |
+
|
| 207 |
+
Tim Salimans and Diederik P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–909, 2016.
|
| 208 |
+
|
| 209 |
+
Simone Scardapane, Danilo Comminiello, Amir Hussain, and Aurelio Uncini. Group sparse regularization for deep neural networks. Neurocomputing, 241:81–89, 2017.
|
| 210 |
+
|
| 211 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 212 |
+
|
| 213 |
+
Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. Journal of machine learning research, 15(1):1929–1958, 2014.
|
| 214 |
+
|
| 215 |
+
Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pp. 267–288, 1996.
|
| 216 |
+
|
| 217 |
+
Twan van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017.
|
| 218 |
+
|
| 219 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. In Advances in Neural Information Processing Systems, pp. 2074–2082, 2016.
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 7: Accuracies obtained by variations of VGG with L1 regularization on SVHN. A green dotted horizontal line is an accuracy obtained by a model without L1 regularization (but with dropout). Accuracy for different sparsity is shown in (d), (e), and (f). The error bars indicate $9 5 \%$ confidence interval.
|
| 223 |
+
|
| 224 |
+
Jaehong Yoon and Sung Ju Hwang. Combined group and exclusive sparsity for deep neural networks. In International Conference on Machine Learning, pp. 3958–3966, 2017.
|
| 225 |
+
|
| 226 |
+
Jason Yosinski, Jeff Clune, Anh Nguyen, Thomas Fuchs, and Hod Lipson. Understanding neural networks through deep visualization. arXiv preprint arXiv:1506.06579, 2015.
|
| 227 |
+
|
| 228 |
+
# Appendices
|
| 229 |
+
|
| 230 |
+
# A EXPERIMENT RESULTS ON SVHN BY L1 REGULARIZER
|
| 231 |
+
|
| 232 |
+
To empirically check the effect of the number of hidden layers on the tolerance level, we experimented variations of VGG on SVHN, and we showed the results by L2 regularizer in Section 3.2. Here, we show the results by L1 regularizer in Figure 7. As more hidden layers are included to the network, the tolerance level where the baseline method suddenly fails is shifted to left. Such pattern in baseline method is more clearly shown in the accuracy vs. sparsity plots. VGG-19 fails to learn even when it loses only $27 \%$ of its parameters, whereas VGG-11 can still learn after losing $84 \%$ of its parameters.
|
| 233 |
+
|
| 234 |
+
# B PRELIMINARY EXPERIMENTS
|
| 235 |
+
|
| 236 |
+
The reason why we proposed a very simple method is that it is effective while it is simple to implement. The only additional hyper-parameter, which is the number of initial epochs to skip regularization, is also not difficult to set. We think that the proposed method is very similar to the traditional regularization method so that it inherits the traditional one’s good performance for non-strong regularization while it also achieves strong regularization.
|
| 237 |
+
|
| 238 |
+
We actually tried a couple more approaches other than the proposed one in our preliminary experiments. We found that the proposed one shows the best accuracy among the approaches we tried while it is the simplest. For example, we tried an approach that can be regarded as a warm-start strategy. It starts with the regularization parameter $\lambda _ { t } = 0$ , and then it gradually increases $\lambda _ { t }$ to $\lambda$ for $\gamma$ epochs, where $\gamma > = 0$ and it is empirically set. We found that it can achieve strong regularization, but its best accuracy is similar to or slightly lower than that of our proposed approach.
|
| 239 |
+
|
| 240 |
+
We also tried a method that is similar to Ivanov regularization (Pelckmans et al., 2004). In this method, the regularization term is applied only when the L1 norm of the weights is greater than a certain threshold. To enforce strong regularization, we set $\lambda$ just above the tolerance level that is found by the baseline method. However, this method did not accomplish any learning. The reason is that, to reach the level of L1 norm that is low enough, the model needs to go through the strong regularization for the first few epochs, and the neurons already lose its learning ability during this period like the baseline method. If we set $\lambda$ below the tolerance level, it cannot reach the desired L1 norm without strong regularization, and thus the performance is inferior to our proposed method.
|
| 241 |
+
|
| 242 |
+
Meanwhile, an approach that applies strong regularization first and then continuously reduces the regularization strength is used in sparse learning for convex optimization. This approach is opposite to our approach in that ours avoids strong regularization for the first few epochs and then apply strong regularization afterwards. We performed a simple experiment with VGG-16 on CIFAR-100 to see if the approach can perform well for deep neural networks. We set the initial regularization parameter $\lambda = \overset { \cdot } { 2 } \times 1 0 ^ { - 3 }$ and $\lambda = 6 \times 1 0 ^ { - 5 }$ for L2 and L1 regularization, respectively, which are just above the ”tolerance level”. Then, we continuously reduced $\lambda _ { t }$ to zero throughout the training session. The trained models didn’t show any improvement over ”random guess”, which means that they were not able to learn. Once the strong regularization is enforced in the beginning, the magnitudes of weights decrease quickly. This in turn drives the magnitudes of gradients to diminish exponentially in deep neural networks as explained in Section 2.2, and thus, the model loses its ability to learn after a short period of strong regularization.
|