Datasets:
Add files using upload-large-folder tool
Browse files- md/train/6Tm1mposlrM/6Tm1mposlrM.md +488 -0
- md/train/GFV8IVyMM4n/GFV8IVyMM4n.md +339 -0
- md/train/H1e0-30qKm/H1e0-30qKm.md +292 -0
- md/train/H1ewdiR5tQ/H1ewdiR5tQ.md +327 -0
- md/train/HJ_aoCyRZ/HJ_aoCyRZ.md +542 -0
- md/train/HJgXCV9xx/HJgXCV9xx.md +341 -0
- md/train/HkzyX3CcFQ/HkzyX3CcFQ.md +247 -0
- md/train/Hy7fDog0b/Hy7fDog0b.md +404 -0
- md/train/LJjC6DmSkgT/LJjC6DmSkgT.md +302 -0
- md/train/S1xoy3CcYX/S1xoy3CcYX.md +373 -0
- md/train/SJNRHiAcYX/SJNRHiAcYX.md +274 -0
- md/train/Sklv5iRqYX/Sklv5iRqYX.md +523 -0
- md/train/SylzhkBtDB/SylzhkBtDB.md +0 -0
- md/train/r1nTpv9eg/r1nTpv9eg.md +288 -0
- md/train/rJehVyrKwH/rJehVyrKwH.md +242 -0
- md/train/rJg6ssC5Y7/rJg6ssC5Y7.md +300 -0
- md/train/rkeJRhNYDH/rkeJRhNYDH.md +465 -0
- md/train/rkmu5b0a-/rkmu5b0a-.md +448 -0
- md/train/rygMWT4twS/rygMWT4twS.md +728 -0
- md/train/tHzvH4Rv1Qa/tHzvH4Rv1Qa.md +239 -0
md/train/6Tm1mposlrM/6Tm1mposlrM.md
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SHARPNESS-AWARE MINIMIZATION FOR EFFICIENTLY IMPROVING GENERALIZATION
|
| 2 |
+
|
| 3 |
+
Pierre Foret ∗
|
| 4 |
+
Google Research
|
| 5 |
+
pierreforet@google.com
|
| 6 |
+
Ariel Kleiner
|
| 7 |
+
Google Research
|
| 8 |
+
akleiner@google.com
|
| 9 |
+
|
| 10 |
+
Hossein Mobahi Google Research hmobahi@google.com
|
| 11 |
+
|
| 12 |
+
Behnam Neyshabur Blueshift, Alphabet neyshabur@google.com
|
| 13 |
+
|
| 14 |
+
# ABSTRACT
|
| 15 |
+
|
| 16 |
+
In today’s heavily overparameterized models, the value of the training loss provides few guarantees on model generalization ability. Indeed, optimizing only the training loss value, as is commonly done, can easily lead to suboptimal model quality. Motivated by prior work connecting the geometry of the loss landscape and generalization, we introduce a novel, effective procedure for instead simultaneously minimizing loss value and loss sharpness. In particular, our procedure, Sharpness-Aware Minimization (SAM), seeks parameters that lie in neighborhoods having uniformly low loss; this formulation results in a minmax optimization problem on which gradient descent can be performed efficiently. We present empirical results showing that SAM improves model generalization across a variety of benchmark datasets (e.g., CIFAR- $\{ 1 0 , 1 0 0 \}$ , ImageNet, finetuning tasks) and models, yielding novel state-of-the-art performance for several. Additionally, we find that SAM natively provides robustness to label noise on par with that provided by state-of-the-art procedures that specifically target learning with noisy labels. We open source our code at https: //github.com/google-research/sam.
|
| 17 |
+
|
| 18 |
+
# 1 INTRODUCTION
|
| 19 |
+
|
| 20 |
+
Modern machine learning’s success in achieving ever better performance on a wide range of tasks has relied in significant part on ever heavier overparameterization, in conjunction with developing ever more effective training algorithms that are able to find parameters that generalize well. Indeed, many modern neural networks can easily memorize the training data and have the capacity to readily overfit (Zhang et al., 2016). Such heavy overparameterization is currently required to achieve stateof-the-art results in a variety of domains (Tan & Le, 2019; Kolesnikov et al., 2020; Huang et al., 2018). In turn, it is essential that such models be trained using procedures that ensure that the parameters actually selected do in fact generalize beyond the training set.
|
| 21 |
+
|
| 22 |
+
Unfortunately, simply minimizing commonly used loss functions (e.g., cross-entropy) on the training set is typically not sufficient to achieve satisfactory generalization. The training loss landscapes of today’s models are commonly complex and non-convex, with a multiplicity of local and global minima, and with different global minima yielding models with different generalization abilities (Shirish Keskar et al., 2016). As a result, the choice of optimizer (and associated optimizer settings) from among the many available (e.g., stochastic gradient descent (Nesterov, 1983), Adam (Kingma & Ba, 2014), RMSProp (Hinton et al.), and others (Duchi et al., 2011; Dozat, 2016; Martens & Grosse, 2015)) has become an important design choice, though understanding of its relationship to model generalization remains nascent (Shirish Keskar et al., 2016; Wilson et al., 2017; Shirish Keskar & Socher, 2017; Agarwal et al., 2020; Jacot et al., 2018). Relatedly, a panoply of methods for modifying the training process have been proposed, including dropout (Srivastava et al., 2014), batch normalization (Ioffe & Szegedy, 2015), stochastic depth (Huang et al., 2016), data augmentation (Cubuk et al., 2018), and mixed sample augmentations (Zhang et al., 2017; Harris et al., 2020).
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 1: (left) Error rate reduction obtained by switching to SAM. Each point is a different dataset / model / data augmentation. (middle) A sharp minimum to which a ResNet trained with SGD converged. (right) A wide minimum to which the same ResNet trained with SAM converged.
|
| 26 |
+
|
| 27 |
+
The connection between the geometry of the loss landscape—in particular, the flatness of minima— and generalization has been studied extensively from both theoretical and empirical perspectives (Shirish Keskar et al., 2016; Dziugaite & Roy, 2017; Jiang et al., 2019). While this connection has held the promise of enabling new approaches to model training that yield better generalization, practical efficient algorithms that specifically seek out flatter minima and furthermore effectively improve generalization on a range of state-of-the-art models have thus far been elusive (e.g., see (Chaudhari et al., 2016; Izmailov et al., 2018); we include a more detailed discussion of prior work in Section 5).
|
| 28 |
+
|
| 29 |
+
We present here a new efficient, scalable, and effective approach to improving model generalization ability that directly leverages the geometry of the loss landscape and its connection to generalization, and is powerfully complementary to existing techniques. In particular, we make the following contributions:
|
| 30 |
+
|
| 31 |
+
• We introduce Sharpness-Aware Minimization (SAM), a novel procedure that improves model generalization by simultaneously minimizing loss value and loss sharpness. SAM functions by seeking parameters that lie in neighborhoods having uniformly low loss value (rather than parameters that only themselves have low loss value, as illustrated in the middle and righthand images of Figure 1), and can be implemented efficiently and easily.
|
| 32 |
+
• We show via a rigorous empirical study that using SAM improves model generalization ability across a range of widely studied computer vision tasks (e.g., CIFAR- $\{ 1 0 , ~ 1 0 0 \}$ , ImageNet, finetuning tasks) and models, as summarized in the lefthand plot of Figure 1. For example, applying SAM yields novel state-of-the-art performance for a number of alreadyintensely-studied tasks, such as ImageNet, CIFAR- $\mathbf { \bar { \{ 1 0 , ~ 1 0 0 \} } }$ , SVHN, Fashion-MNIST, and the standard set of image classification finetuning tasks (e.g., Flowers, Stanford Cars, Oxford Pets, etc).
|
| 33 |
+
• We show that SAM furthermore provides robustness to label noise on par with that provided by state-of-the-art procedures that specifically target learning with noisy labels.
|
| 34 |
+
• Through the lens provided by SAM, we further elucidate the connection between loss sharpness and generalization by surfacing a promising new notion of sharpness, which we term m-sharpness.
|
| 35 |
+
|
| 36 |
+
Section 2 below derives the SAM procedure and presents the resulting algorithm in full detail. Section 3 evaluates SAM empirically, and Section 4 further analyzes the connection between loss sharpness and generalization through the lens of SAM. Finally, we conclude with an overview of related work and a discussion of conclusions and future work in Sections 5 and 6, respectively.
|
| 37 |
+
|
| 38 |
+
# 2 SHARPNESS-AWARE MINIMIZATION (SAM)
|
| 39 |
+
|
| 40 |
+
Throughout the paper, we denote scalars as $a$ , vectors as $^ { a }$ , matrices as $\pmb { A }$ , sets as $\mathcal { A }$ , and equality by definition as $\triangleq$ . Given a training dataset ${ \mathcal { S } } \triangleq \cup _ { i = 1 } ^ { n } \{ ( \pmb { x } _ { i } , \pmb { y } _ { i } ) \}$ drawn i.i.d. from distribution $\mathcal { D }$ , we seek to learn a model that generalizes well. In particular, consider a family of models parameterized by $\pmb { w } \in \mathcal { W } \subseteq \mathbb { R } ^ { d }$ ; given a per-data-point loss function $l : \mathcal { W } \times \mathcal { X } \times \mathcal { Y } \mathbb { R } _ { + }$ , we define the training set loss Having $\begin{array} { r } { L _ { S } ( \pmb { w } ) \triangleq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } l ( \pmb { w } , \pmb { x } _ { i } , \pmb { y } _ { i } ) } \end{array}$ and the population loss odel training is to select $L _ { \mathcal { D } } ( \pmb { w } ) \triangleq \mathbb { E } _ { ( \pmb { x } , \pmb { y } ) \sim D } [ l ( \pmb { w } , \pmb { x } , \pmb { y } ) ]$ $s$ $\pmb { w }$ population loss $\scriptstyle L _ { \mathcal { D } } ( \pmb { w } )$ .
|
| 41 |
+
|
| 42 |
+
Utilizing $L _ { S } ( w )$ as an estimate of $L _ { \mathcal { D } } ( \mathbf { \boldsymbol { w } } )$ motivates the standard approach of selecting parameters $\pmb { w }$ by solving $\mathrm { m i n } _ { w } L _ { S } ( w )$ (possibly in conjunction with a regularizer on $\pmb { w }$ ) using an optimization procedure such as SGD or Adam. Unfortunately, however, for modern overparameterized models such as deep neural networks, typical optimization approaches can easily result in suboptimal performance at test time. In particular, for modern models, $L _ { S } ( w )$ is typically non-convex in $\pmb { w }$ , with multiple local and even global minima that may yield similar values of $L _ { S } ( w )$ while having significantly different generalization performance (i.e., significantly different values of $L _ { \mathcal { D } } ( \mathbf { \boldsymbol { w } } )$ ).
|
| 43 |
+
|
| 44 |
+
Motivated by the connection between sharpness of the loss landscape and generalization, we propose a different approach: rather than seeking out parameter values $\pmb { w }$ that simply have low training loss value $L _ { S } ( w )$ , we seek out parameter values whose entire neighborhoods have uniformly low training loss value (equivalently, neighborhoods having both low loss and low curvature). The following theorem illustrates the motivation for this approach by bounding generalization ability in terms of neighborhood-wise training loss (full theorem statement and proof in Appendix A):
|
| 45 |
+
|
| 46 |
+
Theorem (stated informally) 1. For any $\rho > 0$ , with high probability over training set $s$ generated from distribution $\mathcal { D }$ ,
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
L _ { \mathcal { D } } ( \pmb { w } ) \leq \operatorname* { m a x } _ { \| \pmb { \epsilon } \| _ { 2 } \leq \rho } L _ { S } ( \pmb { w } + \pmb { \epsilon } ) + h ( \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) ,
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
where $h : \mathbb { R } _ { + } \to \mathbb { R } _ { + }$ is a strictly increasing function (under some technical conditions on $L _ { \mathcal { D } } ( \boldsymbol { w } ) ,$ ).
|
| 53 |
+
|
| 54 |
+
To make explicit our sharpness term, we can rewrite the right hand side of the inequality above as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
[ \operatorname* { m a x } _ { \| \epsilon \| _ { 2 } \le \rho } L _ { S } ( \pmb { w } + \epsilon ) - L _ { S } ( \pmb { w } ) ] + L _ { S } ( \pmb { w } ) + h ( \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
The term in square brackets captures the sharpness of $L _ { S }$ at $\pmb { w }$ by measuring how quickly the training loss can be increased by moving from $\pmb { w }$ to a nearby parameter value; this sharpness term is then summed with the training loss value itself and a regularizer on the magnitude of $\pmb { w }$ . Given that the specific function $h$ is heavily influenced by the details of the proof, we substitute the second term with $\lambda | | w | | _ { 2 } ^ { 2 }$ for a hyperparameter $\lambda$ , yielding a standard L2 regularization term. Thus, inspired by the terms from the bound, we propose to select parameter values by solving the following SharpnessAware Minimization (SAM) problem:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\operatorname* { m i n } _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } ) + \lambda | | \pmb { w } | | _ { 2 } ^ { 2 } \mathrm { w h e r e } L _ { S } ^ { S A M } ( \pmb { w } ) \triangleq \operatorname* { m a x } _ { | | \epsilon | | _ { p } \leq \rho } L _ { S } ( \pmb { w } + \epsilon ) ,
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\rho \geq 0$ is a hyperparameter and $p \in [ 1 , \infty ]$ (we have generalized slightly from an L2-norm to a $p$ -norm in the maximization over $\epsilon$ , though we show empirically in appendix C.5 that $p = 2$ is typically optimal). Figure 1 shows1 the loss landscape for a model that converged to minima found by minimizing either $L _ { S } ( w )$ or $L _ { S } ^ { S A M } ( w )$ , illustrating that the sharpness-aware loss prevents the model from converging to a sharp minimum.
|
| 67 |
+
|
| 68 |
+
In order to minimize $L _ { S } ^ { S A M } ( w )$ , we derive an efficient and effective approximation to $\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } )$ by differentiating through the inner maximization, which in turn enables us to apply stochastic gradient descent directly to the SAM objective. Proceeding down this path, we first approximate the inner maximization problem via a first-order Taylor expansion of $L _ { S } ( w + \epsilon )$ w.r.t. $\epsilon$ around 0, obtaining
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\epsilon ^ { * } ( w ) \overset { \triangleq } { \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \mathbb { I } } } } \operatorname* { m a x } L _ { S } ( w + \epsilon ) \approx \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \arg m a x } } L _ { S } ( w ) + \epsilon ^ { T } \nabla _ { w } L _ { S } ( w ) = \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \arg m a x } } \epsilon ^ { T } \nabla _ { w } L _ { S } ( w ) .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
In turn, the value $\hat { \epsilon } ( w )$ that solves this approximation is given by the solution to a classical dual norm problem $( | \cdot | ^ { q - 1 }$ denotes elementwise absolute value and power)2:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r } { \hat { \epsilon } ( \pmb { w } ) = \rho \operatorname { s i g n } \left( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \right) | \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | ^ { q - 1 } / \bigg ( \| \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \| _ { q } ^ { q } \bigg ) ^ { 1 / p } } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $1 / p + 1 / q = 1$ . Substituting back into equation (1) and differentiating, we then have
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { c } { \nabla _ { w } L _ { \mathcal { S } } ^ { S A M } ( { \pmb w } ) \approx \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } + \hat { \epsilon } ( { \pmb w } ) ) = \displaystyle \frac { d ( { \pmb w } + \hat { \epsilon } ( { \pmb w } ) ) } { d { \pmb w } } \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } } \\ { = \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } + \displaystyle \frac { d \hat { \epsilon } ( { \pmb w } ) } { d { \pmb w } } \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } . } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
This approximation to $\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } )$ can be straightforwardly computed via automatic differentiation, as implemented in common libraries such as JAX, TensorFlow, and PyTorch. Though this computation implicitly depends on the Hessian of $L _ { S } ( w )$ because $\hat { \epsilon } ( w )$ is itself a function of $\mathrm { \nabla } \mathrm { \nabla } \varpi { L s } ( w )$ , the Hessian enters only via Hessian-vector products, which can be computed tractably without materializing the Hessian matrix. Nonetheless, to further accelerate the computation, we drop the second-order terms. obtaining our final gradient approximation:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } ) \approx \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | _ { \pmb { w } + \hat { \epsilon } ( \pmb { w } ) } .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
As shown by the results in Section 3, this approximation (without the second-order terms) yields an effective algorithm. In Appendix C.4, we additionally investigate the effect of instead including the second-order terms; in that initial experiment, including them surprisingly degrades performance, and further investigating these terms’ effect should be a priority in future work.
|
| 93 |
+
|
| 94 |
+
We obtain the final SAM algorithm by applying a standard numerical optimizer such as stochastic gradient descent (SGD) to the SAM objective $\check { L _ { S } ^ { S A M } } ( w )$ , using equation 3 to compute the requisite objective function gradients. Algorithm 1 gives pseudo-code for the full SAM algorithm, using SGD as the base optimizer, and Figure 2 schematically illustrates a single SAM parameter update.
|
| 95 |
+
|
| 96 |
+
Input: Training set $s$ , $\cup _ { i = 1 } ^ { n } \{ ( { \pmb x } _ { i } , { \pmb y } _ { i } ) \}$ , Loss function $l : \mathcal { W } \times \mathcal { X } \times \mathcal { Y } \mathbb { R } _ { + }$ , Batch size $b$ , Step size $\eta > 0$ , Neighborhood size $\rho > 0$ .
|
| 97 |
+
|
| 98 |
+
Output: Model trained with SAM Initialize weights $\pmb { w } _ { 0 }$ , $t = 0$ ; while not converged do
|
| 99 |
+
|
| 100 |
+
Sample batch $B = \{ ( { \pmb x } _ { 1 } , { \pmb y } _ { 1 } ) , . . . ( { \pmb x } _ { b } , { \pmb y } _ { b } ) \}$ ;
|
| 101 |
+
Compute gradient $\nabla _ { w } L _ { B } ( w )$ of the batch’s training loss;
|
| 102 |
+
Compute $\hat { \epsilon } ( w )$ per equation 2;
|
| 103 |
+
Compute gradient approximation for the SAM objective (equation 3): $\pmb { g } = \mathcal { \bar { \nabla } } _ { w } L _ { B } ( \pmb { w } ) | _ { \pmb { w } + \hat { \epsilon } ( \pmb { w } ) }$ ;
|
| 104 |
+
Update weights: $\mathbf { } \mathbf { } \mathbf { } w _ { t + 1 } = \mathbf { } w _ { t } - \eta \mathbf { } g$ ;
|
| 105 |
+
$t = t + 1$ ;
|
| 106 |
+
|
| 107 |
+
end return ${ \pmb w } _ { t }$
|
| 108 |
+
|
| 109 |
+
Algorithm 1: SAM algorithm
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 2: Schematic of the SAM parameter update.
|
| 113 |
+
|
| 114 |
+
# 3 EMPIRICAL EVALUATION
|
| 115 |
+
|
| 116 |
+
In order to assess SAM’s efficacy, we apply it to a range of different tasks, including image classification from scratch (including on CIFAR-10, CIFAR-100, and ImageNet), finetuning pretrained models, and learning with noisy labels. In all cases, we measure the benefit of using SAM by simply replacing the optimization procedure used to train existing models with SAM, and computing the resulting effect on model generalization. As seen below, SAM materially improves generalization performance in the vast majority of these cases.
|
| 117 |
+
|
| 118 |
+
# 3.1 IMAGE CLASSIFICATION FROM SCRATCH
|
| 119 |
+
|
| 120 |
+
We first evaluate SAM’s impact on generalization for today’s state-of-the-art models on CIFAR-10 and CIFAR-100 (without pretraining): WideResNets with ShakeShake regularization (Zagoruyko & Komodakis, 2016; Gastaldi, 2017) and PyramidNet with ShakeDrop regularization (Han et al., 2016; Yamada et al., 2018). Note that some of these models have already been heavily tuned in prior work and include carefully chosen regularization schemes to prevent overfitting; therefore, significantly improving their generalization is quite non-trivial. We have ensured that our implementations’ generalization performance in the absence of SAM matches or exceeds that reported in prior work (Cubuk et al., 2018; Lim et al., 2019)
|
| 121 |
+
|
| 122 |
+
All results use basic data augmentations (horizontal flip, padding by four pixels, and random crop). We also evaluate in the setting of more advanced data augmentation methods such as cutout regularization (Devries & Taylor, 2017) and AutoAugment (Cubuk et al., 2018), which are utilized by prior work to achieve state-of-the-art results.
|
| 123 |
+
|
| 124 |
+
SAM has a single hyperparameter $\rho$ (the neighborhood size), which we tune via a grid search over $\{ 0 . 0 1 , 0 . 0 2 , 0 . 0 5 , 0 . 1 , 0 . \bar { 2 } , 0 . 5 \}$ using $10 \%$ of the training set as a validation set3. Please see appendix C.1 for the values of all hyperparameters and additional training details. As each SAM weight update requires two backpropagation operations (one to compute $\hat { \epsilon } ( w )$ and another to compute the final gradient), we allow each non-SAM training run to execute twice as many epochs as each SAM training run, and we report the best score achieved by each non-SAM training run across either the standard epoch count or the doubled epoch count4. We run five independent replicas of each experimental condition for which we report results (each with independent weight initialization and data shuffling), reporting the resulting mean error (or accuracy) on the test set, and the associated $9 5 \%$ confidence interval. Our implementations utilize JAX (Bradbury et al., 2018), and we train all models on a single host having 8 Nvidia $\mathrm { V 1 0 0 \ G P U s }$ . To compute the SAM update when parallelizing across multiple accelerators, we divide each data batch evenly among the accelerators, independently compute the SAM gradient on each accelerator, and average the resulting sub-batch SAM gradients to obtain the final SAM update.
|
| 125 |
+
|
| 126 |
+
As seen in Table 1, SAM improves generalization across all settings evaluated for CIFAR-10 and CIFAR-100. For example, SAM enables a simple WideResNet to attain $1 . 6 \%$ test error, versus $2 . 2 \%$ error without SAM. Such gains have previously been attainable only by using more complex model architectures (e.g., PyramidNet) and regularization schemes (e.g., Shake-Shake, ShakeDrop); SAM provides an easily-implemented, model-independent alternative. Furthermore, SAM delivers improvements even when applied atop complex architectures that already use sophisticated regularization: for instance, applying SAM to a PyramidNet with ShakeDrop regularization yields $1 0 . 3 \%$ error on CIFAR-100, which is, to our knowledge, a new state-of-the-art on this dataset without the use of additional data.
|
| 127 |
+
|
| 128 |
+
Beyond CIFAR- $\{ 1 0 , 1 0 0 \}$ , we have also evaluated SAM on the SVHN (Netzer et al., 2011) and Fashion-MNIST datasets (Xiao et al., 2017). Once again, SAM enables a simple WideResNet to achieve accuracy at or above the state-of-the-art for these datasets: $0 . 9 9 \%$ error for SVHN, and $3 . 5 9 \%$ for Fashion-MNIST. Details are available in appendix B.1.
|
| 129 |
+
|
| 130 |
+
To assess SAM’s performance at larger scale, we apply it to ResNets (He et al., 2015) of different depths (50, 101, 152) trained on ImageNet (Deng et al., 2009). In this setting, following prior work (He et al., 2015; Szegedy et al., 2015), we resize and crop images to 224-pixel resolution, normalize them, and use batch size 4096, initial learning rate 1.0, cosine learning rate schedule, SGD optimizer with momentum 0.9, label smoothing of 0.1, and weight decay 0.0001. When applying SAM, we use $\rho = 0 . 0 5$ (determined via a grid search on ResNet-50 trained for 100 epochs). We train all models on ImageNet for up to 400 epochs using a Google Cloud TPUv3 and report top-1 and top-5 test error rates for each experimental condition (mean and $9 5 \%$ confidence interval across 5 independent runs).
|
| 131 |
+
|
| 132 |
+
<table><tr><td colspan="2"></td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>Model</td><td>Augmentation</td><td>SAM</td><td>SGD</td><td>SAM</td><td>SGD</td></tr><tr><td>WRN-28-10 (200 epochs) WRN-28-10 (200 epochs)</td><td>Basic Cutout</td><td>2.7±0.1 2.3±0.1</td><td>3.5±0.1 2.6±0.1</td><td>16.5±0.2 14.9±0.2</td><td>18.8±0.2 16.9±0.1</td></tr><tr><td>WRN-28-10 (200 epochs) WRN-28-10 (1800 epochs)</td><td>AA Basic</td><td>2.1±<0.1 2.4±0.1</td><td>2.3±0.1 3.5±0.1</td><td>13.6±0.2 16.3±0.2</td><td>15.8±0.2 19.1±0.1</td></tr><tr><td>WRN-28-10 (1800 epochs) WRN-28-10 (1800 epochs)</td><td>Cutout AA</td><td>2.1±0.1 1.6±0.1</td><td>2.7±0.1 2.2±<0.1</td><td>14.0±0.1 12.8±0.2</td><td>17.4±0.1 16.1±0.2</td></tr><tr><td>Shake-Shake (26 2x96d) Shake-Shake (26 2x96d)</td><td>Basic Cutout</td><td>2.3±<0.1 2.0±<0.1</td><td>2.7±0.1 2.3±0.1</td><td>15.1±0.1 14.2±0.2</td><td>17.0±0.1 15.7±0.2</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>AA</td><td>1.6±<0.1</td><td>1.9±0.1</td><td>12.8±0.1</td><td>14.1±0.2</td></tr><tr><td>PyramidNet</td><td>Basic</td><td>2.7±0.1</td><td>4.0±0.1</td><td>14.6±0.4</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>19.7±0.3</td></tr><tr><td>PyramidNet</td><td>Cutout</td><td>1.9±0.1</td><td>2.5±0.1</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>12.6±0.2</td><td>16.4±0.1</td></tr><tr><td>PyramidNet</td><td>AA</td><td>1.6±0.1</td><td>1.9±0.1</td><td>11.6±0.1</td><td>14.6±0.1</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>Basic</td><td>2.1±0.1</td><td>2.5±0.1</td><td>13.3±0.2</td><td></td></tr><tr><td>PyramidNet+ShakeDrop</td><td>Cutout</td><td></td><td></td><td></td><td>14.5±0.1</td></tr><tr><td></td><td></td><td>1.6±<0.1</td><td>1.9±0.1</td><td>11.3±0.1</td><td>11.8±0.2</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>AA</td><td>1.4±<0.1</td><td>1.6±<0.1</td><td>10.3±0.1</td><td>10.6±0.1</td></tr></table>
|
| 133 |
+
|
| 134 |
+
Table 1: Results for SAM on state-of-the-art models on CIFAR- $\{ 1 0 , 1 0 0 \}$ (WRN $=$ WideResNet;
|
| 135 |
+
AA $=$ AutoAugment; SGD is the standard non-SAM procedure used to train these models).
|
| 136 |
+
|
| 137 |
+
As seen in Table 2, SAM again consistently improves performance, for example improving the ImageNet top-1 error rate of ResNet-152 from $2 0 . 3 \%$ to $1 8 . 4 \%$ . Furthermore, note that SAM enables increasing the number of training epochs while continuing to improve accuracy without overfitting. In contrast, the standard training procedure (without SAM) generally significantly overfits as training extends from 200 to 400 epochs.
|
| 138 |
+
|
| 139 |
+
Table 2: Test error rates for ResNets trained on ImageNet, with and without SAM.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Epoch</td><td colspan="2">SAM</td><td colspan="2">Standard Training (No SAM)</td></tr><tr><td>Top-1</td><td>Top-5</td><td>Top-1</td><td>Top-5</td></tr><tr><td rowspan="3">ResNet-50</td><td>100</td><td>22.5±0.1</td><td>6.28±0.08</td><td>22.9±0.1</td><td>6.62±0.11</td></tr><tr><td>200</td><td>21.4±0.1</td><td>5.82±0.03</td><td>22.3±0.1</td><td>6.37±0.04</td></tr><tr><td>400</td><td>20.9±0.1</td><td>5.51±0.03</td><td>22.3±0.1</td><td>6.40±0.06</td></tr><tr><td rowspan="3">ResNet-101</td><td>100</td><td>20.2±0.1</td><td>5.12±0.03</td><td>21.2±0.1</td><td>5.66±0.05</td></tr><tr><td>200</td><td>19.4±0.1</td><td>4.76±0.03</td><td>20.9±0.1</td><td>5.66±0.04</td></tr><tr><td>400</td><td>19.0±<0.01</td><td>4.65±0.05</td><td>22.3±0.1</td><td>6.41±0.06</td></tr><tr><td rowspan="3">ResNet-152</td><td>100</td><td>19.2±<0.01</td><td>4.69±0.04</td><td>20.4±<0.0</td><td>5.39±0.06</td></tr><tr><td>200</td><td>18.5±0.1</td><td>4.37±0.03</td><td>20.3±0.2</td><td>5.39±0.07</td></tr><tr><td>400</td><td>18.4±<0.01</td><td>4.35±0.04</td><td>20.9±<0.0</td><td>5.84±0.07</td></tr></table>
|
| 142 |
+
|
| 143 |
+
# 3.2 FINETUNING
|
| 144 |
+
|
| 145 |
+
Transfer learning by pretraining a model on a large related dataset and then finetuning on a smaller target dataset of interest has emerged as a powerful and widely used technique for producing highquality models for a variety of different tasks. We show here that SAM once again offers considerable benefits in this setting, even when finetuning extremely large, state-of-the-art, already high-performing models.
|
| 146 |
+
|
| 147 |
+
In particular, we apply SAM to finetuning EfficentNet-b7 (pretrained on ImageNet) and EfficientNet-L2 (pretrained on ImageNet plus unlabeled JFT; input resolution 475) (Tan & Le, 2019; Kornblith et al., 2018; Huang et al., 2018). We initialize these models to publicly available checkpoints6 trained with RandAugment $8 4 . 7 \%$ accuracy on ImageNet) and NoisyStudent $8 8 . 2 \%$ accuracy on ImageNet), respectively. We finetune these models on each of several target datasets by training each model starting from the aforementioned checkpoint; please see the appendix for details of the hyperparameters used. We report the mean and $9 5 \%$ confidence interval of top-1 test error over 5 independent runs for each dataset.
|
| 148 |
+
|
| 149 |
+
As seen in Table 3, SAM uniformly improves performance relative to finetuning without SAM. Furthermore, in many cases, SAM yields novel state-of-the-art performance, including $0 . 3 0 \%$ error on CIFAR-10, $3 . 9 2 \%$ error on CIFAR-100, and $1 1 . 3 9 \%$ error on ImageNet.
|
| 150 |
+
|
| 151 |
+
Table 3: Top-1 error rates for finetuning EfficientNet-b7 (left; ImageNet pretraining only) and EfficientNet-L2 (right; pretraining on ImageNet plus additional data, such as JFT) on various downstream tasks. Previous state-of-the-art (SOTA) includes EfficientNet (EffNet) (Tan & Le, 2019), Gpipe (Huang et al., 2018), DAT (Ngiam et al., 2018), BiT-M/L (Kolesnikov et al., 2020), KDforAA (Wei et al., 2020), TBMSL-Net (Zhang et al., 2020), and ViT (Dosovitskiy et al., 2020).
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Dataset</td><td>EffNet-b7 + SAM</td><td>EffNet-b7</td><td>Prev. SOTA (ImageNet only)</td><td>EffNet-L2 + SAM</td><td>EffNet-L2</td><td>Prev. SOTA</td></tr><tr><td>FGVC_Aircraft</td><td>6.80±0.06</td><td>8.15±0.08</td><td>5.3(TBMSL-Net)</td><td>4.82±0.08</td><td>5.80±0.1</td><td>5.3 (TBMSL-Net)</td></tr><tr><td>Flowers</td><td>0.63±0.02</td><td>1.16±0.05</td><td>0.7 (BiT-M)</td><td>0.35±0.01</td><td>0.40±0.02</td><td>0.37 (EffNet)</td></tr><tr><td>Oxford_IIIT_Pets</td><td>3.97±0.04</td><td>4.24±0.09</td><td>4.1 (Gpipe)</td><td>2.90±0.04</td><td>3.08±0.04</td><td>4.1 (Gpipe)</td></tr><tr><td>Stanford_Cars</td><td>5.18±0.02</td><td>5.94±0.06</td><td>5.0 (TBMSL-Net)</td><td>4.04±0.03</td><td>4.93±0.04</td><td>3.8 (DAT)</td></tr><tr><td>CIFAR-10</td><td>0.88±0.02</td><td>0.95±0.03</td><td>1(Gpipe)</td><td>0.30±0.01</td><td>0.34±0.02</td><td>0.63 (BiT-L)</td></tr><tr><td>CIFAR-100</td><td>7.44±0.06</td><td>7.68±0.06</td><td>7.83 (BiT-M)</td><td>3.92±0.06</td><td>4.07±0.08</td><td>6.49 (BiT-L)</td></tr><tr><td>Birdsnap</td><td>13.64±0.15</td><td>14.30±0.18</td><td>15.7 (EffNet)</td><td>9.93±0.15</td><td>10.31±0.15</td><td>14.5 (DAT)</td></tr><tr><td>Food101</td><td>7.02±0.02</td><td>7.17±0.03</td><td>7.0 (Gpipe)</td><td>3.82±0.01</td><td>3.97±0.03</td><td>4.7 (DAT)</td></tr><tr><td>ImageNet</td><td>15.14±0.03</td><td>15.3</td><td>14.2 (KDforAA)</td><td>11.39±0.02</td><td>11.8</td><td>11.45 (ViT)</td></tr></table>
|
| 154 |
+
|
| 155 |
+
The fact that SAM seeks out model parameters that are robust to perturbations suggests SAM’s potential to provide robustness to noise in the training set (which would perturb the training loss landscape). Thus, we assess here the degree of robustness that SAM provides to label noise.
|
| 156 |
+
|
| 157 |
+
In particular, we measure the effect of applying SAM in the classical noisy-label setting for CIFAR-10, in which a fraction of the training set’s labels are randomly flipped; the test set remains unmodified (i.e., clean). To ensure valid comparison to prior work, which often utilizes architectures specialized to the noisy-label setting, we train a simple model of similar size (ResNet-32) for 200 epochs, following Jiang et al. (2019). We evaluate five variants of model training: standard SGD, SGD with Mixup (Zhang et al., 2017), SAM, and ”bootstrapped” variants of SGD with Mixup and SAM (wherein the model is first trained as usual and then retrained from scratch on the labels predicted by the initially trained model). When applying SAM, we use $\rho = 0 . 1$ for all noise levels except $80 \%$ , for which we use $\rho = 0 . 0 5$ for more stable convergence. For the Mixup baselines, we tried all values of $\alpha \in \{ 1 , 8 , 1 6 , 3 2 \}$ and conservatively report the best score for each noise level.
|
| 158 |
+
|
| 159 |
+
Table 4: Test accuracy on the clean test set for models trained on CIFAR-10 with noisy labels. Lower block is our implementation, upper block gives scores from the literature, per Jiang et al. (2019).
|
| 160 |
+
|
| 161 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">Noise rate (%)</td></tr><tr><td>20</td><td>40</td><td>60</td><td>80</td></tr><tr><td>Sanchez et al. (2019)</td><td>94.0</td><td>92.8</td><td>90.3</td><td>74.1</td></tr><tr><td>Zhang & Sabuncu (2018)</td><td>89.7</td><td>87.6</td><td>82.7</td><td>67.9</td></tr><tr><td>Lee et al. (2019)</td><td>87.1</td><td>81.8</td><td>75.4</td><td>-</td></tr><tr><td>Chen et al. (2019)</td><td>89.7</td><td>-</td><td>-</td><td>52.3</td></tr><tr><td>Huang et al. (2019)</td><td>92.6</td><td>90.3</td><td>43.4</td><td>-</td></tr><tr><td>MentorNet (2017)</td><td>92.0</td><td>91.2</td><td>74.2</td><td>60.0</td></tr><tr><td>Mixup (2017)</td><td>94.0</td><td>91.5</td><td>86.8</td><td>76.9</td></tr><tr><td>MentorMix (2019)</td><td>95.6</td><td>94.2</td><td>91.3</td><td>81.0</td></tr><tr><td>SGD</td><td>84.8</td><td>68.8</td><td>48.2</td><td>26.2</td></tr><tr><td>Mixup</td><td>93.0</td><td>90.0</td><td>83.8</td><td>70.2</td></tr><tr><td>Bootstrap + Mixup</td><td>93.3</td><td>92.0</td><td>87.6</td><td>72.0</td></tr><tr><td>SAM</td><td>95.1</td><td>93.4</td><td>90.5</td><td>77.9</td></tr><tr><td>Bootstrap + SAM</td><td>95.4</td><td>94.2</td><td>91.8</td><td>79.9</td></tr></table>
|
| 162 |
+
|
| 163 |
+
As seen in Table 4, SAM provides a high degree of robustness to label noise, on par with that provided by state-of-the art procedures that specifically target learning with noisy labels. Indeed, simply training a model with SAM outperforms all prior methods specifically targeting label noise robustness, with the exception of MentorMix (Jiang et al., 2019). However, simply bootstrapping SAM yields performance comparable to that of MentorMix (which is substantially more complex).
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 3: (left) Evolution of the spectrum of the Hessian during training of a model with standard SGD (lefthand column) or SAM (righthand column). (middle) Test error as a function of $\rho$ for different values of $m$ . (right) Predictive power of $m$ -sharpness for the generalization gap, for different values of $m$ (higher means the sharpness measure is more correlated with actual generalization gap).
|
| 167 |
+
|
| 168 |
+
# 4 SHARPNESS AND GENERALIZATION THROUGH THE LENS OF SAM
|
| 169 |
+
|
| 170 |
+
# 4.1 $m$ -SHARPNESS
|
| 171 |
+
|
| 172 |
+
Though our derivation of SAM defines the SAM objective over the entire training set, when utilizing SAM in practice, we compute the SAM update per-batch (as described in Algorithm 1) or even by averaging SAM updates computed independently per-accelerator (where each accelerator receives a subset of size $m$ of a batch, as described in Section 3). This latter setting is equivalent to modifying the SAM objective (equation 1) to sum over a set of independent $\epsilon$ maximizations, each performed on a sum of per-data-point losses on a disjoint subset of $m$ data points, rather than performing the $\epsilon$ maximization over a global sum over the training set (which would be equivalent to setting $m$ to the total training set size). We term the associated measure of sharpness of the loss landscape $m$ -sharpness.
|
| 173 |
+
|
| 174 |
+
To better understand the effect of $m$ on SAM, we train a small ResNet on CIFAR-10 using SAM with a range of values of $m$ . As seen in Figure 3 (middle), smaller values of $m$ tend to yield models having better generalization ability. This relationship fortuitously aligns with the need to parallelize across multiple accelerators in order to scale training for many of today’s models.
|
| 175 |
+
|
| 176 |
+
Intriguingly, the $m$ -sharpness measure described above furthermore exhibits better correlation with models’ actual generalization gaps as $m$ decreases, as demonstrated by Figure 3 (right)7. In particular, this implies that $m$ -sharpness with $m < n$ yields a better predictor of generalization than the full-training-set measure suggested by Theorem 1 in Section 2 above, suggesting an interesting new avenue of future work for understanding generalization.
|
| 177 |
+
|
| 178 |
+
# 4.2 HESSIAN SPECTRA
|
| 179 |
+
|
| 180 |
+
Motivated by the connection between geometry of the loss landscape and generalization, we constructed SAM to seek out minima of the training loss landscape having both low loss value and low curvature (i.e., low sharpness). To further confirm that SAM does in fact find minima having low curvature, we compute the spectrum of the Hessian for a WideResNet40-10 trained on CIFAR-10 for 300 steps both with and without SAM (without batch norm, which tends to obscure interpretation of the Hessian), at different epochs during training. Due to the parameter space’s dimensionality, we approximate the Hessian spectrum using the Lanczos algorithm of Ghorbani et al. (2019).
|
| 181 |
+
|
| 182 |
+
Figure 3 (left) reports the resulting Hessian spectra. As expected, the models trained with SAM converge to minima having lower curvature, as seen in the overall distribution of eigenvalues, the maximum eigenvalue $\left( \lambda _ { \operatorname* { m a x } } \right)$ at convergence (approximately 24 without SAM, 1.0 with SAM), and the bulk of the spectrum (the ratio $\lambda _ { \operatorname* { m a x } } / \lambda _ { 5 }$ , commonly used as a proxy for sharpness (Jastrzebski et al., 2020); up to 11.4 without SAM, and 2.6 with SAM).
|
| 183 |
+
|
| 184 |
+
# 5 RELATED WORK
|
| 185 |
+
|
| 186 |
+
The idea of searching for “flat” minima can be traced back to Hochreiter & Schmidhuber (1995), and its connection to generalization has seen significant study (Shirish Keskar et al., 2016; Dziugaite & Roy, 2017; Neyshabur et al., 2017; Dinh et al., 2017). In a recent large scale empirical study, Jiang et al. (2019) studied 40 complexity measures and showed that a sharpness-based measure has highest correlation with generalization, which motivates penalizing sharpness. Hochreiter & Schmidhuber (1997) was perhaps the first paper on penalizing the sharpness, regularizing a notion related to Minimum Description Length (MDL). Other ideas which also penalize sharp minima include operating on diffused loss landscape (Mobahi, 2016) and regularizing local entropy (Chaudhari et al., 2016). Another direction is to not penalize the sharpness explicitly, but rather average weights during training; Izmailov et al. (2018) showed that doing so can yield flatter minima that can also generalize better. However, the measures of sharpness proposed previously are difficult to compute and differentiate through. In contrast, SAM is highly scalable as it only needs two gradient computations per iteration. The concurrent work of Sun et al. (2020) focuses on resilience to random and adversarial corruption to expose a model’s vulnerabilities; this work is perhaps closest to ours. Our work has a different basis: we develop SAM motivated by a principled starting point in generalization, clearly demonstrate SAM’s efficacy via rigorous large-scale empirical evaluation, and surface important practical and theoretical facets of the procedure (e.g., $m$ -sharpness). The notion of all-layer margin introduced by Wei & Ma (2020) is closely related to this work; one is adversarial perturbation over the activations of a network and the other over its weights, and there is some coupling between these two quantities.
|
| 187 |
+
|
| 188 |
+
# 6 DISCUSSION AND FUTURE WORK
|
| 189 |
+
|
| 190 |
+
In this work, we have introduced SAM, a novel algorithm that improves generalization by simultaneously minimizing loss value and loss sharpness; we have demonstrated SAM’s efficacy through a rigorous large-scale empirical evaluation. We have surfaced a number of interesting avenues for future work. On the theoretical side, the notion of per-data-point sharpness yielded by $m$ -sharpness (in contrast to global sharpness computed over the entire training set, as has typically been studied in the past) suggests an interesting new lens through which to study generalization. Methodologically, our results suggest that SAM could potentially be used in place of Mixup in robust or semi-supervised methods that currently rely on Mixup (giving, for instance, MentorSAM). We leave to future work a more in-depth investigation of these possibilities.
|
| 191 |
+
|
| 192 |
+
# 7 ACKNOWLEDGMENTS
|
| 193 |
+
|
| 194 |
+
We thank our colleagues at Google — Atish Agarwala, Xavier Garcia, Dustin Tran, Yiding Jiang, Basil Mustafa, Samy Bengio — for their feedback and insightful discussions. We also thank the JAX and FLAX teams for going above and beyond to support our implementation. We are grateful to Sven Gowal for his help in replicating EfficientNet using JAX, and Justin Gilmer for his implementation of the Lanczos algorithm8 used to generate the Hessian spectra. We thank Niru Maheswaranathan for his matplotlib mastery. We also thank David Samuel for providing a PyTorch implementation of $\mathrm { \bf S A M ^ { 9 } }$ .
|
| 195 |
+
|
| 196 |
+
# REFERENCES
|
| 197 |
+
|
| 198 |
+
Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Revisiting the generalization of adaptive gradient methods, 2020. URL https://openreview.net/forum? id=BJl6t64tvr.
|
| 199 |
+
|
| 200 |
+
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. URL http://github.com/google/jax.
|
| 201 |
+
|
| 202 |
+
Niladri S Chatterji, Behnam Neyshabur, and Hanie Sedghi. The intriguing role of module criticality in the generalization of deep networks. In International Conference on Learning Representations, 2020.
|
| 203 |
+
|
| 204 |
+
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. arXiv e-prints, art. arXiv:1611.01838, November 2016.
|
| 205 |
+
|
| 206 |
+
Pengfei Chen, Benben Liao, Guangyong Chen, and Shengyu Zhang. Understanding and utilizing deep neural networks trained with noisy labels. CoRR, abs/1905.05040, 2019. URL http: //arxiv.org/abs/1905.05040.
|
| 207 |
+
|
| 208 |
+
Ekin Dogus Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. Au- ´ toaugment: Learning augmentation policies from data. CoRR, abs/1805.09501, 2018. URL http://arxiv.org/abs/1805.09501.
|
| 209 |
+
|
| 210 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
|
| 211 |
+
|
| 212 |
+
Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. CoRR, abs/1708.04552, 2017. URL http://arxiv.org/abs/1708.04552.
|
| 213 |
+
|
| 214 |
+
Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. arXiv preprint arXiv:1703.04933, 2017.
|
| 215 |
+
|
| 216 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv e-prints, art. arXiv:2010.11929, October 2020.
|
| 217 |
+
|
| 218 |
+
Timothy Dozat. Incorporating nesterov momentum into adam. 2016.
|
| 219 |
+
|
| 220 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research, 12(7), 2011.
|
| 221 |
+
|
| 222 |
+
Gintare Karolina Dziugaite and Daniel M Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017.
|
| 223 |
+
|
| 224 |
+
Xavier Gastaldi. Shake-shake regularization. CoRR, abs/1705.07485, 2017. URL http: //arxiv.org/abs/1705.07485.
|
| 225 |
+
|
| 226 |
+
Behrooz Ghorbani, Shankar Krishnan, and Ying Xiao. An Investigation into Neural Net Optimization via Hessian Eigenvalue Density. arXiv e-prints, art. arXiv:1901.10159, January 2019.
|
| 227 |
+
|
| 228 |
+
Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. CoRR, abs/1610.02915, 2016. URL http://arxiv.org/abs/1610.02915.
|
| 229 |
+
|
| 230 |
+
Ethan Harris, Antonia Marcu, Matthew Painter, Mahesan Niranjan, Adam Prugel-Bennett, and ¨ Jonathon Hare. FMix: Enhancing Mixed Sample Data Augmentation. arXiv e-prints, art. arXiv:2002.12047, February 2020.
|
| 231 |
+
|
| 232 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. URL http://arxiv.org/abs/1512.03385.
|
| 233 |
+
|
| 234 |
+
Geoffrey Hinton, Nitish Srivastava, and Kevin Swersky. Neural networks for machine learning lecture 6a overview of mini-batch gradient descent.
|
| 235 |
+
|
| 236 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Simplifying neural nets by discovering flat minima. In ¨ Advances in neural information processing systems, pp. 529–536, 1995.
|
| 237 |
+
|
| 238 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997.
|
| 239 |
+
|
| 240 |
+
Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep Networks with Stochastic Depth. arXiv e-prints, art. arXiv:1603.09382, March 2016.
|
| 241 |
+
|
| 242 |
+
J. Huang, L. Qu, R. Jia, and B. Zhao. O2u-net: A simple noisy label detection approach for deep neural networks. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 3325–3333, 2019.
|
| 243 |
+
|
| 244 |
+
Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Mia Xu Chen, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V. Le, Yonghui Wu, and Zhifeng Chen. GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism. arXiv e-prints, art. arXiv:1811.06965, November 2018.
|
| 245 |
+
|
| 246 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 247 |
+
|
| 248 |
+
Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging Weights Leads to Wider Optima and Better Generalization. arXiv e-prints, art. arXiv:1803.05407, March 2018.
|
| 249 |
+
|
| 250 |
+
Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and gener-´ alization in neural networks. CoRR, abs/1806.07572, 2018. URL http://arxiv.org/abs/ 1806.07572.
|
| 251 |
+
|
| 252 |
+
Stanislaw Jastrzebski, Maciej Szymczak, Stanislav Fort, Devansh Arpit, Jacek Tabor, Kyunghyun Cho, and Krzysztof Geras. The Break-Even Point on Optimization Trajectories of Deep Neural Networks. arXiv e-prints, art. arXiv:2002.09572, February 2020.
|
| 253 |
+
|
| 254 |
+
Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Regularizing very deep neural networks on corrupted labels. CoRR, abs/1712.05055, 2017. URL http: //arxiv.org/abs/1712.05055.
|
| 255 |
+
|
| 256 |
+
Lu Jiang, Di Huang, Mason Liu, and Weilong Yang. Beyond Synthetic Noise: Deep Learning on Controlled Noisy Labels. arXiv e-prints, art. arXiv:1911.09781, November 2019.
|
| 257 |
+
|
| 258 |
+
Yiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan, and Samy Bengio. Fantastic generalization measures and where to find them. arXiv preprint arXiv:1912.02178, 2019.
|
| 259 |
+
|
| 260 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv e-prints, art. arXiv:1412.6980, December 2014.
|
| 261 |
+
|
| 262 |
+
Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Big transfer (bit): General visual representation learning, 2020.
|
| 263 |
+
|
| 264 |
+
Simon Kornblith, Jonathon Shlens, and Quoc V. Le. Do Better ImageNet Models Transfer Better? arXiv e-prints, art. arXiv:1805.08974, May 2018.
|
| 265 |
+
|
| 266 |
+
John Langford and Rich Caruana. (not) bounding the true error. In Advances in Neural Information Processing Systems, pp. 809–816, 2002.
|
| 267 |
+
|
| 268 |
+
Beatrice Laurent and Pascal Massart. Adaptive estimation of a quadratic functional by model selection. Annals of Statistics, pp. 1302–1338, 2000.
|
| 269 |
+
|
| 270 |
+
Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels, 2019.
|
| 271 |
+
|
| 272 |
+
Hao Li, Zheng Xu, Gavin Taylor, and Tom Goldstein. Visualizing the loss landscape of neural nets. CoRR, abs/1712.09913, 2017. URL http://arxiv.org/abs/1712.09913.
|
| 273 |
+
|
| 274 |
+
Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast autoaugment. CoRR, abs/1905.00397, 2019. URL http://arxiv.org/abs/1905.00397.
|
| 275 |
+
|
| 276 |
+
James Martens and Roger Grosse. Optimizing Neural Networks with Kronecker-factored Approximate Curvature. arXiv e-prints, art. arXiv:1503.05671, March 2015.
|
| 277 |
+
|
| 278 |
+
David A McAllester. Pac-bayesian model averaging. In Proceedings of the twelfth annual conference on Computational learning theory, pp. 164–170, 1999.
|
| 279 |
+
|
| 280 |
+
Hossein Mobahi. Training recurrent neural networks by diffusion. CoRR, abs/1601.04114, 2016. URL http://arxiv.org/abs/1601.04114.
|
| 281 |
+
|
| 282 |
+
Y. E. Nesterov. A method for solving the convex programming problem with convergence rate $o ( 1 / k ^ { 2 } )$ . Dokl. Akad. Nauk SSSR, 269:543–547, 1983. URL https://ci.nii.ac.jp/ naid/10029946121/en/.
|
| 283 |
+
|
| 284 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
|
| 285 |
+
|
| 286 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in neural information processing systems, pp. 5947–5956, 2017.
|
| 287 |
+
|
| 288 |
+
Jiquan Ngiam, Daiyi Peng, Vijay Vasudevan, Simon Kornblith, Quoc V. Le, and Ruoming Pang. Domain adaptive transfer learning with specialist models. CoRR, abs/1811.07056, 2018. URL http://arxiv.org/abs/1811.07056.
|
| 289 |
+
|
| 290 |
+
Eric Arazo Sanchez, Diego Ortego, Paul Albert, Noel E. O’Connor, and Kevin McGuinness. Unsupervised label noise modeling and loss correction. CoRR, abs/1904.11238, 2019. URL http://arxiv.org/abs/1904.11238.
|
| 291 |
+
|
| 292 |
+
Nitish Shirish Keskar and Richard Socher. Improving Generalization Performance by Switching from Adam to SGD. arXiv e-prints, art. arXiv:1712.07628, December 2017.
|
| 293 |
+
|
| 294 |
+
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 e-prints, art. arXiv:1609.04836, September 2016.
|
| 295 |
+
|
| 296 |
+
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.
|
| 297 |
+
|
| 298 |
+
Xu Sun, Zhiyuan Zhang, Xuancheng Ren, Ruixuan Luo, and Liangyou Li. Exploring the Vulnerability of Deep Neural Networks: A Study of Parameter Corruption. arXiv e-prints, art. arXiv:2006.05620, June 2020.
|
| 299 |
+
|
| 300 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision, 2015.
|
| 301 |
+
|
| 302 |
+
Mingxing Tan and Quoc V. Le. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. arXiv e-prints, art. arXiv:1905.11946, May 2019.
|
| 303 |
+
|
| 304 |
+
Colin Wei and Tengyu Ma. Improved sample complexities for deep neural networks and robust classification via an all-layer margin. In International Conference on Learning Representations, 2020.
|
| 305 |
+
|
| 306 |
+
Longhui Wei, An Xiao, Lingxi Xie, Xin Chen, Xiaopeng Zhang, and Qi Tian. Circumventing Outliers of AutoAugment with Knowledge Distillation. arXiv e-prints, art. arXiv:2003.11342, March 2020.
|
| 307 |
+
|
| 308 |
+
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in neural information processing systems, pp. 4148–4158, 2017.
|
| 309 |
+
|
| 310 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017. URL http://arxiv.org/ abs/1708.07747.
|
| 311 |
+
|
| 312 |
+
Yoshihiro Yamada, Masakazu Iwamura, and Koichi Kise. Shakedrop regularization. CoRR, abs/1802.02375, 2018. URL http://arxiv.org/abs/1802.02375.
|
| 313 |
+
|
| 314 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. CoRR, abs/1605.07146, 2016. URL http://arxiv.org/abs/1605.07146.
|
| 315 |
+
|
| 316 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. CoRR, abs/1611.03530, 2016. URL http: //arxiv.org/abs/1611.03530.
|
| 317 |
+
|
| 318 |
+
Fan Zhang, Meng Li, Guisheng Zhai, and Yizhao Liu. Multi-branch and multi-scale attention learning for fine-grained visual categorization, 2020.
|
| 319 |
+
|
| 320 |
+
Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
|
| 321 |
+
|
| 322 |
+
Zhilu Zhang and Mert R. Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. CoRR, abs/1805.07836, 2018. URL http://arxiv.org/abs/1805. 07836.
|
| 323 |
+
|
| 324 |
+
# A APPENDIX
|
| 325 |
+
|
| 326 |
+
# A.1 PAC BAYESIAN GENERALIZATION BOUND
|
| 327 |
+
|
| 328 |
+
Below, we state a generalization bound based on sharpness.
|
| 329 |
+
|
| 330 |
+
Theorem 2. For any $\rho > 0$ and any distribution $\mathcal { D }$ , with probability $1 - \delta$ over the choice of the training set $s \sim \mathcal { D }$ ,
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
L _ { \mathcal { D } } ( \boldsymbol { w } ) \leq \operatorname* { m a x } _ { \| \epsilon \| _ { 2 } \leq \rho } L _ { S } ( \boldsymbol { w } + \epsilon ) + \sqrt { \frac { k \log \left( 1 + \frac { \| \boldsymbol { w } \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + 4 \log \frac { n } { \delta } + \tilde { O } ( 1 ) } { n - 1 } }
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
where $n = | S |$ , $k$ is the number of parameters and we assumed $L _ { \mathcal { D } } ( \boldsymbol { w } ) \leq \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \rho ) } [ L _ { \mathcal { D } } ( \boldsymbol { w } + \boldsymbol { \epsilon } ) ] ,$ .
|
| 337 |
+
|
| 338 |
+
The condition $L _ { \mathcal { D } } ( \boldsymbol { w } ) \le \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \rho ) } [ L _ { \mathcal { D } } ( \boldsymbol { w } + \boldsymbol { \epsilon } ) ]$ means that adding Gaussian perturbation should not decrease the test error. This is expected to hold in practice for the final solution but does not necessarily hold for any $\textbf { \em w }$ .
|
| 339 |
+
|
| 340 |
+
Proof. First, note that the right hand side of the bound in the theorem statement is lower bounded by $\sqrt { k \log ( 1 + \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) / ( 4 n ) }$ which is greater than 1 when $\| \pmb { w } \| _ { 2 } ^ { 2 } > \rho ^ { 2 } ( \exp ( 4 n / k ) - 1 )$ . In that case, the right hand side becomes greater than 1 in which case the inequality holds trivially. Therefore, in the rest of the proof, we only consider the case when $\| \pmb { w } \| _ { 2 } ^ { 2 } \leq \rho ^ { \bar { 2 } } ( \mathrm { e x p } ( 4 n / k ) - 1 )$ .
|
| 341 |
+
|
| 342 |
+
The proof technique we use here is inspired from Chatterji et al. (2020). Using PAC-Bayesian generalization bound McAllester (1999) and following Dziugaite & Roy (2017), the following generalization bound holds for any prior $\mathcal { P }$ over parameters with probability $1 - \delta$ over the choice of the training set $s$ , for any posterior $\mathcal { Q }$ over parameters:
|
| 343 |
+
|
| 344 |
+
$$
|
| 345 |
+
\mathbb { E } _ { \pmb { w } \sim \mathcal { A } } [ L _ { \mathcal { D } } ( \pmb { w } ) ] \le \mathbb { E } _ { \pmb { w } \sim \mathcal { Q } } [ L _ { S } ( \pmb { w } ) ] + \sqrt { \frac { K L ( \mathcal { Q } | | \mathcal { P } ) + \log \frac { n } { \delta } } { 2 ( n - 1 ) } }
|
| 346 |
+
$$
|
| 347 |
+
|
| 348 |
+
Moreover, if $\mathscr P = \mathcal N ( \mu _ { P } , \sigma _ { P } ^ { 2 } I )$ and $\mathcal { Q } = \mathcal { N } ( \pmb { \mu } _ { Q } , \sigma _ { Q } ^ { 2 } \pmb { I } )$ , then the KL divergence can be written as follows:
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
K L ( \mathcal { P } | | \mathcal { Q } ) = \frac { 1 } { 2 } \bigg [ \frac { k \sigma _ { Q } ^ { 2 } + \| \pmb { \mu _ { P } } - \pmb { \mu _ { Q } } \| _ { 2 } ^ { 2 } } { \sigma _ { P } ^ { 2 } } - k + k \log \bigg ( \frac { \sigma _ { P } ^ { 2 } } { \sigma _ { Q } ^ { 2 } } \bigg ) \bigg ]
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
Given a posterior standard deviation $\sigma _ { Q }$ , one could choose a prior standard deviation $\sigma _ { P }$ to minimize the above KL divergence and hence the generalization bound by taking the derivative10 of the above
|
| 355 |
+
|
| 356 |
+
KL with respect to $\sigma _ { P }$ and setting it to zero. We would then have $\sigma _ { P } ^ { * } { } ^ { 2 } = \sigma _ { Q } ^ { 2 } + \| \pmb { \mu } _ { P } - \pmb { \mu } _ { Q } \| _ { 2 } ^ { 2 } / k$ However, since $\sigma _ { P }$ should be chosen before observing the training data $s$ and $\mu _ { Q } , \sigma _ { Q }$ could depend on $s$ , we are not allowed to optimize $\sigma _ { P }$ in this way. Instead, one can have a set of predefined values for $\sigma _ { P }$ and pick the best one in that set. See Langford & Caruana (2002) for the discussion around this technique. Given fixed $a , b > 0$ , let $T = \{ c \exp ( ( 1 - j ) / k ) | j \in \mathbb { N } \}$ be that predefined set of values for $\sigma _ { P } ^ { \dot { 2 } }$ . If for any $j \in \mathbb N$ , the above PAC-Bayesian bound holds for $\sigma _ { P } ^ { 2 } = \dot { c } \exp ( ( 1 -$ $j ) / k )$ with probability $1 - \delta _ { j }$ with $\begin{array} { r } { \delta _ { j } ~ = ~ \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } } \end{array}$ π2j2 , then by the union bound, all above bounds hold simultaneously with probability at least $\begin{array} { r } { 1 - \bar { \sum _ { j = 1 } ^ { \infty } } \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } = 1 - \delta } \end{array}$ .
|
| 357 |
+
|
| 358 |
+
Let $\sigma _ { Q } = \rho$ , $\pmb { \mu } _ { Q } = \pmb { w }$ and $\pmb { \mu } _ { P } = \mathbf { 0 }$ . Therefore, we have:
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\sigma _ { Q } ^ { 2 } + \| \pmb { \mu } _ { P } - \pmb { \mu } _ { Q } \| _ { 2 } ^ { 2 } / k \leq \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \leq \rho ^ { 2 } ( 1 + \exp ( 4 n / k ) )
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
We now consider the bound that corresponds to $j = \lfloor 1 - k \log ( ( \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k ) / c ) \rfloor$ . We can ensure that $j \in \mathbb N$ using inequality equation 7 and by setting $c = \rho ^ { 2 } ( 1 + \exp ( 4 n / k ) )$ . Furthermore, for $\sigma _ { P } ^ { 2 } = c \exp ( ( 1 - j ) / k )$ , we have:
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \leq \sigma _ { P } ^ { 2 } \leq \exp ( 1 / k ) \left( \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \right)
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
Therefore, using the above value for $\sigma _ { P }$ , $\mathrm { K L }$ divergence can be bounded as follows:
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\begin{array} { r l } & { K L ( \mathcal { P } | | \mathcal { X } ) = \frac { 1 } { 2 } \bigg [ \frac { k \sigma _ { Q } ^ { 2 } + \| \mu _ { P } - \mu _ { Q } \| _ { 2 } ^ { 2 } } { \sigma _ { P } ^ { 2 } } - k + k \log \bigg ( \frac { \sigma _ { P } ^ { 2 } } { \sigma _ { Q } ^ { 2 } } \bigg ) \bigg ] } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \ \end{array}
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Given the bound that corresponds to $j$ holds with probability $1 - \delta _ { j }$ for $\begin{array} { r } { \delta _ { j } = \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } } \end{array}$ 6δπ2j2 , the log term in the bound can be written as:
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { r l } & { \log \frac { n } { \delta _ { j } } = \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } j ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( c / ( \rho ^ { 2 } + \| w \| _ { 2 } ^ { 2 } / k ) ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( c / \rho ^ { 2 } ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( 1 + \exp ( 4 n / k ) ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } ( 2 + 4 n / k ) ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } ( 2 + 4 n / k ) ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + 2 \log ( 6 n + 3 k ) } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
Therefore, the generalization bound can be written as follows:
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\begin{array} { r } { \tilde { \Sigma } _ { \epsilon _ { i } \sim N ( 0 , \sigma ) } [ L _ { \mathcal { D } } ( w + \epsilon ) ] \leq \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma ) } [ L _ { S } ( w + \epsilon ) ] + \sqrt { \frac { \frac { 1 } { 4 } k \log \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { k \sigma ^ { 2 } } \right) + \frac { 1 } { 4 } + \log \frac { n } { \delta } + 2 \log \left( 6 n + \sigma \right) } { n - 1 } } } \end{array}
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
In the above bound, we have $\epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma )$ . Therefore, $\| \epsilon \| _ { 2 } ^ { 2 }$ has chi-square distribution and by Lemma 1 in Laurent & Massart (2000), we have that for any positive $t$ :
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
P ( \| \epsilon \| _ { 2 } ^ { 2 } - k \sigma ^ { 2 } \ge 2 \sigma ^ { 2 } \sqrt { k t } + 2 t \sigma ^ { 2 } ) \le \exp ( - t )
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
Therefore, with probability $1 - 1 / \sqrt { n }$ we have that:
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
\| \epsilon \| _ { 2 } ^ { 2 } \leq \sigma ^ { 2 } ( 2 \ln ( { \sqrt { n } } ) + k + 2 { \sqrt { k \ln ( { \sqrt { n } } ) } } ) \leq \sigma ^ { 2 } k \left( 1 + { \sqrt { \frac { \ln ( n ) } { k } } } \right) ^ { 2 } \leq \rho ^ { 2 }
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
Substituting the above value for $\sigma$ back to the inequality and using theorem’s assumption gives us following inequality:
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\begin{array} { r l } & { L _ { \mathcal { G } } ( w ) \leq ( 1 - 1 / \sqrt { n } ) \displaystyle \operatorname* { m a x } _ { \| c \| \geq \rho } L s ( w + \epsilon ) + 1 / \sqrt { n } } \\ & { \quad \quad + \sqrt { \frac { 1 } { 4 } k \log \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + \log \frac { n } { \delta } + 2 \log ( 6 n + 3 k ) } } \\ & { \quad \quad \leq \displaystyle \operatorname* { m a x } _ { \| \epsilon \| \geq \rho } L s ( w + \epsilon ) + } \\ & { \quad \quad + \sqrt { \displaystyle \operatorname* { k i m } _ { \rho } \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + 4 \log \frac { n } { \delta } + 8 \log ( 6 n + 3 k ) } } \end{array}
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
# B ADDITIONAL EXPERIMENTAL RESULTS
|
| 407 |
+
|
| 408 |
+
# B.1 SVHN AND FASHION-MNIST
|
| 409 |
+
|
| 410 |
+
We report in table 5 results obtained on SVHN and Fashion-MNIST datasets. On these datasets, SAM allows a simple WideResnet to reach or push state-of-the-art accuracy $0 . 9 9 \%$ error rate for SVHN, $3 . 5 9 \%$ for Fashion-MNIST).
|
| 411 |
+
|
| 412 |
+
For SVHN, we used all the available data (73257 digits for training $\sec + 5 3 1 1 3 1$ additional samples). For auto-augment, we use the best policy found on this dataset as described in (Cubuk et al., 2018) plus cutout (Devries & Taylor, 2017). For Fashion-MNIST, the auto-augmentation line correspond to cutout only.
|
| 413 |
+
|
| 414 |
+
Table 5: Results on SVHN and Fashion-MNIST.
|
| 415 |
+
|
| 416 |
+
<table><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>SVHN</td><td rowspan=1 colspan=1>Fashion-MNIST</td></tr><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Augmentation</td><td rowspan=1 colspan=1>SAM Baseline</td><td rowspan=1 colspan=1>SAM Baseline</td></tr><tr><td rowspan=1 colspan=1>Wide-ResNet-28-10Wide-ResNet-28-10</td><td rowspan=1 colspan=1>BasicAuto augment</td><td rowspan=1 colspan=1>1.42±0.02 1.58±0.030.99±0.01 1.14±0.04</td><td rowspan=1 colspan=1>3.98±0.05 4.57±0.073.61±0.06 3.86±0.14</td></tr><tr><td rowspan=1 colspan=1>Shake-Shake (26 2x96d)Shake-Shake (26 2x96d)</td><td rowspan=1 colspan=1>BasicAuto augment</td><td rowspan=1 colspan=1>1.44±0.02 1.58±0.051.07±0.02 1.03±0.02</td><td rowspan=1 colspan=1>3.97±0.09 4.37±0.063.59±0.01 3.76±0.07</td></tr></table>
|
| 417 |
+
|
| 418 |
+
# C EXPERIMENT DETAILS
|
| 419 |
+
|
| 420 |
+
# C.1 HYPERPARAMETERS FOR EXPERIMENTS
|
| 421 |
+
|
| 422 |
+
We report in table 6 the hyper-parameters selected by gridsearch for the CIFAR experiments, and the ones for SVHN and Fashion-MNIST in 7. For CIFAR10, CIFAR100, SVHN and Fashion-MNIST, we use a batch size of 256 and determine the learning rate and weight decay used to train each model via a joint grid search prior to applying SAM; all other model hyperparameter values are identical to those used in prior work.
|
| 423 |
+
|
| 424 |
+
For the Imagenet results (Resnet models), the models are trained for 100, 200 or 400 epochs on Google Cloud TPUv3 32 cores with a batch size of 4096. The initial learning rate is set to 1.0 and decayed using a cosine schedule. Weight decay is set to 0.0001 with SGD optimizer and momentum $= 0 . 9$ .
|
| 425 |
+
|
| 426 |
+
Table 6: Hyper-parameter used to produce the CIFAR- $\{ 1 0 , 1 0 0 \}$ results
|
| 427 |
+
|
| 428 |
+
<table><tr><td>CIFAR Dataset</td><td>LR</td><td>WD</td><td>p (CIFAR-10)</td><td>p (CIFAR-100)</td></tr><tr><td>WRN 28-10 (200 epochs)</td><td>0.1</td><td>0.0005</td><td>0.05</td><td>0.1</td></tr><tr><td>WRN 28-10 (1800 epochs)</td><td>0.05</td><td>0.001</td><td>0.05</td><td>0.1</td></tr><tr><td>WRN26-2x6ShakeShake</td><td>0.02</td><td>0.0010</td><td>0.02</td><td>0.05</td></tr><tr><td>Pyramid vanilla</td><td>0.05</td><td>0.0005</td><td>0.05</td><td>0.2</td></tr><tr><td>Pyramid ShakeDrop (CIFAR-10)</td><td>0.02</td><td>0.0005</td><td>0.05</td><td>1</td></tr><tr><td>Pyramid ShakeDrop (CIFAR-100)</td><td>0.05</td><td>0.0005</td><td>1</td><td>0.05</td></tr></table>
|
| 429 |
+
|
| 430 |
+
Table 7: Hyper-parameter used to produce the SVHN and Fashion-MNIST results
|
| 431 |
+
|
| 432 |
+
<table><tr><td></td><td>LR</td><td>WD</td><td>p</td></tr><tr><td rowspan="2">SVHN</td><td>WRN 0.01</td><td>0.0005</td><td>0.01</td></tr><tr><td>ShakeShake 0.01</td><td>0.0005</td><td>0.01</td></tr><tr><td rowspan="2">Fashion</td><td>WRN 0.1</td><td>0.0005</td><td>0.05</td></tr><tr><td>ShakeShake 0.1</td><td>0.0005</td><td>0.02</td></tr></table>
|
| 433 |
+
|
| 434 |
+
Finally, for the noisy label experiments, we also found $\rho$ by gridsearch, computing the accuracy on a (non-noisy) validation set composed of a random subset of $10 \%$ of the usual CIFAR training samples. We report the validation accuracy of the bootstrapped version of SAM for different levels of noise and different $\rho$ in table 8.
|
| 435 |
+
|
| 436 |
+
<table><tr><td></td><td>20%</td><td>40%</td><td>60%</td><td>80%</td></tr><tr><td>0</td><td>15.0%</td><td>31.2%</td><td>52.3%</td><td>73.5%</td></tr><tr><td>0.01</td><td>13.7%</td><td>28.7%</td><td>50.1%</td><td>72.9%</td></tr><tr><td>0.02</td><td>12.8%</td><td>27.8%</td><td>48.9%</td><td>73.1%</td></tr><tr><td>0.05</td><td>11.6%</td><td>25.6%</td><td>47.1%</td><td>21.0%</td></tr><tr><td>0.1</td><td>4.6%</td><td>6.0%</td><td>8.7%</td><td>56.1%</td></tr><tr><td>0.2</td><td>5.3%</td><td>7.4%</td><td>23.3%</td><td>77.1%</td></tr><tr><td>0.5</td><td>17.6%</td><td>40.9%</td><td>80.1%</td><td>89.9%</td></tr></table>
|
| 437 |
+
|
| 438 |
+
Table 8: Validation accuracy of the bootstrapped-SAM for different levels of noise and different $\rho$
|
| 439 |
+
|
| 440 |
+
# C.2 FINETUNING DETAILS
|
| 441 |
+
|
| 442 |
+
Weights are initialized to the values provided by the publicly available checkpoints, except the last dense layer, which change size to accomodate the new number of classes, that is randomly initialized. We train all models with weight decay $1 e ^ { - 5 }$ as suggested in (Tan & Le, 2019), but we reduce the learning rate to 0.016 as the models tend to diverge for higher values. We use a batch size of 1024 on Google Cloud TPUv3 64 cores and cosine learning rate decay. Because other works train with batch size of 256, we train for 5k steps instead of $2 0 \mathrm { k }$ . We freeze the batch norm statistics and use them for normalization, effectively using the batch norm as we would at test time 11 We train the models using SGD with momentum 0.9 and cosine learning rate decay. For Efficientnet-L2, we use this time a batch size 512 to save memory and adjusted the number of training steps accordingly. For CIFAR, we use the same autoaugment policy as in the previous experiments. We do not use data augmentation for the other datasets, applying the same preprocessing as for the Imagenet experiments. We also scale down the learning rate to 0.008 as the batch size is now twice as small. We used Google Cloud TPUv3 128 cores. All other parameters stay the same. For Imagenet, we trained both models from checkpoint for 10 epochs using a learning rate of 0.1 and $\rho = 0 . 0 5$ . We do not randomly initialize the last layer as we did for the other datasets, but instead use the weights included in the checkpoint.
|
| 443 |
+
|
| 444 |
+
# C.3 EXPERIMENTAL RESULTS WITH $\rho = 0 . 0 5$
|
| 445 |
+
|
| 446 |
+
A big sensitivity to the choice of hyper-parameters would make a method less easy to use. To demonstrate that SAM performs even when $\rho$ is not finely tuned, we compiled the table for the CIFAR and the finetuning experiments using $\rho = 0 . 0 5$ . Please note that we already used $\rho = 0 . 0 5$ for all Imagenet experiments. We report those scores in table 9 and 10.
|
| 447 |
+
|
| 448 |
+
Table 9: Results for the Cifar10/Cifar100 experiments, using $\rho \quad = \quad 0 . 0 5$ for all models/datasets/augmentations
|
| 449 |
+
|
| 450 |
+
<table><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>Cifar10</td><td rowspan=1 colspan=3>Cifar100</td></tr><tr><td rowspan=1 colspan=2>Model Augmentation</td><td rowspan=1 colspan=1>p=0.05 SGD</td><td rowspan=1 colspan=3>rho=0.05 SGD</td></tr><tr><td rowspan=4 colspan=1>WRN-28-10 (200 epochs)WRN-28-10 (200 epochs)WRN-28-10 (200 epochs)</td><td rowspan=4 colspan=1>BasicCutoutAA</td><td rowspan=4 colspan=1>2.7 3.52.3 2.62.1 2.3</td><td rowspan=1 colspan=3>16.5 18.8</td></tr><tr><td rowspan=1 colspan=1></td><td></td><td rowspan=1 colspan=1>14.9 16.9</td></tr><tr><td rowspan=2 colspan=1></td><td></td><td></td></tr><tr><td rowspan=1 colspan=3>13.6 15.8</td></tr><tr><td rowspan=2 colspan=1>WRN-28-10 (1800 epochs)WRN-28-10 (1800 ep0chs)WRN-28-10 (1800 epochs)</td><td rowspan=2 colspan=1>BasicCutoutAA</td><td rowspan=2 colspan=1>2.4 3.52.1 2.71.6 2.2</td><td rowspan=1 colspan=2>16.3</td><td rowspan=1 colspan=1>16.3 19.1</td></tr><tr><td rowspan=1 colspan=3>14.0 17.412.8 16.1</td><td rowspan=1 colspan=2>14.0 17.4</td></tr><tr><td rowspan=2 colspan=1>WRN 26-2x6 ssWRN 26-2x6 ssWRN 26-2x6 ss</td><td rowspan=2 colspan=1>BasicCutoutAA</td><td rowspan=2 colspan=1>2.4 2.72.0 2.31.7 1.9</td><td rowspan=1 colspan=3>15.1 17.0</td></tr><tr><td rowspan=1 colspan=3>14.2 15.712.8 14.1</td></tr><tr><td rowspan=3 colspan=1>PyramidNetPyramidNetPyramidNet</td><td rowspan=3 colspan=1>BasicCutoutAA</td><td rowspan=3 colspan=1>2.1 4.01.6 2.51.4 1.9</td><td rowspan=1 colspan=3>15.4 19.7</td></tr><tr><td rowspan=1 colspan=3>13.1 16.4</td></tr><tr><td rowspan=1 colspan=3>12.1 14.6</td></tr><tr><td rowspan=3 colspan=1>PyramidNet+ShakeDropPyramidNet+ShakeDropPyramidNet+ShakeDrop</td><td rowspan=3 colspan=1>BasicCutoutAA</td><td rowspan=1 colspan=1>2.1 2.5</td><td rowspan=1 colspan=3>13.3 14.5</td></tr><tr><td rowspan=2 colspan=1>1.6 1.91.4 1.6</td><td rowspan=1 colspan=3>11.3 11.8</td></tr><tr><td rowspan=1 colspan=3>10.3 10.6</td></tr></table>
|
| 451 |
+
|
| 452 |
+
Table 10: Results for the the finetuning experiments, using $\rho = 0 . 0 5$ for all datasets.
|
| 453 |
+
|
| 454 |
+
<table><tr><td>Dataset</td><td>Efficientnet-b7 + SAM (optimal)</td><td>Efficientnet-b7 + SAM (p= 0.05)</td><td>Efficientnet-b7</td></tr><tr><td>FGVC_Aircraft</td><td>6.80</td><td>7.06</td><td>8.15</td></tr><tr><td>Flowers</td><td>0.63</td><td>0.81</td><td>1.16</td></tr><tr><td>Oxford_IIIT_Pets</td><td>3.97</td><td>4.15</td><td>4.24</td></tr><tr><td>Stanford_Cars</td><td>5.18</td><td>5.57</td><td>5.94</td></tr><tr><td>cifar10</td><td>0.88</td><td>0.88</td><td>0.95</td></tr><tr><td>cifar100</td><td>7.44</td><td>7.56</td><td>7.68</td></tr><tr><td>Birdsnap</td><td>13.64</td><td>13.64</td><td>14.30</td></tr><tr><td>Food101</td><td>7.02</td><td>7.06</td><td>7.17</td></tr></table>
|
| 455 |
+
|
| 456 |
+
# C.4 ABLATION OF THE SECOND ORDER TERMS
|
| 457 |
+
|
| 458 |
+
As described in section 2, computing the gradient of the sharpness aware objective yield some second order terms that are more expensive to compute. To analyze this ablation more in depth, we trained a Wideresnet- $4 0 { \mathrm { x } } 2 $ on CIFAR-10 using SAM with and without discarding the second order terms during training. We report the cosine similarity of the two updates in figure 5, along the training trajectory of both experiments. We also report the training error rate (evaluated at $\pmb { w } + \hat { \epsilon } ( \pmb { w } ) )$ ) and the test error rate (evaluated at $\pmb { w }$ ).
|
| 459 |
+
|
| 460 |
+
We observe that during the first half of the training, discarding the second order terms does not impact the general direction of the training, as the cosine similarity between the first and second order updates are very close to 1. However, when the model nears convergence, the similarity between both types of updates becomes weaker. Fortunately, the model trained without the second order terms reaches a lower test error, showing that the most efficient method is also the one providing the best generalization on this example. The reason for this is quite unclear and should be analyzed in follow up work.
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
Figure 4: Training and test error for the first and second order version of the algorithm.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 5: Cosine similarity between the first and second order updates.
|
| 467 |
+
|
| 468 |
+
# C.5 CHOICE OF P-NORM
|
| 469 |
+
|
| 470 |
+
Our theorem is derived for $p = 2$ , although generalizations can be considered for $p \in [ 1 , + \infty ]$ (the expression of the bound becoming way more involved). Empirically, we validate that the choice $p = 2$ is optimal by training a wide resnet on cifar10 with SAM for $p = \infty$ (in which case we have $\hat { \epsilon } ( \pmb { w } ) = \bar { \rho } \mathrm { s i g n } ( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) ) )$ and $p = 2$ (giving $\begin{array} { r } { \hat { \pmb { \epsilon } } ( \pmb { w } ) = \frac { \rho } { | | \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | | _ { 2 } ^ { 2 } } \big ( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \big ) \big ) } \end{array}$ . We do not consider the case $p = 1$ which would give us a perturbation on a single weight. As an additional ablation study, we also use random weight perturbations of a fixed Euclidean norm: $\begin{array} { r } { \hat { \epsilon } ( w ) = \frac { \rho } { | | z | | _ { 2 } ^ { 2 } } z } \end{array}$ with $\boldsymbol { z } \sim \mathcal { N } ( \mathbf { 0 } , \boldsymbol { I } _ { d } )$ . We report the test accuracy of the model in figure 6.
|
| 471 |
+
|
| 472 |
+

|
| 473 |
+
Figure 6: Test accuracy for a wide resnet trained on CIFAR10 with SAM, for different perturbation norms.
|
| 474 |
+
|
| 475 |
+
We observe that adversarial perturbations outperform random perturbations, and that using $p = 2$ yield superior accuracy on this example.
|
| 476 |
+
|
| 477 |
+
# C.6 SEVERAL ITERATIONS IN THE INNER MAXIMIZATION
|
| 478 |
+
|
| 479 |
+
To empirically verify that the linearization of the inner problem is sensible, we trained a WideResnet on the CIFAR datasets using a variant of SAM that performs several iterations of projected gradient ascent to estimate max $L ( w + \epsilon )$ . We report the evolution of max $L ( w + \epsilon ) - L ( w )$ during training (where $L$ stands for the training error rate computed on the current batch) in Figure 7, along with the test accuracy and the estimated sharpness $\begin{array} { r } { ( \operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w ) ) } \end{array}$ at the end of training in Table 11; we report means and standard deviations across 20 runs.
|
| 480 |
+
|
| 481 |
+
For most of the training, one projected gradient step (as used in standard SAM) is sufficient to obtain a good approximation of the $\epsilon$ found with multiple inner maximization steps. We however observe that this approximation becomes weaker near convergence, where doing several iterations of projected gradient ascent yields a better $\epsilon$ (for example, on CIFAR-10, the maximum loss found on each batch is about $3 \%$ more when doing 5 steps of inner maximization, compared to when doing a single step). That said, as seen in Table 11, the test accuracy is not strongly affected by the number of inner maximization iterations, though on CIFAR-100 it does seem that several steps outperform a single step in a statistically significant way.
|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
Figure 7: Evolution of $\operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w )$ vs. training step, for different numbers of inner projected gradient steps.
|
| 485 |
+
|
| 486 |
+
<table><tr><td rowspan="2">Numberof projected gradient steps</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>Test error</td><td>Estimated sharpness</td><td>Test error</td><td>Estimated sharpness</td></tr><tr><td>1</td><td>2.77±0.03</td><td>0.17±0.03</td><td>16.72±0.08</td><td>0.82±0.05</td></tr><tr><td>2</td><td>2.76±0.03</td><td>0.82±0.03</td><td>16.59±0.08</td><td>1.83±0.05</td></tr><tr><td>3</td><td>2.73±0.04</td><td>1.49±0.05</td><td>16.62±0.09</td><td>2.36±0.03</td></tr><tr><td>5</td><td>2.77±0.03</td><td>2.26±0.05</td><td>16.60±0.06</td><td>2.82±0.04</td></tr></table>
|
| 487 |
+
|
| 488 |
+
Table 11: Test error rate and estimated sharpness $\begin{array} { r } { ( \operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w ) ) } \end{array}$ at the end of the training.
|
md/train/GFV8IVyMM4n/GFV8IVyMM4n.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Deep Marching Tetrahedra: a Hybrid Representation for High-Resolution 3D Shape Synthesis
|
| 2 |
+
|
| 3 |
+
Tianchang Shen 1,2,3 Jun Gao1,2,3 Kangxue Yin 1
|
| 4 |
+
|
| 5 |
+
Ming-Yu Liu 1 Sanja Fidler1,2,3
|
| 6 |
+
|
| 7 |
+
NVIDIA1 University of Toronto2 Vector Institute3
|
| 8 |
+
|
| 9 |
+
{frshen, jung, kangxuey, mingyul, sfidler}@nvidia.com
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
We introduce DMTET, a deep 3D conditional generative model that can synthesize high-resolution 3D shapes using simple user guides such as coarse voxels. It marries the merits of implicit and explicit 3D representations by leveraging a novel hybrid 3D representation. Compared to the current implicit approaches, which are trained to regress the signed distance values, DMTET directly optimizes for the reconstructed surface, which enables us to synthesize finer geometric details with fewer artifacts. Unlike deep 3D generative models that directly generate explicit representations such as meshes, our model can synthesize shapes with arbitrary topology. The core of DMTET includes a deformable tetrahedral grid that encodes a discretized signed distance function and a differentiable marching tetrahedra layer that converts the implicit signed distance representation to the explicit surface mesh representation. This combination allows joint optimization of the surface geometry and topology as well as generation of the hierarchy of subdivisions using reconstruction and adversarial losses defined explicitly on the surface mesh. Our approach significantly outperforms existing work on conditional shape synthesis from coarse voxel inputs, trained on a dataset of complex 3D animal shapes. Project page: https://nv-tlabs.github.io/DMTet/.
|
| 14 |
+
|
| 15 |
+
# 1 Introduction
|
| 16 |
+
|
| 17 |
+
Fields such as simulation, architecture, gaming, and film rely on high-quality 3D content with rich geometric details and complex topology. However, creating such content requires tremendous expert human effort. It takes a significant amount of development time to create each individual 3D asset. In contrast, creating rough 3D shapes with simple building blocks like voxels has been widely adopted. For example, Minecraft has been used by hundreds of millions of users for creating 3D content. Most of them are non-experts. Developing A.I. tools that enable regular people to upscale coarse, voxelized objects into high resolution, beautiful 3D shapes would bring us one step closer to democratizing high-quality 3D content creation. Similar tools can be envisioned for turning 3D scans of objects recorded by modern phones into high-quality forms. Our work aspires to create such capabilities.
|
| 18 |
+
|
| 19 |
+
A powerful 3D representation is a critical component of a learning-based 3D content creation framework. A good 3D representation for high-quality reconstruction and synthesis should capture local geometric details and represent objects with arbitrary topology while also being memory and computationally efficient for fast inference in interactive applications.
|
| 20 |
+
|
| 21 |
+
Recently, neural implicit representations [8, 39, 42, 51], which use a neural network to implicitly represent a shape via a signed distance field (SDF) or an occupancy field (OF), have emerged as an effective 3D representation. Neural implicits have the benefit of representing complex geometry and topology, not limited to a predefined resolution. The success of these methods has been shown in shape compression [49, 13, 51], single-image shape generation [47, 60, 48], and point cloud reconstruction [57]. However, most of the current implicit approaches are trained by regressing to SDF or OF values and cannot utilize an explicit supervision on the target surface, which imposes useful constraints for training. To mitigate this issue, several works [45, 31] proposed to utilize iso-surfacing techniques such as the Marching Cubes (MC) algorithm to extract a surface mesh from the implicit representation, which, however, is computationally expensive.
|
| 22 |
+
|
| 23 |
+
In this work, we introduce DMTET, a deep 3D conditional generative model for high-resolution 3D shape synthesis from user guides in the form of coarse voxels. In the heart of DMTET is a new differentiable shape representation that marries implicit and explicit 3D representations. In contrast to deep implicit approaches optimized for predicting sign distance (or occupancy) values, our model employs additional supervision on the surface, which empirically renders higher quality shapes with finer geometric details. Compared to methods that learn to directly generate explicit representations, such as meshes [54], by committing to a preset topology, our DMTET can produce shapes with arbitrary topology. Specifically, DMTET predicts the underlying surface parameterized by an implicit function encoded via a deformable tetrahedral grid. The underlying surface is converted into an explicit mesh with a Marching Tetrahedra (MT) algorithm, which we show is differentiable and more performant than the Marching Cubes. DMTET maintains efficiency by learning to adapt the grid resolution by deforming and selectively subdividing tetrahedra. This has the effect of spending computation only on the relevant regions in space. We achieve further gains in the overall quality of the output shape with learned surface subdivision. Our DMTET is end-to-end differentiable, allowing the network to jointly optimize the geometry and topology of the surface, as well as the hierarchy of subdivisions using a loss function defined explicitly on the surface mesh.
|
| 24 |
+
|
| 25 |
+
We demonstrate our DMTET on two challenging tasks: 3D shape synthesis from coarse voxel inputs and point cloud 3D reconstruction. We outperform existing state-of-the-art methods by a significant margin while being 10 times faster than alternative implicit representation-based methods at inference time. In summary, we make the following technical contributions:
|
| 26 |
+
|
| 27 |
+
1. We show that using Marching Tetrahedra (MT) as a differentiable iso-surfacing layer allows topological change for the underlying shape represented by a implicit field, in contrast to the analysis in prior works [31, 45].
|
| 28 |
+
2. We incorporate MT in a DL framework and introduce DMTET, a hybrid representation that combines implicit and explicit surface representations. We demonstrate that the additional supervision (e.g. chamfer distance, adversarial loss) defined directly on the extracted surface from implicit field improves the shape synthesis quality.
|
| 29 |
+
3. We introduce a coarse-to-fine optimization strategy that scales DMTET to high resolution during training. We thus achieves better reconstruction quality than state-of-the-art methods on challenging 3D shape synthesis tasks, while requiring a lower computation cost.
|
| 30 |
+
|
| 31 |
+
# 2 Related Work
|
| 32 |
+
|
| 33 |
+
We review the related work on learning-based 3D synthesis methods based on their 3D representations.
|
| 34 |
+
|
| 35 |
+
Voxel-based Methods Early work [59, 10, 38] represented 3D shapes as voxels, which store the coarse occupancy (inside/outside) values on a regular grid, which makes powerful convolutional neural networks native and renders impressive results on 3D reconstruction and synthesis [12, 11, 58, 2]. For high-resolution shape synthesis, DECOR-GAN [6] transfers geometric details from a high-resolution shape represented in voxel to a low-resolution shape by utilizing a discriminator defined on 3D patches of the voxel grid. However, the computational and memory costs grow cubically as the resolution increases, prohibiting the reconstruction of fine geometric details and smooth curves. One common way to address this limitation is building hierarchical structures such as octrees [46, 52, 55, 56, 24, 52], which adapt the grid resolution locally based on the underlying shape. In this paper, we adopt a hierarchical deformable tetrahedral grid to utilize the resolution better. Unlike octree-based shape synthesis, our network learns grid deformation and subdivision jointly to better represent the surface without relying on explicit supervision from a pre-computed hierarchy.
|
| 36 |
+
|
| 37 |
+
Deep Implicit Fields (DIFs) represent a 3D shape as a zero level set of a continuous function parameterized by a neural network [39, 44, 17, 40]. This formulation can represent arbitrary typology and has infinite resolution. DIF-based shape synthesis approaches have demonstrated strong performance in many applications, including single view 3D reconstruction [60, 30, 47, 48], shape manipulation, and synthesis [26, 21, 28, 14, 1, 9]. However, as these approaches are trained by minimizing the reconstruction loss of function values at a set of sampled 3D locations (a rough proxy of the surface), they tend to render artifacts when synthesizing fine details. Furthermore, if one desires a mesh to be extracted from a DIF, an expensive iso-surfacing step based on Marching Cubes [36] or Marching Tetrahedra [15] is required. Due to the computational burden, iso-surfacing is often done on a smaller resolution, hence prone to quantization errors. Lei et al. [29] proposes an analytic meshing solution to reduce the error, but is only applicable to DIFs parametrized by MLPs with ReLU activation. Our representation scales to high resolution and does not require additional modification to the backward pass for training end-to-end. DMTET can represent arbitrary typology, and is trained via direct supervision on the generated surface. Recent works [1, 9] learn to regress unsigned distance to triangle soup or point cloud. However, their iso-surfacing formulation is not differentiable in contrast to DMTET.
|
| 38 |
+
|
| 39 |
+

|
| 40 |
+
Figure 1: DMTET reconstructs the shape implicitly in a coarse-to-fine manner by predicting the SDF defined on a deformable tetrahedral grid. It then converts the SDF to a surface mesh by a differentiable Marching Tetrahedra layer. DMTET is trained by optimizing the objective function defined on the final surface.
|
| 41 |
+
|
| 42 |
+
Surface-based Methods directly predict triangular meshes and have achieved impressive results for reconstructing and synthesizing simpler shapes [54, 23, 5, 41, 7]. Typically, they predefined the topology of the shape, e.g. equivalent to a sphere [54, 5, 25], or a union of primitives [43, 53, 19] or a set of segmented parts [61, 62, 50]. As a result, they can not model a distribution of shapes with complex topology variations. Recently, DefTet [18] represents a mesh with a deformable tetrahedral grid where the grid vertex coordinates and the occupancy values are learned. However, similar to voxel-based methods, the computational costf increases cubically with the grid resolution. Furthermore, as the occupancy loss for supervising topology learning and the surface loss for supervising geometry learning do not support joint training, it tends to generate suboptimal results. In contrast, our method is able to synthesize high-resolution 3D shapes, not shown in previous work.
|
| 43 |
+
|
| 44 |
+
# 3 Deep Marching Tetrahedra
|
| 45 |
+
|
| 46 |
+
We now introduce our DMTET for synthesizing high-quality 3D objects. The schematic illustration is provided in Fig. 1. Our model relies on a new, hybrid 3D representation specifically designed for high-resolution reconstruction and synthesis, which we describe in Sec. 3.1. In Sec. 3.2, we describe the neural network architecture of DMTET that predicts the shape representation from inputs such as coarse voxels. We provide the training objectives in Sec. 3.3.
|
| 47 |
+
|
| 48 |
+
# 3.1 3D Representation
|
| 49 |
+
|
| 50 |
+
We represent a shape using a sign distance field (SDF) encoded with a deformable tetrahedral grid, adopted from DefTet [18, 20]. The grid fully tetrahedralizes a unit cube, where each cell in the volume is a tetahedron with 4 vertices and faces. The key aspect of this representation is that the grid vertices can deform to represent the geometry of the shape more efficiently. While the original DefTet encoded occupancy defined on each tetrahedron, we here encode signed distance values defined on the vertices of the grid and represent the underlying surface implicitly (Sec. 3.1.1). The use of signed distance values, instead of occupancy values, provides more flexibility in representing the underlying surface. For greater representation power while keeping memory and computation manageable, we further selectively subdivide the tetrahedra around the predicted surface (Sec. 3.1.2). We convert the signed distance-based implicit representation into a triangular mesh using a marching tetrahedra layer, which we discuss in Sec. 3.1.3. The final mesh is further converted into a parameterized surface with a differentiable surface subdivision module, described in Sec. 3.1.4.
|
| 51 |
+
|
| 52 |
+
# 3.1.1 Deformable Tetrahedral Mesh as an Approximation of an Implicit Function
|
| 53 |
+
|
| 54 |
+
We adopt and extend the deformable tetrahedral grid introduced in Gao et al. [18], which we denote with $( V _ { T } , T )$ , where $V _ { T }$ are the vertices in the tetrahedral grid $T$ . Following the notation in [18], each tetrahedron $T _ { k } \in T$ is represented with four vertices $\left\{ v _ { a _ { k } } , v _ { b _ { k } } , v _ { c _ { k } } , v _ { d _ { k } } \right\}$ , with $k \in \{ 1 , . . . . , K \}$ , where $K$ is the total number of tetrahedra and $v _ { i _ { k } } \in V _ { T }$ .
|
| 55 |
+
|
| 56 |
+
We represent the sign distance field by interpolating SDF values defined on the vertices of the grid. Specifically, we denote the SDF value in vertex $v _ { i } \in V _ { T }$ as $s ( v _ { i } )$ . SDF values for the points that lie inside the tetrahedron follow a barycentric interpolation of the SDF values of the four vertices that encapsulates the point.
|
| 57 |
+
|
| 58 |
+
# 3.1.2 Volume Subdivision
|
| 59 |
+
|
| 60 |
+
We represent shape in a coarse to fine manner for efficiency. We determine the surface tetrahedra $T _ { s u r f }$ by checking whether a tetrahedron has vertices with different SDF signs – indicating that it intersects the surface encoded by the SDF. We subdivide $T _ { s u r f }$ as well as their immediate neighbors and increase resolution by adding the mid point to each edge. We compute SDF values of the new vertices by averaging the SDF values on the edge (Fig. 2).
|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
Figure 2: Volume Subdivision: Each surface tet.(blue) is divided into 8 tet.(red) by adding midpoints.
|
| 64 |
+
|
| 65 |
+
# 3.1.3 Marching Tetrahedra for converting between an Implicit and Explicit Representation
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 3: Three unique surface configurations in MT. Vertex color indicates the sign of signed distance value. Notice that flipping the signs of all vertices will result in the same surface configuration. Position of the vertex is linearly interpolated along the edges with sign change.
|
| 69 |
+
|
| 70 |
+
We use the Marching Tetrahedra [15] algorithm to convert the encoded SDF into an explicit triangular mesh. Given the SDF values $\mathbf { \bar { \{ } } s ( v _ { a } ) , s ( \mathbf { \bar { { v } } } _ { b } ) , s ( v _ { c } ) , s ( v _ { d } ) \}$ of the vertices of a tetrahedron, MT determines the surface typology inside the tetrahedron based on the signs of $s ( v )$ , which is illustrated in Fig. 3. The total number of configurations is $2 ^ { 4 } = { \bar { 1 } } 6$ , which falls into 3 unique cases after considering rotation symmetry. Once the surface typology inside the tetrahedron is identified, the vertex location of the iso-surface is computed at the zero crossings of the linear interpolation along the tetrahedron’s edges, as shown in Fig. 3.
|
| 71 |
+
|
| 72 |
+
Prior works [45, 31] argue that the singularity in this formulation, i.e. when $s ( v _ { a } ) = s ( v _ { b } )$ , prevents the change of surface typology (sign change of $s ( v _ { a } ) )$ ) during training. However, we find that, in practise, the equation is only evaluated when $\mathrm { s i g n } ( s ( v _ { a } ) ) \neq \mathrm { s i g n } ( s ( v _ { b } ) )$ . Thus, during training, the singularity never happens and the gradient from a loss defined on the extracted iso-surface (Sec. 3.3), can be back-propagated to both vertex positions and SDF values via the chain rule. A more detailed analysis is in the Appendix.
|
| 73 |
+
|
| 74 |
+
# 3.1.4 Surface Subdivision
|
| 75 |
+
|
| 76 |
+
Having a surface mesh as output allows us to further increase the representation power and the visual quality of the shapes with a differentiable surface subdivision module. We follow the scheme of the Loop Subdivision method [35], but instead of using a fixed set of parameters for subdivision, we make these parameters learnable in DMTET. Specifically, learnable parameters include the positions of each mesh vertex $\boldsymbol { v } _ { i } ^ { \prime }$ , as well as $\alpha _ { i }$ which controls the generated surface via weighting the smoothness of neighbouring vertices. Note that different from Liu et al. [33], we only predict the per-vertex parameter at the beginning and carry it over to subsequent subdivision iterations to attain a lower computational cost. We provide more details in Appendix.
|
| 77 |
+
|
| 78 |
+
# 3.2 DMTET: 3D Deep Conditional Generative Model
|
| 79 |
+
|
| 80 |
+
Our DMTET is a neural network that utilizes our proposed 3D representation and aims to output a high resolution 3D mesh $M$ from input $x$ (a point cloud or a coarse voxelized shape). We describe the architecture (Fig. 4) of the generator for each module of our 3D representation in Sec. 3.2.1, with the architecture of the discriminator presented in Sec. 3.2.2. Further details are in Appendix.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
Figure 4: Our generator and discriminator architectures. The generator is composed of two parts—one utilizes MLP to generate the initial predictions for all grid vertices and the other uses GCN to refine the surface.
|
| 84 |
+
|
| 85 |
+
# 3.2.1 3D Generator
|
| 86 |
+
|
| 87 |
+
Input Encoder We use PVCNN [34] as an input encoder to extract a 3D feature volume $F _ { v o l } ( x )$ from a point cloud. When the input is a coarse voxelized shape, we sample points on its surface. We compute a feature vector $F _ { v o l } ( v , x )$ for a grid vertex $v \in \mathbb { R } ^ { 3 }$ via trilinear interpolation.
|
| 88 |
+
|
| 89 |
+
Initial Prediction of SDF We predict the SDF value for each vertex in the initial deformable tetrahedral grid using a fully-connected network $s ( v ) = M L P ( F _ { v o l } ( v , x ) , v )$ . The fully-connected network additionally outputs a feature vector $f ( v )$ , which is used for the surface refinement in the volume subdivision stage.
|
| 90 |
+
|
| 91 |
+
Surface Refinement with Volume Subdivision After obtaining the initial SDF, we iteratively refine the surface and subdivide the tetrahedral grid. We first identify surface tetrahedra $T _ { s u r f }$ based on the current $s ( v )$ value. We then build a graph $G = ( V _ { s u r f } , E _ { s u r f } )$ , where $V _ { s u r f } , E _ { s u r f }$ correspond to the vertices and edges in $T _ { s u r f }$ . We then predict the position offsets $\Delta v _ { i }$ and SDF residual values $\Delta s ( v _ { i } )$ for each vertex $i$ in $V _ { s u r f }$ using a Graph Convolutional Network [32] (GCN):
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\begin{array} { r c l } { f _ { v _ { i } } ^ { \prime } } & { = } & { \mathsf { c o n c a t } ( v _ { i } , s ( v _ { i } ) , F _ { v o l } ( v _ { i } , x ) , f ( v _ { i } ) ) , } \\ { ( \Delta v _ { i } , \Delta s ( v _ { i } ) , \overline { { f ( v _ { i } ) } } ) _ { i = 1 , \cdots N _ { s u r f } } } & { = } & { \mathsf { G C N } \big ( ( f _ { v _ { i } } ^ { \prime } ) _ { i = 1 , \cdots N _ { s u r f } } , G \big ) , } \end{array}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
where $N _ { s u r f }$ is the total number of vertices in $V _ { s u r f }$ and $\overline { { f ( v _ { i } ) } }$ is the updated per-vertex feature. The vertex position and the SDF value for vertex $v _ { i }$ are updated as $v _ { i } ^ { \prime } = v _ { i } + \Delta v _ { i }$ and $s ( v _ { i } ^ { \prime } ) =$ $s ( v _ { i } ) + \Delta s ( v _ { i } )$ . This refinement step can potentially flip the sign of the SDF values to refine the local typology, and also move the vertices thus improving the local geometry.
|
| 98 |
+
|
| 99 |
+
After surface refinement, we perform the volume subdivision step followed by an additional surface refinement step. In particular, we re-identify $T _ { s u r f }$ and subdivide $T _ { s u r f }$ and their immediate neighbors. We drop the unsubdivided tetrahedra from the full tetrahedral grid in both steps, which saves memory and computation, as the size of the $T _ { s u r f }$ is proportional to the surface area of the object, and scales up quadratically rather than cubically as the grid resolution increases.
|
| 100 |
+
|
| 101 |
+
Note that the SDF values and positions of the vertices are inherited from the level before subdivision, thus, the loss computed at the final surface can back-propagate to all vertices from all levels. Therefore, our DMTET automatically learns to subdivide the tetrahedra and does not need an additional loss term in the intermediate steps to supervise the learning of the octree hierarchy as in the prior work [52].
|
| 102 |
+
|
| 103 |
+
Learnable Surface Subdivision After extracting the surface mesh using MT, we can further apply learnable surface subdivision. Specifically, we build a new graph on the extracted mesh, and use GCN to predict the updated position of each vertex $\boldsymbol { v } _ { i } ^ { \prime }$ , and $\alpha _ { i }$ for Loop Subvidision. This step removes the quantization errors and mitigates the approximation errors from the classic Loop Subdivision by adjusting $\alpha _ { i }$ , which are fixed in the classic method.
|
| 104 |
+
|
| 105 |
+
# 3.2.2 3D Discriminator
|
| 106 |
+
|
| 107 |
+
We apply a 3D discriminator $D$ on the final surface predicted from the generator. We empirically find that using a 3D CNN from DECOR-GAN [6] as the discriminator on the signed distance field that is computed from the predicted mesh is effective to capture the local details. Specifically, we first randomly select a high-curvature vertex $v$ from the target mesh and compute the ground truth signed distance field $S _ { r e a l } \in \mathbb { R } ^ { N \times N \times N }$ at a voxelized region around $v$ . Similarly, we compute the signed distance field of the predicted surface mesh $M$ at the same location to obtain $S _ { p r e d } \in \mathbb { R } ^ { N \times \tilde { N } \times N }$ . Note that $S _ { p r e d }$ is an analytical function of the mesh $M$ , and thus the gradient to $S _ { p r e d }$ can backpropagate to the vertex positions in $M$ . We feed $S _ { r e a l }$ or $S _ { p r e d }$ into the discriminator, along with the feature vector $F _ { v o l } ( v , x )$ in position $v$ . The discriminator then predicts the probability indicating whether the input comes from the real or generated shapes.
|
| 108 |
+
|
| 109 |
+
# 3.3 Loss Function
|
| 110 |
+
|
| 111 |
+
DMTET is end-to-end trainable. We supervise all modules to minimize the error defined on the final predicted mesh $M$ . Our loss function contains three different terms: a surface alignment loss to encourage the alignment with ground truth surface, an adversarial loss to improve realism of the generated shape, and regularizations to regularize the behavior of SDF and vertex deformations.
|
| 112 |
+
|
| 113 |
+
Surface Alignment loss We sample a set of points $P _ { g t }$ from the surface of the ground truth mesh $M _ { g t }$ . Similarly, we also sample a set of points from $M _ { p r e d }$ to obtain $P _ { p r e d }$ , and minimize the L2 Chamfer Distance and the normal consistency loss between $P _ { g t }$ and $P _ { p r e d }$ :
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
L _ { \mathrm { c d } } = \sum _ { p \in P _ { p r e d } } \operatorname* { m i n } _ { q \in P _ { g t } } | | p - q | | _ { 2 } + \sum _ { q \in P _ { g t } } \operatorname* { m i n } _ { p \in P _ { p r e d } } | | q - p | | _ { 2 } , L _ { \mathrm { n o m a l } } = \sum _ { p \in P _ { p r e d } } ( 1 - | \Vec { \mathbf { n } } _ { p } \cdot \Vec { \mathbf { n } } _ { \Vec { q } } | ) ,
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
where $\hat { q }$ is the point that corresponds to $p$ when computing the Chamfer Distance, and $\vec { \bf n } _ { p } , \vec { \bf n } _ { \hat { q } }$ denotes the normal direction at point $p , \hat { q }$ .
|
| 120 |
+
|
| 121 |
+
Adversarial Loss We use the adversarial loss proposed in LSGAN [37]:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
L _ { \mathrm { D } } = \frac { 1 } { 2 } [ ( D ( M _ { g t } ) - 1 ) ^ { 2 } + D ( M _ { p r e d } ) ^ { 2 } ] , L _ { \mathrm { G } } = \frac { 1 } { 2 } [ ( D ( M _ { p r e d } ) - 1 ) ^ { 2 } ] .
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
Regularizations The above loss functions operate on the extracted surface, thus, only the vertices that are close to the iso-surface in the tetrahedral grid receive gradients, while the other vertices do not. Moreover, the surface losses do not provide information about what is inside/outside, since flipping the SDF sign of all vertices in a tetrahedron would result in the same surface being extracted by MT. This may lead to disconnected components during training. To alleviate this issue, we add a SDF loss to regularize SDF values:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
L _ { \mathrm { S D F } } = \sum _ { v _ { i } \in V _ { T } } | s ( v _ { i } ) - S D F ( v _ { i } , M _ { g t } ) | ^ { 2 } ,
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
where $S D F ( v _ { i } , M _ { g t } )$ denotes the SDF value of point $v _ { i }$ to the mesh $M _ { g t }$ . In addition, we apply the $L _ { 2 }$ regularization loss on the predicted vertex deformations to avoid artifacts: $\begin{array} { r } { L _ { \mathrm { d e f } } = \sum _ { v _ { i } \in V _ { T } } | | \Delta v _ { i } | | _ { 2 } } \end{array}$ .
|
| 134 |
+
|
| 135 |
+
The final loss is a weighted sum of all five loss terms:
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
L = \lambda _ { \mathrm { c d } } L _ { \mathrm { c d } } + \lambda _ { \mathrm { n o r m a l } } L _ { \mathrm { n o r m a l } } + \lambda _ { \mathrm { G } } L _ { \mathrm { G } } + \lambda _ { \mathrm { S D F } } L _ { \mathrm { S D F } } + \lambda _ { \mathrm { d e f } } L _ { \mathrm { d e f } } ,
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where $\lambda _ { \mathrm { c d } } , \lambda _ { \mathrm { n o r m a l } } , \lambda _ { \mathrm { G } } , \lambda _ { \mathrm { S D F } } , \lambda _ { \mathrm { d e f } }$ are hyperparameters (provided in the Supplement).
|
| 142 |
+
|
| 143 |
+
# 4 Experiments
|
| 144 |
+
|
| 145 |
+
We first evaluate DMTET in the challenging application of generating high-quality animal shapes from coarse voxels. We further evaluate DMTET in reconstructing 3D shapes from noisy point clouds on ShapeNet by comparing to existing state-of-the-art methods.
|
| 146 |
+
|
| 147 |
+
# 4.1 3D Shape Synthesis from Coarse Voxels
|
| 148 |
+
|
| 149 |
+
Experimental Settings We collected 1562 animal models from the TurboSquid website1. These models have a wide range of diversity, ranging from cats, dogs, bears, giraffes, to rhinoceros, goats, etc. We provide visualizations in Supplement. Among 1562 shapes, we randomly select 1120 shapes for training, and the remaining 442 shapes for testing. We follow the pipeline in Kaolin [27] to convert shapes to watertight meshes. To prepare the input to the network, we first voxelize the mesh into the resolution of $1 6 ^ { \overleftarrow { 3 } }$ , and then sample 3000 points from the surface after applying marching cubes to the $1 6 ^ { 3 }$ voxel grid. Note that this preprocessing is agnostic to the representation of the input coarse shape, allowing us to evaluate on different resolution voxels, or even meshes.
|
| 150 |
+
|
| 151 |
+
We compare our model with the official implementation of ConvOnet [44], which achieved SOTA performance on voxel upsampling. We also compare to DECOR-GAN [6], which obtained impressive results on transferring styles from a high-resolution voxel shape to a low-resolution voxel. Note that the original setting of DECOR-GAN is different from ours. For a fair comparison, we use all 1120 training shapes as the high-resolution style shapes during training, and retrieve the closet training shape to the test shape as the style shape during inference, which we refer as DECOR-Retv. We also compare against a randomly selected style shape as reference, denoted as DECOR-Rand.
|
| 152 |
+
|
| 153 |
+
1https://www.turbosquid.com, we obtain consent via an agreement with TurboSquid, and following license at https://blog.turbosquid.com/turbosquid-3d-model-license/
|
| 154 |
+
|
| 155 |
+

|
| 156 |
+
Figure 5: Qualitative results on 3D shapes Synthesis from Coarse Voxels. Comparing with all baselines, our method reconstructs shapes with much higher quality. Adding GAN further improves the realism of the generated shape. We also show the retrieved shapes from the training set in the second last column.
|
| 157 |
+
|
| 158 |
+
Metrics We evaluate L2 and L1 Chamfer Distance, as well as normal consistency score to assess how well the methods reconstruct the corresponding high-resolution shape following [44]. We also report Light Field Distance [4] (LFD) which measures the visual similarity in 2D rendered views. In addition, we evaluate Cls score following [6]. Specifically, we render the predicted 3D shapes and train a patch-based image classifier to distinguish whether images are from the renderings of real or generated shapes. The mean classification accuracy of the trained classifier is reported as Cls (lower is better). More details are in the Supplement.
|
| 159 |
+
|
| 160 |
+
Experimental Results We provide quantitative results in Table 1 with qualitative examples in Fig. 5. Our DMTET achieves significant improvements over all baselines in terms of all metrics. Compared to both ConvOnet [44] and DECORGAN [6], our DMTET reconstructs shapes with better quality when training without adversarial loss (5th column in Fig. 5). Further geometric details, including nails, ears, eyes, mouths, etc, are captured when trained with the adversarial loss (6th column in Fig. 5), significantly improving the realism and visual quality of the generated shape. To demonstrate the generalization ability of our
|
| 161 |
+
|
| 162 |
+

|
| 163 |
+
Figure 6: Qualitative Results of synthesizing highresolution shapes from coarse voxels collected online.
|
| 164 |
+
|
| 165 |
+
DMTET, we collect human-created low-resolution voxels from Turbosquid (shapes unseen in training). We provide qualitative results in Fig. 6. Despite the fact that these human-created shapes have noticeable differences with our coarse voxels used in training, e.g., different ratios of body parts compared with our training shapes (larger head, thinner legs, longer necks), our model faithfully generates high-quality 3D details conditioned on each coarse voxel – an exciting result.
|
| 166 |
+
|
| 167 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>L2 Chamfer↓</td><td rowspan=1 colspan=1>L1 Chamfer↓</td><td rowspan=1 colspan=1>Norm. Cons.↑</td><td rowspan=1 colspan=1>LFD↓</td><td rowspan=1 colspan=1>Cls</td></tr><tr><td rowspan=1 colspan=1>ConvOnet [44]</td><td rowspan=1 colspan=1>0.83</td><td rowspan=1 colspan=1>2.41</td><td rowspan=1 colspan=1>0.901</td><td rowspan=1 colspan=1>3220</td><td rowspan=1 colspan=1>0.63</td></tr><tr><td rowspan=1 colspan=1>DECOR [6]-Retv.</td><td rowspan=1 colspan=1>1.32</td><td rowspan=1 colspan=1>3.81</td><td rowspan=1 colspan=1>0.876</td><td rowspan=1 colspan=1>3689</td><td rowspan=1 colspan=1>0.66</td></tr><tr><td rowspan=1 colspan=1>DECOR [6]-Rand.</td><td rowspan=1 colspan=1>2.38</td><td rowspan=1 colspan=1>6.85</td><td rowspan=1 colspan=1>0.797</td><td rowspan=1 colspan=1>5338</td><td rowspan=1 colspan=1>0.67</td></tr><tr><td rowspan=1 colspan=1>DMTET wo Adv.</td><td rowspan=1 colspan=1>0.76</td><td rowspan=1 colspan=1>2.20</td><td rowspan=1 colspan=1>0.916</td><td rowspan=1 colspan=1>2846</td><td rowspan=1 colspan=1>0.58</td></tr><tr><td rowspan=1 colspan=1>DMTET</td><td rowspan=1 colspan=1>0.75</td><td rowspan=1 colspan=1>2.19</td><td rowspan=1 colspan=1>0.918</td><td rowspan=1 colspan=1>2823</td><td rowspan=1 colspan=1>0.54</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Table 1: Super Resolution of Animal Shapes: DMTET significantly outperforms all baselines in all metrics.
|
| 170 |
+
|
| 171 |
+
User Studies We conduct user studies via Amazon Machanical Turk (AMT) to further evaluate the performance of all methods. In particular, we present two shapes that are predicted from two different models to the AMT workers and ask them to evaluate which one is a better looking shape and which one features more realistic details. Detailed experimental settings are provided in the Supplement. We compare DMTET against ConvONet [44], DECOR [6]-Retv, as well as DMTET without adversarial loss (w.o. Adv.). Quantitative results are reported in Table 2. Human judges agree that the shapes generated from our model have better details, compared to all baselines, in a vast majority of the cases. Ablations on using adversarial loss demonstrate the effectiveness of generating higher quality geometry using a discriminator during training.
|
| 172 |
+
|
| 173 |
+
Ablation Studies To evaluate the effectiveness of our volume subdivision and surface subdivision modules, we ablate by sequentially introducing them to the base model (we refer as $\mathrm { D M T E T } _ { B }$ ) which we train on 100-resolution uniform tetrahedral grid without both volume and surface subdivision modules and adversarial
|
| 174 |
+
|
| 175 |
+
Table 2: User Study on 3D Shape Synthesis from Coarse voxels. In each cell, we report percentages of shapes for which the users agree are better looking (left) or have better details (right).
|
| 176 |
+
|
| 177 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>ConvONet[44]</td><td rowspan=1 colspan=1>DECOR[6]-Retv.</td><td rowspan=1 colspan=1>DMTETWoAdv</td></tr><tr><td rowspan=1 colspan=1>Baselinewins</td><td rowspan=1 colspan=1>5% 15%</td><td rowspan=1 colspan=1>26%/17%</td><td rowspan=1 colspan=1>29% /25%</td></tr><tr><td rowspan=1 colspan=1>DMTETwins</td><td rowspan=1 colspan=1>95%/95%</td><td rowspan=1 colspan=1>74% /83%</td><td rowspan=1 colspan=1>71% 175%</td></tr></table>
|
| 178 |
+
|
| 179 |
+
loss. We conduct user studies to evaluate the improvement after each step using the protocol described in the above paragraph. We first reduce the initial resolution to 70 and employ volume subdivision to support higher output resolution (we refer this model as $\mathbf { D M T E T } _ { V }$ ) and compare with $\mathbf { D M T E T } _ { B }$ Predictions by $\mathrm { D M T E T } _ { V }$ wins $78 \%$ of cases over $\mathrm { D M T E T } _ { B }$ for better looking, and $61 \%$ of cases for realistic details, showing that the volume subdivision module is effective in synthesizing shape details. We then add surface subdivision on top of the $\mathbf { D M T E T } _ { V }$ and compare with it. The new model wins $62 \%$ of cases over $\mathrm { D M T E T } _ { V }$ for better looking, and $62 \%$ of cases for realistic details as well, demonstrating the effect of surface subdivision module in enhancing the shape details.
|
| 180 |
+
|
| 181 |
+
# 4.2 Point Cloud 3D Reconstruction
|
| 182 |
+
|
| 183 |
+
Experimental Settings We follow the setting from DefTet [18], and use all 13 categories in ShapeNet [3] core data2, which we pre-process using Kaolin [27] to watertight meshes. We sample 5000 points for each shape and add Gaussian noise with zero mean of standard deviation 0.005. For quantitative evaluation, we report the L1 Chamfer Distance in the main paper, and refer readers to the Supplement for results in other metrics (3D IoU, L2 Chamfer Distance and F1 score). We additionally report average inference time on the same Nvidia V100 GPU.
|
| 184 |
+
|
| 185 |
+
We compare DMTET against state-of-the-art 3D reconstruction approaches using different representations: voxels [10], deforming a mesh with a fixed template [54], deforming a mesh generated from a volumetric representation [22], DefTet [18], and implicit functions [44]. For a fair comparison, we use the same point cloud encoder for all the methods, and adopt the decoders in the original papers to generate shapes in different representations. We also remove the adversarial loss in this application, since baselines also do not have it. We further compare with oracle performance of MC/MT where the ground truth SDF is utilized to extract iso-surface using MC/MT.
|
| 186 |
+
|
| 187 |
+
Experimental Results Quantitative results are summarized in Table 3, with a few qualitative examples shown in Fig. 7. Compared to DMC [31], which also predicts the SDF values and supervises with a surface loss, DMTET achieves much better reconstruction quality since training using the marching tetrahedra layer is more efficient than calculating an expectation over all possible configurations within one grid cell as done in DMC [31]. Compared to a method that deforms a fixed template (sphere) [54], we reconstruct shapes with different topologies, achieving more faithful results compared to the ground truth shape. When compared with other explicit surface representations that also support different topology [18, 22], our method achieves higher quality results for local geometry, benefiting from the fact that the typology is jointly optimized with the geometry, whereas it is separately supervised by an occupancy loss in [18, 22]. Compared to a neural implicit method [44], we generate higher quality shapes with less artifacts, while running significantly faster at inference. Finally, compared to a voxel-based method [10] at the same resolution, our method recovers more geometric details, benefiting from the predicted vertex deformations as well as the surface loss.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 7: Qualitative results on 3D Reconstruction from Point Clouds: Our model reconstructs shapes with more geometric details compared to baselines.
|
| 191 |
+
|
| 192 |
+
Table 3: Quantitative Results on Point Cloud Reconstruction (Chamfer L1). Note that all the networks in the baselines are not designed for this task, and thus we use the same encoder and their decoder for a fair comparison. We also ablate ourselves by operating on fixed grid (DMTET wo (Def, Vol., Surf.)), removing volume subdivision (DMTET wo Vol.), or surface subdivision (DMTET wo Surf.), or the both (DMTET wo (Vol., Surf.)).
|
| 193 |
+
|
| 194 |
+
<table><tr><td>Category</td><td>Airplane</td><td>Bench</td><td>Dresser</td><td>Car</td><td>Chair</td><td>Display</td><td>Lamp</td><td>Speaker</td><td>Rifle</td><td>Sofa</td><td>Table</td><td>Phone</td><td>Vessel</td><td>Mean↓</td><td>Time(ms)</td></tr><tr><td>3D-R2N2[10]</td><td>1.48</td><td>1.59</td><td>1.64</td><td>1.62</td><td>1.70</td><td>1.66</td><td>1.74</td><td>1.74</td><td>1.37</td><td>1.60</td><td>1.78</td><td>1.55</td><td>1.51</td><td>1.61</td><td>174</td></tr><tr><td>DMC [31]</td><td>1.57</td><td>1.47</td><td>1.29</td><td>1.67</td><td>1.44</td><td>1.25</td><td>2.15</td><td>1.49</td><td>1.45</td><td>1.19</td><td>1.33</td><td>0.88</td><td>1.70</td><td>1.45</td><td>349</td></tr><tr><td>Pixel2mesh [54]</td><td>0.98</td><td>1.28</td><td>1.44</td><td>1.19</td><td>1.91</td><td>1.25</td><td>2.07</td><td>1.61</td><td>0.91</td><td>1.15</td><td>1.82</td><td>0.83</td><td>1.12</td><td>1.35</td><td>30</td></tr><tr><td>ConvOnet [44]</td><td>0.82</td><td>0.95</td><td>0.96</td><td>1.12</td><td>1.03</td><td>0.93</td><td>1.22</td><td>1.12</td><td>0.79</td><td>0.91</td><td>0.94</td><td>0.67</td><td>0.99</td><td>0.95</td><td>866</td></tr><tr><td>MeshRCNN [22]</td><td>0.88</td><td>1.01</td><td>1.05</td><td>1.14</td><td>1.10</td><td>0.99</td><td>1.20</td><td>1.21</td><td>0.83</td><td>0.96</td><td>1.00</td><td>0.71</td><td>1.03</td><td>1.01</td><td>228</td></tr><tr><td>DEFTET[18]</td><td>0.85</td><td>0.94</td><td>0.97</td><td>1.13</td><td>1.04</td><td>0.92</td><td>1.28</td><td>1.17</td><td>0.85</td><td>0.90</td><td>0.93</td><td>0.65</td><td>0.99</td><td>0.97</td><td>61</td></tr><tr><td>DMTET wo (Def, Vol., Surf.)]</td><td>0.82</td><td>0.96</td><td>0.94</td><td>0.98</td><td>0.99</td><td>0.90</td><td>1.04</td><td>1.03</td><td>0.80</td><td>0.86</td><td>0.93</td><td>0.65</td><td>0.89</td><td>0.91</td><td></td></tr><tr><td>DMTET wo (Vol.,Surf.)</td><td>0.69</td><td>0.82</td><td>0.88</td><td>0.92</td><td>0.92</td><td>0.82</td><td>0.89</td><td>0.97</td><td>0.65</td><td>0.81</td><td>0.84</td><td>0.61</td><td>0.80</td><td>0.81</td><td>52 52</td></tr><tr><td>DMTET wo Vol.</td><td>0.65</td><td>0.78</td><td>0.84</td><td>0.89</td><td>0.89</td><td>0.79</td><td>0.86</td><td>0.95</td><td>0.61</td><td>0.78</td><td>0.79</td><td>0.60</td><td>0.78</td><td>0.79</td><td>67</td></tr><tr><td>DMTET wo Surf.</td><td>0.63</td><td>0.77</td><td>0.84</td><td>0.88</td><td>0.88</td><td>0.79</td><td>0.84</td><td>0.94</td><td>0.60</td><td>0.78</td><td>0.79</td><td>0.59</td><td>0.76</td><td>0.78</td><td>108</td></tr><tr><td>DMTET</td><td>0.62</td><td>0.76</td><td>0.83</td><td>0.87</td><td>0.88</td><td>0.78</td><td>0.84</td><td>0.94</td><td>0.59</td><td>0.77</td><td>0.78</td><td>0.57</td><td>0.76</td><td>0.77</td><td>129</td></tr></table>
|
| 195 |
+
|
| 196 |
+
# 4.2.1 Analysis
|
| 197 |
+
|
| 198 |
+
We investigate how each component in our representation affects the performance and reconstruction quality.
|
| 199 |
+
|
| 200 |
+
Comparisons with Oracle Performance of MC/MT We first demonstrate the effect of learning on explicit surface via MT. We compare with the oracle performance of extracting the iso-surface with MT/MC from the ground truth signed distance fields on the Chair test set in ShapeNet, which contains diverse high-quality details. Specifically, for MC/MT, we first compute the discretized SDF at different grid resolutions, and compare the extracted surface to the ground truth surface.
|
| 201 |
+
|
| 202 |
+

|
| 203 |
+
Figure 8: Comparing our DMTET with oracle performance of MC and MT.
|
| 204 |
+
|
| 205 |
+
As shown in Fig. 8, MT consistently outperforms MC when querying the same number of points. We found the staggered grids pattern in tetrahedral grid [16, 18] better captures thin structures at a limited resolution (Fig. 9). This makes MT a better choice for efficiency reasons. The usage of tetrahedral mesh in DMTET follows this motivation. Without deforming the grid, DMTET outperforms the oracle performance of MT by a large margin when querying the same number of points, although DMTET predicts the surface from noisy point cloud. This demonstrates that directly optimizing the reconstructed surface can mitigate the discretization errors imposed by MT to a large extent.
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
Figure 9: We compare trained DMTET to oracle performance of MT and MC. Number in bracket indicates number of SDF points queried.
|
| 209 |
+
|
| 210 |
+
Ablation Studies We further provide ablation studies on the entire ShapeNet test set, which is summarized in Tab. 3. We first compare the version where we only predict SDF values without learning to deform the vertices and volume/surface subdivision with the version that predicts both SDF and the deformation. Predicting deformation along with SDF is significantly more performant, since vertex movements allow for a better reconstruction of the underlying surface. This is especially true for categories with thin structures (e.g. lamp) where the grid vertices are desired to align with them. We further ablate the use of volume subdivision and surface subdivision. We show that each component provides an improvement. In particular, volume subdivision has a significant
|
| 211 |
+
|
| 212 |
+
improvement for object categories with fine-grained structural details, such as airplane and lamp, which require higher grid resolutions to model the occupancy change. Surface subdivision generates shapes with a parametric surface, avoiding the quantization errors in the planar faces and produces more visually pleasing results.
|
| 213 |
+
|
| 214 |
+
# 5 Conclusion
|
| 215 |
+
|
| 216 |
+
In this paper, we introduced a deep 3D conditional generative model that can synthesize highresolution 3D shapes using simple user guides such as coarse voxels. Our DMTET features a novel 3D representation that marries implicit and explicit representations by leveraging the advantages of both. We experimentally show that our approach synthesizes significantly higher quality shapes with better geometric details than existing methods, confirmed by quantitative metrics and an extensive user study. By showcasing the ability to upscale coarse voxels such as Minecraft shapes, we hope that we take one step closer to democratizing 3D content creation.
|
| 217 |
+
|
| 218 |
+
# 6 Broad Impact
|
| 219 |
+
|
| 220 |
+
Many fields such as AR/VR, robotics, architecture, gaming and film rely on high-quality 3D content. Creating such content, however, requires human experts, i.e., experienced artists, and a significant amount of development time. In contrast, platforms like Minecraft enable millions of users around the world to carve out coarse shapes with simple blocks. Our work aims at creating A.I. tools that would enable even novice users to upscale simple, low-resolution shapes into high resolution, beautiful 3D content. Our method currently focuses on 3D animal shapes. We are not currently aware of and do not foresee nefarious use cases of our method.
|
| 221 |
+
|
| 222 |
+
# 7 Disclosure of Funding
|
| 223 |
+
|
| 224 |
+
This work was funded by NVIDIA. Tianchang Shen and Jun Gao acknowledge additional revenue in the form of student scholarships from University of Toronto and the Vector Institute, which are not in direct support of this work.
|
| 225 |
+
|
| 226 |
+
# References
|
| 227 |
+
|
| 228 |
+
[1] Matan Atzmon and Yaron Lipman. Sal: Sign agnostic learning of shapes from raw data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2565–2574, 2020.
|
| 229 |
+
[2] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Generative and discriminative voxel modeling with convolutional neural networks. arXiv preprint arXiv:1608.04236, 2016. [3] Angel X Chang, Thomas Funkhouser, Leonidas Guibas, Pat Hanrahan, Qixing Huang, Zimo Li, Silvio Savarese, Manolis Savva, Shuran Song, Hao Su, et al. Shapenet: An information-rich 3d model repository. arXiv preprint arXiv:1512.03012, 2015.
|
| 230 |
+
[4] Ding-Yun Chen, Xiao-Pei Tian, Yu-Te Shen, and Ming Ouhyoung. On visual similarity based 3d model retrieval. In Computer graphics forum, volume 22, pages 223–232. Wiley Online Library, 2003.
|
| 231 |
+
[5] Wenzheng Chen, Jun Gao, Huan Ling, Edward Smith, Jaakko Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. In Advances In Neural Information Processing Systems, 2019.
|
| 232 |
+
[6] Zhiqin Chen, Vladimir G. Kim, Matthew Fisher, Noam Aigerman, Hao Zhang, and Siddhartha Chaudhuri. Decor-gan: 3d shape detailization by conditional refinement. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 233 |
+
[7] Zhiqin Chen, Andrea Tagliasacchi, and Hao Zhang. Bsp-net: Generating compact meshes via binary space partitioning. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. [8] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
|
| 234 |
+
[9] Julian Chibane, Aymen Mir, and Gerard Pons-Moll. Neural unsigned distance fields for implicit function learning. In Advances in Neural Information Processing Systems (NeurIPS), December 2020.
|
| 235 |
+
[10] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In European conference on computer vision, pages 628–644. Springer, 2016.
|
| 236 |
+
[11] Angela Dai, Daniel Ritchie, Martin Bokeloh, Scott Reed, Jürgen Sturm, and Matthias Nießner. Scancomplete: Large-scale scene completion and semantic segmentation for 3d scans. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4578–4587, 2018.
|
| 237 |
+
[12] Angela Dai, Charles Ruizhongtai Qi, and Matthias Nießner. Shape completion using 3d-encoder-predictor cnns and shape synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5868–5877, 2017.
|
| 238 |
+
[13] Thomas Davies, Derek Nowrouzezahrai, and Alec Jacobson. Overfit neural networks as a compact shape representation. arXiv preprint arXiv:2009.09808, 2020.
|
| 239 |
+
[14] Yu Deng, Jiaolong Yang, and Xin Tong. Deformed implicit field: Modeling 3d shapes with learned dense correspondence. In IEEE Computer Vision and Pattern Recognition, 2021.
|
| 240 |
+
[15] Akio Doi and Akio Koide. An efficient method of triangulating equi-valued surfaces by using tetrahedral cells. IEICE TRANSACTIONS on Information and Systems, 74(1):214–224, 1991.
|
| 241 |
+
[16] Crawford Doran, Athena Chang, and Robert Bridson. Isosurface stuffing improved: acute lattices and feature matching. In ACM SIGGRAPH 2013 Talks, pages 1–1, 2013.
|
| 242 |
+
[17] Yueqi Duan, Haidong Zhu, He Wang, Li Yi, Ram Nevatia, and Leonidas J Guibas. Curriculum deepsdf. In European Conference on Computer Vision, pages 51–67. Springer, 2020.
|
| 243 |
+
[18] Jun Gao, Wenzheng Chen, Tommy Xiang, Clement Fuji Tsang, Alec Jacobson, Morgan McGuire, and Sanja Fidler. Learning deformable tetrahedral meshes for 3d reconstruction. In Advances In Neural Information Processing Systems, 2020.
|
| 244 |
+
[19] Jun Gao, Chengcheng Tang, Vignesh Ganapathi-Subramanian, Jiahui Huang, Hao Su, and Leonidas J Guibas. Deepspline: Data-driven reconstruction of parametric curves and surfaces. arXiv preprint arXiv:1901.03781, 2019.
|
| 245 |
+
[20] Jun Gao, Zian Wang, Jinchen Xuan, and Sanja Fidler. Beyond fixed grid: Learning geometric image representation with a deformable grid. In ECCV, 2020.
|
| 246 |
+
[21] Lin Gao, Jie Yang, Tong Wu, Yu-Jie Yuan, Hongbo Fu, Yu-Kun Lai, and Hao Zhang. Sdm-net: Deep generative network for structured deformable mesh. ACM Transactions on Graphics (TOG), 38(6):1–15, 2019.
|
| 247 |
+
[22] Georgia Gkioxari, Jitendra Malik, and Justin Johnson. Mesh r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, pages 9785–9795, 2019.
|
| 248 |
+
[23] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. A papier-mâché approach to learning 3d surface generation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 216–224, 2018.
|
| 249 |
+
[24] Christian Häne, Shubham Tulsiani, and Jitendra Malik. Hierarchical surface prediction for 3d object reconstruction. In 2017 International Conference on 3D Vision (3DV), pages 412–420. IEEE, 2017.
|
| 250 |
+
[25] Rana Hanocka, Gal Metzer, Raja Giryes, and Daniel Cohen-Or. Point2mesh: A self-prior for deformable meshes. ACM Trans. Graph., 39(4), 2020.
|
| 251 |
+
[26] Zekun Hao, Hadar Averbuch-Elor, Noah Snavely, and Serge Belongie. Dualsdf: Semantic shape manipulation using a two-level representation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7631–7641, 2020.
|
| 252 |
+
[27] Krishna Murthy J., Edward Smith, Jean-Francois Lafleche, Clement Fuji Tsang, Artem Rozantsev, Wenzheng Chen, Tommy Xiang, Rev Lebaredian, and Sanja Fidler. Kaolin: A pytorch library for accelerating 3d deep learning research. arXiv:1911.05063, 2019.
|
| 253 |
+
[28] Marian Kleineberg, Matthias Fey, and Frank Weichert. Adversarial generation of continuous implicit shape representations. arXiv preprint arXiv:2002.00349, 2020.
|
| 254 |
+
[29] Jiabao Lei and Kui Jia. Analytic marching: An analytic meshing solution from deep implicit surface networks. In International Conference on Machine Learning, pages 5789–5798. PMLR, 2020.
|
| 255 |
+
[30] Manyi Li and Hao Zhang. D2im-net: Learning detail disentangled implicit fields from single images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10246– 10255, 2021.
|
| 256 |
+
[31] Yiyi Liao, Simon Donné, and Andreas Geiger. Deep marching cubes: Learning explicit surface representations. In Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
|
| 257 |
+
[32] Huan Ling, Jun Gao, Amlan Kar, Wenzheng Chen, and Sanja Fidler. Fast interactive object annotation with curve-gcn. In CVPR, 2019.
|
| 258 |
+
[33] Hsueh-Ti Derek Liu, Vladimir G. Kim, Siddhartha Chaudhuri, Noam Aigerman, and Alec Jacobson. Neural subdivision. ACM Trans. Graph., 39(4), 2020.
|
| 259 |
+
[34] Zhijian Liu, Haotian Tang, Yujun Lin, and Song Han. Point-voxel cnn for efficient 3d deep learning. In Advances in Neural Information Processing Systems, 2019.
|
| 260 |
+
[35] Charles Loop. Smooth subdivision surfaces based on triangles. January 1987.
|
| 261 |
+
[36] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. ACM siggraph computer graphics, 21(4):163–169, 1987.
|
| 262 |
+
[37] Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE international conference on computer vision, pages 2794–2802, 2017.
|
| 263 |
+
[38] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 922–928. IEEE, 2015.
|
| 264 |
+
[39] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4460–4470, 2019.
|
| 265 |
+
[40] Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020.
|
| 266 |
+
[41] Charlie Nash, Yaroslav Ganin, S. M. Ali Eslami, and Peter W. Battaglia. Polygen: An autoregressive generative model of 3d meshes. ICML, 2020.
|
| 267 |
+
[42] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 165–174, 2019.
|
| 268 |
+
[43] Despoina Paschalidou, Angelos Katharopoulos, Andreas Geiger, and Sanja Fidler. Neural parts: Learning expressive 3d shape abstractions with invertible neural networks. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 269 |
+
|
| 270 |
+
[44] Songyou Peng, Michael Niemeyer, Lars Mescheder, Marc Pollefeys, and Andreas Geiger. Convolutional occupancy networks. In European Conference on Computer Vision (ECCV), 2020.
|
| 271 |
+
|
| 272 |
+
[45] Edoardo Remelli, Artem Lukoianov, Stephan Richter, Benoit Guillard, Timur Bagautdinov, Pierre Baque, and Pascal Fua. Meshsdf: Differentiable iso-surface extraction. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 22468–22478. Curran Associates, Inc., 2020.
|
| 273 |
+
|
| 274 |
+
[46] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3577–3586, 2017.
|
| 275 |
+
|
| 276 |
+
[47] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. In The IEEE International Conference on Computer Vision (ICCV), October 2019.
|
| 277 |
+
|
| 278 |
+
[48] Shunsuke Saito, Tomas Simon, Jason Saragih, and Hanbyul Joo. Pifuhd: Multi-level pixel-aligned implicit function for high-resolution 3d human digitization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, June 2020.
|
| 279 |
+
|
| 280 |
+
[49] Vincent Sitzmann, Julien N.P. Martel, Alexander W. Bergman, David B. Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. In Proc. NeurIPS, 2020.
|
| 281 |
+
|
| 282 |
+
[50] Minhyuk Sung, Hao Su, Vladimir G Kim, Siddhartha Chaudhuri, and Leonidas Guibas. Complementme: Weakly-supervised component suggestions for 3d modeling. ACM Transactions on Graphics (TOG), 36(6):1–12, 2017.
|
| 283 |
+
|
| 284 |
+
[51] Towaki Takikawa, Joey Litalien, Kangxue Yin, Karsten Kreis, Charles Loop, Derek Nowrouzezahrai, Alec Jacobson, Morgan McGuire, and Sanja Fidler. Neural geometric level of detail: Real-time rendering with implicit 3D shapes. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
|
| 285 |
+
|
| 286 |
+
[52] M. Tatarchenko, A. Dosovitskiy, and T. Brox. Octree generating networks: Efficient convolutional architectures for high-resolution 3d outputs. In IEEE International Conference on Computer Vision (ICCV), 2017.
|
| 287 |
+
|
| 288 |
+
[53] Shubham Tulsiani, Hao Su, Leonidas J. Guibas, Alexei A. Efros, and Jitendra Malik. Learning shape abstractions by assembling volumetric primitives. In Computer Vision and Pattern Regognition (CVPR), 2017.
|
| 289 |
+
|
| 290 |
+
[54] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 52–67, 2018.
|
| 291 |
+
|
| 292 |
+
[55] Peng-Shuai Wang, Yang Liu, Yu-Xiao Guo, Chun-Yu Sun, and Xin Tong. O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis. ACM Transactions on Graphics (SIGGRAPH), 36(4), 2017.
|
| 293 |
+
|
| 294 |
+
[56] Peng-Shuai Wang, Yang Liu, and Xin Tong. Deep octree-based cnns with output-guided skip connections for 3d shape and scene completion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pages 266–267, 2020.
|
| 295 |
+
|
| 296 |
+
[57] Francis Williams, Matthew Trager, Joan Bruna, and Denis Zorin. Neural splines: Fitting 3d surfaces with infinitely-wide neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9949–9958, 2021.
|
| 297 |
+
|
| 298 |
+
[58] Jiajun Wu, Chengkai Zhang, Tianfan Xue, William T Freeman, and Joshua B Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pages 82–90, 2016.
|
| 299 |
+
|
| 300 |
+
[59] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguang Zhang, Xiaoou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1912–1920, 2015.
|
| 301 |
+
|
| 302 |
+
[60] Qiangeng Xu, Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. In Advances in Neural Information Processing Systems, pages 490–500, 2019.
|
| 303 |
+
|
| 304 |
+
[61] Kangxue Yin, Zhiqin Chen, Siddhartha Chaudhuri, Matthew Fisher, Vladimir Kim, and Hao Zhang. Coalesce: Component assembly by learning to synthesize connections. In Proc. of 3DV, 2020.
|
| 305 |
+
[62] Chenyang Zhu, Kai Xu, Siddhartha Chaudhuri, Renjiao Yi, and Hao Zhang. SCORES: Shape composition with recursive substructure priors. ACM Transactions on Graphics, 37(6):Article 211, 2018.
|
| 306 |
+
|
| 307 |
+
# Checklist
|
| 308 |
+
|
| 309 |
+
1. For all authors...
|
| 310 |
+
|
| 311 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] We provide extensive experiments in Sec. 4.
|
| 312 |
+
(b) Did you describe the limitations of your work? [Yes] We provide the discussion on limitations an failure cases in Supplement.
|
| 313 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] We provide the discussion in the Board Impact section with further discussions in Supplement.
|
| 314 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 315 |
+
|
| 316 |
+
2. If you are including theoretical results...
|
| 317 |
+
|
| 318 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 319 |
+
|
| 320 |
+
3. If you ran experiments...
|
| 321 |
+
|
| 322 |
+
(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] The code is currently quite uncleaned and requires many dependencies. We are planning to release the code after cleaning.
|
| 323 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We provide training details in both Sec. 4 in the main paper and Supplement.
|
| 324 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Training existing 3D models, including ours, on large-scale 3D datasets is too computation costly to repeat multiple times.
|
| 325 |
+
(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 provide in the Supplement.
|
| 326 |
+
|
| 327 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 328 |
+
|
| 329 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We used ShapeNet [3] core dataset in Sec. 4.2. We also used official code to reproduce baselines with citations. In particular, ConvONet [44] and DECOR-GAN [6].
|
| 330 |
+
(b) Did you mention the license of the assets? [Yes] We provided the license of ShapeNet and Turbosquid.
|
| 331 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No] The Turbosquid data we are using contains proprietary information.
|
| 332 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] We discussed in the Sec. 4 and provide further details in the Supplementary Materials.
|
| 333 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] We provide discussion on this in Supplement.
|
| 334 |
+
|
| 335 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 336 |
+
|
| 337 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [Yes] We provide details in the paper, with full text and screenshot in Supplement.
|
| 338 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [No] We did not anticipate the potential participant risks, as we only conduct human studies on generated animals.
|
| 339 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [Yes] We provide details in Supplement
|
md/train/H1e0-30qKm/H1e0-30qKm.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# UNLABELED DISENTANGLING OF GANS WITH GUIDED SIAMESE NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Disentangling underlying generative factors of a data distribution is important for interpretability and generalizable representations. In this paper, we introduce two novel disentangling methods. Our first method, Unlabeled Disentangling GAN (UD-GAN, unsupervised), decomposes the latent noise by generating similar/dissimilar image pairs and it learns a distance metric on these pairs with siamese networks and a contrastive loss. This pairwise approach provides consistent representations for similar data points. Our second method (UD-GAN-G, weakly supervised) modifies the UD-GAN with user-defined guidance functions, which restrict the information that goes into the siamese networks. This constraint helps UD-GAN-G to focus on the desired semantic variations in the data. We show that both our methods outperform existing unsupervised approaches in quantitative metrics that measure semantic accuracy of the learned representations. In addition, we illustrate that simple guidance functions we use in UD-GAN-G allow us to directly capture the desired variations in the data.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) are generative model estimators, where two neural networks (generator and discriminator) are trained in an adversarial setting, so that likelihood-based probabilistic modeling is not necessary. This works particularly well for sampling from a complex probability distribution, such as images. Although GANs yield realistic looking images (Radford et al., 2015), the original formulation in (Goodfellow et al., 2014) only allows for randomly sampling from the data distribution without disentangled structural or semantic control over the generated data points.
|
| 12 |
+
|
| 13 |
+
One way to disentangle the generation process is to use conditional GANs (Mirza & Osindero, 2014; Odena et al., 2017). These models modify the generator by conditioning it with supervised labels. Then, they either take the same labels as input in the discriminator (Mirza & Osindero, 2014) and measure the image-label compatibility, or classify the correct label at the output, given the generated image (Odena et al., 2017). Conditional GANs rely on a dataset with labels, which might not always be available or might be time-consuming to collect.
|
| 14 |
+
|
| 15 |
+
In this paper, we propose two GAN-based methods that learns disentangled representations without using labeled data. Our first method, Unlabeled Disentangling GAN (UD-GAN), generates image pairs, then embeds them with Siamese Networks (Chopra et al., 2005), and finally learns a distance metric on a disentangled representation space. Whereas our second method, UD-GAN-G, uses guidance functions to restrict the input to our siamese networks, so that they capture desired semantic variations.
|
| 16 |
+
|
| 17 |
+
# 2 RELATED WORK
|
| 18 |
+
|
| 19 |
+
There have been many studies on learning disentangled representations in generative models, which can be grouped into the level of supervision/labeled data they require.
|
| 20 |
+
|
| 21 |
+
Disentangled representations (supervised). In (Zhu et al., 2014; Yang et al., 2015), the identity and the viewpoint of an object are disentangled via reconstructing the same object from a different viewpoint and minimizing a reconstruction loss. Whereas in (Kingma et al., 2014; Makhzani et al., 2016), the style and category of an object is separated via autoencoders, where an encoder embeds the style of an input image to a latent representation, and a decoder takes the category and style input to reconstruct the input image. In (Tran et al., 2017; Yin et al., 2017), autoencoders and GANs are combined to decompose identity and attribute of an object, where the disentangled representation is obtained at the encoder outputs, and image labels are used at the output of the discriminator.
|
| 22 |
+
|
| 23 |
+
Disentangled representations (semi-supervised). In (Reed et al., 2014), they clamp the hidden units for a pair of images with the same identity but with different pose or expression to have the same identity representation. Whereas in (Kulkarni et al., 2015), synthesized images are used to disentangle pose, light, and shape of an object by passing a batch of images where only one attribute varies and the rest of the representation is clamped to be the same. These techniques only require a batch of samples with one attribute different at a time.
|
| 24 |
+
|
| 25 |
+
Disentangled representations (unsupervised). InfoGAN (Chen et al., 2016) is an unsupervised technique that discovers categorical and continuous factors by maximizing the mutual information between a GAN’s noise variables and the generated image. $\beta$ -VAE (Higgins et al., 2017) and DIPVAE (Kumar et al., 2018) are unsupervised autoencoder-based techniques that disentangle different factors in the latent representation of an encoded image. In $\beta$ -VAE, the KL-divergence between the latent and a prior distribution is weighted with a factor $\beta > 1$ to encourage disentanglement in the posterior latent distributions. Wheres in DIP-VAE, the covariance matrix of the latent distribution is encouraged to be an identity matrix, thus leading to uncorrelated latent representations.
|
| 26 |
+
|
| 27 |
+
For all of the unsupervised methods, after a model is trained, a human needs to investigate which factors map to which semantic property. In addition, as the methods are unsupervised, not all desirable factors might be represented. In contrast, our method builds on existing approaches with two important modifications: (i) We operate on pairs of similar/dissimilar image pairs. (ii) We compute the image embeddings using separate networks, which allows us to guide the disentangling process with information restriction.
|
| 28 |
+
|
| 29 |
+
# 3 UNLABELED DISENTANGLING GAN
|
| 30 |
+
|
| 31 |
+
# 3.1 BACKGROUND: GENERATIVE ADVERSARIAL NETWORKS
|
| 32 |
+
|
| 33 |
+
In GANs, the generator, $G ( . )$ , maps a latent variable $\mathbf { z }$ , which has an easy-to-sample distribution, into a more complex and unknown distribution, such as images. On the other hand, the discriminator $D ( . )$ tries to distinguish real images from the ones that are generated by $G$ . In (Goodfellow et al., 2014), the training is performed as a minimax game as follows:
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( G , D ) = \underset { \mathbf { x } \sim \mathbb { P } _ { \mathrm { R } } } { \mathbb { E } } [ \log D ( \mathbf { x } ) ] + \underset { \mathbf { z } \sim \mathbb { P } _ { \mathrm { Z } } } { \mathbb { E } } [ \log ( 1 - D ( G ( \mathbf { z } ) ) ) ] ,
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
where $\mathbb { P } _ { \mathrm { R } }$ and $\mathbb { P } _ { \mathrm { Z } }$ are the probability distributions of real images and the latent variable $\mathbf { z }$ , respectively. We train our GAN by using the loss in equation 1. In order to increase stability, we modify the generator loss by maximzing $\log ( D ( G ( \mathbf { z } ) ) )$ , instead of minimizing the second term in equation 1.
|
| 40 |
+
|
| 41 |
+
# 3.2 A NOVEL GAN ARCHITECTURE: UD-GAN
|
| 42 |
+
|
| 43 |
+
In a standard GAN setting, all of the variation in the distribution of real images is captured by the latent variable z. However, a single dimension or a slice of $\mathbf { z }$ does not necessarily have a semantic meaning. In this paper, our target is to slice the latent variable into multiple vectors, where each vector controls a different semantic variation.
|
| 44 |
+
|
| 45 |
+
Our network architecture is visualized in Figure 1. In our method, the latent vector $\begin{array} { r l } { \mathbf { z } } & { { } = } \end{array}$ $[ \mathbf { q } _ { 1 } , \mathbf { q } _ { 2 } , . . . , \mathbf { q } _ { N _ { A } } ]$ is the concatenation of $N _ { A }$ knobs, $\{ \mathbf { q } _ { i } \} _ { i = 1 } ^ { N _ { A } }$ , which represent different attributes we aim to disentangle. One can add a final variable that captures the variation (and the noise) that is not picked up by the knobs. In our experiments, this additional variable did not have a notable effect. In our notation, $\mathbf { q } _ { \bar { i } }$ refers to all of the knobs, except $\mathbf { q } _ { i }$ . In order to train our model, first, for each $\mathbf { q } _ { i }$ , we sample two different vectors, $\mathbf { q } _ { i } ^ { ( 1 ) }$ and ${ \bf q } _ { i } ^ { ( 2 ) }$ from Unif $( - 1 , 1 )$ . If we would attempt to form a batch by combinatorially concatenating all knob samples, we get a batch size of $2 ^ { N _ { A } }$ , which grows exponentially with the number of attributes. To avoid this computational burden, we train our model through stochastic sampling of one attribute at a time. For example, if the $i ^ { t h }$ attribute is chosen, we generate four images as shown in Figure 1.
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 1: The flowchart of our architecture. Sampled latents from different attributes are combined into latent vectors. Generated images are grouped with respect to different attributes (here, represented by shape) by Siamese Networks (denoted as $\phi _ { i }$ ).
|
| 49 |
+
|
| 50 |
+
The image pairs that are generated with the same $\mathbf { q } _ { i }$ vectors, $\left\{ \mathbf { x } _ { 1 1 } , \mathbf { x } _ { 1 2 } \right\}$ or $\left\{ \mathbf { x } _ { 2 1 } , \mathbf { x } _ { 2 2 } \right\}$ , should have the same $i ^ { t h }$ attribute, regardless of the values of $\mathbf { q } _ { \bar { i } }$ . We can ensure this via embedding the generated image pairs into a representation space with Siamese Networks (Chopra et al., 2005), which are denoted as $\phi _ { i } ( . )$ , and then learning a distance metric on the embedding vectors by employing Contrastive Loss (Hadsell et al., 2006). An optional guidance function is used to restrict the information that goes into a siamese network, thus letting us approximate a desired representation space. The guidance is disabled for our unsupervised UD-GAN approach. Whereas for UD-GAN-G, the guidance is a simple, user-defined function, which is discussed in Section 3.3.
|
| 51 |
+
|
| 52 |
+
We use a Contrastive Loss function to pull similar image pairs together, and push dissimilar pairs apart as follows:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\mathcal { L } _ { \phi _ { i } } = \frac { 1 } { 2 } \sum _ { n _ { i } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { n _ { i } 1 } , \mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \frac { 1 } { 4 } \sum _ { n _ { \bar { i } } = 1 } ^ { 2 } \sum _ { m _ { \bar { i } } = 1 } ^ { 2 } \operatorname* { m a x } ( 0 , \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } - \rho _ { i } ( \mathbf { x } _ { 1 n _ { \bar { i } } } , \mathbf { x } _ { 2 m _ { \bar { i } } } ) ) ^ { 2 } ,
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where, $\mathcal { L } _ { \phi _ { i } }$ is the Contrastive Loss for the $i ^ { t h }$ Siamese Network $\phi _ { i } ( . )$ , the function $\rho _ { i } ( { \bf x } _ { n _ { i } 1 } , { \bf x } _ { n _ { i } 2 } ) =$ $\big | \big | \phi _ { i } ( \mathbf { x } _ { n _ { i } 1 } ) - \phi _ { i } ( \mathbf { x } _ { n _ { i } 2 } ) \big | \big | _ { 2 }$ is a shorthand for embedding distance between ${ \bf x } _ { n _ { i } 1 }$ and ${ \bf x } _ { n _ { i } 2 }$ , and $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) }$ is an adaptive margin of the form $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } ~ = ~ \big | \big | \mathbf { q } _ { i } ^ { ( 1 ) } - \mathbf { q } _ { i } ^ { ( 2 ) } \big | \big | _ { 2 }$ . Using an adaptive margin makes the distance between two latent samples semantically meaningful and we empirically found that it improves the training stability.
|
| 59 |
+
|
| 60 |
+
The discriminator network $D$ is not modified and is trained to separate real and generated image distributions. Donahue et al. (2018) use a similar latent variable slicing for capturing illumination and pose variations of a face with a fixed identity. Their discriminator needs image pairs, which must be labeled for real images, to judge the quality and identity of the faces. Our method does not require any labels for the real images. Instead, we create similar and dissimilar image pairs via concatenating latent variables and generating image batches. Our final loss function is:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { c } { \mathcal { L } _ { \phi } = \lambda _ { \phi _ { i } } \mathcal { L } _ { \phi _ { i } } , \quad i \sim \mathrm { C a t } ( N _ { A } ) } \\ { \displaystyle \operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } V ( G , D ) = \mathcal { L } _ { G A N } + \mathcal { L } _ { \phi } , } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where, $\mathcal { L } _ { W G A N }$ is the GAN loss described in equation 1, $\lambda _ { \phi _ { i } }$ is the weight of the embedding loss, and the sampling of the latent variables depends on $i$ and is performed as described above.
|
| 67 |
+
|
| 68 |
+
# 3.3 DISENTANGLING WITH GUIDANCE FUNCTIONS: UD-GAN-G
|
| 69 |
+
|
| 70 |
+
A guidance function reduces the information content that flows into a siamese network and causes the corresponding embedding space to capture only the variations in the restricted input. For example, consider we want to capture the hair-related attributes in the CelebA dataset (Liu et al., 2015), which contains aligned images of human faces. By cropping every region but the top part of a generated image, we are able to guide $\phi _ { t o p } ( . )$ to learn only the variations in the “Hair Color” as shown in the first row of Figure 2. Note that, the knob $\mathbf { q } _ { t o p }$ (that corresponds to $\phi _ { t o p . } ( . ) \big _ { ; }$ ) changes the hair color not only at the cropped part of the image but as a whole. This is due to the interplay between the adversarial part of our loss (see equation 3), which enforces global realism in images, and the contrastive loss, which administers disentangled representations. As shown in Figure 2, different guidance functions leads to capturing different variations in the CelebA dataset.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 2: (left) Four of our siamese networks are guided with differently cropped images. (right) Varying latent variables that correspond to guided siamese networks captures desired variations.
|
| 74 |
+
|
| 75 |
+
# 3.4 PROBABILISTIC INTERPRETATION
|
| 76 |
+
|
| 77 |
+
We can gain a probabilistic interpretation of our method on a toy example. Let us assume a problem, where we want to generate images of colored polygons (see Figure 1), where there are two independent factors of variation: shape and color, which we want to capture using two knobs $\mathbf { q } _ { i }$ and ${ \bf q } _ { j }$ , respectively. When we set ${ \bf q } _ { j }$ to a certain value and vary $\mathbf { q } _ { i }$ , we want to generate polygons with the same color, but different shapes, and vice versa.
|
| 78 |
+
|
| 79 |
+
Let $\mathbb { P }$ be the probability distribution of colored polygons. For each attribute, $\mathbb { P }$ can be decomposed into a mixture distribution as follows:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\mathbb { P } = \sum _ { k = 1 } ^ { N _ { i } } \pi _ { i } ^ { ( k ) } \mathbb { Q } _ { i } ^ { ( k ) } \quad \gets \mathrm { ~ f o r ~ a t t r i b u t e ~ } i , \qquad \mathbb { P } = \sum _ { k = 1 } ^ { N _ { j } } \pi _ { j } ^ { ( k ) } \mathbb { Q } _ { j } ^ { ( k ) } \quad \gets \mathrm { ~ f o r ~ a t t r i b u t e ~ } j \gets \mathbb { P } \operatorname { m a x } _ { i } ^ { ( k ) } \mathbb { Q } _ { i } ^ { ( k ) } ,
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where , Q(k) is a mixture component and π(k)i is its corresponding probability of choosing it, and Ni is the number of different values an attribute (in our example, $i$ corresponds to shape) can take. A similar explanation can be made for attribute $j$ , i.e. color. For the sake of this analysis, we accept that for each attribute, $\mathbb { P }$ can be decomposed into different discrete mixture distributions as shown in Figure 3. For this specific case, $\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\mathbb { Q } _ { i } ^ { ( 2 ) }$ are the distributions of colored squares and colored diamonds, respectively. For the color attribute, which is indexed by $j$ , each $\mathbb { Q } _ { j } ^ { ( k ) }$ corresponds to a distribution of polygons with a single color (i.e., green polygons).
|
| 86 |
+
|
| 87 |
+
Our contrastive loss in equation 2 has two terms. The first term is minimizing the spread of each mixture component $\mathbb { Q } _ { i } ^ { ( k ) }$ . This spread is inversely related to disentanglement. If all samples from
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 3: Illustration of the embedding spaces and separated probability distributions after training our model.
|
| 91 |
+
|
| 92 |
+
Q(k) are mapped to the same embedding vector, the effect of $j$ (and any other attribute) on the representation $\phi _ { i } ( . )$ disappears and disentangling is achieved. During training, we stochastically go through all embedding spaces and minimize their spread, thus resulting in a disentangled representation in Table 9 in Appendix G.
|
| 93 |
+
|
| 94 |
+
The second term in equation 2 separates all $\mathbb { Q } _ { i } ^ { ( k ) }$ from each other using an adaptive margin $\gamma _ { i } ^ { ( 1 , 2 ) }$ . This margin depends on the difference between input latent pairs, so that the resulting embedding space is smooth. In other words, we separate rectangles, circles, and ovals from each other, but circles should be closer to ovals than squares, due to their relative similarity. In the following, we focus on the shape attribute that is represented by $i$ , however, derivations carry over to the color attribute $j$ .
|
| 95 |
+
|
| 96 |
+
In order to separate the probability distributions over image embeddings, one can maximize a divergence between all pairs from Q(k)i . One way to measure the distance between these distributions is to use the unbiased estimator of the energy distance (Szekely & Rizzo, 2004): ´
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
D _ { E } ( \mathbb { Q } _ { i } ^ { ( 1 ) } , \mathbb { Q } _ { i } ^ { ( 2 ) } ; \phi _ { i } , j ) = - \frac { 1 } { 2 } \sum _ { n _ { i } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { n _ { i } 1 } , \mathbf { x } _ { n _ { i } 2 } ) ^ { 2 } + \frac { 1 } { 4 } \sum _ { n _ { j } = 1 } ^ { 2 } \sum _ { m _ { j } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ^ { 2 }
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
The energy distance in equation 5 can be interpreted as an instance of Maximum Mean Discrepancy (Binkowski et al., 2018) and resembles the Contrastive Loss (Hadsell et al., 2006). We can ´ rewrite equation 5 using the Contrastive Loss in equation 2 as follows:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
D _ { E } = - \mathcal { L } _ { \phi _ { i } } + \frac { 1 } { 4 } \sum _ { n _ { j } = 1 } ^ { 2 } \sum _ { m _ { j } = 1 } ^ { 2 } \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ^ { 2 } + \operatorname* { m a x } ( 0 , \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } - \rho _ { i } ( \mathbf { x } _ { 1 n _ { j } } , \mathbf { x } _ { 2 m _ { j } } ) ) ^ { 2 }
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
Each element in the second sum is quadratic function and has its minimum at $\rho _ { i } ( { \bf x } _ { 1 n _ { j } } , { \bf x } _ { 2 m _ { j } } ) =$ $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } / 2$ and the value of the minimum is $\left( \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } \right) ^ { 2 } / 2$ . So, we can rewrite equation 6 as follows:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
D _ { E } ( \mathbb { Q } _ { i } ^ { ( 1 ) } , \mathbb { Q } _ { i } ^ { ( 2 ) } ; \phi _ { i } , j ) \ge \frac { \big ( \gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) } \big ) ^ { 2 } } { 2 } - \mathcal { L } _ { \phi _ { i } } .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Therefore, as the margin γ(1i $\gamma _ { \mathrm { i } } ^ { ( 1 , 2 ) }$ depends only on the input latent variables and is not trainable, minimizing our embedding loss $\mathcal { L } _ { \phi _ { i } }$ maximizes the lower bound for the energy distance $D _ { E }$ . This corresponds to learning a Siamese Network $\phi _ { i } ( . )$ that separates two probability distributions $\mathbb { Q } _ { i } ^ { ( 1 ) }$ and $\mathbb { Q } _ { i } ^ { ( 2 ) }$ , i.e., colored squares and colored diamonds, from each other and minimizes the spread of each distribution, thus resulting in disentangling the effect of $j$ from $i$ . The same derivation can be made for the color attribute. After jointly training the Siamese Networks, we can achieve the embedding spaces represented in Figure 3. An example of one such disentangled embedding space is illustrated for MNIST (LeCun & Cortes, 2010) digits in Figure 4 in Appendix B.
|
| 115 |
+
|
| 116 |
+
# 4 EXPERIMENTS
|
| 117 |
+
|
| 118 |
+
# 4.1 SETUP
|
| 119 |
+
|
| 120 |
+
We perform our experiments on a server with Intel Xeon Gold 6134 CPU, 256GB system memory, and an NVIDIA V100 GPU with 16GB of graphics memory. Our generator and discriminator architectures are outlined in our Appendix A. Each knob is a 1-dimensional slice of the latent variable and is sampled from Uni $\tilde { \cdot } ( - 1 , 1 )$ . We use ADAM (Kingma & Ba, 2014) as an optimizer for our training with the following parameters: learning rate $ _ { = 0 . 0 0 0 2 }$ and $\beta _ { 1 } = 0 . 5$ . We will release our code after the review process.
|
| 121 |
+
|
| 122 |
+
Datasets. We evaluate our method on two image datasets: (i) the CelebA dataset (Liu et al., 2015), which consists of over 200,000 images of aligned faces. We cropped the images to $6 4 \times 6 4$ pixels in size. (ii) the 2D Shapes (Higgins et al., 2017), which is a dataset that is synthetically created with different properties, such as shape, scale, orientation, and $\mathbf { X } ^ { } -$ -y locations. Both datasets are divided into training and test sets with a $90 \% - 1 0 \%$ ratio. The weight values for the contrastive loss is $\lambda _ { \phi } = 1$ for the CelebA dataset and $\lambda _ { \phi } = 5$ for the 2D shapes dataset. We use a 32 and 10-dimensional latent variables for the CelebA and the 2D Shapes datasets, respectively.
|
| 123 |
+
|
| 124 |
+
Baselines. We have two versions of our algorithm. UD-GAN refers to the results that are obtained without any guidance at the input of our siamese networks, whereas UD-GAN-G represents a guided training. We compare our method against $\beta$ -VAE (Higgins et al., 2017), DIP-VAE (Kumar et al., 2018), and InfoGAN (Chen et al., 2016) to compare against both autoencoder and GAN-based approaches. We get the quantitative and visual results for $\beta$ -VAE and DIP-VAE from (Higgins et al., 2017) and (Kumar et al., 2018), and use our own implementation of InfoGAN for training and testing. The same generator/discriminator architecture is used for InfoGAN and our method.
|
| 125 |
+
|
| 126 |
+
Guidance. For the CelebA dataset, the first 28 of 32 latent knobs are unguided and therefore are processed by the same siamese network that outputs a 28-dimensional embedding vector1. Whereas the remaining four knobs correspond to four siamese networks $( \phi _ { t o p } , \phi _ { m i u } , \phi _ { m i l } , \phi _ { b o t } )$ that are guided with cropped images in Figure 2. For the 2D shapes dataset, we have 10 knobs, where the first 7 dimensions are unguided. In order to guide the remaining three networks, we estimate the center of mass $( \hat { M } _ { x } , \hat { M } _ { y } )$ and the size $\hat { S }$ of the generated object and feed them to our siamese networks, $\phi _ { X } ( \hat { M } _ { x } ) , \phi _ { Y } ( \hat { M } _ { y } )$ , and $\phi _ { S } ( \hat { S } )$ . More information for this computation can be found in Appendix D.
|
| 127 |
+
|
| 128 |
+
# 4.2 RESULTS
|
| 129 |
+
|
| 130 |
+
Disentanglement Metric. This metric was proposed by Higgins et al. (2017) and measures whether learned disentangled representations can capture separate semantic variations in a dataset. In $\beta$ - VAE and DIP-VAE, this representation is the output of the encoder, i.e., the inferred latent variable. For InfoGAN, we use the representation learned by the discriminator. In our method, we use the concatenated outputs of our siamese networks, which we denote as $\phi ( . )$ .
|
| 131 |
+
|
| 132 |
+
The disentanglement metric scores for different methods are illustrated in Table 1. Here, we can see that both of our methods outperforms the baseline on the CelebA dataset. All of the baseline approaches relate the latent variables to generated images on per-image basis. Whereas our approach attempts to relate similarities/differences of latent variable pairs to image pairs, which provides a discriminative image embedding, where each dimension is invariant to unwanted factors (Hadsell et al., 2006).
|
| 133 |
+
|
| 134 |
+
For both datasets, our guided network (UD-GAN-G) performs better than our unguided approach, especially on the CelebA dataset. This might be due to the correlations between irrelevant attributes. For example the correlation coefficient between “Wearing Lipstick” and “Wavy Hair” attributes is 0.36, although they are not necessarily dependent. One of our guided networks receive the cropped image around the mouth of a person, which prevents cluttering it with hairstyle. Therefore, this guidance provides better disentanglement and results in an improved score as shown in Table 1. Due to containing simple synthetic images, our disentanglement scores for the 2D shapes dataset are very high. The reason we get 100.0 score on our guided method is because of the guidances we choose, which are highly correlated with the ground truth labels, as shown in Table 7 in Appendix D.
|
| 135 |
+
|
| 136 |
+
Table 1: Disentanglement metric scores (Higgins et al., 2017), which measure how strongly and independently the dataset attributes are captured by a method.
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Method</td><td>2DS Shapes</td><td>CelebA</td></tr><tr><td>β-VAE</td><td>99.2</td><td>7.1</td></tr><tr><td>InfoGAN</td><td>88.4</td><td>12.3</td></tr><tr><td>DIP-VAE</td><td>98.7</td><td>14.8</td></tr><tr><td>UD-GAN</td><td>99.1</td><td>15.4</td></tr><tr><td>UD-GAN-G</td><td>100.0</td><td>16.5</td></tr></table>
|
| 139 |
+
|
| 140 |
+
CelebA Attribute Classification. Kumar et al. (2018) introduced a binary classification metric for the CelebA attributes that project a test image embedding onto average embedding vectors of attributes. In Table 2, we compare our method against baseline approaches on CelebA attribute classification accuracy using the aforementioned projection vector. Similar to the results in Table 1, our guided approach slightly outperforms our unguided method and the other completely unsupervised techniques. This is because some attributes in the CelebA dataset can be spatially isolated via cropping, which leads to a better classification performance. For example, the attributes that are related to hair (Black Hair, Blond Hair, Wavy Hair) and mouth (Mouth Slightly Open, Wearing Lipstick) are captured better by the guided approach, because our top and bottom crops (see Figure 2) are detaching the effects of other variations and are making attributes less correlated. The accuracy on the attribute “Bangs” is worse on the guided approach. This might be due to heuristic cropping we perform that divides the relevant image region into two slits.
|
| 141 |
+
|
| 142 |
+
Table 2: CelebA attribute classification accuracy.
|
| 143 |
+
|
| 144 |
+
<table><tr><td>AAaaheedperaga</td><td></td><td></td><td></td><td>Bre aerr</td><td>Jre pulr</td><td>Paaeeaes</td><td></td><td>wado cprons nntn</td><td>peeg tr</td><td>JAH KAem</td><td>WhSeer</td><td>Vahsdrsieer</td></tr><tr><td>Prriea β-VAE</td><td>71.6</td><td>Aeeie 72.6</td><td>sueg 90.6</td><td>79.3</td><td>89.1</td><td>79.3</td><td>Wr 83.5</td><td>76.1</td><td>86.9</td><td>67.8</td><td>95.9</td><td>82.4</td></tr><tr><td>DIP-VAE</td><td>73.7</td><td>73.2</td><td>90.9</td><td>80.6</td><td>91.9</td><td>81.5</td><td>85.9</td><td>75.9</td><td>85.3</td><td>71.5</td><td>96.2</td><td>84.7</td></tr><tr><td>InfoGAN</td><td>74.7</td><td>73.8</td><td>90.9</td><td>80.9</td><td>91.5</td><td>82.6</td><td>87.4</td><td>76.9</td><td>88.7</td><td>74.3</td><td>97.3</td><td>86.9</td></tr><tr><td>UD-GAN</td><td>75.0</td><td>74.8</td><td>90.5</td><td>82.1</td><td>91.5</td><td>84.2</td><td>86.2</td><td>79.7</td><td>87.5</td><td>75.1</td><td>96.5</td><td>85.6</td></tr><tr><td>UD-GAN-G</td><td>75.0</td><td>75.5</td><td>90.2</td><td>82.3</td><td>92.1</td><td>84.2</td><td>89.9</td><td>82.2</td><td>87.7</td><td>75.6</td><td>96.7</td><td>87.3</td></tr></table>
|
| 145 |
+
|
| 146 |
+
Visual Comparison. In Table 3, we illustrate images generated by different methods on the CelebA dataset. Each of the three rows capture the change in a semantic property: smile, azimuth, and hair color, respectively. Within each image group, a latent dimension is varied (from top to bottom) to visualize the semantic change in that property. Compared to adversarial methods, such as InfoGAN and UD-GAN-G, the DIP-VAE method generates blurrier images, due to the data likelihood term in VAE-based approaches, which is usually implemented as a pixel-wise image reconstruction loss. In GAN-based approaches, this is handled via a learnable discriminator in an adversarial setting. In Table 1 and 2, we quantitatively show the advantage of using our guided approach. Another advantage is to have better control over the captured attributes. For example, in all unsupervised approaches (including UD-GAN), we need to check which latent dimension represents corresponds to which visual attribute. In some cases, a semantic attribute might not be captured due to the correlated nature of a dataset. Whereas, in UD-GAN-G, we directly obtain the variations in smile, azimuth, and hair color through cropping the bottom, middle, and top part of our images, respectively. Thanks to our guidance in Figure 2, we can directly manipulate these three attributes using the knobs $\mathbf { q } _ { b o t }$ , $\mathbf { q } _ { m i l }$ , and $\mathbf { q } _ { t o p }$ as shown in Table 3.
|
| 147 |
+
|
| 148 |
+
The same trend is true for the 2D Shapes dataset results in Table 4. Although the $\mathrm { X }$ and Y positions and the scale of the synthetic object is captured by both our unsupervised and guided approaches, the guidance we choose directly captures the desired feature on in advance chosen knobs ${ \bf q } _ { X } , { \bf q } _ { Y }$ , and $\mathbf { q } _ { S }$ , respectively.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Table 4: Generated images for the 2D Shapes dataset by varying a latent dimension, which corresponds to a semantic property (first row: UD-GAN, second row: UD-GAN-G).
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
|
| 155 |
+
# 4.3 DISCUSSION
|
| 156 |
+
|
| 157 |
+
In completely unsupervised approaches, there is no guarantee to capture all of the desired semantic variations. The main premise behind UD-GAN-G is to find very simple, yet effective ways to capture some of the variation in the data. This weak supervision helps us to obtain proxies to certain semantic properties, so that we get the desired features without training the model multiple times with different hyperparameters or initializations.
|
| 158 |
+
|
| 159 |
+
In the aligned the CelebA dataset, each face is roughly centered around the nose. This reduces the variation and simplifies the problem of guidance design, as we show in Figure 2. In more complex scenarios, where the objects can appear in a large variety of scales, translations, and viewpoints, one can use a pre-trained object detection and localization method, such as YOLO (Redmon et al., 2015), as a guidance network. This enables us to use the knowledge obtained from a labeled dataset, such as ImageNet (Russakovsky et al., 2015) to disentangle a new unlabeled dataset. Note that backpropagating the gradients of a deep network into an image might cause adversarial samples (Szegedy et al., 2014). However, the discriminator can alleviate this by rejecting problematic images.
|
| 160 |
+
|
| 161 |
+
In order to backpropagate the gradients from the siamese networks to the generator, the guidance function we use needs to be differentiable. This might pose a limitation to our method; however, differentiable relaxations can instead be used to guide our network. For example, one can employ differentiable relaxation of the superpixel segmentation in (Jampani et al., 2018) to disentangle a low-level image segmentation.
|
| 162 |
+
|
| 163 |
+
Our latent variables are sampled from a uniform distribution. In addition, image similarity is measured by using L2-distance between a pair of image embeddings. We experimented with modeling some latent dimensions as categorical variables. However, we encountered training stability issues, due to computing the softmax loss between two learnable categorical image embeddings, instead of one embedding and one fixed label vector as it is usually done. We plan to tackle that problem in our future work.
|
| 164 |
+
|
| 165 |
+
# 5 CONCLUSION
|
| 166 |
+
|
| 167 |
+
In this paper we introduced UD-GAN and UD-GAN-G, novel GAN formulations which employ Siamese networks with contrastive losses in order to make slices of the latent noise space disentangled and more semantically meaningful. Our experiments encompassed guided and unguided approaches for the embedding networks, and illustrated how our methods can be used for semantically meaningful image manipulation. Our qualitative and quantiative results confirm that our method can adjust well to the intrinsic factors of variation of the data and outperform the current state-of-the-art methods on the CelebA and 2D Shapes datasets. In future work, we plan to investigate more powerful forms of embedders, e.g. extracting information from pre-trained networks for semantic segmentation and landmark detection. This allows for even more powerful novel image manipulation techniques.
|
| 168 |
+
|
| 169 |
+
# REFERENCES
|
| 170 |
+
|
| 171 |
+
M. Binkowski, D. J. Sutherland, M. Arbel, and A. Gretton. Demystifying MMD GANs. ´ ICLR, 2018.
|
| 172 |
+
Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. NIPS, 2016.
|
| 173 |
+
Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005.
|
| 174 |
+
C. Donahue, Z. C. Lipton, A. Balsubramani, and J. McAuley. Semantically Decomposing the Latent Spaces of Generative Adversarial Networks. ICLR, 2018.
|
| 175 |
+
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.
|
| 176 |
+
Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. MS-Celeb-1M: A dataset and benchmark for large scale face recognition. In European Conference on Computer Vision, 2016.
|
| 177 |
+
|
| 178 |
+
R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. CVPR, 2006.
|
| 179 |
+
|
| 180 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. Beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017.
|
| 181 |
+
|
| 182 |
+
Varun Jampani, Deqing Sun, Ming-Yu Liu, Ming-Hsuan Yang, and Jan Kautz. Superpixel sampling networks. ECCV, 2018.
|
| 183 |
+
|
| 184 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, 2014.
|
| 185 |
+
|
| 186 |
+
Diederik P. Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In NIPS, 2014.
|
| 187 |
+
|
| 188 |
+
Tejas D. Kulkarni, William F. Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In NIPS, 2015.
|
| 189 |
+
|
| 190 |
+
Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In ICLR, 2018.
|
| 191 |
+
|
| 192 |
+
Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010.
|
| 193 |
+
|
| 194 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015.
|
| 195 |
+
|
| 196 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, and Ian Goodfellow. Adversarial autoencoders. In ICLR, 2016.
|
| 197 |
+
|
| 198 |
+
Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, 2014.
|
| 199 |
+
|
| 200 |
+
A. Odena, C. Olah, and J. Shlens. Conditional image synthesis with auxiliary classifier gans. In ICML, 2017.
|
| 201 |
+
|
| 202 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, 2015.
|
| 203 |
+
|
| 204 |
+
Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. CoRR, 2015.
|
| 205 |
+
|
| 206 |
+
Scott Reed, Kihyuk Sohn, Yuting Zhang, and Honglak Lee. Learning to disentangle factors of variation with manifold interaction. In ICML, 2014.
|
| 207 |
+
|
| 208 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 2015.
|
| 209 |
+
|
| 210 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 211 |
+
|
| 212 |
+
Gabor J. Sz ´ ekely and Maria L. Rizzo. Testing for equal distributions in high dimensions. ´ InterStat, 2004.
|
| 213 |
+
|
| 214 |
+
L. Tran, X. Yin, and X. Liu. Disentangled representation learning gan for pose-invariant face recognition. In CVPR, 2017.
|
| 215 |
+
|
| 216 |
+
Laurens van der Maaten and Geoffrey Hinton. Journal of Machine Learning Research, 2008.
|
| 217 |
+
|
| 218 |
+
Jimei Yang, Scott Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In NIPS, 2015.
|
| 219 |
+
|
| 220 |
+
Weidong Yin, Yanwei Fu, Leonid Sigal, and Xiangyang Xue. Semi-latent gan: Learning to generate and modify facial images from attributes. CoRR, 2017.
|
| 221 |
+
|
| 222 |
+
Zhenyao Zhu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Multi-view perceptron: a deep model for learning face identity and view representations. In NIPS, 2014.
|
| 223 |
+
|
| 224 |
+
# APPENDIX
|
| 225 |
+
|
| 226 |
+
# A NEURAL NETWORK ARCHITECTURES
|
| 227 |
+
|
| 228 |
+
In Table 5, we show the neural network layers we use in our generator for different datasets. Our discriminator and siamese network architectures are the inverted version of our generator. Each fully connected and Conv2D layer is followed by a Leaky ReLU non-linearity, except the last layer.
|
| 229 |
+
|
| 230 |
+
Table 5: The architectures of our generator networks.
|
| 231 |
+
|
| 232 |
+
<table><tr><td>Layer</td><td>CelebA</td><td>2D Shapes</td></tr><tr><td>Latents Fully Connected Reshape Conv2D-Transpose (3 × 3) Conv2D (3 × 3)</td><td>(32) (2048) (128 ×4×4) (128 ×8× 8) (128×8× 8) (128 × 16 × 16) (128 × 16 × 16)</td><td>(10) (512) (32 × 4 × 4) (32 ×8 × 8) (32 ×8 × 8)</td></tr></table>
|
| 233 |
+
|
| 234 |
+
# B CHOOSING SEMANTICS WITH GUIDANCE
|
| 235 |
+
|
| 236 |
+
The Siamese Networks $\phi _ { i }$ are desired to map images into embedding spaces, where they can be grouped within a distinct semantic context. For the example shown in Figure 4, where we disentangle the shape and the color, this might not be directly achievable in a completely unsupervised setting, because the separation in equation 4 is not unique. However, we can still benefit from the disentangling capability of our method via small assumptions and domain knowledge, without collecting labeled data.
|
| 237 |
+
|
| 238 |
+
Consider the toy example, where we extend the MNIST dataset (LeCun & Cortes, 2010) to have a random color, sampled from a uniform RGB color distribution. We define our problem to independently capture the shape of a digit with ${ \bf q } _ { 1 }$ and its color with $\mathbf { q } _ { 2 }$ .
|
| 239 |
+
|
| 240 |
+
In Figure 4(a), we show images created by a generator, which is trained along with two networks, $\phi _ { 1 }$ and $\phi _ { 2 }$ , without any guidance in an unsupervised setting. We can see that the knobs, ${ \bf q } _ { 1 }$ and $\mathbf { q } _ { 2 }$ , capture the variations in the data, however, these variations are coupled with multiple semantic properties. Each knob modifies a complicated combination of shape and color.
|
| 241 |
+
|
| 242 |
+
However, if we design a network architecture in a slightly smarter way, we should be able to separate the shape and the color attributes. This is exemplified in Figure 4(b), where instead of feeding the whole image to $\phi _ { 2 }$ , we feed the average color of some randomly sampled pixels from a generated image. This choice prevents $\phi _ { 2 }$ to capture the spatial structure of the generated digit and to focus only on color. After the training our method with a modified $\phi _ { 2 }$ , the first network captures shape of a digit, and the second one captures the color variations. This can also be observed in Figure 4(c) and 4(d), where we use t-SNE (van der Maaten & Hinton, 2008) to visualize embedding spaces for shape and color, respectively.
|
| 243 |
+
|
| 244 |
+
# C EXPERIMENTS ON ADDITIONAL GUIDANCES
|
| 245 |
+
|
| 246 |
+
In order to show the effect of the guided siamese networks, we perform three experiments on the MS-Celeb dataset (Guo et al., 2016) by using different guiding proxies. In the first experiment, only one of the two networks is guided with an edge detector at the input. Results of this experiment are shown in Table 6. We can see that the first knob, which is connected to edges, captures the overall outline and roughly controls the identity of the generated face. On the other hand, the unguided second knob modifies the image with minimal changes to image edges. This change, in this case, corresponds to the lighting of the face.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
Figure 4: (a) Samples from the colored version of the MNIST dataset. (b) Images generated after an unsupervised training with two knobs and (c) after a guided training (the knob values are interpolated between two values and then concatenated to generate the final image). (d) The t-SNE representation of the embedding vectors for shape and (e) color.
|
| 250 |
+
|
| 251 |
+
We perform a second experiment with the edge detector, where in this case, the second knob is guided with the average color of the generated image. In Table 6, we can observe the results of our disentangled image manipulation. The first knob with the edge detector again captures the outline of the face, and the second average color knob modifies a combination of the light and the skin color, similar to the results in Figure Table 6.
|
| 252 |
+
|
| 253 |
+
In our third experiment, we employ the cropped guidance networks. The two knobs receive the cropped top and bottom part of the image for training. Although these image crops are not independent, we still get acceptable results that are shown in Table 6. Adjusting the first knob only modifies the upper part of the face; the hair and the eyes. Similarly, the second knob is responsible for determining the chin and mouth shape.
|
| 254 |
+
|
| 255 |
+

|
| 256 |
+
Table 6: The results of UD-GAN-G using differently guided siamese networks.
|
| 257 |
+
|
| 258 |
+
# D GUIDING FOR THE 2D SHAPES DATASET
|
| 259 |
+
|
| 260 |
+
In order to guide our siamese networks for the 2D shapes dataset, we estimate the center of mass of the generated image, and the size of the generated object as follows:
|
| 261 |
+
|
| 262 |
+
$$
|
| 263 |
+
\begin{array} { l } { \displaystyle \hat { M } _ { x } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } c _ { x } \cdot \mathbf { x } [ c _ { x } , c _ { y } ] , \qquad \hat { M } _ { y } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } c _ { y } \cdot \mathbf { x } [ c _ { x } , c _ { y } ] } \\ { \displaystyle \hat { S } = \frac { 1 } { Z } \sum _ { c _ { x } , c _ { y } } \big ( ( c _ { x } - \hat { M } _ { x } ) ^ { 2 } + ( c _ { y } - \hat { M } _ { y } ) ^ { 2 } \big ) \cdot \mathbf { x } [ c _ { x } , c _ { y } ] } \\ { \displaystyle Z = \sum _ { c _ { x } , c _ { y } } \mathbf { x } [ c _ { x } , c _ { y } ] , } \end{array}
|
| 264 |
+
$$
|
| 265 |
+
|
| 266 |
+
where, $\mathbf { x }$ is a generated image, $\mathbf { x } [ c _ { x } , c _ { y } ]$ is the pixel intensity at image coordinates $[ c _ { x } , c _ { y } ]$ , $( \hat { M } _ { x } , \hat { M } _ { y } )$ are the coordinates of the center of mass of $\mathbf { x }$ , and $\hat { S }$ is the size estimate for the generated object. As the 2D shapes dataset is relatively simple and contain only one object, these guidances are highly correlated with the ground truth attributes as shown in Table 7.
|
| 267 |
+
|
| 268 |
+
Table 7: Correlation between ground truth attributes of the 2D shapes dataset and the calculated proxies.
|
| 269 |
+
|
| 270 |
+
<table><tr><td>Ground Truth Attribute</td><td>M</td><td>My</td><td>S</td></tr><tr><td>Shape</td><td>0.000</td><td>-0.002</td><td>-0.366</td></tr><tr><td>Scale</td><td>-0.000</td><td>-0.000</td><td>0.910</td></tr><tr><td>Orientation</td><td>0.027</td><td>0.000</td><td>-0.001</td></tr><tr><td>X Position</td><td>0.998</td><td>-0.000</td><td>-0.000</td></tr><tr><td>Y Position</td><td>-0.000</td><td>0.998</td><td>0.001</td></tr></table>
|
| 271 |
+
|
| 272 |
+
# E ADDITIONAL SEMANTIC MANIPULATION
|
| 273 |
+
|
| 274 |
+
In Figure 5, we illustrate additional semantic properties that are captured by UD-GAN-G.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Figure 5: Semantic properties that are captured by our method.
|
| 278 |
+
|
| 279 |
+
# F CELEBA ATTRIBUTE CLASSIFICATION
|
| 280 |
+
|
| 281 |
+
In Table 8, we compare the classification perfromance of our method to InfoGAN on all attributes in the CelebA dataset.
|
| 282 |
+
|
| 283 |
+
Table 8: CelebA attribute classification accuracy.
|
| 284 |
+
|
| 285 |
+
<table><tr><td>Piriea</td><td>Soppr ooaos</td><td>Aardlracs</td><td>Leeera</td><td>rrggepensrg</td><td>3</td><td>sueg</td><td>srrgg</td><td>Ber</td><td></td><td>Je alr</td><td>JBh ppllt</td><td>PrnlI</td><td>Jrr gmig</td><td>per g gg grss</td><td>Cqppa</td><td></td><td>Doo eretr</td><td>assessrg</td><td></td><td>Ceeer</td><td>heeri</td><td>Paaeee</td><td>regeeeroh</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>90.4 90.4</td><td>75.0</td><td>74.7 73.8 75.5</td><td>80.6 81.3</td><td>97.9 97.9</td><td>90.9 90.2</td><td></td><td>67.5 68.1</td><td>80.4 80.7</td><td>80.9 82.3</td><td>91.5 92.1</td><td>94.9 95.1</td><td>82.1 81.9</td><td></td><td>87.8 88.6</td><td>94.6 94.6</td><td>95.4 95.5</td><td></td><td>94.5 95.4</td><td>95.8 95.5</td><td>97.0 97.0</td><td>82.6 84.2</td><td>78.0 81.2</td></tr><tr><td></td><td></td><td>urligir</td><td>Hrrrtece</td><td>N LIee</td><td>Peeg ce</td><td></td><td>Dree</td><td>rs saee</td><td>PSn nir</td><td>rrenereer</td><td>Boot ses</td><td>seiniiprs</td><td></td><td>Buiiia</td><td>srereet</td><td>WH a</td><td>argaieers</td><td></td><td>Wafaaaa</td><td>wapsdrrseer</td><td>areeec</td><td>waeeggee</td><td>BunoX</td></tr><tr><td>InfoGAN UD-GAN-G</td><td>89.9</td><td>87.476.9 82.2</td><td>96.1 96.1</td><td>85.3 85.2</td><td>88.7 87.7</td><td></td><td>72.0 72.4</td><td>95.9 96.4</td><td>72.9 73.6</td><td>91.5 92.0</td><td>93.2 93.9</td><td>95.6 95.3</td><td></td><td>82.1 86.4</td><td>79.1 79.2</td><td>74.3 75.6</td><td>79.8 80.4</td><td></td><td>97.3 96.7</td><td>86.9 87.3</td><td>86.3 86.3</td><td>93.0 93.0</td><td>80.9 81.1</td></tr></table>
|
| 286 |
+
|
| 287 |
+
# G ATTRIBUTE CORRELATIONS.
|
| 288 |
+
|
| 289 |
+
In Table 9, we compare the correlation between different embedding (or latent) dimensions and the correlation between embedding dimensions and the CelebA attributes. Although DIP-VAE encodes a more un-correlated representation, due to the correlated nature of CelebA attributes, it does not necessarily transfer to a disentangled semantic representation, as illustrated by the quantitative results in Table 1 and 2.
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Table 9: Correlation between embeddings (or latents) with each other (first row) and with CelebA attributes(second row). Negative correlations are inverted for visibility purposes.
|
md/train/H1ewdiR5tQ/H1ewdiR5tQ.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GRAPH WAVELET NEURAL NETWORK
|
| 2 |
+
|
| 3 |
+
Bingbing $\mathbf { X } \mathbf { u } ^ { 1 , 2 }$ , Huawei Shen1,2, Qi $\mathbf { C a o } ^ { 1 , 2 }$ , Yunqi $\mathbf { Q i u } ^ { 1 , 2 }$ & Xueqi Cheng1,2
|
| 4 |
+
|
| 5 |
+
1CAS Key Laboratory of Network Data Science and Technology,
|
| 6 |
+
Institute of Computing Technology, Chinese Academy of Sciences;
|
| 7 |
+
2School of Computer and Control Engineering,
|
| 8 |
+
University of Chinese Academy of Sciences
|
| 9 |
+
Beijing, China
|
| 10 |
+
{xubingbing,shenhuawei,caoqi,qiuyunqi,cxq}@ict.ac.cn
|
| 11 |
+
|
| 12 |
+
# ABSTRACT
|
| 13 |
+
|
| 14 |
+
We present graph wavelet neural network (GWNN), a novel graph convolutional neural network (CNN), leveraging graph wavelet transform to address the shortcomings of previous spectral graph CNN methods that depend on graph Fourier transform. Different from graph Fourier transform, graph wavelet transform can be obtained via a fast algorithm without requiring matrix eigendecomposition with high computational cost. Moreover, graph wavelets are sparse and localized in vertex domain, offering high efficiency and good interpretability for graph convolution. The proposed GWNN significantly outperforms previous spectral graph CNNs in the task of graph-based semi-supervised classification on three benchmark datasets: Cora, Citeseer and Pubmed.
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Convolutional neural networks (CNNs) (LeCun et al., 1998) have been successfully used in many machine learning problems, such as image classification (He et al., 2016) and speech recognition (Hinton et al., 2012), where there is an underlying Euclidean structure. The success of CNNs lies in their ability to leverage the statistical properties of Euclidean data, e.g., translation invariance. However, in many research areas, data are naturally located in a non-Euclidean space, with graph or network being one typical case. The non-Euclidean nature of graph is the main obstacle or challenge when we attempt to generalize CNNs to graph. For example, convolution is not well defined in graph, due to that the size of neighborhood for each node varies dramatically (Bronstein et al., 2017).
|
| 19 |
+
|
| 20 |
+
Existing methods attempting to generalize CNNs to graph data fall into two categories, spatial methods and spectral methods, according to the way that convolution is defined. Spatial methods define convolution directly on the vertex domain, following the practice of the conventional CNN. For each vertex, convolution is defined as a weighted average function over all vertices located in its neighborhood, with the weighting function characterizing the influence exerting to the target vertex by its neighbors (Monti et al., 2017). The main challenge is to define a convolution operator that can handle neighborhood with different sizes and maintain the weight sharing property of CNN. Although spatial methods gain some initial success and offer us a flexible framework to generalize CNNs to graph, it is still elusive to determine appropriate neighborhood.
|
| 21 |
+
|
| 22 |
+
Spectral methods define convolution via graph Fourier transform and convolution theorem. Spectral methods leverage graph Fourier transform to convert signals defined in vertex domain into spectral domain, e.g., the space spanned by the eigenvectors of the graph Laplacian matrix, and then filter is defined in spectral domain, maintaining the weight sharing property of CNN. As the pioneering work of spectral methods, spectral CNN (Bruna et al., 2014) exploited graph data with the graph Fourier transform to implement convolution operator using convolution theorem. Some subsequent works make spectral methods spectrum-free (Defferrard et al., 2016; Kipf & Welling, 2017; Khasanova & Frossard, 2017), achieving locality in spatial domain and avoiding high computational cost of the eigendecomposition of Laplacian matrix.
|
| 23 |
+
|
| 24 |
+
In this paper, we present graph wavelet neural network to implement efficient convolution on graph data. We take graph wavelets instead of the eigenvectors of graph Laplacian as a set of bases, and define the convolution operator via wavelet transform and convolution theorem. Graph wavelet neural network distinguishes itself from spectral CNN by its three desirable properties: (1) Graph wavelets can be obtained via a fast algorithm without requiring the eigendecomposition of Laplacian matrix, and thus is efficient; (2) Graph wavelets are sparse, while eigenvectors of Laplacian matrix are dense. As a result, graph wavelet transform is much more efficient than graph Fourier transform; (3) Graph wavelets are localized in vertex domain, reflecting the information diffusion centered at each node (Tremblay & Borgnat, 2014). This property eases the understanding of graph convolution defined by graph wavelets.
|
| 25 |
+
|
| 26 |
+
We develop an efficient implementation of the proposed graph wavelet neural network. Convolution in conventional CNN learns an individual convolution kernel for each pair of input feature and output feature, causing a huge number of parameters especially when the number of features is high. We detach the feature transformation from convolution and learn a sole convolution kernel among all features, substantially reducing the number of parameters. Finally, we validate the effectiveness of the proposed graph wavelet neural network by applying it to graph-based semi-supervised classification. Experimental results demonstrate that our method consistently outperforms previous spectral CNNs on three benchmark datasets, i.e., Cora, Citeseer, and Pubmed.
|
| 27 |
+
|
| 28 |
+
# 2 OUR METHOD
|
| 29 |
+
|
| 30 |
+
# 2.1 PRELIMINARY
|
| 31 |
+
|
| 32 |
+
Let $\mathcal { G } = \{ \mathbb { V } , \mathbb { E } , A \}$ be an undirected graph, where $\mathbb { V }$ is the set of nodes with $| \mathbb { V } | = n$ , $\mathbb { E }$ is the set of edges, and $\pmb { A }$ is adjacency matrix with $A _ { i , j } = A _ { j , i }$ to define the connection between node $i$ and node $j$ . The graph Laplacian matrix $\mathcal { L }$ is defined as $\overset { \vartriangle } { \boldsymbol { \mathcal { L } } } = \boldsymbol { D } - \boldsymbol { A }$ where $_ { D }$ is a diagonal degree matrix with $\textstyle D _ { i , i } = \sum _ { j } A _ { i , j }$ , and the normalized Laplacian matrix is ${ \cal L } = I _ { n } - { \cal D } ^ { - 1 / 2 } \bar { \cal A } { \cal D } ^ { - 1 / 2 }$ where ${ { I } _ { n } }$ is the identity matrix. Since $\pmb { L }$ is a real symmetric matrix, it has a complete set of orthonormal eigenvectors $U = \left( \ b { u } _ { 1 } , \ b { u } _ { 2 } , . . . , \ b { u } _ { n } \right)$ , known as Laplacian eigenvectors. These eigenvectors have associated real, non-negative eigenvalues $\{ \lambda _ { l } \} _ { l = 1 } ^ { n }$ , identified as the frequencies of graph. Eigenvectors associated with smaller eigenvalues carry slow varying signals, indicating that connected nodes share similar values. In contrast, eigenvectors associated with larger eigenvalues carry faster varying signals across connected nodes.
|
| 33 |
+
|
| 34 |
+
# 2.2 GRAPH FOURIER TRANSFORM
|
| 35 |
+
|
| 36 |
+
Taking the eigenvectors of normalized Laplacian matrix as a set of bases, graph Fourier transform of a signal $\pmb { x } \in R ^ { n }$ on graph $\mathcal { G }$ is defined as $\hat { \pmb x } = \pmb U ^ { \top } \pmb x$ , and the inverse graph Fourier transform is $\mathbf { \pmb { x } } = \pmb { U } \hat { \mathbf { x } }$ (Shuman et al., 2013). Graph Fourier transform, according to convolution theorem, offers us a way to define the graph convolution operator, denoted as $^ { \ast _ { \mathcal { G } } }$ . Denoting with $\textbf { { y } }$ the convolution kernel, $^ { \ast _ { \mathcal { G } } }$ is defined as
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\pmb { x } \ast _ { \mathscr { G } } \pmb { y } = \pmb { U } \big ( ( \pmb { U } ^ { \top } \pmb { y } ) \odot ( \pmb { U } ^ { \top } \pmb { x } ) \big ) ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $\odot$ is the element-wise Hadamard product. Replacing the vector $\pmb { U } ^ { \top } \pmb { y }$ by a diagonal matrix $g _ { \theta }$ , then Hadamard product can be written in the form of matrix multiplication. Filtering the signal $x$ by the filter $g _ { \theta }$ , we can write Equation (1) as $U g _ { \theta } \pmb { U } ^ { \top } \pmb { x }$ .
|
| 43 |
+
|
| 44 |
+
However, there are some limitations when using Fourier transform to implement graph convolution: (1) Eigendecomposition of Laplacian matrix to obtain Fourier basis $U$ is of high computational cost with $\bar { O } ( n ^ { 3 } )$ ; (2) Graph Fourier transform is inefficient, since it involves the multiplication between a dense matrix $U$ and the signal $_ { \textbf { \em x } }$ ; (3) Graph convolution defined through Fourier transform is not localized in vertex domain, i.e., the influence to the signal on one node is not localized in its neighborhood. To address these limitations, ChebyNet (Defferrard et al., 2016) restricts convolution kernel $g _ { \theta }$ to a polynomial expansion
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
g _ { \theta } = \sum _ { k = 0 } ^ { K - 1 } \theta _ { k } \Lambda ^ { k } ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $K$ is a hyper-parameter to determine the range of node neighborhoods via the shortest path distance, $\theta \in \bar { R } ^ { \bar { K } }$ is a vector of polynomial coefficients, and $\Lambda = \mathrm { d i a g } \big ( \{ \lambda _ { l } \} _ { l = 1 } ^ { n } \big )$ . However, such a polynomial approximation limits the flexibility to define appropriate convolution on graph, i.e., with a smaller $K$ , it’s hard to approximate the diagonal matrix $g _ { \boldsymbol { \theta } }$ with $n$ free parameters. While with a larger $K$ , locality is no longer guaranteed. Different from ChebyNet, we address the aforementioned three limitations through replacing graph Fourier transform with graph wavelet transform.
|
| 51 |
+
|
| 52 |
+
# 2.3 GRAPH WAVELET TRANSFORM
|
| 53 |
+
|
| 54 |
+
Similar to graph Fourier transform, graph wavelet transform projects graph signal from vertex domain into spectral domain. Graph wavelet transform employs a set of wavelets as bases, defined as $\psi _ { s } = ( \psi _ { s 1 } , \psi _ { s 2 } , . . . , \psi _ { s n } )$ , where each wavelet $\psi _ { s i }$ corresponds to a signal on graph diffused away from node $i$ and $s$ is a scaling parameter. Mathematically, $\psi _ { s i }$ can be written as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\psi _ { s } = U G _ { s } U ^ { \top } ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $U$ is Laplacian eigenvectors, $G _ { s } \mathrm { = d i a g } \big ( g ( s \lambda _ { 1 } ) , . . . , g ( s \lambda _ { n } ) \big )$ is a scaling matrix and $g ( s \lambda _ { i } ) =$ $e ^ { \lambda _ { i } s }$ .
|
| 61 |
+
|
| 62 |
+
Using graph wavelets as bases, graph wavelet transform of a signal $_ { \textbf { \em x } }$ on graph is defined as ${ \hat { \mathbf { x } } } = { }$ ${ \psi } _ { s } ^ { - 1 } \bar { x }$ and the inverse graph wavelet transform is $\boldsymbol { x } = \psi _ { s } \hat { \pmb { x } }$ . Note that $\bar { \psi } _ { s } ^ { - 1 }$ can be obtained by simply replacing the $g ( s \lambda _ { i } )$ in $\psi _ { s }$ with $g ( - s \lambda _ { i } )$ corresponding to a heat kernel (Donnat et al., 2018). Replacing the graph Fourier transform in Equation (1) with graph wavelet transform, we obtain the graph convolution as
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\pmb { x } * _ { \mathscr { G } } \pmb { y } = \psi _ { s } ( ( \psi _ { s } ^ { - 1 } \pmb { y } ) \odot ( \psi _ { s } ^ { - 1 } \pmb { x } ) ) .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
Compared to graph Fourier transform, graph wavelet transform has the following benefits when being used to define graph convolution:
|
| 69 |
+
|
| 70 |
+
1. High efficiency: graph wavelets can be obtained via a fast algorithm without requiring the eigendecomposition of Laplacian matrix. In Hammond et al. (2011), a method is proposed to use Chebyshev polynomials to efficiently approximate $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ , with the computational complexity $O ( m \times | \mathbb { E } | )$ , where $\lvert \mathbb { E } \rvert$ is the number of edges and $m$ is the order of Chebyshev polynomials.
|
| 71 |
+
|
| 72 |
+
2. High spareness: the matrix $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ are both sparse for real world networks, given that these networks are usually sparse. Therefore, graph wavelet transform is much more computationally efficient than graph Fourier transform. For example, in the Cora dataset, more than $9 7 \%$ elements in $\psi _ { s } ^ { - 1 }$ are zero while only less than $1 \%$ elements in $U ^ { \top }$ are zero (Table 4).
|
| 73 |
+
|
| 74 |
+
3. Localized convolution: each wavelet corresponds to a signal on graph diffused away from a centered node, highly localized in vertex domain. As a result, the graph convolution defined in Equation (4) is localized in vertex domain. We show the localization property of graph convolution in Appendix A. It is the localization property that explains why graph wavelet transform outperforms Fourier transform in defining graph convolution and the associated tasks like graph-based semisupervised learning.
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
Figure 1: Wavelets on an example graph at (a) small scale and (b) large scale.
|
| 78 |
+
|
| 79 |
+
4. Flexible neighborhood: graph wavelets are more flexible to adjust node’s neighborhoods. Different from previous methods which constrain neighborhoods by the discrete shortest path distance, our method leverages a continuous manner, i.e., varying the scaling parameter $s$ . A small value of $s$ generally corresponds to a smaller neighborhood. Figure 1 shows two wavelet bases at different scale on an example network, depicted using GSP toolbox (Perraudin et al., 2014).
|
| 80 |
+
|
| 81 |
+
# 2.4 GRAPH WAVELET NEURAL NETWORK
|
| 82 |
+
|
| 83 |
+
Replacing Fourier transform with wavelet transform, graph wavelet neural network (GWNN) is a multi-layer convolutional neural network. The structure of the $m$ -th layer is
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
{ \pmb X } _ { [ : , j ] } ^ { m + 1 } = h ( \psi _ { s } \sum _ { i = 1 } ^ { p } { \pmb F } _ { i , j } ^ { m } \psi _ { s } ^ { - 1 } { \pmb X } _ { [ : , i ] } ^ { m } ) \qquad j = 1 , \cdots , q ,
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $\psi _ { s }$ is wavelet bases, $\psi _ { s } ^ { - 1 }$ is the graph wavelet transform matrix at scale $s$ which projects signal in vertex domain into spectral domain, $X _ { [ : , i ] } ^ { m }$ with dimensions $n \times 1$ is the $i$ -th column of ${ \pmb X } ^ { m }$ , ${ \bf \it F } _ { i , j } ^ { m }$ is a diagonal filter matrix learned in spectral domain, and $h$ is a non-linear activation function. This layer transforms an input tensor ${ \pmb X } ^ { m }$ with dimensions $n \times p$ into an output tensor $X ^ { m + 1 }$ with dimensions $n \times q$ .
|
| 90 |
+
|
| 91 |
+
In this paper, we consider a two-layer GWNN for semi-supervised node classification on graph. The formulation of our model is
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\mathrm { f i r s t ~ l a y e r : ~ } X _ { [ : , j ] } ^ { 2 } = \mathrm { R e L U } ( \psi _ { s } \sum _ { i = 1 } ^ { p } F _ { i , j } ^ { 1 } \psi _ { s } ^ { - 1 } X _ { [ : , i ] } ^ { 1 } ) \qquad j = 1 , \cdots , q ,
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\mathrm { s e c o n d l a y e r : ~ } Z _ { j } = \mathrm { s o f t m a x } ( \psi _ { s } \sum _ { i = 1 } ^ { q } F _ { i , j } ^ { 2 } \psi _ { s } ^ { - 1 } X _ { [ : , \ : , i ] } ^ { 2 } ) \qquad j = 1 , \cdots , c ,
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
where $c$ is the number of classes in node classification, $z$ of dimensions $n \times c$ is the prediction result. The loss function is the cross-entropy error over all labeled examples:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\boldsymbol { L o s s } = - \sum _ { l \in y _ { L } } \sum _ { i = 1 } ^ { c } Y _ { l i } \mathrm { l n } { \boldsymbol { Z } _ { l i } } ,
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $y _ { L }$ is the labeled node set, $Y _ { l i } = 1$ if the label of node $l$ is $i$ , and ${ Y _ { l i } } = 0$ otherwise. The weights $\pmb { F }$ are trained using gradient descent.
|
| 108 |
+
|
| 109 |
+
# 2.5 REDUCING PARAMETER COMPLEXITY
|
| 110 |
+
|
| 111 |
+
In Equation (5), the parameter complexity of each layer is $O ( n \times p \times q )$ , where $n$ is the number of nodes, $p$ is the number of features of each vertex in current layer, and $q$ is the number of features of each vertex in next layer. Conventional CNN methods learn convolution kernel for each pair of input feature and output feature. This results in a huge number of parameters and generally requires huge training data for parameter learning. This is prohibited for graph-based semi-supervised learning. To combat this issue, we detach the feature transformation from graph convolution. Each layer in GWNN is divided into two components: feature transformation and graph convolution. Spectially, we have
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\begin{array} { c } { { \mathrm { f e a t u r e ~ t r a n s f o r m a t i o n : } ~ { \cal X } ^ { m ^ { \prime } } = { \cal X } ^ { m } { \cal W } , } } \\ { { \mathrm { g r a p h ~ c o n v o l u t i o n : } ~ { \cal X } ^ { m + 1 } = h ( \psi _ { s } { \cal F } ^ { m } \psi _ { s } ^ { - 1 } { \cal X } ^ { m ^ { \prime } } ) . } } \end{array}
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
where $W \in \mathbb { R } ^ { p \times q }$ is the parameter matrix for feature transformation, $X ^ { m ^ { \prime } }$ with dimensions $n \times q$ is the feature matrix after feature transformation, ${ \pmb F } ^ { m }$ is the diagonal matrix for graph convolution kernel, and $h$ is a non-linear activation function.
|
| 118 |
+
|
| 119 |
+
After detaching feature transformation from graph convolution, the parameter complexity is reduced from $O ( n \times p \times q )$ to $O ( n + p \times q )$ . The reduction of parameters is particularly valuable fro graphbased semi-supervised learning where labels are quite limited.
|
| 120 |
+
|
| 121 |
+
# 3 RELATED WORKS
|
| 122 |
+
|
| 123 |
+
Graph convolutional neural networks on graphs. The success of CNNs when dealing with images, videos, and speeches motivates researchers to design graph convolutional neural network on graphs. The key of generalizing CNNs to graphs is defining convolution operator on graphs. Existing methods are classified into two categories, i.e., spectral methods and spatial methods.
|
| 124 |
+
|
| 125 |
+
Spectral methods define convolution via convolution theorem. Spectral CNN (Bruna et al., 2014) is the first attempt at implementing CNNs on graphs, leveraging graph Fourier transform and defining convolution kernel in spectral domain. Boscaini et al. (2015) developed a local spectral CNN approach based on the graph Windowed Fourier Transform. Defferrard et al. (2016) introduced a Chebyshev polynomial parametrization for spectral filter, offering us a fast localized spectral filtering method. Kipf & Welling (2017) provided a simplified version of ChebyNet, gaining success in graph-based semi-supervised learning task. Khasanova & Frossard (2017) represented images as signals on graph and learned their transformation invariant representations. They used Chebyshev approximations to implement graph convolution, avoiding matrix eigendecomposition. Levie et al. (2017) used rational functions instead of polynomials and created anisotropic spectral filters on manifolds.
|
| 126 |
+
|
| 127 |
+
Spatial methods define convolution as a weighted average function over neighborhood of target vertex. GraphSAGE takes one-hop neighbors as neighborhoods and defines the weighting function as various aggregators over neighborhood (Hamilton et al., 2017). Graph attention network (GAT) proposes to learn the weighting function via self-attention mechanism (Velickovic et al., 2017). MoNet offers us a general framework for design spatial methods, taking convolution as the weighted average of multiple weighting functions defined over neighborhood (Monti et al., 2017). Some works devote to making graph convolutional networks more powerful. Monti et al. (2018) alternated convolutions on vertices and edges, generalizing GAT and leading to better performance. GraphsGAN (Ding et al., 2018) generalizes GANs to graph, and generates fake samples in low-density areas between subgraphs to improve the performance on graph-based semi-supervised learning.
|
| 128 |
+
|
| 129 |
+
Graph wavelets. Sweldens (1998) presented a lifting scheme, a simple construction of wavelets that can be adapted to graphs without learning process. Hammond et al. (2011) proposed a method to construct wavelet transform on graphs. Moreover, they designed an efficient way to bypass the eigendecomposition of the Laplacian and approximated wavelets with Chebyshev polynomials. Tremblay & Borgnat (2014) leveraged graph wavelets for multi-scale community mining by modulating a scaling parameter. Owing to the property of describing information diffusion, Donnat et al. (2018) learned structural node embeddings via wavelets. All these works prove that graph wavelets are not only local and sparse but also valuable for signal processiong on graph.
|
| 130 |
+
|
| 131 |
+
# 4 EXPERIMENTS
|
| 132 |
+
|
| 133 |
+
# 4.1 DATASETS
|
| 134 |
+
|
| 135 |
+
To evaluate the proposed GWNN, we apply GWNN on semi-supervised node classification, and conduct experiments on three benchmark datasets, namely, Cora, Citeseer and Pubmed (Sen et al., 2008). In the three citation network datasets, nodes represent documents and edges are citation links. Details of these datasets are demonstrated in Table 1. Here, the label rate denotes the proportion of labeled nodes used for training. Following the experimental setup of GCN (Kipf & Welling, 2017), we fetch 20 labeled nodes per class in each dataset to train the model.
|
| 136 |
+
|
| 137 |
+
Table 1: The Statistics of Datasets
|
| 138 |
+
|
| 139 |
+
<table><tr><td>Dataset</td><td>Nodes</td><td>Edges</td><td>Classes</td><td>Features</td><td>Label Rate</td></tr><tr><td>Cora</td><td>2,708</td><td>5,429</td><td>7</td><td>1,433</td><td>0.052</td></tr><tr><td>Citeseer</td><td>3,327</td><td>4,732</td><td>6</td><td>3,703</td><td>0.036</td></tr><tr><td>Pubmed</td><td>19,717</td><td>44,338</td><td>3</td><td>500</td><td>0.003</td></tr></table>
|
| 140 |
+
|
| 141 |
+
# 4.2 BASELINES
|
| 142 |
+
|
| 143 |
+
We compare with several traditional semi-supervised learning methods, including label propagation (LP) (Zhu et al., 2003), semi-supervised embedding (SemiEmb) (Weston et al., 2012), manifold regularization (ManiReg) (Belkin et al., 2006), graph embeddings (DeepWalk) (Perozzi et al., 2014), iterative classification algorithm (ICA) (Lu & Getoor, 2003) and Planetoid (Yang et al., 2016).
|
| 144 |
+
|
| 145 |
+
Furthermore, along with the development of deep learning on graph, graph convolutional networks are proved to be effective in semi-supervised learning. Since our method is a spectral method based on convolution theorem, we compare it with the Spectral CNN (Bruna et al., 2014). ChebyNet (Defferrard et al., 2016) and GCN (Kipf & Welling, 2017), two variants of the Spectral CNN, are also included as our baselines. Considering spatial methods, we take MoNet (Monti et al., 2017) as our baseline, which also depends on Laplacian matrix.
|
| 146 |
+
|
| 147 |
+
# 4.3 EXPERIMENTAL SETTINGS
|
| 148 |
+
|
| 149 |
+
We train a two-layer graph wavelet neural network with 16 hidden units, and prediction accuracy is evaluated on a test set of 1000 labeled samples. The partition of datasets is the same as GCN (Kipf & Welling, 2017) with an additional validation set of 500 labeled samples to determine hyper-parameters.
|
| 150 |
+
|
| 151 |
+
Weights are initialized following Glorot & Bengio (2010). We adopt the Adam optimizer (Kingma & Ba, 2014) for parameter optimization with an initial learning rate $l r = 0 . 0 1$ . For computational efficiency, we set the elements of $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ smaller than a threshold $t$ to 0. We find the optimal hyper-parameters $s$ and $t$ through grid search, and the detailed discussion about the two hyperparameters is introduced in Appendix B. For Cora, $s = 1 . 0$ and $t = 1 e - 4$ . For Citeseer, $s = 0 . 7$ and $t = 1 e - 5$ . For Pubmed, $s = 0 . 5$ and $t = 1 e - 7$ . To avoid overfitting, dropout (Srivastava et al., 2014) is applied. Meanwhile, we terminate the training if the validation loss does not decrease for 100 consecutive epochs.
|
| 152 |
+
|
| 153 |
+
# 4.4 ANALYSIS ON DETACHING FEATURE TRANSFORMATION FROM CONVOLUTION
|
| 154 |
+
|
| 155 |
+
Since the number of parameters for the undetached version of GWNN is $O ( n \times p \times q )$ , we can hardly implement this version in the case of networks with a large number $n$ of nodes and a huge number $p$ of input features. Here, we validate the effectiveness of detaching feature transformation form convolution on ChebyNet (introduced in Section 2.2), whose parameter complexity is $O ( K \times$ $p \times q \rangle$ . For ChebyNet of detaching feature transformation from graph convolution, the number of parameters is reduced to $O ( K + p \times q )$ . Table 2 shows the performance and the number of parameters on three datasets. Here, the reported performance is the optimal performance varying the order $K = 2 , 3 , 4$ .
|
| 156 |
+
|
| 157 |
+
Table 2: Results of Detaching Feature Transformation from Convolution
|
| 158 |
+
|
| 159 |
+
<table><tr><td></td><td>Method</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td rowspan="2">Prediction Accuracy</td><td>ChebyNet</td><td>81.2%</td><td>69.8%</td><td>74.4%</td></tr><tr><td>Detaching-ChebyNet</td><td>81.6%</td><td>68.5%</td><td>78.6%</td></tr><tr><td rowspan="2">Number of Parameters</td><td>ChebyNet</td><td>46.080 (K=2)</td><td>178,032 (K=3)</td><td>24,144 (K=3)</td></tr><tr><td>Detaching-ChebyNet</td><td>23,048 (K=4)</td><td>59,348 (K=2)</td><td>8,054 (K=3)</td></tr></table>
|
| 160 |
+
|
| 161 |
+
As demonstrated in Table 2, with fewer parameters, we improve the accuracy on Pubmed by a large margin. This is due to that the label rate of Pubmed is only 0.003. By detaching feature transformation from convolution, the parameter complexity is significantly reduced, alleviating overfitting in semi-supervised learning and thus remarkably improving prediction accuracy. On Citeseer, there is a little drop on the accuracy. One possible explanation is that reducing the number of parameters may restrict the modeling capacity to some degree.
|
| 162 |
+
|
| 163 |
+
# 4.5 PERFORMANCE OF GWNN
|
| 164 |
+
|
| 165 |
+
We now validate the effectiveness of GWNN with detaching technique on node classification. Experimental results are reported in Table 3. GWNN improves the classification accuracy on all the three datasets. In particular, replacing Fourier transform with wavelet transform, the proposed GWNN is comfortably ahead of Spectral CNN, achieving $1 0 \%$ improvement on Cora and Citeseer, and $5 \%$ improvement on Pubmed. The large improvement could be explained from two perspectives: (1) Convolution in Spectral CNN is non-local in vertex domain, and thus the range of feature diffusion is not restricted to neighboring nodes; (2) The scaling parameter $s$ of wavelet transform is flexible to adjust the diffusion range to suit different applications and different networks. GWNN consistently outperforms ChebyNet, since it has enough degree of freedom to learn the convolution kernel, while ChebyNet is a kind of approximation with limited degree of freedom. Furthermore, our GWNN also performs better than GCN and MoNet, reflecting that it is promising to design appropriate bases for spectral methods to achieve good performance.
|
| 166 |
+
|
| 167 |
+
Table 3: Results of Node Classification
|
| 168 |
+
|
| 169 |
+
<table><tr><td>Method</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td>MLP</td><td>55.1%</td><td>46.5%</td><td>71.4%</td></tr><tr><td>ManiReg</td><td>59.5%</td><td>60.1%</td><td>70.7%</td></tr><tr><td>SemiEmb</td><td>59.0%</td><td>59.6%</td><td>71.7%</td></tr><tr><td>LP</td><td>68.0%</td><td>45.3%</td><td>63.0%</td></tr><tr><td>DeepWalk</td><td>67.2%</td><td>43.2%</td><td>65.3%</td></tr><tr><td>ICA</td><td>75.1%</td><td>69.1%</td><td>73.9%</td></tr><tr><td>Planetoid</td><td>75.7%</td><td>64.7%</td><td>77.2%</td></tr><tr><td>Spectral CNN</td><td>73.3%</td><td>58.9%</td><td>73.9%</td></tr><tr><td>ChebyNet</td><td>81.2%</td><td>69.8%</td><td>74.4%</td></tr><tr><td>GCN</td><td>81.5%</td><td>70.3%</td><td>79.0%</td></tr><tr><td>MoNet</td><td>81.7±0.5%</td><td></td><td>78.8±0.3%</td></tr><tr><td>GWNN</td><td>82.8%</td><td>71.7%</td><td>79.1%</td></tr></table>
|
| 170 |
+
|
| 171 |
+
# 4.6 ANALYSIS ON SPARSITY
|
| 172 |
+
|
| 173 |
+
Besides the improvement on prediction accuracy, wavelet transform with localized and sparse transform matrix holds sparsity in both spatial domain and spectral domain. Here, we take Cora as an example to illustrate the sparsity of graph wavelet transform.
|
| 174 |
+
|
| 175 |
+
The sparsity of transform matrix. There are 2,708 nodes in Cora. Thus, the wavelet transform matrix $\psi _ { s } ^ { - 1 }$ and the Fourier transform matrix $U ^ { \top }$ both belong to $\mathbb { R } ^ { 2 , 7 0 8 \times 2 , 7 0 8 }$ . The first two rows in Table 4 demonstrate that $\psi _ { s } ^ { - 1 }$ is much sparser than $U ^ { \top }$ . Sparse wavelets not only accelerate the computation, but also well capture the neighboring topology centered at each node.
|
| 176 |
+
|
| 177 |
+
The sparsity of projected signal. As mentioned above, each node in Cora represents a document and has a sparse bag-of-words feature. The input feature $\ b { X } \in \mathbb { R } ^ { n \times p }$ is a binary matrix, and $X _ { [ i , j ] } =$ 1 when the $i$ -th document contains the $j$ -th word in the bag of words, it equals 0 otherwise. Here, $X _ { [ : , j ] }$ denotes the $j$ -th column of $\boldsymbol { X }$ , and each column represents the feature vector of a word. Considering a specific signal $X _ { [ : , 9 8 4 ] }$ , we project the spatial signal into spectral domain, and get its projected vector. Here, $p = \bar { \psi _ { s } ^ { - 1 } } X _ { [ : , 9 8 4 ] }$ denotes the projected vector via wavelet transform, $\pmb { q } = \pmb { U } ^ { \top } \pmb { X } _ { [ : , 9 8 4 ] }$ denotes the projected vector via Fourier transform, and $\pmb { p } , \pmb { q } \in \mathbb { R } ^ { 2 , 7 0 8 }$ . The last row in Table 4 lists the numbers of non-zero elements in $\pmb { p }$ and $\pmb q$ . As shown in Table 4, with wavelet transform, the projected signal is much sparser.
|
| 178 |
+
|
| 179 |
+
Table 4: Statistics of wavelet transform and Fourier transform on Cora
|
| 180 |
+
|
| 181 |
+
<table><tr><td></td><td>Statistical Property</td><td>wavelettransform</td><td>Fouriertransform</td></tr><tr><td rowspan="2">Transform Matrix</td><td>Density</td><td>2.8%</td><td>99.1%</td></tr><tr><td>Number of Non-zero Elements</td><td>205,774</td><td>7,274,383</td></tr><tr><td rowspan="2">Projected Signal</td><td>Density</td><td>10.9%</td><td>100%</td></tr><tr><td>Number of Non-zero Elements</td><td>297</td><td>2,708</td></tr></table>
|
| 182 |
+
|
| 183 |
+
# 4.7 ANALYSIS ON INTERPRETABILITY
|
| 184 |
+
|
| 185 |
+
Compare with graph convolution network using Fourier transform, GWNN provides good interpretability. Here, we show the interpretability with specific examples in Cora.
|
| 186 |
+
|
| 187 |
+
Each feature, i.e. word in the bag of words, has a projected vector, and each element in this vector is associated with a spectral wavelet basis. Here, each basis is centered at a node, corresponding to a document. The value can be regarded as the relation between the word and the document. Thus, each value in $\pmb { p }$ can be interpreted as the relation between $W o r d _ { 9 8 4 }$ and a document. In order to elaborate the interpretability of wavelet transform, we analyze the projected values of different feature as following.
|
| 188 |
+
|
| 189 |
+
Considering two features $W o r d _ { 9 8 4 }$ and $W o r d _ { 1 1 7 7 }$ , we select the top-10 active bases, which have the 10 largest projected values of each feature. As illustrated in Figure 2, for clarity, we magnify the local structure of corresponding nodes and marked them with bold rims. The central network in each subgraph denotes the dataset Cora, each node represents a document, and 7 different colors represent 7 classes. These nodes are clustered by OpenOrd (Martin et al., 2011) based on the adjacency matrix.
|
| 190 |
+
|
| 191 |
+
Figure 2a shows the top-10 active bases of $W o r d _ { 9 8 4 }$ . In Cora, this word only appears 8 times, and all the documents containing $W o r d _ { 9 8 4 }$ belong to the class “ Case-Based ”. Consistently, all top-10 nodes activated by $W o r d _ { 9 8 4 }$ are concentrated and belong to the class “ Case-Based ”. And, the frequencies of $W o r d _ { 1 1 7 7 }$ appearing in different classes are similar, indicating that $W o r d _ { 1 1 7 7 }$ is a universal word. In concordance with our expectation, the top-10 active bases of $W o r d _ { 1 1 7 7 }$ are discrete and belong to different classes in Figure 2b.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 2: Top-10 active bases of two words in Cora. The central network of each subgraph represents the dataset Cora, which is split into 7 classes. Each node represents a document, and its color indicates its label. The nodes that represent the top-10 active bases are marked with bold rims. (a) $W o r d _ { 9 8 4 }$ only appears in documents of the class “ Case-Based ” in Cora. Consistently, all its 10 active bases also belong to the class “ Case-Based ”. (b) The frequencies of $W o r d _ { 1 1 7 7 }$ appearing in different classes are similar in Cora. As expected, the top-10 active bases of $W o r d _ { 1 1 7 7 }$ also belong to different classes.
|
| 195 |
+
|
| 196 |
+
Owing to the properties of graph wavelets, which describe the neighboring topology centered at each node, the projected values of wavelet transform can be explained as the correlation between features and nodes. These properties provide an interpretable domain transformation and ease the understanding of graph convolution.
|
| 197 |
+
|
| 198 |
+
# 5 CONCLUSION
|
| 199 |
+
|
| 200 |
+
Replacing graph Fourier transform with graph wavelet transform, we proposed GWNN. Graph wavelet transform has three desirable properties: (1) Graph wavelets are local and sparse; (2) Graph wavelet transform is computationally efficient; (3) Convolution is localized in vertex domain. These advantages make the whole learning process interpretable and efficient. Moreover, to reduce the number of parameters and the dependence on huge training data, we detached the feature transformation from convolution. This practice makes GWNN applicable to large graphs, with remarkable performance improvement on graph-based semi-supervised learning.
|
| 201 |
+
|
| 202 |
+
# 6 ACKNOWLEDGEMENTS
|
| 203 |
+
|
| 204 |
+
This work is funded by the National Natural Science Foundation of China under grant numbers 61425016, 61433014, and 91746301. Huawei Shen is also funded by K.C. Wong Education Foundation and the Youth Innovation Promotion Association of the Chinese Academy of Sciences.
|
| 205 |
+
|
| 206 |
+
# REFERENCES
|
| 207 |
+
|
| 208 |
+
Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of machine learning research, 7 (Nov):2399–2434, 2006.
|
| 209 |
+
|
| 210 |
+
Davide Boscaini, Jonathan Masci, Simone Melzi, Michael M Bronstein, Umberto Castellani, and Pierre Vandergheynst. Learning class-specific descriptors for deformable shapes using localized spectral convolutional networks. In Computer Graphics Forum, volume 34, pp. 13–23. Wiley Online Library, 2015.
|
| 211 |
+
|
| 212 |
+
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.
|
| 213 |
+
|
| 214 |
+
Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann Lecun. Spectral networks and locally connected networks on graphs. In International Conference on Learning Representations (ICLR2014), CBLS, April 2014, 2014.
|
| 215 |
+
|
| 216 |
+
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.
|
| 217 |
+
|
| 218 |
+
Ming Ding, Jie Tang, and Jie Zhang. Semi-supervised learning on graphs with generative adversarial nets. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, pp. 913–922. ACM, 2018.
|
| 219 |
+
|
| 220 |
+
Claire Donnat, Marinka Zitnik, David Hallac, and Jure Leskovec. Learning structural node embeddings via diffusion wavelets. 2018.
|
| 221 |
+
|
| 222 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249–256, 2010.
|
| 223 |
+
|
| 224 |
+
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems, pp. 1024–1034, 2017.
|
| 225 |
+
|
| 226 |
+
David K Hammond, Pierre Vandergheynst, and Remi Gribonval. Wavelets on graphs via spectral ´ graph theory. Applied and Computational Harmonic Analysis, 30(2):129–150, 2011.
|
| 227 |
+
|
| 228 |
+
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.
|
| 229 |
+
|
| 230 |
+
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.
|
| 231 |
+
|
| 232 |
+
Renata Khasanova and Pascal Frossard. Graph-based isometry invariant representation learning. In International Conference on Machine Learning, pp. 1847–1856, 2017.
|
| 233 |
+
|
| 234 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 235 |
+
|
| 236 |
+
Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017.
|
| 237 |
+
|
| 238 |
+
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.
|
| 239 |
+
|
| 240 |
+
Ron Levie, Federico Monti, Xavier Bresson, and Michael M Bronstein. Cayleynets: Graph convolutional neural networks with complex rational spectral filters. arXiv preprint arXiv:1705.07664, 2017.
|
| 241 |
+
|
| 242 |
+
Qing Lu and Lise Getoor. Link-based classification. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pp. 496–503, 2003.
|
| 243 |
+
|
| 244 |
+
Shawn Martin, W Michael Brown, Richard Klavans, and Kevin W Boyack. Openord: an opensource toolbox for large graph layout. In Visualization and Data Analysis 2011, volume 7868, pp. 786806. International Society for Optics and Photonics, 2011.
|
| 245 |
+
|
| 246 |
+
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 Proc. CVPR, volume 1, pp. 3, 2017.
|
| 247 |
+
|
| 248 |
+
Federico Monti, Oleksandr Shchur, Aleksandar Bojchevski, Or Litany, Stephan Gunnemann, ¨ and Michael M Bronstein. Dual-primal graph convolutional networks. arXiv preprint arXiv:1806.00770, 2018.
|
| 249 |
+
|
| 250 |
+
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.
|
| 251 |
+
|
| 252 |
+
Nathanael Perraudin, Johan Paratte, David Shuman, Lionel Martin, Vassilis Kalofolias, Pierre Van-¨ dergheynst, and David K Hammond. Gspbox: A toolbox for signal processing on graphs. arXiv preprint arXiv:1408.5781, 2014.
|
| 253 |
+
|
| 254 |
+
Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina Eliassi-Rad. Collective classification in network data. AI magazine, 29(3):93, 2008.
|
| 255 |
+
|
| 256 |
+
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. IEEE Signal Processing Magazine, 30(3):83–98, 2013.
|
| 257 |
+
|
| 258 |
+
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.
|
| 259 |
+
|
| 260 |
+
Wim Sweldens. The lifting scheme: A construction of second generation wavelets. SIAM journal on mathematical analysis, 29(2):511–546, 1998.
|
| 261 |
+
|
| 262 |
+
Nicolas Tremblay and Pierre Borgnat. Graph wavelets for multiscale community mining. IEEE Transactions on Signal Processing, 62(20):5227–5239, 2014.
|
| 263 |
+
|
| 264 |
+
Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. arXiv preprint arXiv:1710.10903, 2017.
|
| 265 |
+
|
| 266 |
+
Jason Weston, Fred´ eric Ratle, Hossein Mobahi, and Ronan Collobert. Deep learning via semi- ´ supervised embedding. In Neural Networks: Tricks of the Trade, pp. 639–655. Springer, 2012.
|
| 267 |
+
|
| 268 |
+
Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International Conference on Machine Learning, pp. 40–48, 2016.
|
| 269 |
+
|
| 270 |
+
Xiaojin Zhu, Zoubin Ghahramani, and John D Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Proceedings of the 20th International conference on Machine learning (ICML-03), pp. 912–919, 2003.
|
| 271 |
+
|
| 272 |
+
We use a diagonal matrix $\Theta$ to represent the learned kernel transformed by wavelets $\psi _ { s } ^ { - 1 } \pmb { y }$ , and replace the Hadamard product with matrix muplication. Then Equation (4) is:
|
| 273 |
+
|
| 274 |
+
$$
|
| 275 |
+
\pmb { x } * _ { \mathcal { G } } \pmb { y } = \psi _ { s } \Theta \psi _ { s } ^ { - 1 } \pmb { x } .
|
| 276 |
+
$$
|
| 277 |
+
|
| 278 |
+
We set $\psi _ { s } = ( \psi _ { s 1 } , \psi _ { s 2 } , . . . , \psi _ { s n } )$ , $\psi _ { s } ^ { - 1 } = ( \psi _ { s 1 } ^ { * } , \psi _ { s 2 } ^ { * } , . . . , \psi _ { s n } ^ { * } )$ , and $\Theta = \mathrm { d i a g } ( \{ \theta _ { k } \} _ { k = 1 } ^ { n } )$ . Equation (11) becomes :
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\pmb { x } * _ { \mathscr { G } } \pmb { y } = \sum _ { k = 1 } ^ { n } \theta _ { k } \psi _ { s k } ( \psi _ { s k } ^ { * } ) ^ { \top } \pmb { x } .
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
As proved by Hammond et al. (2011), both $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ are local in small scale (s). Figure 3 shows the locality of $\psi _ { s 1 }$ and $\psi _ { s 1 } ^ { * }$ , i.e., the first column in $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ when $s = 3$ . Each column in $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ describes the neighboring topology of target node, which means that $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ are local. The locality of $\psi _ { s k }$ and $\psi _ { s k } ^ { * }$ leads to the locality of the resulting matrix of multiplication between the column vector $\psi _ { s k }$ and row vector $( \psi _ { s k } ^ { * } ) ^ { \top }$ . For convenience, we set $M _ { k } = \psi _ { s k } ( \psi _ { s k } ^ { * } ) ^ { \top }$ , $M _ { k [ i , j ] } > 0$ only when $\psi _ { s k } [ i ] > 0$ and $( \psi _ { s k } ^ { * } ) ^ { \top } [ j ] > 0$ . In other words, if $M _ { k [ i , j ] } > 0$ , vertex $i$ and vertex $j$ can correlate with each other through vertex $k$ .
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
Figure 3: Locality of (a) $\psi _ { s 1 }$ and (b) $\psi _ { s 1 } ^ { * }$ .
|
| 288 |
+
|
| 289 |
+
Since each $M _ { k }$ is local, for any convolution kernel $\Theta$ , $\psi _ { s } \Theta \psi _ { s } ^ { - 1 }$ is local, and it means that convolution is localized in vertex domain. By replacing $\Theta$ with an identity matrix in Equation (12), we get $\begin{array} { r } { \pmb { x } * _ { \mathcal { G } } \pmb { y } = \sum _ { k = 1 } ^ { n } M _ { k } \pmb { x } } \end{array}$ . We define $\begin{array} { r } { \mathbf { \dot { H } } = \sum _ { k = 1 } ^ { n ^ { * } } M _ { k } } \end{array}$ , and Figure 4 shows $H _ { [ 1 , : ] }$ in different scaling, i.e., correlation between the first node and other nodes during convolution. The locality of $\pmb { H }$ suggests that graph convolution is localized in vertex domain. Moreover, as the scaling parameter $s$ becomes larger, the range of feature diffusion becomes larger.
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 4: Correlation between first node and other nodes at (a) small scale and (b) large scale. Nonzero value of node represents correlation between this node and target node during convolution. Locality of $\pmb { H }$ suggests that graph convolution is localized in vertex domain. Moreover, with scaling parameter $s$ becoming larger, the range of feature diffusion becomes larger.
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 5: Influence of $s$ and $t$ on Cora.
|
| 296 |
+
|
| 297 |
+
GWNN leverages graph wavelets to implement graph convolution, where $s$ is used to modulate the range of neighborhoods. From Figure 5, as $s$ becomes larger starting from 0, the range of neighboring nodes becomes large, resulting the increase of accuracy on Cora. However when $s$ becomes too large, some irrelevant nodes are included, leading to decreasing of accuracy. The hyperparameter $t$ only used for computational efficiency, has any slight influence on its performance.
|
| 298 |
+
|
| 299 |
+
For experiments on specific dataset, $s$ and $t$ are choosen via grid search using validation. Generally, a appropriate $s$ is in the range of [0.5, 1], which can not only capture the graph structure but also guarantee the locality of convolution, and $t$ is less insensive to dataset.
|
| 300 |
+
|
| 301 |
+
# APPENDIX C PARAMETER COMPLEXITY OF NODE CLASSIFICATION
|
| 302 |
+
|
| 303 |
+
We show the parameter complexity of node classification in Table 5. The high parameter complexity $O ( n * p * q )$ of Spectral CNN makes it difficult to generalize to real world networks. ChebyNet approximates the convolution kernel via polynomial function of the diagonal matrix of Laplacian eigenvalues, reducing parameter complexity to $O ( K * p * q )$ with $K$ being the order of polynomial function. GCN simplifies ChebyNet via setting $K { = } 1$ . We detach feature transformation from graph convolution to implement GWNN and Spectral CNN in our experiments, which can reduce parameter to $O ( n + p * q )$ .
|
| 304 |
+
|
| 305 |
+
Table 5: Parameter complexity of Node Classification
|
| 306 |
+
|
| 307 |
+
<table><tr><td>Method</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td>Spectral CNN</td><td>62,392,320</td><td>197,437,488</td><td>158,682,416</td></tr><tr><td>Spectral CNN (detaching)</td><td>28,456</td><td>65,379</td><td>47,482</td></tr><tr><td>ChebyNet</td><td>46,080 (K=2)</td><td>178,032 (K=3)</td><td>24,144 (K=3)</td></tr><tr><td>GCN</td><td>23,040</td><td>59,344</td><td>8.048</td></tr><tr><td>GWNN</td><td>28,456</td><td>65,379</td><td>47,482</td></tr></table>
|
| 308 |
+
|
| 309 |
+
In Cora and Citeseer, with smaller parameter complexity, GWNN achieves better performance than ChebyNet, reflecting that it is promising to implement convolution via graph wavelet transform. As Pubmed has a large number of nodes, the parameter complexity of GWNN is larger than ChebyNet. As future work, it is an interesting attempt to select wavelets associated with a subset of nodes, further reducing parameter complexity with potential loss of performance.
|
| 310 |
+
|
| 311 |
+
# APPENDIX D FAST GRAPH WAVELETS WITH CHEBYSHEV POLYNOMIAL APPROXIMATION
|
| 312 |
+
|
| 313 |
+
Hammond et al. (2011) proposed a method, using Chebyshev polynomials to efficiently approximate $\psi _ { s }$ and $\psi _ { s } ^ { - 1 }$ . The computational complexity is $O ( m \times | \mathbb { E } | )$ , where $\lvert \mathbb { E } \rvert$ is the number of edges and $m$ is the order of Chebyshev polynomials. We give the details of the approximation proposed in Hammond et al. (2011).
|
| 314 |
+
|
| 315 |
+
With the stable recurrence relation $T _ { k } ( y ) = 2 y T _ { k - 1 } ( y ) - T _ { k - 2 } ( y )$ , we can generate the Chebyshev polynomials $T _ { k } ( y )$ . Here $T _ { 0 } = 1$ and $T _ { 1 } = y$ . For $y$ sampled between $^ { - 1 }$ and 1, the trigonometric expression $T _ { k } ( y ) = c o s ( k a r c c o s ( y ) )$ is satisfied. It shows that $T _ { k } ( y ) \in [ - 1 , 1 ]$ when $y \in [ - 1 , 1 ]$ . Through the Chebyshev polynomials, an orthogonal basis for the Hilbert space of square integrable functions $L ^ { 2 } ( [ - 1 , 1 ] , \frac { d y } { \sqrt { 1 - y ^ { 2 } } } )$ is formed. For each $h$ in this Hilbert space, we have a uniformly convergent Chebyshev series $\begin{array} { r } { h ( y ) = \frac { 1 } { 2 } c _ { 0 } + \sum _ { k = 1 } ^ { \infty } c _ { k } T _ { k } ( y ) } \end{array}$ , and the Chebyshev coefficients $c _ { k } =$ $\begin{array} { r } { \frac { 2 } { \pi } \int _ { - 1 } ^ { 1 } \frac { T _ { k } ( y ) h ( y ) } { \sqrt { 1 - y ^ { 2 } } } d y = \frac { 2 } { \pi } \int _ { 0 } ^ { \pi } c o s ( k \theta ) h ( \bar { c o s } ( \theta ) ) d \theta } \end{array}$ . A fixed scale $s$ is assumed. To approximate $g ( s x )$ for $x \in [ 0 , \lambda _ { m a x } ]$ , we can shift the domain through the transformation $x = a ( y + 1 ) $ , where $a =$ $\frac { \lambda _ { m a x } } { 2 }$ $\begin{array} { r } { T _ { k } ^ { \prime } ( x ) = T _ { k } ( \frac { x - a } { a } ) } \end{array}$ e shif, and , $\frac { x - a } { a } \in [ - 1 , 1 ]$ . $\begin{array} { r } { g ( s x ) = \frac { 1 } { 2 } c _ { 0 } + \sum _ { k = 1 } ^ { \infty } c _ { k } T _ { k } ^ { \prime } ( x ) } \end{array}$ $x \in [ 0 , \lambda _ { m a x } ]$ $\begin{array} { r } { c _ { k } = \frac { 2 } { \pi } \int _ { 0 } ^ { \pi } c o s ( k \theta ) g ( s ( a ( c o s ( \theta ) + 1 ) ) ) d \theta } \end{array}$ we truncate the Chebyshev expansion to $m$ terms and achieve Polynomial approximation.
|
| 316 |
+
|
| 317 |
+
sgive the fast approximation wavelets by Here we give the example of the $\psi _ { s } ^ { - 1 }$ and $\begin{array} { r } { \psi _ { s } ^ { - 1 } \pmb { f } ^ { \prime } = \frac { 1 } { 2 } c _ { 0 } \pmb { f } + \sum _ { k = 1 } ^ { m } c _ { k } \tilde { T _ { k } ^ { \prime } } ( \pmb { L } ) \pmb { f } } \end{array}$ $g ( s x ) = e ^ { - s x }$ , the graph signal is . The efficient compu- $\pmb { f } \in R ^ { n }$ . Then we can tation of $T _ { k } ^ { \prime } ( { \pmb { L } } )$ determines the utility of this approach, where $\begin{array} { r } { T _ { k } ^ { \prime } ( L ) \dag = \frac { 2 } { a } ( L - \pmb { I } ) ( T _ { k - 1 } ^ { \prime } ( L ) \pmb { f } ) - } \end{array}$ $T _ { k - 2 } ^ { \prime } ( { \pmb { L } } ) f$ .
|
| 318 |
+
|
| 319 |
+
# APPENDIX E ANALYSIS ON SPASITY OF SPECTRAL TRANSFORM AND LAPLACIAN MATRIX
|
| 320 |
+
|
| 321 |
+
The sparsity of the graph wavelets depends on the sparsity of the Laplacian matrix and the hyperparameter $s$ , We show the sparsity of spectral transform matrix and Laplacian matrix in Table 6.
|
| 322 |
+
|
| 323 |
+
Table 6: Statistics of spectral transform and Laplacian matrix on Cora
|
| 324 |
+
|
| 325 |
+
<table><tr><td></td><td>Density</td><td>NumofNon-zeroElements</td></tr><tr><td>wavelettransform</td><td>2.8%</td><td>205,774</td></tr><tr><td>Fouriertransform</td><td>99.1%</td><td>7,274,383</td></tr><tr><td>Laplacian matrix</td><td>0.15%</td><td>10,858</td></tr></table>
|
| 326 |
+
|
| 327 |
+
The sparsity of Laplacian matrix is sparser than graph wavelets, and this property limits our method, i.e., the higher time complexity than some methods depending on Laplacian matrix and identity matrix, e.g., GCN. Specifically, both our method and GCN aim to improve Spectral CNN via designing localized graph convolution. GCN, as a simplified version of ChebyNet, leverages Laplacian matrix as weighted matrix and expresses the spectral graph convolution in spatial domain, acting as spatial-like method (Monti et al., 2017). However, our method resorts to using graph wavelets as a new set of bases, directly designing localized spectral graph convolution. GWNN offers a localized graph convolution via replacing graph Fourier transform with graph wavelet transform, finding good spectral basis with localization property and good interpretability. This distinguishes GWNN from ChebyNet and GCN, which express the graph convolution defined via graph Fourier transform in vertex domain.
|
md/train/HJ_aoCyRZ/HJ_aoCyRZ.md
ADDED
|
@@ -0,0 +1,542 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPECTRALNET: SPECTRAL CLUSTERING USING DEEP NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Uri Shaham∗†, Kelly Stanton∗, Henry Li∗
|
| 4 |
+
Yale University
|
| 5 |
+
New Haven, CT, USA
|
| 6 |
+
{uri.shaham, kelly.stanton, henry.li}@yale.edu
|
| 7 |
+
|
| 8 |
+
# Yuval Kluger
|
| 9 |
+
|
| 10 |
+
Boaz Nadler, Ronen Basri
|
| 11 |
+
Weizmann Institute of Science
|
| 12 |
+
Rehovot, Israel
|
| 13 |
+
{boaz.nadler, ronen.basri}@gmail.com
|
| 14 |
+
|
| 15 |
+
Yale University New Haven, CT, USA yuval.kluger@yale.edu
|
| 16 |
+
|
| 17 |
+
# ABSTRACT
|
| 18 |
+
|
| 19 |
+
Spectral clustering is a leading and popular technique in unsupervised data analysis. Two of its major limitations are scalability and generalization of the spectral embedding (i.e., out-of-sample-extension). In this paper we introduce a deep learning approach to spectral clustering that overcomes the above shortcomings. Our network, which we call SpectralNet, learns a map that embeds input data points into the eigenspace of their associated graph Laplacian matrix and subsequently clusters them. We train SpectralNet using a procedure that involves constrained stochastic optimization. Stochastic optimization allows it to scale to large datasets, while the constraints, which are implemented using a specialpurpose output layer, allow us to keep the network output orthogonal. Moreover, the map learned by SpectralNet naturally generalizes the spectral embedding to unseen data points. To further improve the quality of the clustering, we replace the standard pairwise Gaussian affinities with affinities learned from the given unlabeled data using a Siamese network. Additional improvement of the resulting clustering can be achieved by applying the network to code representations produced, e.g., by standard autoencoders. Our end-to-end learning procedure is fully unsupervised. In addition, we apply VC dimension theory to derive a lower bound on the size of SpectralNet. State-of-the-art clustering results are reported on the Reuters dataset. Our implementation is publicly available at https://github.com/kstant0725/SpectralNet.
|
| 20 |
+
|
| 21 |
+
# 1 INTRODUCTION
|
| 22 |
+
|
| 23 |
+
Discovering clusters in unlabeled data is a task of significant scientific and practical value. With technological progress images, texts, and other types of data are acquired in large numbers. Their labeling, however, is often expensive, tedious, or requires expert knowledge. Clustering techniques provide useful tools to analyze such data and to reveal its underlying structure.
|
| 24 |
+
|
| 25 |
+
Spectral Clustering (Shi & Malik, 2000; $\mathrm { N g }$ et al., 2002; Von Luxburg, 2007) is a leading and highly popular clustering algorithm. It works by embedding the data in the eigenspace of the Laplacian matrix, derived from the pairwise similarities between data points, and applying $k$ -means to this representation to obtain the clusters. Several properties make spectral clustering appealing: First, its embedding optimizes a natural cost function, minimizing pairwise distances between similar data points; moreover, this optimal embedding can be found analytically. Second, spectral clustering variants arise as relaxations of graph balanced-cut problems (Von Luxburg, 2007). Third, spectral clustering was shown to outperform other popular clustering algorithms such as $k$ -means (Von Luxburg, 2007), arguably due to its ability to handle non-convex clusters. Finally, it has a solid probabilistic interpretation, since the Euclidean distance in the embedding space is equal to a diffusion distance, which, informally, measures the time it takes probability mass to transfer between points, via all the other points in the dataset (Nadler et al., 2006; Coifman & Lafon, 2006a).
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: Illustrative 2D and 3D examples showing the results of our SpectralNet clustering (top) compared to typical results obtained with DCN, VaDE, DEPICT and IMSAT (bottom) on simulated datasets in 2D and 3D. Our approach successfully finds these non-convex clusters, whereas the competing algorithms fail on all five examples. (The full set of results for these algorithms is shown in Figure 4 in Appendix A.)
|
| 29 |
+
|
| 30 |
+
While spectral embedding of data points can be achieved by a simple eigen-decomposition of their graph Laplacian matrix, with large datasets direct computation of eigenvectors may be prohibitive. Moreover, generalizing a spectral embedding to unseen data points, a task commonly referred to as out-of-sample-extension (OOSE), is a non-trivial task; see, for example, (Belkin et al., 2006; Bengio et al., 2004; Fowlkes et al., 2004; Coifman & Lafon, 2006b).
|
| 31 |
+
|
| 32 |
+
In this work we introduce SpectralNet, a deep learning approach to spectral clustering, which addresses the scalability and OOSE problems pointed above. Specifically, SpectralNet is trained in a stochastic fashion, which allows it to scale. Moreover, once trained, it provides a function, implemented as a feed-forward network, that maps each input data point to its spectral embedding coordinates. This map can easily be applied to new test data. Unlike optimization of standard deep learning models, SpectralNet is trained using constrained optimization, where the constraint (orthogonality of the net outputs) is enforced by adding a linear layer, whose weights are set by the QR decomposition of its inputs. In addition, as good affinity functions are crucial for the success of spectral clustering, rather than using the common Euclidean distance to compute Gaussian affinity, we show how Siamese networks can be trained from the given unlabeled data to learn more informative pairwise distances and consequently significantly improve the quality of the clustering. Further improvement can be achieved if our network is applied to transformed data obtained by an autoencoder (AE). On the theoretical front, we utilize VC-dimension theory to derive a lower bound on the size of neural networks that compute spectral clustering. Our experiments indicate that our network indeed approximates the Laplacian eigenvectors well, allowing the network to cluster challenging non-convex point sets, which recent deep network based methods fail to handle; see examples in Figure 1. Finally, SpetralNet achieves competitive performance on MNIST handwritten digit dataset and state-of-the-art on the Reuters document dataset, whose size makes standard spectral clustering inapplicable.
|
| 33 |
+
|
| 34 |
+
# 2 RELATED WORK
|
| 35 |
+
|
| 36 |
+
Recent deep learning approaches to clustering largely attempt to learn a code for the input that is amenable to clustering according to either the $k$ -means or mixture of gaussians clustering models. DCN (Yang et al., 2017) directly optimizes a loss composed of a reconstruction term (for the code) and the $k$ -means functional. DEC (Xie et al., 2016) iteratively updates a target distribution to sharpen cluster associations. DEPICT (Dizaji et al., 2017) adds a regularization term that prefers balanced clusters. All three methods are pre-trained as autoencoders, while DEPICT also initializes its target distribution using $k$ -means or other standard clustering algorithms. Several other recent approaches rely on a variational autoencoder that utilizes a Gaussian mixture prior, see, for example, VaDE (Zheng et al., 2016) and GMVAE (Dilokthanakul et al., 2016). IMSAT (Hu et al., 2017) is based on data augmentation, where the net is trained to maximize the mutual information between inputs and predicted clusters, while regularizing the net so that the cluster assignment of original data points will be consistent with the assignment of augmented points. Different approaches are proposed by Chen (2015), who uses a deep belief net followed by non-parametric maximum margin clustering (NMMC), and by Yang et al. (2016), who introduce a recurrent-agglomerative framework to image clustering.
|
| 37 |
+
|
| 38 |
+
While these approaches achieve accurate clustering results on standard datasets (such as the MNIST and Reuters), the use of the $k$ -means criterion, as well as the Gaussian mixture prior, seems to introduce an implicit bias towards the formation of clusters with convex shapes. This limitation seems to hold even in code space. This bias is demonstrated in Figure 1(bottom), which shows the failure of several of the above approaches on relatively simple clustering tasks. In contrast, as is indicated in Figure 1(top), our SpectralNet approach appears to be less vulnerable to such bias. The full set of runs can be found in Appendix A.
|
| 39 |
+
|
| 40 |
+
In the context of spectral clustering, Tian et al. (2014) learn an autoencoder that maps the rows of a graph Laplacian matrix onto the corresponding spectral embedding, and then use $k$ -means in code space to cluster the underlying data. Unlike our work, which learns to map an input data point to its spectral embedding, Tian et al.’s network takes as input an entire row of the graph Laplacian, and therefore OOSE is impractical, as it requires to compute the affinities of each new data point to all the training data. Also of interest is the kernel spectral method by Alzate & Suykens (2010), which allows for out of sample extension and handles large datasets through smart sampling (but does not use a neural network).
|
| 41 |
+
|
| 42 |
+
Yi et al. (2016) address the problem of 3D shape segmentation. Their work, which focuses on learning graph convolutions, uses a graph spectral embedding through eigenvector decomposition, which is not learned. In addition, we enforce orthogonalization stochastically through a constraint layer, while they attempt to learn orthogonalized functional maps by adding an orthogonalization term to the loss function, which involves non-trivial balancing between two loss components.
|
| 43 |
+
|
| 44 |
+
Other deep learning works use a spectral approach in the context of supervised learning. Law et al. (2017) apply supervised metric learning, showing that their method approximates the eigenvectors of a 0-1 affinity matrix constructed from the true labels. Mishne et al. (2017) trained a network to compute graph Laplacian eigenvectors using supervised regression. Their approach, however, requires the true eigenvectors for training, and hence does not easily scale to large datasets.
|
| 45 |
+
|
| 46 |
+
Finally, a number of papers showed that stochastic gradient descent can be used effectively to compute the principal components of covariance matrices, see, e.g., (Shamir, 2015) and references therein. The setup in these papers assumes that in each iteration a noisy estimate of the entire input matrix is provided. In contrast, in our work we use in each iteration only a small submatrix of the affinity matrix, corresponding to a small minibatch. In future work, we plan to examine how these algorithms can be adapted to improve the convergence rate of our proposed network.
|
| 47 |
+
|
| 48 |
+
# 3 SPECTRALNET
|
| 49 |
+
|
| 50 |
+
In this section we present our proposed approach, describe its key components, and explain its connection to spectral clustering. Consider the following standard clustering setup: Let $\scriptscriptstyle \textit { \textbf { X } } =$ $\{ x _ { 1 } , \ldots , x _ { n } \} \subseteq \mathbb { R } ^ { d }$ denote a collection of unlabeled data points drawn from some unknown distribution $\mathcal { D }$ ; given a target number of clusters $k$ and a distance measure between points, the goal is to learn a similarity measure between points in $\mathcal { X }$ and use it to learn a map that assigns each of $x _ { 1 } , \ldots , x _ { n }$ to one of $k$ possible clusters, so that similar points tend to be grouped in the same cluster. As in classification tasks we further aim to use the learned map to determine the cluster assignments of new, yet unseen, points drawn from $\mathcal { D }$ . Such out-of-sample-extension is based solely on the learned map, and requires neither computation of similarities between the new points and the training points nor re-clustering of combined data.
|
| 51 |
+
|
| 52 |
+
In this work we propose SpectralNet, a neural network approach for spectral clustering. Once trained, SpectralNet computes a map $F _ { \theta } : \mathbb { R } ^ { d } \mathbb { R } ^ { k }$ and a cluster assignment function $c : \mathbb { R } ^ { k } $ $\{ 1 , \ldots , k \}$ . It maps each input point $x$ to an output $y = F _ { \theta } ( x )$ and provides its cluster assignment $c ( y )$ . The spectral map $F _ { \theta }$ is implemented using a neural network, and the parameter vector $\theta$ denotes the network weights.
|
| 53 |
+
|
| 54 |
+
The training of SpectralNet consists of three components: (i) unsupervised learning of an affinity given the input distance measure, via a Siamese network (see Section 3.2); (ii) unsupervised learning of the map $F _ { \theta }$ by optimizing a spectral clustering objective while enforcing orthogonality (see Section 3.1); (iii) learning the cluster assignments, by k-means clustering in the embedded space.
|
| 55 |
+
|
| 56 |
+
# 3.1 LEARNING THE SPECTRAL MAP $F _ { \theta }$
|
| 57 |
+
|
| 58 |
+
In this section we describe the main learning step in SpectralNet, component (ii) above. To this end, let $w : \mathbb { R } ^ { d } \times \mathbb { R } ^ { d } \to [ 0 , \infty )$ be a symmetric affinity function, such that $w ( x , x ^ { \prime } )$ expresses the similarity between $x$ and $x ^ { \prime }$ . Given $w$ , we would like points $x , x ^ { \prime }$ which are similar to each other (i.e., with large $w ( x , x ^ { \prime } ) )$ to be embedded close to each other. Hence, we define the loss
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { S p e c t r a l N e t } } ( \theta ) = \mathbb { E } \left[ w ( x , x ^ { \prime } ) \lVert y - y ^ { \prime } \rVert ^ { 2 } \right] , } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $y , y ^ { \prime } \in \mathbb { R } ^ { k }$ , the expectation is taken with respect to pairs of i.i.d. elements $( x , x ^ { \prime } )$ drawn from $\mathcal { D }$ , and $\theta$ denotes the parameters of the map $y = F _ { \theta } ( x )$ . Clearly, the loss $\mathcal { L } _ { \mathrm { S p e c t r a l N e t } } ( \theta )$ can be minimized by mapping all points to the same output vector $( F _ { \theta } ( x ) = y _ { 0 }$ for all $x$ ). To prevent this, we require that the outputs will be orthonormal in expectation with respect to $\mathcal { D }$ , i.e.,
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathbb { E } \left[ y y ^ { T } \right] = I _ { k \times k } .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
As the distribution $\mathcal { D }$ is unknown, we replace the expectations in (1) and (2) by their empirical analogues. Furthermore, we perform the optimization in a stochastic fashion. Specifically, at each iteration we randomly sample a minibatch of $m$ samples, which without loss of generality we denote $x _ { 1 } , \ldots , x _ { m } \in \mathcal { X }$ , and organize them in an $m \times d$ matrix $X$ whose $i$ th row contains $x _ { i } ^ { T }$ . We then minimize the loss
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
L _ { { \mathrm { S p e c t r a l N e t } } } ( \theta ) = \frac { 1 } { m ^ { 2 } } \sum _ { i , j = 1 } ^ { m } W _ { i , j } \| y _ { i } - y _ { j } \| ^ { 2 } ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $y _ { i } = F _ { \theta } ( x _ { i } )$ and $W$ is a $m \times m$ matrix such that $W _ { i , j } = w ( x _ { i } , x _ { j } )$ . The analogue of (2) for a small minibatch is
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
{ \frac { 1 } { m } } Y ^ { T } Y = I _ { k \times k } ,
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $Y$ is a $m \times k$ matrix of the outputs whose $i$ th row is $y _ { i } ^ { T }$
|
| 83 |
+
|
| 84 |
+
We implement the map $F _ { \theta }$ as a general neural network whose last layer enforces the orthogonality constraint (4). This layer gets input from $k$ units, and acts as a linear layer with $k$ outputs, where the weights are set to orthogonalize the output $Y$ for the minibatch $X$ . Let $\tilde { Y }$ denote the $m \times k$ matrix containing the inputs to this layer for $X$ (i.e., the outputs of $F _ { \theta }$ over the minibatch before orthogonalization). A linear map that orthogonalizes the columns of $\tilde { Y }$ is computed through its QR decomposition. Specifically, for any matrix $A$ such that $A ^ { T } A$ is full rank, one can obtain the QR decomposition via the Cholesky decomposition $A ^ { T } A = L L ^ { T }$ , where $L$ is a lower triangular matrix, and then setting $Q \ : = \ : A \left( L ^ { - 1 } \right) ^ { T }$ . This is verified in Appendix B. Therefore, in order to orthogonalize $\tilde { Y }$ , the last layer multiplies $\tilde { Y }$ from the right by $\sqrt { m } \left( \tilde { L } ^ { - 1 } \right) ^ { T }$ , where $\tilde { L }$ is obtained from the Cholesky decomposition of $\tilde { Y } ^ { T } \tilde { Y }$ and the $\sqrt { m }$ factor is needed to satisfy (4).
|
| 85 |
+
|
| 86 |
+
We train this spectral map in a coordinate descent fashion, where we alternate between orthogonalization and gradient steps. Each of these steps uses a different minibatch (possibly of different sizes), sampled uniformly from the training set $\mathcal { X }$ . In each orthogonalization step we use the QR decomposition to tune the weights of the last layer. In each gradient step we tune the remaining weights using standard backpropagation. Once SpectralNet is trained, all the weights are freezed, including those of the last layer, which simply acts as a linear layer. Finally, to obtain the cluster assignments $c _ { 1 } , \ldots c _ { 2 }$ , we propagate $x _ { 1 } , \ldots . x _ { n }$ through it to obtain the embeddings $y _ { 1 } , \ldots , y _ { n } \in \mathbb { R } ^ { k }$ , and perform $k$ -means on them, obtaining $k$ cluster centers, as in standard spectral clustering. These algorithmic steps are summarized below in Algorithm 1 in Sec. 3.3.
|
| 87 |
+
|
| 88 |
+
# Connection with Spectral Clustering The loss (3) can also be written as
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
L _ { \mathrm { S p e c t r a l N e t } } ( \theta ) = \frac { 2 } { m ^ { 2 } } \operatorname { t r a c e } \left( Y ^ { T } ( D - W ) Y \right) ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $D$ is a $m \times m$ diagonal matrix such that $\begin{array} { r } { D _ { i , i } = \sum _ { j } W _ { i , j } } \end{array}$ . The symmetric, positive semidefinite matrix $D - W$ forms the (unnormalized) graph Laplacian of the minibatch $x _ { 1 } , \ldots , x _ { m }$ . For $k = 1$ the loss is minimized when $y$ is the eigenvector of $D - W$ corresponding to the smallest eigenvalue. Similarly, for general $k$ , under the constraint (4), the minimum is attained when the column space of $Y$ is the subspace of the $k$ eigenvectors corresponding to the smallest $k$ eigenvalues of $D - W$ . Note that this subspace includes the constant vector whose inclusion does not affect the final cluster assignment.
|
| 95 |
+
|
| 96 |
+
Hence, SpectralNet approximates spectral clustering, where the main differences are that the training is done in a stochastic fashion, and that the orthogonality constraint with respect to the full dataset $\mathcal { X }$ holds only approximately. SpectralNet therefore trades accuracy with scalability and generalization ability. Specifically, while its outputs are an approximation of the true eigenvectors, the stochastic training enables its scalability and thus allows one to cluster large datasets that are prohibitive for standard spectral clustering. Moreover, once trained, SpectralNet provides a parametric function whose image for the training points is (approximately) the eigenvectors of the graph Laplacian. This function can now naturally embed new test points, which were not present at training time. Our experiments with the MNIST dataset (Section 5) indicate that the outputs of SpectralNet closely approximate the true eigenvectors.
|
| 97 |
+
|
| 98 |
+
Finally, as in common spectral clustering applications, cluster assignments are determined by applying $k$ -means to the embeddings $y _ { 1 } , \ldots y _ { n }$ . We note that the $k$ -means step can be replaced by other clustering algorithms. Our preference to use $k$ -means is based on the interpretation (for normalized Laplacian matrices) of the Euclidean distance in the embedding space as diffusion distance in the input space (Nadler et al., 2006; Coifman $\&$ Lafon, 2006a).
|
| 99 |
+
|
| 100 |
+
Normalized graph Laplacian In spectral clustering, the symmetric normalized graph Laplacian $I - D ^ { - { \frac { 1 } { 2 } } } W D ^ { - { \frac { 1 } { 2 } } }$ can use as an alternative to the unnormalized Laplacian $D - W$ . In order to train SpectralNet with normalized graph Laplacian, the loss function (3) should be replaced by
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
L _ { \mathrm { S p e c t r a l N e t } } ( \theta ) = \frac { 1 } { m ^ { 2 } } \sum _ { i , j = 1 } ^ { m } W _ { i , j } \left\| \frac { y _ { i } } { d _ { i } } - \frac { y _ { j } } { d _ { j } } \right\| ^ { 2 } ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where $\begin{array} { r } { d _ { i } = D _ { i , i } = \sum _ { j = 1 } ^ { m } W _ { i , j } } \end{array}$
|
| 107 |
+
|
| 108 |
+
Batch size considerations Typically in classification or regression, the loss is a sum over the losses of individual examples. In contrast, SpectralNet loss (3) is summed over pairs of points, and each summand describes relationships between data points. This relation is encoded by the full $n \times n$ affinity matrix $W _ { \mathrm { f u l l } }$ (which we never compute explicitly). The minibatch size $m$ should therefore be sufficiently large to capture the structure of the data. For this reason, it is also highly important that minibatches will be sampled at random from the entire dataset at each step, and not be fixed across epochs. When the minibatches are fixed, the knowledge of $W _ { \mathrm { f u l l } }$ is reduced to a (possibly permuted) diagonal sequence of $m \times m$ blocks, thus ignoring many of the entries of $W _ { \mathrm { f u l l } }$ . In addition, while the output layer orthogonalizes $\tilde { Y }$ , we do not have any guarantees on how well it orthogonalizes other random minibatches. However, in our experiments we observed that if $m$ is large enough, it approximately orthogonalizes other batches as well, and its weights stabilize as training progresses. Therefore, to train SpectralNet, we use larger minibatches compared to common choices made by practitioners in the context of classification. In our experiments we use minibatches of size 1024 for MNIST and 2048 for Reuters, re-sampled randomly at every step.
|
| 109 |
+
|
| 110 |
+
# 3.2 LEARNING AFFINITIES USING A SIAMESE NETWORK
|
| 111 |
+
|
| 112 |
+
Choosing a good affinity measure is crucial to the success of spectral clustering. In many applications, practitioners use an affinity measure that is positive for a set of nearest neighbor pairs, combined with a Gaussian kernel with some scale $\sigma > 0$ , e.g.,
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
W _ { i , j } = \left\{ \begin{array} { l l } { \exp \left( - \frac { \| x _ { i } - x _ { j } \| ^ { 2 } } { 2 \sigma ^ { 2 } } \right) , } & { ~ x _ { j } \mathrm { ~ i s ~ a m o n g ~ t h e ~ n e a r e s t ~ n e i g h b o r s ~ o f ~ } x _ { i } } \\ { 0 , } & { \mathrm { ~ o t h e r w i s e , } } \end{array} \right.
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where one typically symmetrizes $W$ , for example, by setting $W _ { i , j } \gets ( W _ { i , j } + W _ { j , i } ) / 2$
|
| 119 |
+
|
| 120 |
+
Euclidean distance may be overly simplistic measure of similarity; seeking methods that can capture more complex similarity relations might turn out advantageous. Siamese nets (Hadsell et al., 2006; Shaham & Lederman, 2018) are trained to learn affinity relations between data points; we empirically found that the unsupervised application of a Siamese net to determine the distances often improves the quality of the clustering.
|
| 121 |
+
|
| 122 |
+
Siamese nets are typically trained on a collection of similar (positive) and dissimilar (negative) pairs of data points. When labeled data are available, such pairs can be chosen based on label information (i.e., pairs of points with the same label are considered positive, while pairs of points with different labels are considered negative). Here we focus on datasets that are unlabeled. In this case we can learn the affinities directly from Euclidean proximity or from graph distance, e.g., by “labeling” points $x _ { i } , x _ { j }$ positive if $\| x _ { i } - x _ { j } \|$ is small and negative otherwise. In our experiments, we construct positive pairs from the nearest neighbors of each point. Negative pairs are constructed from points with larger distances. This Siamese network, therefore, is trained to learn an adaptive nearest neighbor metric.
|
| 123 |
+
|
| 124 |
+
A Siamese net maps every data point $x _ { i }$ into an embedding $z _ { i } = G _ { \theta _ { \mathrm { s i a m e s e } } } ( x _ { i } )$ in some space. The net is typically trained to minimize contrastive loss, defined as
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
L _ { \mathrm { s i a m e s e } } ( \theta _ { \mathrm { s i a m e s e } } ; x _ { i } , x _ { j } ) = \left\{ \begin{array} { l l } { \| z _ { i } - z _ { j } \| ^ { 2 } , } & { ( x _ { i } , x _ { j } ) \mathrm { ~ i s ~ a ~ p o s i t i v e ~ p a i r } } \\ { \operatorname* { m a x } \left( c - \| z _ { i } - z _ { j } \| , 0 ) \right) ^ { 2 } , } & { ( x _ { i } , x _ { j } ) \mathrm { ~ i s ~ a ~ n e g a t i v e ~ p a i r } , } \end{array} \right.
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $c$ is a margin (typically set to 1).
|
| 131 |
+
|
| 132 |
+
Once the Siamese net is trained, we use it to define a batch affinity matrix $W$ for the training of SpectralNet, by replacing the Euclidean distance $\| x _ { i } - x _ { j } \|$ in (6) with $\| z _ { i } - z _ { j } \|$ .
|
| 133 |
+
|
| 134 |
+
Remarkably, despite being trained in an unsupervised fashion on a training set constructed from relatively naive nearest neighbor relations, in Section 5 we show that affinities that use the Siamese distances yield dramatically improved clustering quality over affinities that use Euclidean distances. This implies that unsupervised training of Siamese nets can lead to learning useful and rich affinity relations.
|
| 135 |
+
|
| 136 |
+
# 3.3 ALGORITHM
|
| 137 |
+
|
| 138 |
+
Our end-to-end training approach is summarized in Algorithm 1.
|
| 139 |
+
|
| 140 |
+
Input: $\mathcal { X } \subseteq \mathbb { R } ^ { d }$ , number of clusters $k$ , batch size $m$
|
| 141 |
+
|
| 142 |
+
Output: embeddings $y _ { 1 } , \dots , y _ { n } , \ y _ { i } \in \mathbb { R } ^ { k }$ , cluster assignments $c _ { 1 } , \ldots c _ { n } , \ c _ { i } \in \{ 1 , \ldots k \}$ Construct a training set of positive and negative pairs for the Siamese network; Train a Siamese network;
|
| 143 |
+
|
| 144 |
+
Randomly initialize the network weights $\theta$ ; while $L _ { S p e c t r a l N e t } ( \theta )$ not converged do
|
| 145 |
+
|
| 146 |
+
# Orthogonalization step:
|
| 147 |
+
|
| 148 |
+
Sample a random minibatch $X$ of size $m$ ;
|
| 149 |
+
|
| 150 |
+
Forward propagate $X$ and compute inputs to orthogonalization layer $\tilde { Y }$ ;
|
| 151 |
+
|
| 152 |
+
Compute the Cholesky factorization $L L ^ { T } = \tilde { Y } ^ { T } \tilde { Y }$
|
| 153 |
+
|
| 154 |
+
Set the weights of the orthogonalization layer to be $\sqrt { m } \left( L ^ { - 1 } \right) ^ { T }$ ;
|
| 155 |
+
|
| 156 |
+
# Gradient step:
|
| 157 |
+
|
| 158 |
+
Sample a random minibatch $x _ { 1 } , \ldots , x _ { m }$ ;
|
| 159 |
+
Compute the $m \times m$ affinity matrix $W$ using the Siamese net;
|
| 160 |
+
Forward propagate $x _ { 1 } , \ldots , x _ { m }$ to get $y _ { 1 } , \ldots , y _ { m }$ ;
|
| 161 |
+
Compute the loss (3) or (5);
|
| 162 |
+
Use the gradient of $L _ { \mathrm { S p e c t r a l N e t } } ( \theta )$ to tune all $F _ { \theta }$ weights, except those of the output layer;
|
| 163 |
+
|
| 164 |
+
# end
|
| 165 |
+
|
| 166 |
+
Forward propagate $x _ { 1 } , \ldots , x _ { n }$ and obtain $F _ { \theta }$ outputs $y _ { 1 } , \ldots , y _ { n }$ ;
|
| 167 |
+
Run $k$ -means on $y _ { 1 } , \ldots , y _ { n }$ to determine cluster centers;
|
| 168 |
+
|
| 169 |
+
Algorithm 1: SpectralNet training
|
| 170 |
+
|
| 171 |
+
Once SpectralNet is trained, computing the embeddings of new test points (i.e., out-of-sampleextension) and their cluster assignments is straightforward: we simply propagate each test point $x _ { i }$ through the network $F _ { \theta }$ to obtain their embeddings $y _ { i }$ , and assign the point to its nearest centroid, where the centroids were computed using $k$ -means on the training data, at the last line of Algorithm 1.
|
| 172 |
+
|
| 173 |
+
# 3.4 SPECTRAL CLUSTERING IN CODE SPACE
|
| 174 |
+
|
| 175 |
+
Given a dataset $\mathcal { X }$ , one can either apply SpectralNet in the original input space, or in a code space (obtained, for example, by an autoencoder). A code space representation is typically lower dimensional, and often contains less nuisance information (i.e., information on which an appropriate similarity measure should not depend). Following (Yang et al., 2017; Xie et al., 2016; Zheng et al., 2016) and others, we empirically observed that SpectralNet performs best in code space. Unlike these works, which use an autoencoder as an initialization for their clustering networks, we use the code as our data representation and apply SpectralNet directly in that space, (i.e., we do not change the code space while training SpectralNet). In our experiments, we use code spaces obtained from publicly available autoencoders trained by Zheng et al. (2016) on the MNIST and Reuters datasets.
|
| 176 |
+
|
| 177 |
+
# 4 THEORETICAL ANALYSIS
|
| 178 |
+
|
| 179 |
+
Our proposed SpectralNet not only determines cluster assignments in training, as clustering algorithms commonly do, but it also produces a map that can generalize to unseen data points at test time. Given a training set with $n$ points, it is thus natural to ask how large should such a network be to represent this spectral map. The theory of VC-dimension can provide useful worst-case bounds for this size.
|
| 180 |
+
|
| 181 |
+
In this section, we use the VC dimension theory to study the minimal size a neural network should have in order to compute spectral clustering for $k = 2$ . Specifically, we consider the class of functions that map all training points to binary values, determined by thresholding at zero the eigenvector of the graph Laplacian with the second smallest eigenvalue. We denote this class of binary classifiers $\mathcal { F } _ { n } ^ { \mathrm { s g } }$ ectral clustering. Note that with $k = 2$ , $k$ -means can be replaced by thresholding of the second smallest eigenvector, albeit not necessarily at zero. We are interested in the minimal number of weights and neurons required to allow the net to compute such functions, assuming the affinities decay exponentially with the Euclidean distance. We do so by studying the VC dimension of function classes obtained by performing spectral clustering on $n$ points in arbitrary Euclidean spaces $\mathbb { R } ^ { d }$ , with $d \geq 3$ . We will make no assumption on the underlying distribution of the points.
|
| 182 |
+
|
| 183 |
+
In the main result of this section, we prove a lower bound on the VC dimension of spectral clustering, which is linear in the number of points $n$ . In contrast, the VC dimension of $k$ -means, for example, depends solely on the dimension $d$ , but not on $n$ , hence making $k$ -means significantly less expressive than spectral clustering1. As a result of our main theorem, we bound from below the number of weights and neurons in any net that is required to compute Laplacian eigenvectors. The reader might find the analysis in this section interesting in its own right.
|
| 184 |
+
|
| 185 |
+
Our main result shows that for data in $\mathbb { R } ^ { d }$ with $d \geq 3$ , the VC dimension of $\mathcal { F } _ { n } ^ { \mathrm { s p e c t r a l ~ c l u s t e r i n g } }$ is linear in the number $n$ of points, making spectral clustering almost as rich as arbitrary clustering of the $n$ points.
|
| 186 |
+
|
| 187 |
+
Theorem 4.1. VC dim(F spectral clusteringn ) ≥ 110 n.
|
| 188 |
+
|
| 189 |
+
The formal proof of Theorem 4.1 is deferred to Appendix C. Below we informally sketch its principles. We show that for any integer $n$ (assuming for simplicity that $n$ is divisible by 10), there exists a set of $m = n / 1 0$ points in $\mathbb { R } ^ { d }$ that is shattered by $\mathcal { F } _ { n } ^ { \mathrm { s p } }$ ectral clustering. In particular, we show this for the set of $m$ points placed in a 2-dimensional grid in $\mathbb { R } ^ { d }$ . We then show that for any arbitrary dichotomy of these $m$ points, we can augment the set of points to a larger set $X$ , containing $n = 1 0 m$ points, with a balanced partition of $X$ into two disjoint sets $S$ and $T$ that respects the dichotomy of the original $m$ points. The larger set has the special properties: (1) within $S$ (and resp. $T$ ), there is a path between any two points such that the distances between all pairs of consecutive points along the path are small, and (2) all pairs $( s , t ) \in S \times T$ are far apart. We complete the proof by constructing a Gaussian affinity $W$ with a suitable value of $\sigma$ and showing that the minimizer of the spectral clustering loss for $( X , W )$ (i.e., the second eigenvector of the Laplacian), when thresholded at 0, separates $S$ from $T$ , and hence respects the original dichotomy.
|
| 190 |
+
|
| 191 |
+
By connecting Theorem 4.1 with known results regarding the VC dimension of neural nets, see, e.g., (Shalev-Shwartz & Ben-David, 2014), we can bound the size from below (in terms of number of weights and neurons) of any neural net that computes spectral clustering. This is formalized in the following corollary.
|
| 192 |
+
|
| 193 |
+
# Corollary 4.2.
|
| 194 |
+
|
| 195 |
+
1. For the class of neural nets with $| v |$ sigmoid nodes and $| w |$ weights to represent all functions realizable by spectral clustering (i.e., second eigenvector of the Laplacian, thresholded at 0) on n points, it is necessary to have $| w | ^ { 2 } | v | ^ { 2 } \geq O ( n )$ .
|
| 196 |
+
2. For the class of neural nets with $| w |$ weights from a finite family (e.g., single-precision weights) to represent all functions realizable by spectral clustering, it is necessary to have $| w | \geq O ( n )$ .
|
| 197 |
+
|
| 198 |
+
#
|
| 199 |
+
|
| 200 |
+
1. The VC dimension of the class of neural nets with $| v |$ sigmoid units and $| w |$ weights is at most $O ( | w | ^ { 2 } | v | ^ { 2 } )$ (Shalev-Shwartz & Ben-David, 2014, p. 275). Hence, if $| w | ^ { 2 } \bar { | v | } ^ { 2 } <$ $O ( n )$ , such net cannot shatter any collection of points of size $O ( n )$ . From Theorem 4.1, $\mathcal { F } _ { n } ^ { \mathrm { s p e c t r a l ~ c l u s t e r i n g } }$ shatters at least $O ( n )$ points. Therefore, in order for a class of networks to be able to express any function that can be computed using spectral clustering, it is a necessary (but not sufficient) condition to satisfy $| w | ^ { 2 } | v | ^ { 2 } \geq O ( n )$ .
|
| 201 |
+
|
| 202 |
+
2. The VC dimension of the class of neural nets with $| w |$ weights from a finite family is $O ( w )$ (Shalev-Shwartz & Ben-David, 2014, p. 276). The arguments above imply that $| w | \geq$ $O ( n )$ .
|
| 203 |
+
|
| 204 |
+
Corollary 4.2 implies that in the general case (i.e., without assuming any structure on the $n$ data points), to perform spectral clustering, the size of the net has to grow with $n$ . However, when the data has some geometric structure, the net size can be much smaller. Indeed, in a related result, the ability of neural networks to learn eigenvectors of Laplacian matrices was demonstrated both empirically and theoretically by Mishne et al. (2017). They proved that there exist networks which approximate the eigenfunctions of manifold Laplacians arbitrarily well (where the size of the network depends on the desired error and the parameters of the manifold, but not on $n$ ).
|
| 205 |
+
|
| 206 |
+
# 5 EXPERIMENTAL RESULTS
|
| 207 |
+
|
| 208 |
+
# 5.1 EVALUATION METRICS
|
| 209 |
+
|
| 210 |
+
To numerically evaluate the accuracy of the clustering, we use two commonly used measures, the unsupervised clustering accuracy (ACC), and the normalized mutual information (NMI). For completeness, we define ACC and NMI below, and refer the reader to (Cai et al., 2011) for more details. For data point $x _ { i }$ , let $l _ { i }$ and $c _ { i }$ denote its true label and predicted cluster, respectively. Let $l = ( l _ { 1 } , \ldots l _ { n } )$ and similarly $c = ( c _ { 1 } , \ldots c _ { n } )$ .
|
| 211 |
+
|
| 212 |
+
ACC is defined as
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
\operatorname { A C C } ( l , c ) = { \frac { 1 } { n } } \operatorname* { m a x } _ { \pi \in \Pi } \sum _ { i = 1 } ^ { n } \mathbb { 1 } \left\{ l _ { i } = \pi \left( c _ { i } \right) \right\} ,
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
where $\Pi$ is the collection of all permutations of $\{ 1 , \ldots k \}$ . The optimal permutation $\pi$ can be computed using the Kuhn-Munkres algorithm (Munkres, 1957).
|
| 219 |
+
|
| 220 |
+
Table 1: Performance of various clustering methods on MNIST and Reuters datasets. $( ^ { * } )$ reported in (Xie et al., 2016). $( ^ { * * } )$ reported in (Yang et al., 2017), $( ^ { \dag } )$ reported in (Zheng et al., 2016), $( ^ { \ddagger } )$ ) reported in (Dizaji et al., 2017), $( ^ { \dag \dag } )$ reported in (Yang et al., 2016), $( ^ { \ddagger \ddagger } )$ reported in (Hu et al., 2017). The IMSAT result on Reuters was obtained on a subset of 10,000 from the full dataset.
|
| 221 |
+
|
| 222 |
+
<table><tr><td rowspan=1 colspan=1>Algorithm</td><td rowspan=1 colspan=1>ACC (MNIST)</td><td rowspan=1 colspan=1>NMI (MNIST)</td><td rowspan=1 colspan=1>ACC(Reuters)</td><td rowspan=1 colspan=1>NMI (Reuters)</td></tr><tr><td rowspan=1 colspan=1>k-means</td><td rowspan=1 colspan=1>.534</td><td rowspan=1 colspan=1>.499</td><td rowspan=1 colspan=1>.533</td><td rowspan=1 colspan=1>.401</td></tr><tr><td rowspan=1 colspan=1>Spectral clustering</td><td rowspan=1 colspan=1>.717</td><td rowspan=1 colspan=1>.754</td><td rowspan=1 colspan=1>NA</td><td rowspan=1 colspan=1>NA</td></tr><tr><td rowspan=1 colspan=1>DEC</td><td rowspan=1 colspan=1>.843*</td><td rowspan=1 colspan=1>.8**</td><td rowspan=1 colspan=1>.756*</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>DCN</td><td rowspan=1 colspan=1>.83**</td><td rowspan=1 colspan=1>.81**</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>VaDE</td><td rowspan=1 colspan=1>.9446†</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>.7938†</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>JULE</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>.913</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>DEPICT</td><td rowspan=1 colspan=1>.965tt</td><td rowspan=1 colspan=1>.9171t</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>IMSAT</td><td rowspan=1 colspan=1>.984±.004‡#</td><td rowspan=1 colspan=1>not reported</td><td rowspan=1 colspan=1>.719</td><td rowspan=1 colspan=1>not reported</td></tr><tr><td rowspan=1 colspan=1>SpectralNet (input space,Euclidean distance)</td><td rowspan=1 colspan=1>.622±.008</td><td rowspan=1 colspan=1>.687±.004</td><td rowspan=1 colspan=1>.645±.01</td><td rowspan=1 colspan=1>.444±.01</td></tr><tr><td rowspan=1 colspan=1>SpectralNet (input space,Siamese distance)</td><td rowspan=1 colspan=1>.826±.03</td><td rowspan=1 colspan=1>.884±.02</td><td rowspan=1 colspan=1>.661± 017</td><td rowspan=1 colspan=1>.381 ± .057</td></tr><tr><td rowspan=1 colspan=1>SpectralNet (code space,Euclidean distance)</td><td rowspan=1 colspan=1>.800±.003</td><td rowspan=1 colspan=1>.814±.008</td><td rowspan=1 colspan=1>.605±.053</td><td rowspan=1 colspan=1>.401±.061</td></tr><tr><td rowspan=1 colspan=1>SpectralNet (code space, Siamese distance)</td><td rowspan=1 colspan=1>.971±.001</td><td rowspan=1 colspan=1>.924±.001</td><td rowspan=1 colspan=1>.803±.006</td><td rowspan=1 colspan=1>.532±.010</td></tr></table>
|
| 223 |
+
|
| 224 |
+
NMI is defined as
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
\operatorname { N M I } ( l , c ) = \frac { I ( l ; c ) } { \operatorname* { m a x } \{ H ( l ) , H ( c ) \} } ,
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
where $I ( l ; c )$ denotes the mutual information between $l$ and $c$ , and $H ( \cdot )$ denotes their entropy. Both ACC and NMI are in $[ 0 , 1 ]$ , with higher values indicating better correspondence the clusters and the true labels.
|
| 231 |
+
|
| 232 |
+
# 5.2 CLUSTERING
|
| 233 |
+
|
| 234 |
+
We compare SpectralNet to several deep learning-based clustering approaches on two real world datasets. In all runs we assume the number of clusters is given $_ { \mathrm { k = 1 0 } }$ in MNIST and ${ \bf k } { = } 4$ in Reuters). As a reference, we also report the performance of $k$ -means and (standard) spectral clustering. Specifically, we compare SpectralNet to DEC (Xie et al., 2016), DCN (Yang et al., 2017), VaDE (Zheng et al., 2016), JULE (Yang et al., 2016), DEPICT (Dizaji et al., 2017), and IMSAT (Hu et al., 2017). The results for these six methods are reported in the corresponding papers. Technical details regarding the application of $k$ -means and spectral clustering appear in Appendix D.
|
| 235 |
+
|
| 236 |
+
We considered two variants of Gaussian affinity functions: using Euclidean distances (6), and Siamese distances; the latter case follows Algorithm 1. In all experiments we used the loss (3). In addition, we report results of SpectralNet (and the Siamese net) in both input space and code space. The code spaces are obtained using the publicly available autoencoders which are used to pre-train the weights of $\mathrm { V a D E } ^ { 2 }$ , and are 10-dimensional. We refer the reader to Appendix D for technical details about the architectures and training procedures.
|
| 237 |
+
|
| 238 |
+
# 5.2.1 MNIST
|
| 239 |
+
|
| 240 |
+
MNIST is a collection of $7 0 , 0 0 0 2 8 \times 2 8$ gray-scale images of handwritten digits, divided to training (60,000) and test (10,000) sets. To construct positive pairs for the Siamese net, we paired each instance with its two nearest neighbors. An equal number of negative pairs were chosen randomly from non-neighboring points.
|
| 241 |
+
|
| 242 |
+
Table 1 shows the performance of the various clustering algorithms on the MNIST dataset, using all 70,000 images for training. As can be seen, the performance of SpectralNet is significantly improved when using Siamese distance instead of Euclidean distance, and when the data is represented in code space rather than in pixel space. With these two components, SpectralNet outperforms DEC, DCN, VaDE, DEPICT and JULE, and is competitive with IMSAT.
|
| 243 |
+
|
| 244 |
+
To evaluate how well the outputs of SpectralNet approximate the true eigenvectors of the graph Laplacian, we compute the Grassmann distance between the subspace of SpectralNet outputs and that of the true eigenvectors. The squared Grassmann distance measures the sum of squared sines of the angles between two $k$ -dimensional subspaces; the distance is in $[ 0 , k ]$ . Figure 2 shows the Grassmann distance on the MNIST dataset as a function of the training time (expressed as number of parameter updates). It can be seen that the distance decreases rapidly at the beginning of training and stabilizes around 0.026 as time progresses.
|
| 245 |
+
|
| 246 |
+

|
| 247 |
+
Figure 2: Grassmann distance as a function of iteration update for the MNIST dataset.
|
| 248 |
+
|
| 249 |
+
To check the generalization ability of SpectralNet to new test points, we repeated the experiment, this time training SpectralNet only on the training set, and predicting the labels of the test examples by passing them through the net and associating each test example with the nearest centroid from the $k$ -means that were performed on the embedding of the training examples. The accuracy on test examples was .970, implying that SpectralNet generalizes well to unseen test data in this case. We similarly also evaluated the generalization performance of $\mathbf { k }$ -means. The accuracy of $\mathbf { k }$ -means on the test set is .546 when using the input space and .776 when using the code space, both significantly inferior to SpectralNet.
|
| 250 |
+
|
| 251 |
+
# 5.2.2 REUTERS
|
| 252 |
+
|
| 253 |
+
The Reuters dataset is a collection of English news, labeled by category. Like DEC and VaDE, we used the following categories: corporate/industrial, government/social, markets, and economics as labels and discarded all documents with multiple labels. Each article is represented by a tfidf vector, using the $2 0 0 0 \ \mathrm { m o s t }$ frequent words. The dataset contains $n = 6 8 5 , 0 7 1$ documents. Performing vanilla spectral clustering on a dataset of this size in a standard way is prohibitive. The AE used to map the data to code space was trained based on a random subset of 10,000 samples from the full dataset. To construct positive pairs for the Siamese net, we randomly sampled 300,000 examples from the entire dataset, and paired each one with a random neighbor from its 3000 nearest neighbors. An equal number of negative pairs was obtained by randomly pairing each point with one of the remaining points.
|
| 254 |
+
|
| 255 |
+
Table 1 shows the performance of the various algorithms on the Reuters dataset. Overall, we see similar behavior to what we observed on MNIST: SpectralNet outperforms all other methods, and performs best in code space, and using Siamese affinity. Our SpectralNet implementation took less than 20 minutes to learn the spectral map on this dataset, using a GeForce GTX 1080 GPU. For comparison, computing the top four eigenvectors of the Laplacian matrix of the complete data, needed for spectral clustering, took over 100 minutes using ARPACK. Note that both SpectralNet and spectral clustering require pre-computed nearest neighbor graph. Moreover, spectral clustering using the ARPACK eigenvectors failed to produce reasonable clustering. This illustrates the robustness of our method in contrast to the well known instability of spectral clustering to outliers.
|
| 256 |
+
|
| 257 |
+
To evaluate the generalization ability of SpectralNet, we divided the data randomly to a $90 \%$ - $10 \%$ split, re-trained the Siamese net and SpectralNet on the larger subset, and predicted the labels of the smaller subset. The test accuracy was 0.798, implying that as on MNIST, SpectralNet generalizes well to new examples.
|
| 258 |
+
|
| 259 |
+
# 6 CONCLUSIONS
|
| 260 |
+
|
| 261 |
+
We have introduced SpectralNet, a deep learning approach for approximate spectral clustering. The stochastic training of SpectralNet allows us to scale to larger datasets than what vanilla spectral clustering can handle, and the parametric map obtained from the net enables straightforward out of sample extension. In addition, we propose to use unsupervised Siamese networks to compute distances, and empirically show that this results in better performance, comparing to standard Euclidean distances. Further improvement are achieved by applying our network to code representations produced with a standard stacked autoencoder. We present a novel analysis of the VC dimension of spectral clustering, and derive a lower bound on the size of neural nets that compute it. In addition, we report state of the art results on two benchmark datasets, and show that SpectralNet outperforms existing methods when the clusters cannot be contained in non overlapping convex shapes. We believe the integration of spectral clustering with deep learning provides a useful tool for unsupervised deep learning.
|
| 262 |
+
|
| 263 |
+
# ACKNOWLEDGEMENTS
|
| 264 |
+
|
| 265 |
+
We thank Raphy Coifman and Sahand Negahban for helpful discussions. R.B is supported in part by the Minerva foundation with funding from the Federal German Ministry for Education and Research. Y.K and B.N are supported by NIH grant 1R01HG008383-01A1.
|
| 266 |
+
|
| 267 |
+
# REFERENCES
|
| 268 |
+
|
| 269 |
+
Carlos Alzate and Johan AK Suykens. Multiway spectral clustering with out-of-sample extensions through weighted kernel pca. IEEE transactions on pattern analysis and machine intelligence, 32 (2):335–347, 2010.
|
| 270 |
+
|
| 271 |
+
Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. Journal of machine learning research, 7 (Nov):2399–2434, 2006.
|
| 272 |
+
|
| 273 |
+
Yoshua Bengio, Jean-franc¸cois Paiement, Pascal Vincent, Olivier Delalleau, Nicolas L Roux, and Marie Ouimet. Out-of-sample extensions for lle, isomap, mds, eigenmaps, and spectral clustering. In Advances in neural information processing systems, pp. 177–184, 2004.
|
| 274 |
+
|
| 275 |
+
Deng Cai, Xiaofei He, and Jiawei Han. Locally consistent concept factorization for document clustering. IEEE Transactions on Knowledge and Data Engineering, 23(6):902–913, 2011.
|
| 276 |
+
|
| 277 |
+
Gang Chen. Deep learning with nonparametric clustering. arXiv preprint arXiv:1501.03084, 2015.
|
| 278 |
+
|
| 279 |
+
Ronald R Coifman and Stephane Lafon. Diffusion maps. ´ Applied and computational harmonic analysis, 21(1):5–30, 2006a.
|
| 280 |
+
|
| 281 |
+
Ronald R Coifman and Stephane Lafon. Geometric harmonics: a novel tool for multiscale out-of- ´ sample extension of empirical functions. Applied and Computational Harmonic Analysis, 21(1): 31–52, 2006b.
|
| 282 |
+
|
| 283 |
+
Nat Dilokthanakul, Pedro AM Mediano, Marta Garnelo, Matthew CH Lee, Hugh Salimbeni, Kai Arulkumaran, and Murray Shanahan. Deep unsupervised clustering with gaussian mixture variational autoencoders. arXiv preprint arXiv:1611.02648, 2016.
|
| 284 |
+
|
| 285 |
+
Kamran Ghasedi Dizaji, Amirhossein Herandi, and Heng Huang. Deep clustering via joint convolutional autoencoder embedding and relative entropy minimization. arXiv preprint arXiv:1704.06327, 2017.
|
| 286 |
+
|
| 287 |
+
Charless Fowlkes, Serge Belongie, Fan Chung, and Jitendra Malik. Spectral grouping using the nystrom method. IEEE transactions on pattern analysis and machine intelligence, 26(2):214– 225, 2004.
|
| 288 |
+
|
| 289 |
+
Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In Computer vision and pattern recognition, 2006 IEEE computer society conference on, volume 2, pp. 1735–1742. IEEE, 2006.
|
| 290 |
+
|
| 291 |
+
Weihua Hu, Takeru Miyato, Seiya Tokui, Eiichi Matsumoto, and Masashi Sugiyama. Learning discrete representations via information maximizing self augmented training. arXiv preprint arXiv:1702.08720, 2017.
|
| 292 |
+
|
| 293 |
+
Marc T Law, Raquel Urtasun, and Richard S Zemel. Deep spectral clustering learning. In International Conference on Machine Learning, pp. 1985–1994, 2017.
|
| 294 |
+
|
| 295 |
+
Gal Mishne, Uri Shaham, Alexander Cloninger, and Israel Cohen. Diffusion nets. Applied and Computational Harmonic Analysis, 2017.
|
| 296 |
+
|
| 297 |
+
James Munkres. Algorithms for the assignment and transportation problems. Journal of the society for industrial and applied mathematics, 5(1):32–38, 1957.
|
| 298 |
+
|
| 299 |
+
Boaz Nadler, Stephane Lafon, Ioannis Kevrekidis, and Ronald R Coifman. Diffusion maps, spectral clustering and eigenfunctions of fokker-planck operators. In Advances in neural information processing systems, pp. 955–962, 2006.
|
| 300 |
+
|
| 301 |
+
Andrew Y Ng, Michael I Jordan, and Yair Weiss. On spectral clustering: Analysis and an algorithm. In Advances in neural information processing systems, pp. 849–856, 2002.
|
| 302 |
+
|
| 303 |
+
Uri Shaham and Roy R Lederman. Learning by coincidence: Siamese networks and common variable learning. Pattern Recognition, 74:52–63, 2018.
|
| 304 |
+
|
| 305 |
+
Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014.
|
| 306 |
+
|
| 307 |
+
Ohad Shamir. A stochastic pca and svd algorithm with an exponential convergence rate. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 144–152, 2015.
|
| 308 |
+
|
| 309 |
+
Jianbo Shi and Jitendra Malik. Normalized cuts and image segmentation. IEEE Transactions on pattern analysis and machine intelligence, 22(8):888–905, 2000.
|
| 310 |
+
|
| 311 |
+
Fei Tian, Bin Gao, Qing Cui, Enhong Chen, and Tie-Yan Liu. Learning deep representations for graph clustering. In AAAI, pp. 1293–1299, 2014.
|
| 312 |
+
|
| 313 |
+
Ulrike Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007.
|
| 314 |
+
|
| 315 |
+
Junyuan Xie, Ross Girshick, and Ali Farhadi. Unsupervised deep embedding for clustering analysis. In International Conference on Machine Learning (ICML), 2016.
|
| 316 |
+
|
| 317 |
+
Bo Yang, Xiao Fu, Nicholas D Sidiropoulos, and Mingyi Hong. Towards k-means-friendly spaces: Simultaneous deep learning and clustering. International Conference on Machine Learning (ICML), 2017.
|
| 318 |
+
|
| 319 |
+
Jianwei Yang, Devi Parikh, and Dhruv Batra. Joint unsupervised learning of deep representations and image clusters. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5147–5156, 2016.
|
| 320 |
+
|
| 321 |
+
Li Yi, Hao Su, Xingwen Guo, and Leonidas Guibas. Syncspeccnn: Synchronized spectral cnn for 3d shape segmentation. arXiv preprint arXiv:1612.00606, 2016.
|
| 322 |
+
|
| 323 |
+
Yin Zheng, Huachun Tan, Bangsheng Tang, Hanning Zhou, et al. Variational deep embedding: A generative approach to clustering. arXiv preprint arXiv:1611.05148, 2016.
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
Figure 3: SpectralNet performance on the nested $\mathbf { \tilde { C } } \mathbf { \Psi }$ example. Top row: clustering using SpectralNet (left), spectral clustering (center), and $k$ -means (right). Bottom row, left panel: SpectralNet outputs (plotted in blue and green) vs. the true eigenvectors. Bottom row, right panel: loss and Grassmann distance as a function of iteration number; the values on the horizontal axis $\times 1 0 0$ are the numbers of the parameter updates.
|
| 327 |
+
|
| 328 |
+
# A ILLUSTRATIVE DATASETS
|
| 329 |
+
|
| 330 |
+
To compare SpectralNet to spectral clustering, we consider a simple dataset of 1500 points in two dimensions, containing two nested $\mathbf { \bar { C } } '$ -shaped clusters. We applied spectral clustering to the dataset by computing the eigenvectors of the unnormalized graph Laplacian $L = D - W$ corresponding to the two smallest eigenvalues, and then applying $k$ -means (with $k { = } 2$ ) to these eigenvector embeddings. The affinity matrix $W$ was computed using $\begin{array} { r } { W _ { i , j } = \exp \left( { - \frac { \| x _ { i } - x _ { j } \| ^ { 2 } } { \sigma ^ { 2 } } } \right) } \end{array}$ , where the scale $\sigma$ was set to be the median distance between a point to its 3rd neighbor – a standard practice in diffusion applications.
|
| 331 |
+
|
| 332 |
+
Figure 3 shows the clustering of the data obtained by SpectralNet, standard spectral clustering, and $k$ -means. It can be seen that both SpectralNet and spectral clustering identify the correct cluster structure, while $k$ -means fails to do so. Moreover, despite the stochastic training, the net outputs closely approximate the two true eigenvectors of $W$ with smallest eigenvalues. Indeed the Grassmann distance between the net outputs and the true eigenvectors approaches zero as the loss decreases.
|
| 333 |
+
|
| 334 |
+
In the next experiment, we trained, DCN, VaDE, DEPICT (using agglomerative clustering initialization) and IMSAT (using adversarial perturbations for data augmentation) on the 2D datasets of Figure 1. The experiments were performed using the code published by the authors of each paper. For each method, we tested various network architectures and hyper-parameter settings. Unfortunately, we were unable to find a setting that will yield an appropriate clustering on any of the datasets for DCN, VaDE and DEPICT. IMSAT worked on two out of the five datasets, however failed to yield an appropriate clustering in fairly simple cases. Plots with typical results of each of the methods on each of the five 2D datasets is shown in Figure 4.
|
| 335 |
+
|
| 336 |
+
To further investigate why these methods fail, we performed a sequence of experiments with the two nested ’C’s data, while changing the distance between the two clusters. The results are shown in Figure 5. We can see that all three methods fail to cluster the points correctly once the clusters cannot be linearly separated.
|
| 337 |
+
|
| 338 |
+
Interestingly, although the target distribution of DEPICT was initialized with agglomerative clustering, which successfully clusters the nested ’C’s, its target distribution becomes corrupted throughout the training, although its loss is considerably reduced, see Figure 6.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 4: from top to bottom: Results of DCN, VaDE, DEPICT and IMSAT on our illustrative datasets.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 5: From top: Typical results of DCN, VaDE, DEPICT and IMSAT on the nested ’C’s, with several different distances between the two clusters.
|
| 345 |
+
|
| 346 |
+

|
| 347 |
+
Figure 6: The nested ’C’s, colored by DEPICT target distribution. Left: at initialization (with agglomerative clustering initialization). the DEPICT loss at this stage is 9.01. Right: after DEPICT training. The loss is 0.22. Although the loss decreases with training, the target distribution becomes corrupted.
|
| 348 |
+
|
| 349 |
+
# B CORRECTNESS OF THE $Q R$ DECOMPOSITION
|
| 350 |
+
|
| 351 |
+
We next verify that the Cholesky decomposition can indeed be used to compute the QR decomposition of a positive definite matrix. First, observe that since $L$ is lower triangular, then so is $L ^ { - 1 }$ , and $( L ^ { - 1 } ) ^ { T }$ is upper triangular. Hence for $i = 1 , \ldots m$ , the column space of the first $i$ columns of $A$ is the same as the column space of the first $i$ columns of $Q = A ( \dot { L } ^ { - 1 } ) ^ { T }$ . To show that the columns of $Q$ corresponds to Gram-Schmidt orthogonalization of the columns of $A$ , it therefore remains to show that $\hat { Q } ^ { T } Q = I$ . Indeed:
|
| 352 |
+
|
| 353 |
+
$$
|
| 354 |
+
Q ^ { T } Q = L ^ { - 1 } A ^ { T } A ( L ^ { - 1 } ) ^ { T } = L ^ { - 1 } L L ^ { T } ( L ^ { - 1 } ) ^ { T } = ( L ^ { - 1 } L ) ^ { T } = I .
|
| 355 |
+
$$
|
| 356 |
+
|
| 357 |
+
# C SECTION 4 PROOFS
|
| 358 |
+
|
| 359 |
+
# C.1 PRELIMINARIES
|
| 360 |
+
|
| 361 |
+
To prove Theorem 4.1, we begin with the following definition and lemmas.
|
| 362 |
+
|
| 363 |
+
Definition C.1 $( \alpha , \beta )$ -separated graph). Let $\alpha > \beta \ge 0$ . An $( \alpha , \beta )$ -separated graph is $G =$ $( V , W )$ , where $V$ has an even number of vertices and has a balanced partition $V = S \cup T$ , $| S | = | T |$ , and $W$ is an affinity matrix so that:
|
| 364 |
+
|
| 365 |
+
• For any $v _ { i } , v _ { j } \in S$ (resp. $T _ { \cdot }$ ), there is a path $v _ { i } = v _ { k _ { 1 } } , v _ { k _ { 2 } } , \ldots , v _ { k _ { l } } = v _ { j } \in S$ , so that for every two consecutive points $v _ { k _ { l } } , v _ { k _ { l + 1 } }$ along the path, $W _ { k _ { l } , k _ { l + 1 } } \geq \alpha$ .
|
| 366 |
+
|
| 367 |
+
• For any $v _ { i } \in S , \ v _ { j } \in T , W _ { i , j } \leq \beta .$
|
| 368 |
+
|
| 369 |
+
Lemma C.2. For any integer $m > 0$ there exists a set ${ \tilde { X } } = \{ x _ { 1 } , \ldots , x _ { m } \} \subseteq \mathbb { R } ^ { d } \left( d \geq 3 \right)$ , so that for any binary partition ${ \tilde { X } } = { \tilde { S } } \cup { \tilde { T } }$ , we can construct a set $X$ of $n = 1 0 m$ points, ${ \tilde { X } } \subset X$ , and $a$ balanced binary partition $X = S \cup T$ , $| S | = | T |$ of it, such that
|
| 370 |
+
|
| 371 |
+
• $\tilde { S } \subset S , \tilde { T } \subset T$
|
| 372 |
+
• For any $x _ { i } , x _ { j } \in S \left( r e s p . \ T \right)$ , there is a path $x _ { i } , x _ { k _ { 1 } } , x _ { k _ { 2 } } , \ldots , x _ { k _ { l } } , x _ { j } \in S$ , so that for every two consecutive points $x _ { k _ { l } } , x _ { k _ { l + 1 } }$ along the path, $\| x _ { k _ { l } } - x _ { k _ { l + 1 } } \| \le b < 1$ (property $\pmb { a }$ ).
|
| 373 |
+
• For any $x _ { i } \in S , \ x _ { j } \in T , \ \| x _ { i } - x _ { j } | \geq 1 ( p r o p e r t y \ b ) .$
|
| 374 |
+
|
| 375 |
+
Proof. We will prove this for the case $d = 3$ ; the proof holds for any $d \geq 3$ .
|
| 376 |
+
|
| 377 |
+
Let $m > 0$ be integer. We choose the set $\tilde { X }$ to lie in a 2-dimensional unit grid inside a square of minimal diameter, which is placed in the $Z = 0$ plane. Each point $x _ { i }$ is at a distance 1 from its neighbors.
|
| 378 |
+
|
| 379 |
+
Next, given a partition of $x _ { 1 } , \ldots , x _ { m }$ to two subsets, $\tilde { S }$ and $\tilde { T }$ , we will construct a set $X \supset { \tilde { X } }$ with $n = 1 0 m$ points and a partition $S \cup T$ that satisfy the conditions of the lemma (an illustration can be seen in Figure 7). First, we add points to obtain a balanced partition. We do so by adding $m$ new points $x _ { m + 1 } , \ldots , x _ { 2 m }$ , assigning each of them arbitrarily to either $\tilde { S }$ or $\tilde { T }$ until $| \tilde { S } | = | \tilde { T } | = m$ . We place all these points also on grid points in the $Z = 0$ plane so that all $2 m$ points lie inside a square of minimal diameter. We further add all the points in $\bar { \tilde { S } }$ to $S$ and those in $\tilde { T }$ to $T$ .
|
| 380 |
+
|
| 381 |
+

|
| 382 |
+
Figure 7: Illustration of the construction of Lemma C.2. We select the set $\tilde { X }$ to lie in a grid in the $Z = 0$ plane. Given an arbitrary dichotomy ${ \tilde { X } } = { \tilde { S } } \cup { \tilde { T } }$ (points are marked with filled circles, colored respectively in red and blue), we first add points to make the sets balanced (not shown). Next, we make a copy for $S$ at $Z = 1$ and for $T$ at $Z = - 1$ (filled squares). We then add midpoints between each point and its copy (empty circles), and finally add more points along the minimal length spanning tree (empty squares). Together, all the red points form the set $S$ ; the blue points form the set $T$ , and $X = S \cup T$ .
|
| 383 |
+
|
| 384 |
+
In the next step, we prepare a copy of the $\tilde { S }$ -points at $Z = 1$ (with the same $X , Y$ coordinates) and a copy of the $\tilde { T }$ -points at $Z = - 1$ . We denote these copies by $x _ { 1 } ^ { \prime } , . . . , x _ { 2 m } ^ { \prime }$ and refer to the lifted points at $Z = 1$ by $S ^ { \prime }$ and at $Z = - 1$ by $T ^ { \prime }$ . Next, we will add $6 m$ more points to make the full set of $n = 1 0 m$ points satisfy properties a and $\mathbf { b }$ . First, we will add the midpoint between every point and its copy, i.e., $x _ { i } ^ { \prime \prime } = ( x _ { i } + x _ { i } ^ { \prime } ) / 2$ . We assign each such midpoint to $S$ (resp. $T$ ) if it is placed between $x _ { i } \in S$ and $x _ { i } ^ { \prime } \in S ^ { \prime }$ (resp. $T$ and $T ^ { \prime }$ ). Then we connect the points in $S ^ { \prime }$ (resp. $T ^ { \prime }$ ) by a minimal length spanning tree and add $4 m$ more points along the edges of these two spanning trees so that the added points are equally spaced along every edge. We assign the new points on the spanning tree of $S ^ { \prime }$ to $S$ and of $T ^ { \prime }$ to $T$ .
|
| 385 |
+
|
| 386 |
+
We argue that the obtained point set $X$ of size $1 0 m$ satisfies the conditions of the lemma. Clearly, $\tilde { S } \subset \bar { S }$ and $\tilde { T } \subset T$ . To show that property a is satisfied, note that the length of each spanning tree cannot exceed $2 m$ , since the full $2 m$ grid points $\tilde { X }$ can be connected with a tree of length $2 m - 1$ . It is evident therefore that every two points $x _ { i } , x _ { j } \in S$ (resp. $T$ ) are connected by a path in which the distance between each two consecutive points is strictly less than 1 (property a). Property $\mathbf { b }$ too is satisfied because the grid points in $\tilde { X }$ are at least distance 1 apart; each midpoint $x _ { i } ^ { \prime \prime }$ is distance $1 / 2$ from $x _ { i }$ and $\boldsymbol { x } _ { i } ^ { \prime }$ (and they all belong to the same set, either $S$ or $T$ ), but its distance to the rest of the points in $\tilde { X }$ exceeds 1, and the rest of the points in $S$ (resp. $T$ ) are on the $Z = 1$ (resp. $Z = 1$ ) plane, and so they are at least distance 1 away from members of the opposite set which all lie in the $Z \le 0$ (resp. $Z \geq 0$ ) half space. □
|
| 387 |
+
|
| 388 |
+
Lemma C.3. . Let $f ( \cdot )$ be the spectral clustering loss
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
f ( y ) = \sum _ { i , j } W _ { i , j } ( y _ { i } - y _ { j } ) ^ { 2 } .
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
Let $G = ( X , W )$ be a $( \alpha , \beta )$ -separated graph, such that $\vert X \vert = n \ge 4$ . Let $y ^ { * }$ be a minimizer of $f ( y ) w . r . t W$ , subject to $1 ^ { T } y = 0 , \ \| y \| = 1$ . Let
|
| 395 |
+
|
| 396 |
+
and similarly
|
| 397 |
+
|
| 398 |
+
$$
|
| 399 |
+
\begin{array} { r l } & { \Delta _ { S } = \operatorname* { m a x } \{ y _ { i } ^ { * } - y _ { j } ^ { * } : x _ { i } , x _ { j } \in S \} , } \\ & { } \\ & { \Delta _ { T } = \operatorname* { m a x } \{ y _ { i } ^ { * } - y _ { j } ^ { * } : x _ { i } , x _ { j } \in T \} . } \end{array}
|
| 400 |
+
$$
|
| 401 |
+
|
| 402 |
+
Let $\Delta = \operatorname* { m a x } \left\{ \Delta _ { S } , \Delta _ { T } \right\}$ . Then
|
| 403 |
+
|
| 404 |
+
$$
|
| 405 |
+
\frac { \alpha } { \beta } \Delta ^ { 2 } \leq \frac { n ^ { 2 } } { 2 } .
|
| 406 |
+
$$
|
| 407 |
+
|
| 408 |
+
Proof. Without loss of generality, assume that $x _ { 1 } , \ldots , x _ { \frac { n } { 2 } } \in S$ , $x _ { \frac { n } { 2 } + 1 } , \ldots , x _ { n } \in T$ , and that $y _ { 1 } ^ { * } \leq$ $y _ { 2 } ^ { * } \leq . . . \leq y _ { \frac { n } { 2 } } ^ { * }$ and $y _ { \frac { n } { 2 } + 1 } ^ { * } \leq y _ { \frac { n } { 2 } + 2 } ^ { * } \leq \cdot \cdot \cdot \leq y _ { n } ^ { * }$ . Also wlog, $\Delta = \Delta ^ { \acute { \prime } } s$ . We begin by lower-bounding $f ( y ^ { * } )$ .
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\begin{array} { l } { f ( y ^ { * } ) = \displaystyle \sum _ { i , j } W _ { i , j } ( y _ { i } ^ { * } - y _ { j } ^ { * } ) ^ { 2 } } \\ { \geq \displaystyle \sum _ { x _ { i } , x _ { j } \in S } W _ { i , j } ( y _ { i } ^ { * } - y _ { j } ^ { * } ) ^ { 2 } + \displaystyle \sum _ { x _ { i } , x _ { j } \in T } W _ { i , j } ( y _ { i } ^ { * } - y _ { j } ^ { * } ) ^ { 2 } . } \end{array}
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
Since $G$ is $( \alpha , \beta )$ -separated, there exists a path from $y _ { 1 }$ to $y _ { \frac { n } { 2 } }$ (and likewise from $y _ { \frac { n } { 2 } + 1 } ^ { { n } }$ to $y _ { n }$ where the affinity of every pair of consecutive points exceeds $\alpha$ . Denote this path by $\Gamma _ { S }$ (resp. $\Gamma _ { T }$ ), therefore
|
| 415 |
+
|
| 416 |
+
$$
|
| 417 |
+
f ( \boldsymbol { y } ^ { * } ) \ge \alpha \left( \sum _ { x _ { k _ { i } } , x _ { k _ { i + 1 } } \in \Gamma _ { S } } ( \boldsymbol { y } _ { k _ { i + 1 } } ^ { * } - \boldsymbol { y } _ { k _ { i } } ^ { * } ) ^ { 2 } + \sum _ { x _ { k _ { i } } , x _ { k _ { i + 1 } } \in \Gamma _ { T } } ( \boldsymbol { y } _ { k _ { i + 1 } } ^ { * } - \boldsymbol { y } _ { k _ { i } } ^ { * } ) ^ { 2 } \right) .
|
| 418 |
+
$$
|
| 419 |
+
|
| 420 |
+
Note that these are telescopic sums of squares. Clearly, such sum of squares is minimized if all $n / 2$ points are ordered and equi-distant, i.e., if we divide a segment of length $\Delta$ into $n / 2 - 1$ segments of equal length. Consequently, discarding the second summand,
|
| 421 |
+
|
| 422 |
+
$$
|
| 423 |
+
f ( y ^ { * } ) \geq \alpha \left( \frac { n } { 2 } - 1 \right) \left( \frac { \Delta } { n / 2 - 1 } \right) ^ { 2 } = \frac { 2 \Delta ^ { 2 } \alpha } { n - 2 } \geq \frac { 2 \Delta ^ { 2 } \alpha } { n } ,
|
| 424 |
+
$$
|
| 425 |
+
|
| 426 |
+
Next, to produce an upper bound, we consider the vector $\bar { y } = \textstyle \frac { 1 } { \sqrt { n } } ( - 1 , \dotsc , - 1 , 1 , \dotsc 1 )$ , i.e., $\bar { y } _ { i } =$ $- { \frac { 1 } { \sqrt { n } } }$ for $i \leq \frac { n } { 2 }$ , and $\scriptstyle { \frac { 1 } { \sqrt { n } } }$ otherwise. For this vector,
|
| 427 |
+
|
| 428 |
+
$$
|
| 429 |
+
f ( \bar { y } ) \leq \beta \left( \frac { n } { 2 } \right) ^ { 2 } \left( \frac { 2 } { \sqrt { n } } \right) ^ { 2 } = n \beta .
|
| 430 |
+
$$
|
| 431 |
+
|
| 432 |
+
In summary, we obtain
|
| 433 |
+
|
| 434 |
+
Hence
|
| 435 |
+
|
| 436 |
+
$$
|
| 437 |
+
\begin{array} { c } { { \displaystyle \frac { 2 \Delta ^ { 2 } \alpha } { n } \leq f ( y ^ { * } ) \leq f ( \bar { y } ) \leq n \beta , } } \\ { { { } } } \\ { { \displaystyle \frac { \alpha } { \beta } \Delta ^ { 2 } \leq \frac { n ^ { 2 } } { 2 } . } } \end{array}
|
| 438 |
+
$$
|
| 439 |
+
|
| 440 |
+
Lemma C.4. Let $y \in \mathbb { R } ^ { n }$ be a vector such that $1 ^ { T } y ~ = ~ 0$ , and $\| y \| = 1$ . Let $X \ = \ S \cup T$ , $\begin{array} { r } { | S | = | T | = \frac { n } { 2 } } \end{array}$ .
|
| 441 |
+
|
| 442 |
+
and similarly
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\begin{array} { r l } & { \Delta _ { S } = \operatorname* { m a x } \{ y _ { i } - y _ { j } : x _ { i } , x _ { j } \in S \} , } \\ & { } \\ & { \Delta _ { T } = \operatorname* { m a x } \{ y _ { i } - y _ { j } : x _ { i } , x _ { j } \in T \} . } \end{array}
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Let $\Delta = \operatorname* { m a x } \left\{ \Delta _ { S } , \Delta _ { T } \right\}$ . If $\begin{array} { r } { \Delta < \frac { 1 } { \sqrt { 2 n } } } \end{array}$ , then
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
\operatorname* { m a x } \{ y _ { i } : x _ { i } \in S \} < 0 < \operatorname* { m i n } \{ y _ { i } : x _ { i } \in T \} .
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
Proof. Let
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
m _ { S } = \frac { 2 } { n } \sum _ { x _ { i } \in S } y _ { i } , m _ { T } = \frac { 2 } { n } \sum _ { x _ { i } \in T } y _ { i } .
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
Since $1 ^ { T } y = 0$ , we have $m _ { S } = - m _ { T }$ . Without loss of generality, assume that $m _ { S } < 0 < m _ { T }$ . For every $y _ { i }$ such that $x _ { i } \in S$ ,
|
| 461 |
+
|
| 462 |
+
$$
|
| 463 |
+
( y _ { i } - m _ { S } ) ^ { 2 } \leq \Delta ^ { 2 } .
|
| 464 |
+
$$
|
| 465 |
+
|
| 466 |
+
Similarly, for every $y _ { i }$ such that $x _ { i } \in T$ ,
|
| 467 |
+
|
| 468 |
+
$$
|
| 469 |
+
( y _ { i } + m _ { S } ) ^ { 2 } = ( y _ { i } - m _ { T } ) ^ { 2 } \leq \Delta ^ { 2 } .
|
| 470 |
+
$$
|
| 471 |
+
|
| 472 |
+
This gives
|
| 473 |
+
|
| 474 |
+
$$
|
| 475 |
+
\begin{array} { r c l } { { } } & { { } } & { { { n \displaystyle \Delta ^ { 2 } \geq \sum _ { x _ { i } \in S } ( y _ { i } - m _ { S } ) ^ { 2 } + \sum _ { x _ { i } \in T } ( y _ { i } + m _ { S } ) ^ { 2 } } } } \\ { { } } & { { } } & { { = \displaystyle \sum _ { x _ { i } \in S \cup T } y _ { i } ^ { 2 } - 2 m _ { S } \sum _ { x _ { i } \in S } y _ { i } + 2 m _ { S } \sum _ { x _ { i } \in T } y _ { i } + n m _ { S } ^ { 2 } } } \\ { { } } & { { } } & { { = 1 - 2 m _ { S } \cdot m _ { S } \frac { n } { 2 } + 2 m _ { S } \cdot - m _ { S } \frac { n } { 2 } + n m _ { S } ^ { 2 } } } \\ { { } } & { { } } & { { = 1 - n m _ { S } ^ { 2 } , } } \end{array}
|
| 476 |
+
$$
|
| 477 |
+
|
| 478 |
+
which gives
|
| 479 |
+
|
| 480 |
+
$$
|
| 481 |
+
m _ { S } ^ { 2 } \geq \frac { 1 - n \Delta ^ { 2 } } { n } .
|
| 482 |
+
$$
|
| 483 |
+
|
| 484 |
+
In order to obtain the desired result, i.e., that $\operatorname* { m a x } \{ y _ { i } : x _ { i } \in S \} < 0 < \operatorname* { m i n } \{ y _ { i } : x _ { i } \in T \}$ , it therefore remains to show that for a sufficiently small $\Delta$ , by (7), $m _ { S } + \Delta < 0$ (this will also yield $m _ { T } - \Delta > 0 ,$ ). Hence, we will require
|
| 485 |
+
|
| 486 |
+
$$
|
| 487 |
+
{ \frac { 1 - n \Delta ^ { 2 } } { n } } \geq \Delta ^ { 2 } ,
|
| 488 |
+
$$
|
| 489 |
+
|
| 490 |
+
which holds for $\begin{array} { r } { \Delta < \frac { 1 } { \sqrt { 2 n } } } \end{array}$
|
| 491 |
+
|
| 492 |
+
# C.2 PROOF OF THEOREM 4.1
|
| 493 |
+
|
| 494 |
+
Proof. To determine the VC-dimension of $\mathcal { F } _ { n } ^ { \mathrm { s p } }$ ectral clustering we need to show that there exists a set of $m = n / 1 0$ points (assuming for simplicity that $n$ is divisible by 10) that is shattered by spectral clustering. By Lemma C.2, there exists a set of $m$ points $\tilde { X } \subseteq \mathbb { R } ^ { d } \left( d \geq 3 \right)$ so that for any dichotomy of $\tilde { X }$ there exists a set $X \supset { \tilde { X } }$ of $n = 1 0 m$ points, with a balanced partition $X = S \cup T$ that respects the dichotomy of $\tilde { X }$ , and whose points satisfy properties a and $\mathbf { b }$ of Lemma C.2 with $0 \leq b < 1$ .
|
| 495 |
+
|
| 496 |
+
Consider next the complete graph $G = ( V , W )$ whose vertices $v _ { i } \in V$ correspond to point $x _ { i }$ and the affinity matrix $W$ is set with the standard Gaussian affinity $\begin{array} { r } { W _ { i , j } = \exp \left( { - \frac { \| x _ { i } - x _ { j } \| ^ { 2 } } { 2 \sigma ^ { 2 } } } \right) } \end{array}$ where the value of $\sigma$ will be provided below. It can be readily verified that, due to properties a and $\mathbf { b }$ , $G$ is $( \alpha , \beta )$ -separated, where
|
| 497 |
+
|
| 498 |
+
$$
|
| 499 |
+
\alpha = \exp \left( - \frac { b ^ { 2 } } { 2 \sigma ^ { 2 } } \right) , \beta = \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \right) .
|
| 500 |
+
$$
|
| 501 |
+
|
| 502 |
+
Let $y ^ { * }$ be the second-smallest eigenvector of the graph Laplacian matrix for $G$ , i.e., the minimizer of
|
| 503 |
+
|
| 504 |
+
$$
|
| 505 |
+
f ( y ) = \sum _ { i , j } W _ { i , j } ( y _ { i } - y _ { j } ) ^ { 2 } , \quad \mathrm { s . t . } \quad 1 ^ { T } y = 0 , y ^ { T } y = 1 .
|
| 506 |
+
$$
|
| 507 |
+
|
| 508 |
+
By Lemma C.3, since $G$ is $( \alpha , \beta )$ -separated, $\Delta$ , i.e, the spread of the entries of $y ^ { * }$ for the partition $S \cup T$ , should satisfy
|
| 509 |
+
|
| 510 |
+
$$
|
| 511 |
+
\frac { \alpha } { \beta } \Delta ^ { 2 } \leq \frac { n ^ { 2 } } { 2 } .
|
| 512 |
+
$$
|
| 513 |
+
|
| 514 |
+
Notice that
|
| 515 |
+
|
| 516 |
+
$$
|
| 517 |
+
\frac { \alpha } { \beta } = \exp \left( \frac { 1 - b ^ { 2 } } { 2 \sigma ^ { 2 } } \right) ,
|
| 518 |
+
$$
|
| 519 |
+
|
| 520 |
+
allowing us to make $\Delta$ arbitrarily small by pushing the scale $\sigma$ towards $0 ^ { 3 }$ . In particular, we can set $\sigma$ so as to make $\Delta$ satisfy $\Delta < 1 / \sqrt { 2 n }$ . Therefore, by lemma (C.4), thresholding $y ^ { * }$ at 0 respects the partition of $X$ , and hence also the dichotomy of $\tilde { X }$ .
|
| 521 |
+
|
| 522 |
+
In summary, we have shown that any dichotomy of $\tilde { X }$ can be obtained from a second-smallest eigenvector of some graph Laplacian of $n$ points. Hence the VC dimension of $\mathcal { F }$ is at least $m =$ $n / 1 0$ . □
|
| 523 |
+
|
| 524 |
+
Table 2: Siamese net and SpectralNet architectures in the MNIST and Reuters experiments.
|
| 525 |
+
|
| 526 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Siamese net</td><td rowspan=1 colspan=1>SpectralNet</td></tr><tr><td rowspan=1 colspan=1>MNIST</td><td rowspan=1 colspan=1>ReLU,size=1024ReLU,size = 1024ReLU,size = 512ReLU,size = 10■</td><td rowspan=1 colspan=1>ReLU,size=1024ReLU,size = 1024ReLU,size = 512tanh, size = 10orthonorm</td></tr><tr><td rowspan=1 colspan=1>Reuters</td><td rowspan=1 colspan=1>ReLU, size= 512ReLU,size = 256ReLU,size = 128=</td><td rowspan=1 colspan=1>ReLU, size = 512ReLU, size = 256tanh, size =4orthonorm</td></tr></table>
|
| 527 |
+
|
| 528 |
+
Table 3: Additional technical details.
|
| 529 |
+
|
| 530 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>MNISTSiamese</td><td rowspan=1 colspan=1>MNISTSpectralNet</td><td rowspan=1 colspan=1>ReutersSiamese</td><td rowspan=1 colspan=1>ReutersSpectralNet</td></tr><tr><td rowspan=1 colspan=1>Batch size</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>128</td><td rowspan=1 colspan=1>2048</td></tr><tr><td rowspan=1 colspan=1>Ortho.batch size</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1024</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>2048</td></tr><tr><td rowspan=1 colspan=1>Initial LR</td><td rowspan=1 colspan=1>10-3</td><td rowspan=1 colspan=1>10-3</td><td rowspan=1 colspan=1>10-3</td><td rowspan=1 colspan=1>5·10-5</td></tr><tr><td rowspan=1 colspan=1>LR decay</td><td rowspan=1 colspan=1>.1</td><td rowspan=1 colspan=1>.1</td><td rowspan=1 colspan=1>.1</td><td rowspan=1 colspan=1>.1</td></tr><tr><td rowspan=1 colspan=1>Optimizer</td><td rowspan=1 colspan=1>RMSprop</td><td rowspan=1 colspan=1>RMSprop</td><td rowspan=1 colspan=1>RMSprop</td><td rowspan=1 colspan=1>RMSprop</td></tr><tr><td rowspan=1 colspan=1>Patience epochs</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>10</td></tr></table>
|
| 531 |
+
|
| 532 |
+
# D TECHNICAL DETAILS
|
| 533 |
+
|
| 534 |
+
For $k$ -means we used Python’s sklearn.cluster; we used the default configuration (in particular, 300 iterations of the algorithm, 10 restarts from different centroid seeds, final results are from the run with the best objective). To perform spectral clustering, we computed an affinity matrix $W$ using (6), with the number of neighbors set to 25 and the scale $\sigma$ set to the median distance from each point to its $2 5 \mathrm { t h }$ neighbor. Once $W$ was computed, we took the $k$ eigenvectors of $D - W$ corresponding to the smallest eigenvalues, and then applied $k$ -means to that embedding. The $k$ -means configuration was as above. In our experiments, the loss (3) was computed with a factor of $\frac { 1 } { m }$ rather than $\scriptstyle { \frac { 1 } { m ^ { 2 } } }$ , for numerical stability. The architectures of the Siamese net and SpectralNet are described in Table 2. Additional technical details are shown in Table 3.
|
| 535 |
+
|
| 536 |
+
The learning rate policy for all nets was determined by monitoring the loss on a validation set (a random subset of the training set); once the validation loss did not improve for a specified number of epochs (see patience epochs in Table 3), we divided the learning rate by 10 (see $L R$ decay in Table 3). Training stopped once the learning rate reached $1 0 ^ { - 8 }$ . Typical training took about 100 epochs for a Siamese net and less than 20,000 parameter updates for SpectralNet, on both MNIST and Reuters.
|
| 537 |
+
|
| 538 |
+
In the MNIST experiments, the training set for the Siamese was obtained by pairing each data point with its two nearest neighbors (in Euclidean distance). During the training of the spectral map, we construct the batch affinity matrix $W$ by connecting each point to its nearest two neighbors in the Siamese distance. The scale $\sigma$ in (6) was set to the median of the distances from each point to its nearest neighbor.
|
| 539 |
+
|
| 540 |
+
In the Reuters experiment, we obtained the training set for the Siamese net by pairing each point from that set to a random point from its 100 nearest neighbors, found by approximate nearest neighbor algorithm4. To evaluate the generalization performance, the Siamese nets were trained using training data only. The scale $\sigma$ in (6) was set globally to the median (across all points in the dataset) distance from any point to its 10th neighbor.
|
| 541 |
+
|
| 542 |
+
Finally, we used the validation loss to determine the hyper-parameters. To demonstrate that indeed the validation loss is correlated to clustering accuracy, we conducted a series of experiments with the MNIST dataset, where we varied the net architectures and learning rate policies; the Siamese net and Gaussian scale parameter $\sigma$ were held fixed throughout all experiments. In each experiment, we measured the loss on a validation set and the clustering accuracy (over the entire data). The correlation between loss and accuracy across these experiments was -0.771. This implies that hyperparameter setting for the spectral map learning can be chosen based on the validation loss, and a setup that yields a smaller validation loss should be preferred. We remark that we also use the convergence of the validation loss to determine our learning rate schedule and stopping criterion.
|
md/train/HJgXCV9xx/HJgXCV9xx.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DIALOGUE LEARNING WITH HUMAN-IN-THE-LOOP
|
| 2 |
+
|
| 3 |
+
Jiwei Li, Alexander H. Miller, Sumit Chopra, Marc’Aurelio Ranzato, Jason Weston
|
| 4 |
+
Facebook AI Research,
|
| 5 |
+
New York, USA
|
| 6 |
+
{jiwel,ahm,spchopra,ranzato,jase}@fb.com
|
| 7 |
+
|
| 8 |
+
# ABSTRACT
|
| 9 |
+
|
| 10 |
+
An important aspect of developing conversational agents is to give a bot the ability to improve through communicating with humans and to learn from the mistakes that it makes. Most research has focused on learning from fixed training sets of labeled data rather than interacting with a dialogue partner in an online fashion. In this paper we explore this direction in a reinforcement learning setting where the bot improves its question-answering ability from feedback a teacher gives following its generated responses. We build a simulator that tests various aspects of such learning in a synthetic environment, and introduce models that work in this regime. Finally, real experiments with Mechanical Turk validate the approach.
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
A good conversational agent (which we sometimes refer to as a learner or bot1) should have the ability to learn from the online feedback from a teacher: adapting its model when making mistakes and reinforcing the model when the teacher’s feedback is positive. This is particularly important in the situation where the bot is initially trained in a supervised way on a fixed synthetic, domainspecific or pre-built dataset before release, but will be exposed to a different environment after release (e.g., more diverse natural language utterance usage when talking with real humans, different distributions, special cases, etc.). Most recent research has focused on training a bot from fixed training sets of labeled data but seldom on how the bot can improve through online interaction with humans. Human (rather than machine) language learning happens during communication (Bassiri, 2011; Werts et al., 1995), and not from labeled datasets, hence making this an important subject to study.
|
| 15 |
+
|
| 16 |
+
In this work, we explore this direction by training a bot through interaction with teachers in an online fashion. The task is formalized under the general framework of reinforcement learning via the teacher’s (dialogue partner’s) feedback to the dialogue actions from the bot. The dialogue takes place in the context of question-answering tasks and the bot has to, given either a short story or a set of facts, answer a set of questions from the teacher. We consider two types of feedback: explicit numerical rewards as in conventional reinforcement learning, and textual feedback which is more natural in human dialogue, following (Weston, 2016). We consider two online training scenarios: (i) where the task is built with a dialogue simulator allowing for easy analysis and repeatability of experiments; and (ii) where the teachers are real humans using Amazon Mechanical Turk.
|
| 17 |
+
|
| 18 |
+
We explore important issues involved in online learning such as how a bot can be most efficiently trained using a minimal amount of teacher’s feedback, how a bot can harness different types of feedback signal, how to avoid pitfalls such as instability during online learing with different types of feedback via data balancing and exploration, and how to make learning with real humans feasible via data batching. Our findings indicate that it is feasible to build a pipeline that starts from a model trained with fixed data and then learns from interactions with humans to improve itself.
|
| 19 |
+
|
| 20 |
+
# 2 RELATED WORK
|
| 21 |
+
|
| 22 |
+
Reinforcement learning has been widely applied to dialogue, especially in slot filling to solve domain-specific tasks (Walker, 2000; Schatzmann et al., 2006; Singh et al., 2000; 2002). Efforts include Markov Decision Processes (MDPs) (Levin et al., 1997; 2000; Walker et al., 2003; Pieraccini et al., 2009), POMDP models (Young et al., 2010; 2013; Gasic et al., 2013; 2014) and policy ˇ learning (Su et al., 2016). Such a line of research focuses mainly on frames with slots to fill, where the bot will use reinforcement learning to model a state transition pattern, generating dialogue utterances to prompt the appropriate user responses to put in the desired slots. This goal is different from ours, where we study end-to-end learning systems and also consider non-reward based setups via textual feedback.
|
| 23 |
+
|
| 24 |
+
Our work is related to the line of research that focuses on supervised learning for question answering (QA) from dialogues (Dodge et al., 2015; Weston, 2016), either given a database of knowledge (Bordes et al., 2015; Miller et al., 2016) or short texts (Weston et al., 2015; Hermann et al., 2015; Rajpurkar et al., 2016). In our work, the discourse includes the statements made in the past, the question and answer, and crucially the response from the teacher. The latter is what makes the setting different from the standard QA setting, i.e. we use methods that leverage this response also, not just answering questions. Further, QA works only consider fixed datasets with gold annotations, i.e. they do not consider a reinforcement learning setting.
|
| 25 |
+
|
| 26 |
+
Our work is closely related to a recent work from Weston (2016) that learns through conducting conversations where supervision is given naturally in the response during the conversation. That work introduced the use of forward prediction that learns by predicting the teacher’s feedback, in addition to using reward-based learning of correct answers. However, two important issues were not addressed: (i) it did not use a reinforcement learning setting, but instead used pre-built datasets with fixed policies given in advance; and (ii) experiments used only simulated and no real language data. Hence, models that can learn policies from real online communication were not investigated. To make the differences with our work clear, we will now detail these points further.
|
| 27 |
+
|
| 28 |
+
The experiments in (Weston, 2016) involve constructing pre-built fixed datasets, rather than training the learner within a simulator, as in our work. Pre-built datasets can only be made by fixing a prior in advance. They achieve this by choosing an omniscient (but deliberately imperfect) labeler that gets $\pi _ { a c c }$ examples always correct (the paper looked at values $50 \%$ , $10 \%$ and $1 \%$ ). Again, this was not learned, and was fixed to generate the datasets. Note that the paper refers to these answers as coming from “the learner” (which should be the model), but since the policy is fixed it actually does not depend on the model. In a realistic setting one does not have access to an omniscient labeler, one has to learn a policy completely from scratch, online, starting with a random policy, so their setting was not practically viable. In our work, when policy training is viewed as batch learning over iterations of the dataset, updating the policy on each iteration, (Weston, 2016) can be viewed as training only one iteration, whereas we perform multiple iterations. This is explained further in Sections 4.2 and 5.1. We show in our experiments that performance improves over the iterations, i.e. it is better than the first iteration. We show that such online learning works for both rewardbased numerical feedback and for forward prediction methods using textual feedback (under certain conditions which are detailed). This is a key contribution of our work.
|
| 29 |
+
|
| 30 |
+
Finally, (Weston, 2016) only conducted experiments on synthetic or templated language, and not real language, especially the feedback from the teacher was scripted. While we believe that synthetic datasets are very important for developing understanding (hence we develop a simulator and conduct experiments also with synthetic data), for a new method to gain traction it must be shown to work on real data. We hence employ Mechanical Turk to collect real language data for the questions and importantly for the teacher feedback and construct experiments in this real setting.
|
| 31 |
+
|
| 32 |
+
# 3 DATASET AND TASKS
|
| 33 |
+
|
| 34 |
+
We begin by describing the data setup we use. In our first set of experiments we build a simulator as a testbed for learning algorithms. In our second set of experiments we use Mechanical Turk to provide real human teachers giving feedback.
|
| 35 |
+
|
| 36 |
+
# 3.1 SIMULATOR
|
| 37 |
+
|
| 38 |
+
The simulator adapts two existing fixed datasets to our online setting. Following Weston (2016), we use (i) the single supporting fact problem from the bAbI datasets (Weston et al., 2015) which consists of 1000 short stories from a simulated world interspersed with questions; and (ii) the WikiMovies dataset (Weston et al., 2015) which consists of roughly 100k (templated) questions over 75k entities based on questions with answers in the open movie database (OMDb). Each dialogue takes place between a teacher, scripted by the simulation, and a bot. The communication protocol is as follows: (1) the teacher first asks a question from the fixed set of questions existing in the dataset, (2) the bot answers the question, and finally (3) the teacher gives feedback on the bot’s answer.
|
| 39 |
+
|
| 40 |
+
We follow the paradigm defined in (Weston, 2016) where the teacher’s feedback takes the form of either textual feedback, a numerical reward, or both, depending on the task. For each dataset, there are ten tasks, which are further described in Sec. A and illustrated in Figure 5 of the appendix. We also refer the readers to (Weston, 2016) for more detailed descriptions and the motivation behind these tasks. In the main text of this paper we only consider Task 6 (“partial feedback”): the teacher replies with positive textual feedback (6 possible templates) when the bot answers correctly, and positive reward is given only $50 \%$ of the time. When the bot is wrong, the teacher gives textual feedback containing the answer. Descriptions and experiments on the other tasks are detailed in the appendix. Example dialogues are given in Figure 1.
|
| 41 |
+
|
| 42 |
+
The difference between our simulation and the original fixed tasks of Weston (2016) is that models are trained on-the-fly. After receiving feedback and/or rewards, we update the model (policy) and then deploy it to collect teacher’s feedback in the next episode or batch. This means the model’s policy affects the data which is used to train it, which was not the case in the previous work.
|
| 43 |
+
|
| 44 |
+
Figure 1: Simulator sample dialogues for the bAbI task (left) and WikiMovies (right). We consider 10 different tasks following Weston (2016) but here describe only Task 6; other tasks are detailed in the appendix. The teacher’s dialogue is in black and the bot is in red. $( + )$ indicates receiving positive reward, given only $50 \%$ of the time even when correct.
|
| 45 |
+
|
| 46 |
+
<table><tr><td>bAbI Task 6:PartialRewards Mary went to the hallway. John moved to the bathroom. Mary travelled to the kitchen. Where isMary? Yes,that's right!</td></tr><tr><td>kitchen Where is John? bathroom</td></tr></table>
|
| 47 |
+
|
| 48 |
+
<table><tr><td>WikiMovies Task6:PartialRewards What films are about Hawaii?</td><td>50 First Dates</td></tr><tr><td>Correct! Who acted in Licence to Kill?</td><td>Billy Madison</td></tr><tr><td>No, the answer is Timothy Dalton. What genre is Saratoga Trunk in? Yes! (+)</td><td>Drama</td></tr></table>
|
| 49 |
+
|
| 50 |
+
Figure 2: Human Dialogue from Mechanical Turk (based on WikiMovies) The human teacher’s dialogue is in black and the bot is in red. We show examples where the bot answers correctly (left) and incorrectly (right). Real humans provide more variability of language in both questions and textual feedback than in the simulator setup (cf. Figure 1).
|
| 51 |
+
|
| 52 |
+
<table><tr><td>Sample dialogueswith correct answers from the bot: Who wrote the Linguini Incident ? Richard Shepard is one of the right answers here.</td><td>richard shepard</td></tr><tr><td>What year did The World Before Her premiere? Yep!That's when it came out. Which are the movie genres of Mystery of the 13th Guest?</td><td>2012</td></tr><tr><td>Right, it can also be categorized as a mystery. Sample dialogues with incorrect answers from the bot:</td><td>crime</td></tr><tr><td>What are some movies about a supermarket ? There were many options and this one was not among them.</td><td>supermarket</td></tr><tr><td>Which are the genres of the film Juwanna Mann ? That is incorrect. Remember the question asked for a genre not name.</td><td>kevin pollak</td></tr><tr><td>Who wrote the story of movie Coraline ?</td><td>fantasy</td></tr><tr><td>That's a movie genre and not the name of the writer.A better answer would of been Henry Selick</td><td></td></tr><tr><td>or Neil Gaiman.</td><td></td></tr></table>
|
| 53 |
+
|
| 54 |
+
# 3.2 MECHANICAL TURK EXPERIMENTS
|
| 55 |
+
|
| 56 |
+
Finally, we extended WikiMovies using Mechanical Turk so that real human teachers are giving feedback rather than using a simulation. As both the questions and feedback are templated in the simulation, they are now both replaced with natural human utterances. Rather than having a set of simulated tasks, we have only one task, and we gave instructions to the teachers that they could give feedback as they see fit. The exact instructions given to the Turkers is given in Appendix B. In general, each independent response contains feedback like (i) positive or negative sentences; or (ii) a phrase containing the answer or (iii) a hint, which are similar to setups defined in the simulator. However, some human responses cannot be so easily categorized, and the lexical variability is much larger in human responses. Some examples of the collected data are given in Figure 2.
|
| 57 |
+
|
| 58 |
+
# 4 METHODS
|
| 59 |
+
|
| 60 |
+
# 4.1 MODEL ARCHITECTURE
|
| 61 |
+
|
| 62 |
+
In our experiments, we used variants of the End-to-End Memory Network (MemN2N) model (Sukhbaatar et al., 2015) as our underlying architecture for learning from dialogue.
|
| 63 |
+
|
| 64 |
+
The input to MemN2N is the last utterance of the dialogue history $x$ as well as a set of memories (context) $C { = } c _ { 1 }$ , $c _ { 2 } , . . . , c _ { N }$ . The memory $C$ encodes both short-term memory, e.g., dialogue histories between the bot and the teacher, and long-term memories, e.g., the knowledge base facts that the bot has access to. Given the input $x$ and $C$ , the goal is to produce an output/label $a$ .
|
| 65 |
+
|
| 66 |
+
In the first step, the query $x$ is transformed to a vector representation $u _ { 0 }$ by summing up its constituent word embeddings: $u _ { 0 } = A x$ . The input $x$ is a bag-of-words vector and $A$ is the $d \times V$ word embedding matrix where $d$ denotes the emebbding dimension and $V$ denotes the vocabulary size. Each memory $c _ { i }$ is similarly transformed to a vector $m _ { i }$ . The model will read information from the memory by comparing input representation $u _ { 0 }$ with memory vectors $m _ { i }$ using softmax weights:
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
o _ { 1 } = \sum _ { i } p _ { i } ^ { 1 } m _ { i } \qquad p _ { i } ^ { 1 } = \mathsf { s o f t m a x } ( u _ { 0 } ^ { T } m _ { i } )
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
This process selects memories relevant to the last utterance $x$ , i.e., the memories with large values of $p _ { i } ^ { 1 }$ . The returned memory vector $o _ { 1 }$ is the weighted sum of memory vectors. This process can be repeated to query the memory $\mathbf { N }$ times (so called “hops”) by adding $o _ { n }$ to the original input, $u _ { 1 } = o _ { 1 } + u _ { 0 }$ , or to the previous state, $u _ { n } = o _ { n } + u _ { n - 1 }$ , and then using $u _ { n }$ to query the memories again.
|
| 73 |
+
|
| 74 |
+
In the end, $u _ { N }$ is input to a softmax function for the final prediction:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\boldsymbol { a } = \mathsf { s o f t m a x } ( u _ { N } ^ { T } y _ { 1 } , u _ { N } ^ { T } y _ { 2 } , . . . , u _ { N } ^ { T } y _ { L } )
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $y _ { 1 } , \ldots , y _ { L }$ denote the set of candidate answers. If the answer is a word, $y _ { i }$ is the corresponding word embedding. If the answer is a sentence, $y _ { i }$ is the embedding for the sentence achieved in the same way that we obtain embeddings for query $x$ and memory $C$ .
|
| 81 |
+
|
| 82 |
+
The standard way MemN2N is trained is via a cross entropy criterion on known input-output pairs, which we refer to as supervised or imitation learning. As our work is in a reinforcement learning setup where our model must make predictions to learn, this procedure will not work, so we instead consider reinforcement learning algorithms which we describe next.
|
| 83 |
+
|
| 84 |
+
# 4.2 REINFORCEMENT LEARNING
|
| 85 |
+
|
| 86 |
+
In this section, we present the algorithms we used to train MemN2N in an online fashion. Our learning setup can be cast as a particular form of Reinforcement Learning. The policy is implemented by the MemN2N model. The state is the dialogue history. The action space corresponds to the set of answers the MemN2N has to choose from to answer the teacher’s question. In our setting, the policy chooses only one action for each episode. The reward is either 1 (a reward from the teacher when the bot answers correctly) or 0 otherwise. Note that in our experiments, a reward equal to 0 might mean that the answer is incorrect or that the positive reward is simply missing. The overall setup is closest to standard contextual bandits, except that the reward is binary.
|
| 87 |
+
|
| 88 |
+
When working with real human dialogues, e.g. collecting data via Mechanical Turk, it is easier to set up a task whereby a bot is deployed to respond to a large batch of utterances, as opposed to a single one. The latter would be more difficult to manage and scale up since it would require some form of synchronization between the model replicas interacting with each human.
|
| 89 |
+
|
| 90 |
+
This is comparable to the real world situation where a teacher can either ask a student a single question and give feedback right away, or set up a test that contains many questions and grade all of them at once. Only after the learner completes all questions, it can hear feedback from the teacher.
|
| 91 |
+
|
| 92 |
+
We use batch size to refer to how many dialogue episodes the current model is used to collect feedback before updating its parameters. In the Reinforcement Learning literature, batch size is related to off-policy learning since the MemN2N policy is trained using episodes collected with a stale version of the model. Our experiments show that our model and base algorithms are very robust to the choice of batch size, alleviating the need for correction terms in the learning algorithm (Bottou et al., 2013).
|
| 93 |
+
|
| 94 |
+
We consider two strategies: (i) online batch size, whereby the target policy is updated after doing a single pass over each batch (a batch size of 1 reverts to the usual on-policy online learning); and (ii) dataset-sized batch, whereby training is continued to convergence on the batch which is the size of the dataset, and then the target policy is updated with the new model, and a new batch is drawn and the procedure iterates. These strategies can be applied to all the methods we use, described below.
|
| 95 |
+
|
| 96 |
+
Next, we discuss the learning algorithms we considered in this work.
|
| 97 |
+
|
| 98 |
+
# 4.2.1 REWARD-BASED IMITATION (RBI)
|
| 99 |
+
|
| 100 |
+
The simplest algorithm we first consider is the one employed in Weston (2016). RBI relies on positive rewards provided by the teacher. It is trained to imitate the correct behavior of the learner, i.e., learning to predict the correct answers (with reward 1) at training time and disregarding the other ones. This is implemented by using a MemN2N that maps a dialogue input to a prediction, i.e. using the cross entropy criterion on the positively rewarded subset of the data.
|
| 101 |
+
|
| 102 |
+
In order to make this work in the online setting which requires exploration to find the correct answer, we employ an $\epsilon$ -greedy strategy: the learner makes a prediction using its own model (the answer assigned the highest probability) with probability $1 - \epsilon$ , otherwise it picks a random answer with probability $\epsilon$ . The teacher will then give a reward of $+ 1$ if the answer is correct, otherwise 0. The bot will then learn to imitate the correct answers: predicting the correct answers while ignoring the incorrect ones.
|
| 103 |
+
|
| 104 |
+
# 4.2.2 REINFORCE
|
| 105 |
+
|
| 106 |
+
The second algorithm we use is the REINFORCE algorithm (Williams, 1992), which maximizes the expected cumulative reward of the episode, in our case the expected reward provided by the teacher. The expectation is approximated by sampling an answer from the model distribution. Let $a$ denote the answer that the learner gives, $p ( a )$ denote the probability that current model assigns to $a$ , $r$ denote the teacher’s reward, and $J ( \theta )$ denote the expectation of the reward. We have:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\nabla J ( \theta ) \approx \nabla \log p ( a ) [ r - b ]
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $b$ is the baseline value, which is estimated using a linear regression model that takes as input the output of the memory network after the last hop, and outputs a scalar $b$ denoting the estimation of the future reward. The baseline model is trained by minimizing the mean squared loss between the estimated reward $b$ and actual reward $r$ , $| | \boldsymbol { r } - \boldsymbol { b } | | ^ { 2 }$ . We refer the readers to (Ranzato et al., 2015; Zaremba & Sutskever, 2015) for more details. The baseline estimator model is independent from the policy model, and its error is not backpropagated through the policy model.
|
| 113 |
+
|
| 114 |
+
The major difference between RBI and REINFORCE is that (i) the learner only tries to imitate correct behavior in RBI while in REINFORCE it also leverages the incorrect behavior, and (ii) the learner explores using an $\epsilon$ -greedy strategy in RBI while in REINFORCE it uses the distribution over actions produced by the model itself.
|
| 115 |
+
|
| 116 |
+
# 4.2.3 FORWARD PREDICTION (FP)
|
| 117 |
+
|
| 118 |
+
FP (Weston, 2016) handles the situation where a numerical reward for a bot’s answer is not available, meaning that there are no $+ 1$ or 0 labels available after a student’s utterance. Instead, the model assumes the teacher gives textual feedback $t$ to the bot’s answer, taking the form of a dialogue utterance, and the model tries to predict this instead. Suppose that $x$ denotes the teacher’s question and $C { = } c _ { 1 }$ , $c _ { 2 } , . . . , c _ { N }$ denotes the dialogue history as before. In $F P$ , the model first maps the teacher’s initial question $x$ and dialogue history $C$ to a vector representation $u$ using a memory network with multiple hops. Then the model will perform another hop of attention over all possible student’s answers in A, with an additional part that incorporates the information of which candidate (i.e., $a$ ) was actually selected in the dialogue:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
p _ { \hat { a } } = { \tt s o f t m a x } ( u ^ { T } y _ { \hat { a } } ) \quad o = \sum _ { \hat { a } \in \mathbb { A } } p _ { \hat { a } } ( y _ { \hat { a } } + \beta \cdot { \bf 1 } [ \hat { a } = a ] )
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $y _ { \hat { a } }$ denotes the vector representation for the student’s answer candidate $\hat { a } . \beta$ is a (learned) d-dimensional vector to signify the actual action $a$ that the student chooses. $o$ is then combined with $u$ to predict the teacher’s feedback $t$ using a softmax:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\begin{array} { r l } { u _ { 1 } = o + u } & { { } t = \mathsf { s o f t m a x } \big ( u _ { 1 } ^ { T } x _ { r _ { 1 } } , u _ { 1 } ^ { T } x _ { r _ { 2 } } , . . . , u _ { 1 } ^ { T } x _ { r _ { N } } \big ) } \end{array}
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
where $\boldsymbol { x } _ { r _ { i } }$ denotes the embedding for the $i ^ { t h }$ response. In the online setting, the teacher will give textual feedback, and the learner needs to update its model using the feedback. It was shown in Weston (2016) that in an off-line setting this procedure can work either on its own, or in conjunction with a method that uses numerical rewards as well for improved performance. In the online setting, we consider two simple extensions:
|
| 131 |
+
|
| 132 |
+
• $\epsilon$ -greedy exploration: with probability $\epsilon$ the student will give a random answer, and with probability $1 - \epsilon$ it will give the answer that its model assigns the largest probability. This method enables the model to explore the space of actions and to potentially discover correct answers. data balancing: cluster the set of teacher responses $t$ and then balance training across the clusters equally.2 This is a type of experience replay (Mnih et al., 2013) but sampling with an evened distribution. Balancing stops part of the distribution dominating the learning. For example, if the model is not exposed to sufficient positive and negative feedback, and one class overly dominates, the learning process degenerates to a model that always predicts the same output regardless of its input.
|
| 133 |
+
|
| 134 |
+
# 5 EXPERIMENTS
|
| 135 |
+
|
| 136 |
+
Experiments are first conducted using our simulator, and then using Amazon Mechanical Turk with real human subjects taking the role of the teacher3.
|
| 137 |
+
|
| 138 |
+
# 5.1 SIMULATOR
|
| 139 |
+
|
| 140 |
+
Online Experiments In our first experiments, we considered both the bAbI and WikiMovies tasks and varied batch size, random exploration rate $\epsilon$ , and type of model. Figure 3 and Figure 4 shows (Task 6) results on bAbI and WikiMovies. Other tasks yield similar conclusions and are reported in the appendix.
|
| 141 |
+
|
| 142 |
+
Overall, we obtain the following conclusions:
|
| 143 |
+
|
| 144 |
+
• In general RBI and FP do work in a reinforcement learning setting, but can perform better with random exploration.
|
| 145 |
+
• In particular RBI can fail without exploration. RBI needs random noise for exploring labels otherwise it can get stuck predicting a subset of labels and fail. • REINFORCE obtains similar performance to RBI with optimal $\epsilon$ .
|
| 146 |
+
• FP with balancing or with exploration via $\epsilon$ both outperform FP alone.
|
| 147 |
+
• For both RBI and FP, performance is largely independent of online batch size.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 3: Training epoch vs. test accuracy for bAbI (Task 6) varying exploration $\epsilon$ and batch size. Random exploration is important for both reward-based (RBI) and forward prediction (FP). Performance is largely independent of batch size, and RBI performs similarly to REINFORCE. Note that supervised, rather than reinforcement learning, with gold standard labels achieves $100 \%$ accuracy on this task.
|
| 151 |
+
|
| 152 |
+
Dataset Batch Size Experiments Given that larger online batch sizes appear to work well, and that this could be important in a real-world data collection setup where the same model is deployed to gather a large amount of feedback from humans, we conducted further experiments where the batch size is exactly equal to the dataset size and for each batch training is completed to convergence.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 4: WikiMovies: Training epoch vs. test accuracy on Task 6 varying (top left panel) exploration rate $\epsilon$ while setting batch size to 32 for RBI, (top right panel) for FP, (bottom left) batch size for RBI, and (bottom right) comparing RBI, REINFORCE and FP with $\epsilon = 0 . 5$ . The model is robust to the choice of batch size. RBI and REINFORCE perform comparably. Note that supervised, rather than reinforcement learning, with gold standard labels achieves $80 \%$ accuracy on this task (Weston, 2016).
|
| 156 |
+
|
| 157 |
+
After the model has been trained on the dataset, it is deployed to collect a new dataset of questions and answers, and the process is repeated. Table 1 reports test error at each iteration of training, using the bAbI Task 6 as the case study (see the appendix for results on other tasks). The following conclusions can be made for this setting:
|
| 158 |
+
|
| 159 |
+
• RBI improves in performance as we iterate. Unlike in the online case, RBI does not need random exploration. We believe this is because the first batch, which is collected with a randomly initialized model, contains enough variety of examples with positive rewards that the model does not get stuck predicting a subset of labels. FP is not stable in this setting. This is because once the model gets very good at making predictions (at the third iteration), it is not exposed to a sufficient number of negative responses anymore. From that point on, learning degenerates and performance drops as the model always predicts the same responses. At the next iteration, it will recover again since it has a more balanced training set, but then it will collapse again in an oscillating behavior.
|
| 160 |
+
• FP does work if extended with balancing or random exploration with sufficiently large $\epsilon$ .
|
| 161 |
+
• $\mathrm { R B I + F P }$ also works well and helps with the instability of FP, alleviating the need for random exploration and data balancing.
|
| 162 |
+
|
| 163 |
+
Overall, our simulation results indicate that while a bot can be effectively trained fully online from bot-teacher interactions, collecting real dialogue data in batches (which is easier to collect and iterate experiments over) is also a viable approach. We hence pursue the latter approach in our next set of experiments.
|
| 164 |
+
|
| 165 |
+
Table 1: Test accuracy of various models per iteration in the dataset batch size case (using batch size equal to the size of the full training set) for bAbI, Task 6. Results $> 0 . 9 5$ are in bold.
|
| 166 |
+
|
| 167 |
+
<table><tr><td rowspan=1 colspan=1>Iteration</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><td rowspan=1 colspan=1>6</td></tr><tr><td rowspan=2 colspan=1>Imitation LearningReward Based Imitation (RBI)Forward Pred. (FP)RBI+FP</td><td rowspan=1 colspan=1>0.24</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.22</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.23</td></tr><tr><td rowspan=1 colspan=1>0.740.990.99</td><td rowspan=1 colspan=1>0.870.960.96</td><td rowspan=1 colspan=1>0.901.000.97</td><td rowspan=1 colspan=1>0.960.300.95</td><td rowspan=1 colspan=1>0.961.000.94</td><td rowspan=1 colspan=1>0.980.290.97</td></tr><tr><td rowspan=1 colspan=1>FP (balanced)FP (rand. exploration ε = 0.25)FP (rand. exploration e = 0.5)</td><td rowspan=1 colspan=1>0.990.960.98</td><td rowspan=1 colspan=1>0.970.880.98</td><td rowspan=1 colspan=1>0.970.940.99</td><td rowspan=1 colspan=1>0.970.260.98</td><td rowspan=1 colspan=1>0.970.640.95</td><td rowspan=1 colspan=1>0.970.990.99</td></tr></table>
|
| 168 |
+
|
| 169 |
+
Relation to experiments in Weston (2016) As described in detail in Section 2 the datasets we use in our experiments were introduced in (Weston et al., 2015). However, that work involved constructing pre-built fixed policies (and hence, datasets), rather than training the learner in a reinforcement/interactive learning using a simulator, as in our work. They achieved this by choosing an omniscient (but deliberately imperfect) labeler that gets $\pi _ { a c c }$ examples always correct (the paper looked at values $1 \%$ , $10 \%$ and $50 \%$ ). In a realistic setting one does not have access to an omniscient labeler, one has to learn a policy completely from scratch, online, starting with a random policy, as we do here. Nevertheless, it is possible to compare our learnt policies to those results because we use the same train/valid/test splits.
|
| 170 |
+
|
| 171 |
+
The clearest comparison comparison is via Table 1, where the policy is learnt using batch iterations of the dataset, updating the policy on each iteration. Weston et al. (2015) can be viewed as training only one iteration, with a pre-built policy, as explained above, where $59 \%$ , $81 \%$ and $9 9 \%$ accuracy was obtained for RBI for $\pi _ { a c c }$ with $1 \%$ , $10 \%$ and $50 \%$ respectively4. While $\pi _ { a c c }$ of $50 \%$ is good enough to solve the task, lower values are not. In this work a random policy begins with $74 \%$ accuracy on the first iteration, but importantly on each iteration the policy is updated and improves, with values of $87 \%$ , $90 \%$ on iterations 2 and 3 respectively, and $98 \%$ on iteration 6. This is a key differentiator to the work of (Weston et al., 2015) where such improvement was not shown. We show that such online learning works for both reward-based numerical feedback and for forward prediction methods using textual feedback (as long as balancing or random exploration is performed sufficiently). The final performance outperforms most values of $\pi _ { a c c }$ from Weston et al. (2015) unless $\pi$ is so large that the task is already solved. This is a key contribution of our work.
|
| 172 |
+
|
| 173 |
+
Similar conclusions can be made for Figures 3 and 4. Despite our initial random policy starting at close to $0 \%$ accuracy, if random exploration $\epsilon \geq 0 . 2$ is employed then after a number of epochs the performance is better than most values of $\pi _ { a c c }$ from Weston et al. (2015), e.g. compare the accuracies given in the previous paragraph ( $5 9 \%$ , $81 \%$ and $9 9 \%$ ) to Figure 3, top left.
|
| 174 |
+
|
| 175 |
+
# 5.2 HUMAN FEEDBACK
|
| 176 |
+
|
| 177 |
+
We employed Turkers to both ask questions and then give textual feedback on the bot’s answers, as described in Section 3.2. Our experimental protocol was as follows. We first trained a MemN2N using supervised (i.e., imitation) learning on a training set of 1000 questions produced by Turkers and using the known correct answers provided by the original dataset (and no textual feedback). Next, using the trained policy, we collected textual feedback for the responses of the bot for an additional 10,000 questions. Examples from the collected dataset are given in Figure 2. Given this dataset, we compare various models: RBI, FP and $\mathrm { F P + R B I }$ . As we know the correct answers to the additional questions, we can assign a positive reward to questions the bot got correct. We hence measure the impact of the sparseness of this reward signal, where a fraction $r$ of additional examples have rewards. The models are tested on a test set of ${ \sim } 8 { , } 0 0 0$ questions (produced by Turkers), and hyperparameters are tuned on a similarly sized validation set. Note this is a harder task than the WikiMovies task in the simulator due to the use natural language from Turkers, hence lower test performance is expected.
|
| 178 |
+
|
| 179 |
+
Results are given in Table 2. They indicate that both RBI and FP are useful. When rewards are sparse, FP still works via the textual feedback while RBI can only use the initial 1000 examples when $r = 0$ . As FP does not use numericalrewards at all, it is invariant to the parameter $r$ . The combination of FP and RBI outperforms either alone.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>r=0</td><td rowspan=1 colspan=1>r= 0.1</td><td rowspan=1 colspan=1>r= 0.5</td><td rowspan=1 colspan=1>r=1</td></tr><tr><td rowspan=3 colspan=1>Reward Based Imitation (RBI)Forward Prediction (FP)RBI+FP</td><td rowspan=3 colspan=1>0.3330.3580.431</td><td rowspan=1 colspan=1>0.340</td><td rowspan=1 colspan=1>0.365</td><td rowspan=3 colspan=1>0.3750.3580.441</td></tr><tr><td rowspan=1 colspan=1>0.358</td><td rowspan=2 colspan=1>0.3580.443</td></tr><tr><td rowspan=1 colspan=1>0.438</td></tr></table>
|
| 182 |
+
|
| 183 |
+
Table 2: Incorporating Feedback From Humans via Mechanical Turk. Textual feedback is provided for 10,000 model predictions (from a model trained with 1k labeled training examples), and additional sparse binary rewards (fraction $r$ of examples have rewards). Forward Prediction and Reward-based Imitation are both useful, with their combination performing best.
|
| 184 |
+
|
| 185 |
+
We also conducted additional experiments comparing with (i) synthetic feedback and (ii) the fully supervised case which are given in Appendix C.1. They show that the results with human feedback are competitive with these approaches.
|
| 186 |
+
|
| 187 |
+
# 6 CONCLUSION
|
| 188 |
+
|
| 189 |
+
We studied dialogue learning of end-to-end models using textual feedback and numerical rewards. Both fully online and iterative batch settings are viable approaches to policy learning, as long as possible instabilities in the learning algorithms are taken into account. Secondly, we showed for the first time that the recently introduced FP method can work in both an online setting and on real human feedback. Overall, our results indicate that it is feasible to build a practical pipeline that starts with a model trained on an initial fixed dataset, which then learns from interactions with humans in a (semi-)online fashion to improve itself. Future research should work towards doing this in a never-ending learning setup.
|
| 190 |
+
|
| 191 |
+
# REFERENCES
|
| 192 |
+
|
| 193 |
+
Mohammad Amin Bassiri. Interactional feedback and the impact of attitude and motivation on noticing l2 form. English Language and Literature Studies, 1(2):61, 2011.
|
| 194 |
+
|
| 195 |
+
Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston. Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075, 2015.
|
| 196 |
+
|
| 197 |
+
Leon Bottou, Jonas Peters, Denis X. Quionero-Candela, Joaquin amd Charles, D. Max Chickering, Elon Portugaly, Dipankar Ray, Patrice Simard, and Ed Snelson. Counterfactual reasoning and learning systems: The example of computational advertising. Journal of Machine Learning Research, 14:3207–3260, 2013.
|
| 198 |
+
|
| 199 |
+
Jesse Dodge, Andreea Gane, Xiang Zhang, Antoine Bordes, Sumit Chopra, Alexander Miller, Arthur Szlam, and Jason Weston. Evaluating prerequisite qualities for learning end-to-end dialog systems. arXiv preprint arXiv:1511.06931, 2015.
|
| 200 |
+
|
| 201 |
+
Milica Gasic, Catherine Breslin, Matthew Henderson, Dongho Kim, Martin Szummer, Blaise Thom- ˇ son, Pirros Tsiakoulis, and Steve Young. Pomdp-based dialogue manager adaptation to extended domains. In Proceedings of SIGDIAL, 2013.
|
| 202 |
+
|
| 203 |
+
Milica Gasic, Dongho Kim, Pirros Tsiakoulis, Catherine Breslin, Matthew Henderson, Martin ˇ Szummer, Blaise Thomson, and Steve Young. Incremental on-line adaptation of pomdp-based dialogue managers to extended domains. In Proceedings on InterSpeech, 2014.
|
| 204 |
+
|
| 205 |
+
Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pp. 1693–1701, 2015.
|
| 206 |
+
|
| 207 |
+
Esther Levin, Roberto Pieraccini, and Wieland Eckert. Learning dialogue strategies within the markov decision process framework. In Automatic Speech Recognition and Understanding, 1997. Proceedings., 1997 IEEE Workshop on, pp. 72–79. IEEE, 1997.
|
| 208 |
+
|
| 209 |
+
Esther Levin, Roberto Pieraccini, and Wieland Eckert. A stochastic model of human-machine interaction for learning dialog strategies. IEEE Transactions on speech and audio processing, 8(1): 11–23, 2000.
|
| 210 |
+
|
| 211 |
+
Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. arXiv preprint arXiv:1606.03126, 2016.
|
| 212 |
+
|
| 213 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
|
| 214 |
+
|
| 215 |
+
Roberto Pieraccini, David Suendermann, Krishna Dayanidhi, and Jackson Liscombe. Are we there yet? research in commercial spoken dialog systems. In International Conference on Text, Speech and Dialogue, pp. 3–13. Springer, 2009.
|
| 216 |
+
|
| 217 |
+
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: $1 0 0 { , } 0 0 0 { + }$ questions for machine comprehension of text. arXiv preprint arXiv:1606.05250, 2016.
|
| 218 |
+
|
| 219 |
+
Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015.
|
| 220 |
+
|
| 221 |
+
Jost Schatzmann, Karl Weilhammer, Matt Stuttle, and Steve Young. A survey of statistical user simulation techniques for reinforcement-learning of dialogue management strategies. The knowledge engineering review, 21(02):97–126, 2006.
|
| 222 |
+
|
| 223 |
+
Satinder Singh, Michael Kearns, Diane J Litman, Marilyn A Walker, et al. Empirical evaluation of a reinforcement learning spoken dialogue system. In AAAI/IAAI, pp. 645–651, 2000.
|
| 224 |
+
|
| 225 |
+
Satinder Singh, Diane Litman, Michael Kearns, and Marilyn Walker. Optimizing dialogue management with reinforcement learning: Experiments with the njfun system. Journal of Artificial Intelligence Research, 16:105–133, 2002.
|
| 226 |
+
|
| 227 |
+
Pei-Hao Su, Milica Gasic, Nikola Mrksic, Lina Rojas-Barahona, Stefan Ultes, David Vandyke, Tsung-Hsien Wen, and Steve Young. Continuously learning neural dialogue management. arXiv preprint arXiv:1606.02689, 2016.
|
| 228 |
+
|
| 229 |
+
Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015.
|
| 230 |
+
|
| 231 |
+
Marilyn A. Walker. An application of reinforcement learning to dialogue strategy selection in a spoken dialogue system for email. Journal of Artificial Intelligence Research, 12:387–416, 2000.
|
| 232 |
+
|
| 233 |
+
Marilyn A Walker, Rashmi Prasad, and Amanda Stent. A trainable generator for recommendations in multimodal dialog. In INTERSPEECH, 2003.
|
| 234 |
+
|
| 235 |
+
Margaret G Werts, Mark Wolery, Ariane Holcombe, and David L Gast. Instructive feedback: Review of parameters and effects. Journal of Behavioral Education, 5(1):55–75, 1995.
|
| 236 |
+
|
| 237 |
+
Jason Weston. Dialog-based language learning. arXiv preprint arXiv:1604.06045, 2016.
|
| 238 |
+
|
| 239 |
+
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. arXiv preprint arXiv:1502.05698, 2015.
|
| 240 |
+
|
| 241 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 242 |
+
|
| 243 |
+
Steve Young, Milica Gasiˇ c, Simon Keizer, Franc¸ois Mairesse, Jost Schatzmann, Blaise Thomson, ´ and Kai Yu. The hidden information state model: A practical framework for pomdp-based spoken dialogue management. Computer Speech & Language, 24(2):150–174, 2010.
|
| 244 |
+
|
| 245 |
+
Steve Young, Milica Gasiˇ c, Blaise Thomson, and Jason D Williams. Pomdp-based statistical spoken ´ dialog systems: A review. Proceedings of the IEEE, 101(5):1160–1179, 2013.
|
| 246 |
+
|
| 247 |
+
Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. arXiv preprint arXiv:1505.00521, 362, 2015.
|
| 248 |
+
|
| 249 |
+
# A FURTHER SIMULATOR TASK DETAILS
|
| 250 |
+
|
| 251 |
+
The tasks in Weston (2016) were specifically:
|
| 252 |
+
|
| 253 |
+
- Task 1: The teacher tells the student exactly what they should have said (supervised baseline). - Task 2: The teacher replies with positive textual feedback and reward, or negative textual feedback. - Task 3: The teacher gives textual feedback containing the answer when the bot is wrong. - Task 4: The teacher provides a hint by providing the class of the correct answer, e.g., “No it’s a movie” for the question “which movie did Forest Gump star in?”.
|
| 254 |
+
- Task 5: The teacher provides a reason why the student’s answer is wrong by pointing out the relevant supporting fact from the knowledge base.
|
| 255 |
+
- Task 6: The teacher gives positive reward only $50 \%$ of the time.
|
| 256 |
+
- Task 7: Rewards are missing and the teacher only gives natural language feedback.
|
| 257 |
+
- Task 8: Combines Tasks 1 and 2 to see whether a learner can learn successfully from both forms of supervision at once.
|
| 258 |
+
- Task 9: The bot asks questions of the teacher about what it has done wrong.
|
| 259 |
+
- Task 10: The bot will receive a hint rather than the correct answer after asking for help.
|
| 260 |
+
|
| 261 |
+
We refer the readers to (Weston, 2016) for more detailed descriptions and the motivation behind these tasks. The difference in our system is that the model can be trained on-the-fly via the simulator: after receiving feedback and/or rewards, the model can update itself and apply its learning to the next episode. We present results on Tasks 2, 3 and 4 in this appendix
|
| 262 |
+
|
| 263 |
+
# B INSTRUCTIONS GIVEN TO TURKERS
|
| 264 |
+
|
| 265 |
+
These are the instructions given for the textual feedback mechanical turk task (we also constructed a separate task to collect the initial questions, not described here):
|
| 266 |
+
|
| 267 |
+
Title: Write brief responses to given dialogue exchanges (about 15 min)
|
| 268 |
+
|
| 269 |
+
Description: Write a brief response to a student’s answer to a teacher’s question, providing feedback to the student on their answer.
|
| 270 |
+
|
| 271 |
+
Instructions:
|
| 272 |
+
|
| 273 |
+
Each task consists of the following triplets:
|
| 274 |
+
|
| 275 |
+
1. a question by the teacher
|
| 276 |
+
2. the correct answer(s) to the question (separated by “OR”)
|
| 277 |
+
3. a proposed answer in reply to the question from the student
|
| 278 |
+
|
| 279 |
+
Consider the scenario where you are the teacher and have already asked the question, and received the reply from the student. Please compose a brief response giving feedback to the student about their answer. The correct answers are provided so that you know whether the student was correct or not.
|
| 280 |
+
|
| 281 |
+
For example, given 1) question: “what is a color in the united states flag?”; 2) correct answer: “white, blue, red”; 3) student reply: “red”, your response could be something like “that’s right!”; for 3) reply: “green”, you might say “no that’s not right” or “nope, a correct answer is actually white”.
|
| 282 |
+
|
| 283 |
+
Please vary responses and try to minimize spelling mistakes. If the same responses are copied/pasted or overused, we’ll reject the HIT.
|
| 284 |
+
|
| 285 |
+
Avoid naming the student or addressing “the class” directly.
|
| 286 |
+
|
| 287 |
+
We will consider bonuses for higher quality responses during review.
|
| 288 |
+
|
| 289 |
+

|
| 290 |
+
Figure 5: The ten tasks our simulator implements, which evaluate different forms of teacher response and binary feedback. In each case the same example from WikiMovies is given for simplicity, where the student answered correctly for all tasks (left) or incorrectly (right). Red text denotes responses by the bot with S denoting the bot. Blue text is spoken by the teacher with T denoting the teacher’s response. For imitation learning the teacher provides the response the student should say denoted with S in Tasks 1 and 8. A $( + )$ denotes a positive reward.
|
| 291 |
+
|
| 292 |
+
# C ADDITIONAL EXPERIMENTS
|
| 293 |
+
|
| 294 |
+
<table><tr><td rowspan=1 colspan=1>Iteration</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><td rowspan=1 colspan=1>6</td></tr><tr><td rowspan=2 colspan=1>Imitation LearningReward Based Imitation (RBI)Forward Pred. (FP)RBI+FP</td><td rowspan=2 colspan=1>0.240.951.000.99</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.23</td><td rowspan=1 colspan=1>0.25</td><td rowspan=2 colspan=1>0.251.000.220.99</td></tr><tr><td rowspan=1 colspan=1>0.990.190.99</td><td rowspan=1 colspan=1>0.990.860.99</td><td rowspan=1 colspan=1>0.990.300.99</td><td rowspan=1 colspan=1>1.009999</td></tr><tr><td rowspan=1 colspan=1>FP (balanced)FP (rand. exploration ∈ = 0.25)FP (rand. exploration ∈ = 0.5)</td><td rowspan=1 colspan=1>0.990.990.98</td><td rowspan=1 colspan=1>0.970.910.93</td><td rowspan=1 colspan=1>0.980.930.97</td><td rowspan=1 colspan=1>0.980.880.96</td><td rowspan=1 colspan=1>0.960.940.95</td><td rowspan=1 colspan=1>0.970.940.97</td></tr></table>
|
| 295 |
+
|
| 296 |
+
Table 3: Test accuracy of various models in the dataset batch size case (using batch size equal to the size of the full training set) for bAbI, task 3. Results $> 0 . 9 5$ are in bold.
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 6: Training epoch vs. test accuracy for bAbI (Task 2) varying exploration $\epsilon$ and batch size.
|
| 300 |
+
|
| 301 |
+

|
| 302 |
+
Figure 7: Training epoch vs. test accuracy for bAbI (Task 3) varying exploration $\epsilon$ and batch size. Random exploration is important for both reward-based (RBI) and forward prediction (FP).
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
Figure 8: Training epoch vs. test accuracy for bAbI (Task 4) varying exploration $\epsilon$ and batch size. Random exploration is important for both reward-based (RBI) and forward prediction (FP).
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 9: WikiMovies: Training epoch vs. test accuracy on Task 2 varying (top left panel) exploration rate $\epsilon$ while setting batch size to 32 for RBI, (top right panel) for FP, (bottom left) batch size for RBI, and (bottom right) comparing RBI, REINFORCE and FP setting $\epsilon = 0 . 5$ . The model is robust to the choice of batch size. RBI and REINFORCE perform comparably.
|
| 309 |
+
|
| 310 |
+

|
| 311 |
+
Figure 10: WikiMovies: Training epoch vs. test accuracy on Task 3 varying (top left panel) exploration rate $\epsilon$ while setting batch size to 32 for RBI, (top right panel) for FP, (bottom left) batch size for RBI, and (bottom right) comparing RBI, REINFORCE and FP setting $\epsilon = 0 . 5$ . The model is robust to the choice of batch size. RBI and REINFORCE perform comparably.
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 11: WikiMovies: Training epoch vs. test accuracy on Task 4 varying (top left panel) exploration rate $\epsilon$ while setting batch size to 32 for RBI, (top right panel) for FP, (bottom left) batch size for RBI, and (bottom right) comparing RBI, REINFORCE and FP setting $\epsilon = 0 . 5$ . The model is robust to the choice of batch size. RBI and REINFORCE perform comparably.
|
| 315 |
+
|
| 316 |
+

|
| 317 |
+
Figure 12: WikiMovies: Training epoch vs. test accuracy with varying batch size for FP on Task 2 (top left panel), 3 (top right panel), 4 (bottom left panel) and 6 (top right panel) setting $\epsilon = 0 . 5$ . The model is robust to the choice of batch size.
|
| 318 |
+
|
| 319 |
+
# C.1 ADDITIONAL EXPERIMENTS FOR MECHANICAL TURK SETUP
|
| 320 |
+
|
| 321 |
+
In the experiment in Section 5.2 we conducted experiments with real human feedback. Here, we compare this to a form of synthetic feedback, mostly as a sanity check, but also to see how much improvement we can get if the signal is simpler and cleaner (as it is synthetic). We hence constructed synthetic feedback for the 10,000 responses, using either Task 2 (positive or negative feedback), Task 3 (answers provided by teacher) or a mix (Task $2 { + } 3$ ) where we use one or the other for each example $5 0 \%$ chance of each). The latter makes the synthetic data have a mixed setup of responses, which more closely mimics the real data case. The results are given in Table 4. The $\mathrm { R B I + F P }$ combination is better using the synthetic data than the real data with Task $^ { 2 + 3 }$ or Task 3, which is to be expected, but the real data is competitive, despite the difficulty of dealing with its lexical and semantic variability. The real data is better than using Task 2 synthetic data.
|
| 322 |
+
|
| 323 |
+
For comparison purposes, we also ran a supervised (imitation learning) MemN2N on different sized training sets of turker authored questions with gold annotated labels (so, there are no numerical rewards or textual feedback, this is a pure supervised setting). The results are given in Table 5. They indicate that $\mathrm { R B I + F P }$ and even FP alone get close to the performance of fully supervised learning.
|
| 324 |
+
|
| 325 |
+
<table><tr><td>Model</td><td>r=0</td><td>r= 0.1</td><td>r= 0.5</td><td>r=1</td></tr><tr><td>Reward Based Imitation (RBI) Forward Prediction (FP) [real]</td><td>0.333 0.358</td><td>0.340 0.358</td><td>0.365 0.358</td><td>0.375 0.358</td></tr><tr><td>RBI+FP [real] Forward Prediction (FP) [synthetic Task 2]</td><td>0.431 0.188</td><td>0.438 0.188</td><td>0.443 0.188</td><td>0.441 0.188</td></tr><tr><td>Forward Prediction (FP)[synthetic Task 2+3]</td><td>0.328</td><td>0.328</td><td>0.328</td><td>0.328</td></tr><tr><td>Forward Prediction (FP)[synthetic Task 3]</td><td>0.361</td><td>0.361</td><td>0.361</td><td>0.361</td></tr><tr><td>RBI+FP[synthetic Task 2]</td><td>0.382</td><td>0.383</td><td>0.407</td><td>0.408</td></tr><tr><td>RBI+FP [synthetic Task 2+3]</td><td>0.459</td><td>0.465</td><td>0.464</td><td>0.478</td></tr><tr><td>RBI+FP [synthetic Task 3]</td><td>0.473</td><td>0.486</td><td>0.490</td><td>0.494</td></tr></table>
|
| 326 |
+
|
| 327 |
+
Table 4: Incorporating Feedback From Humans via Mechanical Turk: comparing real human feedback to synthetic feedback. Textual feedback is provided for 10,000 model predictions (from a model trained with 1k labeled training examples), and additional sparse binary rewards (fraction $r$ of examples have rewards). We compare real feedback (rows 2 and 3) to synthetic feedback when using FP or $\mathrm { R B I + F P }$ (rows 4 and 5).
|
| 328 |
+
|
| 329 |
+
Table 5: Fully Supervised (Imitation Learning) Results on Human Questions
|
| 330 |
+
|
| 331 |
+
<table><tr><td rowspan=1 colspan=1>Train data size</td><td rowspan=1 colspan=1>1k</td><td rowspan=1 colspan=1>5k</td><td rowspan=1 colspan=1>10k</td><td rowspan=1 colspan=1>20k</td><td rowspan=1 colspan=1>60k</td></tr><tr><td rowspan=1 colspan=1>Supervised MemN2N</td><td rowspan=1 colspan=1>0.333</td><td rowspan=1 colspan=1>0.429</td><td rowspan=1 colspan=1>0.476</td><td rowspan=1 colspan=1>0.526</td><td rowspan=1 colspan=1>0.599</td></tr></table>
|
| 332 |
+
|
| 333 |
+
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>r=0</td><td rowspan=1 colspan=1>r= 0.1</td><td rowspan=1 colspan=1>r= 0.5</td><td rowspan=1 colspan=1>r=1</td></tr><tr><td rowspan=1 colspan=1>e=0</td><td rowspan=1 colspan=1>0.499</td><td rowspan=1 colspan=1>0.502</td><td rowspan=1 colspan=1>0.501</td><td rowspan=1 colspan=1>0.502</td></tr><tr><td rowspan=1 colspan=1>∈=0.1</td><td rowspan=1 colspan=1>0.494</td><td rowspan=1 colspan=1>0.496</td><td rowspan=1 colspan=1>0.501</td><td rowspan=4 colspan=1>0.5020.4990.5040.497</td></tr><tr><td rowspan=1 colspan=1>∈= 0.25</td><td rowspan=1 colspan=1>0.493</td><td rowspan=1 colspan=1>0.495</td><td rowspan=1 colspan=1>0.496</td></tr><tr><td rowspan=1 colspan=1>∈= 0.5</td><td rowspan=2 colspan=1>∈= 0.5∈=1</td><td rowspan=1 colspan=1>0.501</td><td rowspan=1 colspan=1>0.499</td><td rowspan=1 colspan=1>0.501</td></tr><tr><td></td><td rowspan=1 colspan=1>0.497</td><td rowspan=1 colspan=1>0.497</td><td rowspan=1 colspan=1>0.498</td></tr></table>
|
| 334 |
+
|
| 335 |
+
Table 6: Second Iteration of Feedback Using synthetic textual feedback of synthetic $\mathrm { T a s k } 2 + 3$ with the $\mathrm { R B I + F P }$ method, an additional iteration of data collection of 10k examples, varying sparse binary reward fraction $r$ and exploration $\epsilon$ . The performance of the first iteration model was 0.478.
|
| 336 |
+
|
| 337 |
+
# C.2 SECOND ITERATION OF FEEDBACK
|
| 338 |
+
|
| 339 |
+
We conducted experiments with an additional iteration of data collection for the case of binary rewards and textual feedback using the synthetic Task $2 { + } 3 \ \mathrm { m i x }$ . We selected the best model from the previous training, using $\mathrm { R B I + F P }$ with $r = 1$ which previously gave a test accuracy of 0.478 (see Table 4). Using that model as a predictor, we collected an additional 10,000 training examples.
|
| 340 |
+
|
| 341 |
+
We then continue to train our model using the original $1 \mathrm { k } { + } 1 0 \mathrm { k }$ training set, plus the additional 10k. As before, we report the test accuracy varying $r$ on the additional collected set. We also report the performance from varying $\epsilon$ , the proportion of random exploration of predictions on the new set. The results are reported in Table 6. Overall, performance is improved in the second iteration, with slightly better performance for large $r$ and $\epsilon = 0 . 5$ . However, the improvement is mostly invariant to those parameters, likely because FP takes advantage of feedback from incorrect predictions in any case.
|
md/train/HkzyX3CcFQ/HkzyX3CcFQ.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CONTEXTUAL RECURRENT CONVOLUTIONAL MODEL FOR ROBUST VISUAL LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Feedforward convolutional neural network has achieved a great success in many computer vision tasks. While it validly imitates the hierarchical structure of biological visual system, it still lacks one essential architectural feature: contextual recurrent connections with feedback, which widely exists in biological visual system. In this work, we designed a Contextual Recurrent Convolutional Network with this feature embedded in a standard CNN structure. We found that such feedback connections could enable lower layers to “rethink” about their representations given the top-down contextual information. We carefully studied the components of this network, and showed its robustness and superiority over feedforward baselines in such tasks as noise image classification, partially occluded object recognition and fine-grained image classification. We believed this work could be an important step to help bridge the gap between computer vision models and real biological visual system.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
It has been long established that the primate’s ventral visual system has a hierarchical structure (Felleman & Van Essen, 1991) including early (V1, V2), intermediate (V4), and higher (IT) visual areas. Modern deep convolutional neural networks (CNNs) for image recognition (Krizhevsky et al., 2012; Simonyan & Zisserman, 2014) trained on large image data sets like ImageNet (Russakovsky et al., 2015) imitate this hierarchical structure with multiple layers. There is a hierarchical correspondence between internal feature representations of a deep CNN’s different layers and neural representations of different visual areas (Cichy et al., 2016; Yamins & DiCarlo, 2016); lower visual areas (V1, V2) are best explained by a deep CNN’s internal representations from lower layers (Cadena et al., 2017; Khaligh-Razavi & Kriegeskorte, 2014) and higher areas (IT, V4) are best explained by its higher layers (Khaligh-Razavi & Kriegeskorte, 2014; Yamins et al., 2014). Deep CNNs explain neuron responses in ventral visual system better than any other model class (Yamins & DiCarlo, 2016; Kriegeskorte, 2015), and this success indicates that deep CNNs share some similarities with the ventral visual system, in terms of architecture and internal feature representations (Yamins & DiCarlo, 2016).
|
| 12 |
+
|
| 13 |
+
However, there is one key structural component that is missing in the standard feedforward deep CNNs: contextual feedback recurrent connections between neurons in different areas (Felleman & Van Essen, 1991). These connections greatly contribute to the complexity of the visual system, and may be essential for the success of the visual systems in reality; for example, there are evidences that recurrent connections are crucial for object recognition under noise, clutter, and occlusion (O’Reilly et al., 2013; Spoerer et al., 2017; Rajaei et al., 2018).
|
| 14 |
+
|
| 15 |
+
In this paper, we explored a variety of model with different recurrent architectures, contextual modules, and information flows to understand the computational advantages of feedback circuits. We are interested in understanding what and how top-down and bottom-up contextual information can be combined to improve in performance in visual tasks. We investigated VGG16 (Simonyan & Zisserman, 2014), a standard CNN that coarsely approximate the ventral visual hierarchical stream, and its recurrent variants for comparison. To introduce feedback recurrent connections, we divided VGG16’s layers into stages and selectively added feedback connections from the groups’ highest layers to their lowest layers. At the end of each feedback connection, there is a contextual module (Section 3.2) that refines the bottom-up input with gated contextual information. We tested and compared several networks with such contextual modules against VGG16 in several standard image classification task, as well as visual tasks in which refinement under feedback guidance is more likely to produce some beneficial effects, such as object recognition under degraded conditions (noise, clutter and occlusion) and fine-grained recognition. We found that our network could outperform all the baseline feedforward networks and surpassed them by a large margin in finegrained and occlusion tasks. We also studied the internal feature representations of our network to illustrate the effectiveness of the structure. While much future work has to be done, our work can still be an important step to bridge the gap between biological visual systems and state-of-the-art computer vision models.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: The schematic of a Contextual Recurrent Convolutional Network (CRCN). Check Section 3.1 for details.
|
| 19 |
+
|
| 20 |
+
# 2 RELATED WORK
|
| 21 |
+
|
| 22 |
+
Although recurrent network modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014) have been widely used in temporal prediction (Wang et al., 2017c) and processing of sequential data (e.g. video classification (Donahue et al., 2015)), few studies have been done to augment feedforward CNNs with recurrent connections in image-based computer vision tasks.
|
| 23 |
+
|
| 24 |
+
Image classification. Standard deep CNNs for image classification suffer from occlusion and noise (Wang et al., 2017a;b; Zhang et al., 2017), since heavy occlusion and noise severely corrupt feature representations at lower layers and therefore cause degradation of higher semantic layers. With the inclusion of feedback connections, a model can “rethink” or refine its feature representations at lower layers using feedback information from higher layers (Li et al., 2018); after multiple rounds of feedback and refinement, input signals from distracting objects (noise, irrelevant objects, etc.) will be suppressed in the final feature representation (Cao et al., 2015). Li et al. (2018) used the output posterior possibilities of a CNN to refine its intermediate feature maps; however, their method requires posterior possibilities for refinement and thus cannot be applied in scenarios where supervision is absent. Jetley et al. (2018) used more global and semantic features at higher convolutional layers to sharpen more local feature maps at lower layers for image classification on CIFAR datasets; however, our own experimentation suggests that this method only works when the higher and lower layers have a relatively small semantic gap (similarly sized receptive fields); on highresolution dataset like ImageNet, large semantic gaps between higher and lower layers make this method difficult to work.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 2: The details of a VGG-style context-gating recurrent model.
|
| 28 |
+
|
| 29 |
+
Other computer vision tasks. Linsley et al. (2018) designed a model with explicit horizontal recurrent connections to solve contour detection problems, and Spoerer et al. (2017) evaluated the performance of various models with recurrent connections on digit recognition tasks under clutter. The tasks evaluated in these studies are rather simple and contrived, and it remains to be seen whether their models and conclusions can apply to real world computer vision problems. (Li et al., 2018) uses posterior possibilities at the last fully connected layer to select intermediate feature map representations; however, the posterior possibility vector is not informative enough and the input of the feedback connection is totally fixed, which makes it less flexible to fully mimic the recurrent connections in the visual system. Overall, feedback and recurrent connections are present in multiple layers of the visual hierarchy, and this study constrains feedback connections to the output classification layer only. It is worth noting that a recent study (Nayebi et al., 2018) is motivated by recurrent connections in the brain as well; however, their work focuses on exploring the computational benefits of local recurrent connections while ours focuses on feedback recurrent ones. Thus, we believe that our work is complementary to theirs.
|
| 30 |
+
|
| 31 |
+
# 3 METHODS
|
| 32 |
+
|
| 33 |
+
In this section, we will describe the overall architecture of our proposed model and discuss some design details.
|
| 34 |
+
|
| 35 |
+
# 3.1 OVERALL MODEL ARCHITECTURE
|
| 36 |
+
|
| 37 |
+
The main structure of our Contextual Recurrent Convolutional Network (CRCN) is shown in Figure 1. A CRCN model is a standard feedforward convolutional network augmented with feedback connections attached to some layers. At the end of each feedback connection, a contextual module fuses top-down and bottom-up information (dashed red lines in Figure 1) to provide refined and sharpened input to the augmented layer.
|
| 38 |
+
|
| 39 |
+
Given an input image, the model generates intermediate feature representations and output responses in multiple time steps. At the first time step $t = 0$ in Figure 1), the model passes the input through the feedforward route (black arrows in Figure 1) as in a standard CNN. At later time steps ${ \bf \chi } _ { t } > 0$ in Figure 1), each contextual module fuses output representations of lower and higher layers at the previous step (dashed red lines in Figure 1) to generate the refined input at the current time step (red lines in Figure 1). Mathematically, we have
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
O _ { k } ^ { ( t ) } = \left\{ \begin{array} { l l } { f _ { k } ( O _ { k - 1 } ^ { ( t ) } ) } & { \mathrm { i f ~ } t = 0 \mathrm { o r } k \not \in S _ { G } } \\ { c _ { k } ( O _ { k - 1 } ^ { ( t - 1 ) } , O _ { h ( k ) } ^ { ( t - 1 ) } ) } & { \mathrm { i f ~ } t > 0 \mathrm { a n d } k \in S _ { G } } \end{array} , \right.
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $S _ { G }$ is the index set of layers augmented with feedback connections and contextual modules, $c _ { k } ( \cdot , \cdot )$ (detailed in Eqs. (2)) is the contextual module for layer $k$ , $O _ { k } ^ { ( t ) }$ denotes the output of layer $k$ at time $t$ , $h ( \cdot )$ is a function that maps the index of an augmented layer to that of its higher feedback
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 3: The schematic of our proposed contextual module. Layer $k$ denotes the bottom-up layer and layer $h ( k )$ denotes the top-down layer aligned with the size of $\mathbf { k }$ layer. The left black arrow shows the feed-forward pipeline.
|
| 49 |
+
|
| 50 |
+
<table><tr><td>Model</td><td>CIFAR-10</td><td>CIFAR-100</td></tr><tr><td>VGG-small VGG-ATT VGG-LR-2 VGG-CRCN-1 VGG-CRCN-2</td><td>91.20 91.77 91.49 92.37</td><td>67.06 69.48 68.99 70.82</td></tr></table>
|
| 51 |
+
|
| 52 |
+
Table 1: Top-1 image classification accuracy on CIFAR datasets. VGG-small means VGG model with only one FC layer. VGG-ATT means the model proposed in (Jetley et al., 2018), VGGLR-2 means the ”rethinking” one-FC-layer VGG model with 2 unrolling times proposed in (Li et al., 2018). CRCN- $n$ means our 2-recurrentconnection model with $n$ unrolling times.
|
| 53 |
+
|
| 54 |
+
layer, and $f _ { k } ( \cdot )$ denotes the (feedforward) operation to compute the output of layer $k$ given some input.
|
| 55 |
+
|
| 56 |
+
# 3.2 CONTEXTUAL MODULE DESIGN
|
| 57 |
+
|
| 58 |
+
The key part of the Contextual Recurrent Convolutional Network model is the contextual module at the end of each feedback connection. Figure 3 shows one possible design of the contextual module, which is inspired by traditional RNN modules including LSTM (Hochreiter & Schmidhuber, 1997) and Gated Recurrent Unit (Cho et al., 2014). In this scheme, a gate map is generated by the concatenation of the bottom-up and the (upsampled) top-down feature map passing through a $3 \times 3$ convolution (black circle with “C” and black arrows with circle). Then a tanh function is applied to the map to generate a gate map. The gate map then controls the amount of contextual information that can go through by a point-wise multiplication (red lines). To make the information flow more stable, we add it with bottom-up feature map (black circle with $" + "$ ). The equations are presented in Eqs. (2). Then we use this new feature representation to replace the old one and continue feedforward calculation as described in Section 3.1.
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { l } { O _ { k } ^ { ( t ) } = g a t e * \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) + O _ { k } ^ { ( t - 1 ) } } \\ { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
# 3.3 LOCATION OF RECURRENT CONNECTIONS
|
| 65 |
+
|
| 66 |
+
Since there exists a gap between the semantic meanings of feature representations of bottom-up and top-down layers, we argue that recurrent connection across too many layers can do harm to the performance. Therefore, we derive three sets of connections, conv3 2 to conv2 2, conv4 2 to conv3 3, and $\mathsf { c o n v } 5 _ { - 2 }$ to $\mathtt { C O n v 4 \_ 3 }$ respectively. It is worth noting that all these connections go across pooling layers, for pooling layers can greatly enlarge the receptive field of neurons and enrich the contextual information of top-down information flow. For information flow in networks with multiple recurrent connections, take the network structure in Figure 2 as an example. The part between conv2 2 and $\mathsf { c o n v } 5 _ { - 2 }$ will be unrolled for a certain number of times. To make the experiments setting consistent, we used model with two recurrent connections $( \log 1 + \log 2 )$ in all the tasks.
|
| 67 |
+
|
| 68 |
+
# 4 EXPERIMENTS AND ANALYSIS
|
| 69 |
+
|
| 70 |
+
We first tested the Contextual Recurrent Convolutional model on standard image classification task including CIFAR-10, CIFAR-100, ImageNet and fine-grained image classification dataset CUB-200.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 4: The example images and results of noise image classification experiment. Upper four images show an example of images with different levels of Gaussian noise added. From left to right, the standard deviations are 0, 10, 30, 50, respectively. Lower right figure shows the increased percentage of our unroll-2-times model on top-1 noise image accuracy compared with feedforward model. Lower left figure shows the adversarial attack result. The fooling rate is measured by the absolute accuracy drop when adversarial attack is performed on the model. We use standard FGSM attack on all ImageNet validation images. The blue line shows the fooling rate of our unroll-2-times model, red line shows the feed-forward model and the orange line shows the model proposed by (Li et al., 2018). As the attack gets stronger, our model shows more robustness.
|
| 74 |
+
|
| 75 |
+
<table><tr><td>Model</td><td>Occlusion</td></tr><tr><td>VGG-small VGG-ATT (Jetley et al., 2018) VGG-LR-2 (Li et al., 2018) VGG-CRCN-2</td><td>34.50 46.57 45.88</td></tr></table>
|
| 76 |
+
|
| 77 |
+
Table 2: Top-1 accuracy on CUB-200 datasets.
|
| 78 |
+
|
| 79 |
+
<table><tr><td>Model</td><td>CUB-200</td></tr><tr><td>VGG-small</td><td>64.88</td></tr><tr><td>VGG-ATT (Jetley et al., 2018)</td><td>73.19</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>72.99</td></tr><tr><td>VGG-CRCN-2</td><td>74.90</td></tr></table>
|
| 80 |
+
|
| 81 |
+
Table 3: Top-1 accuracy on Occlusion datasets.
|
| 82 |
+
|
| 83 |
+
To display the robustness of our model, we showed its performance on noise image classification, adversarial attack and occluded images. We found that our model achieved considerate performance gain compared with the standard feedforward model on all these tasks. Notice that our proposed models are based on VGG16 with 2 recurrent connection(loop1+loop2 in Figure 2) in all the tasks.
|
| 84 |
+
|
| 85 |
+
# 4.1 STANDARD IMAGE CLASSIFICATION
|
| 86 |
+
|
| 87 |
+
CIFAR-10: Because CIFAR-10 and CIFAR-100 datasets only contain tiny images, the receptive fields of neurons in layers beyond conv3 2 already cover an image entirely. Although the real power of contextual modulation is hindered by this limitation, our model can still beat the baseline VGG16 network by a large margin (Second column in Table 1). Our model also compared favorably to two other recent models with recurrent connections. Again, our models showed better results.
|
| 88 |
+
|
| 89 |
+
CIFAR-100: Based on the assumption that contextual modulation can help layers capture more detailed information, we also tested our model on CIFAR-100 dataset, which is a 100-category version of CIFAR-10. Our model got a larger improvement compared with feedforward and other models (The third column in Table.1).
|
| 90 |
+
|
| 91 |
+
Table 4: Noise image classification top-1 accuracy on different module structures. VGG16: standard feedforward model. module 1: top-down gating contextual. module 2: contextual gating contextual. module 3: contextual gating top-down and top-down gating contextual combined. Proposed: contextual gating top-down.
|
| 92 |
+
|
| 93 |
+
<table><tr><td rowspan=1 colspan=1>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Module 1</td><td rowspan=1 colspan=1>Module 2</td><td rowspan=1 colspan=1>Module 3</td><td rowspan=1 colspan=1>Proposed</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.608</td><td rowspan=1 colspan=1>71.540</td><td rowspan=1 colspan=1>71.500</td><td rowspan=2 colspan=1>71.63266.760</td></tr><tr><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.400</td><td rowspan=1 colspan=1>66.578</td><td rowspan=1 colspan=1>66.580</td></tr><tr><td rowspan=1 colspan=1>20</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>56.630</td><td rowspan=1 colspan=1>55.944</td><td rowspan=2 colspan=1>56.04041.520</td><td rowspan=2 colspan=1>56.29442.104</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>39.124</td><td rowspan=1 colspan=1>41.090</td><td rowspan=1 colspan=1>41.800</td></tr><tr><td rowspan=1 colspan=1>40</td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>26.980</td><td rowspan=1 colspan=1>27.634</td><td rowspan=2 colspan=1>26.91015.460</td><td rowspan=2 colspan=1>27.76616.310</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.890</td><td rowspan=1 colspan=1>16.458</td></tr></table>
|
| 94 |
+
|
| 95 |
+
Table 5: Noise image classification top-1 accuracy on different loop locations. Loop1 corresponds to the first feedback connection in Figure 2. The same for Loop2, 3, $1 + 2$ , $^ { 2 + 3 }$ and $1 + 2 + 3$ .
|
| 96 |
+
|
| 97 |
+
<table><tr><td></td><td>Locations</td><td rowspan="2">Loop 1</td><td rowspan="2">Loop 2</td><td rowspan="2">Loop 3</td><td rowspan="2">Loop 1+2</td><td rowspan="2">Loop 2+3</td><td rowspan="2">Loop 1+2+3</td></tr><tr><td>Noise Level</td><td></td></tr><tr><td colspan="2">0</td><td>71.581</td><td>71.672</td><td>71.580</td><td>71.632</td><td>71.646</td><td>71.745</td></tr><tr><td colspan="2">10</td><td>66.151</td><td>66.075</td><td>65.952</td><td>66.760</td><td>66.646</td><td>67.620</td></tr><tr><td colspan="2">20</td><td>55.301</td><td>55.240</td><td>54.692</td><td>56.294</td><td>56.000</td><td>56.988</td></tr><tr><td colspan="2">30</td><td>40.271</td><td>40.150</td><td>39.773</td><td>42.104</td><td>41.621</td><td>42.686</td></tr><tr><td colspan="2">40</td><td>25.600</td><td>25.490</td><td>24.910</td><td>27.766</td><td>27.110</td><td>28.120</td></tr><tr><td colspan="2">50</td><td>14.045</td><td>13.932</td><td>12.418</td><td>16.310</td><td>16.014</td><td>17.102</td></tr></table>
|
| 98 |
+
|
| 99 |
+
# 4.2 NOISE IMAGE CLASSIFICATION AND ADVERSARIAL ATTACK
|
| 100 |
+
|
| 101 |
+
ImageNet: ImageNet (Krizhevsky et al., 2012) is the commonly used large-scale image classification dataset. It contains over 1 million images with 1000 categories. In this task, to test the robustness of our model, we added different levels of Gaussian noise on the $2 2 4 \mathrm { p x } \times 2 2 4 \mathrm { p x }$ images in the validation set and calculated the performance drop. In detail, we used the two recurrent connection model for this task $( \log 1 { + } \log 2$ in Figure 2). Notice that all models are not trained on noise images. The result of top1 error without any noise is shown in Table 7. We found that the performance gap between our model and feedforward VGG model got larger as the noise level increased. Results are shown in Figure 4. Also, we showed the noise ImageNet top-1 accuracy of our model, (Li et al., 2018)’s model and feed-forward model in Table 8.
|
| 102 |
+
|
| 103 |
+
Additionally, we also tested adversarial attacks on our model. Figure 4 shows the results with different $\mathrm { L } _ { \infty }$ norm coefficient. We also found that our model had much lower fooling rates than feedforward model and (Li et al., 2018)’s model with the increasing of the norms, which successfully proved our model’s robustness.
|
| 104 |
+
|
| 105 |
+
# 4.3 FINE-GRAINED IMAGE CLASSIFICATION
|
| 106 |
+
|
| 107 |
+
We argued that the contextual module can help the network to preserve more fine-grained details in feature representations, and thus we tested our model on CUB-200 fine-grained bird classification dataset (Wah et al., 2011). We used the same model as ImageNet classification task which indicates that our model contains two recurrent connection(loop1+loop2 in Figure 2). As a result, our model can outperform much better than the feed-forward VGG model(Zagoruyko & Komodakis, 2016) and other similar models with the same experimental settings. The result is shown in 2.
|
| 108 |
+
|
| 109 |
+
# 4.4 OCCLUDED IMAGE TASK
|
| 110 |
+
|
| 111 |
+
To further prove the robust ability of our model, we tested our model on VehicleOcclusion dataset (Wang et al., 2017b), which contains 4549 training images and 4507 testing images covering six types of vehicles, i.e., airplane, bicycle, bus, car, motorbike and train. For each test image in dataset, some randomly-positioned occluders (irrelevant to the target object) are placed onto the target object, and make sure that the occlusion ratio of the target object is constrained. One example is shown in Figure 6. In this task, we used multi-recurrent model which is similar with the model mentioned in Imagenet task. Here, we found that our model can achieve a huge improvement, which is shown in 3.
|
| 112 |
+
|
| 113 |
+
# 4.5 DISCUSSION AND ANALYSIS
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 5: The results of t-SNE visualization. Upper four sub-figures shows the result of VGG16. (a) shows the result of conv4 layer without noise. (b) shows conv4 layer with noise level 30. (c) shows FC layer without noise. (d) shows FC layer with noise level 30.Lower four sub-figures shows the corresponding results of VGG-CRCN-2 model.
|
| 117 |
+
|
| 118 |
+
# 4.5.1 LOCATION OF RECURRENT CONNECTIONS
|
| 119 |
+
|
| 120 |
+
We implemented all the possible combinations of recurrent connections listed in Figure 2. We denote connection from conv3 2 to conv2 2, conv4 2 to conv3 3, and conv5 2 to $\mathsf { C O n v 4 } _ { - 3 }$ as Loop 1, Loop 2 and Loop 3, respectively. The same naming scheme goes for Loop $1 + 2$ and Loop $1 + 2 + 3$ , etc. We tested altogether 6 different models on the noise classification experiment, the settings of which were completely the same. In Table 5, by comparing the corresponding columns where one more recurrent connection is added, we can find that having more loops yields better classification accuracy and robustness, consistent with the reciprocal loops between successive layers in the hierarchical visual cortex. Especially, we can also find that the importance of Loop 1 is slightly better than Loop 2 and Loop 3, indicating the early layers may benefit more from the additional contextual information as an aid.
|
| 121 |
+
|
| 122 |
+
# 4.5.2 CONTEXTUAL MODULE STRUCTURE
|
| 123 |
+
|
| 124 |
+
In additional to the original contextual module in Figure 3, we implemented three other structures that we thought were all reasonable, so as to further study the effect and importance of top-down information and contextual modulation. Briefly, we refer Module 1 to the scheme that top-down feature map gating contextual map, Module 2 to contextual map gating contextual map itself, Module 3 to the scheme that top-down feature map gating contextual map, as well as contextual map gating top-down feature map, and afterwards the two gating results are added together. The final output of all three modules are the gating output added by bottom-up feature map. By “contextual map”, we mean the concatenation of top-down and bottom-up feature map undergone a $3 \times 3$ convolution layer. By “gating”, we mean the gated map element-wisely multiplied with the Sigmoid responses of the gate map. For formulas and further details of the three module structures, we guide readers to read the supplementary materials.
|
| 125 |
+
|
| 126 |
+
Table 6: Noise image classification top-1 accuracy on different unrolling times of our proposed model. VGG16 means Feed-forward VGG16 model and Unroll x indicates Unroll x times during the test process.
|
| 127 |
+
|
| 128 |
+
<table><tr><td rowspan=1 colspan=4>ModelsNoise Level</td><td rowspan=1 colspan=1>VGG16</td><td rowspan=1 colspan=1>Unroll 0</td><td rowspan=1 colspan=1>Unroll 1</td><td rowspan=1 colspan=1>Unroll 2</td><td rowspan=1 colspan=1>Unroll 3</td><td></td><td rowspan=1 colspan=1>Unroll 4</td></tr><tr><td rowspan=1 colspan=4>0</td><td rowspan=1 colspan=1>71.076</td><td rowspan=1 colspan=1>71.018</td><td rowspan=1 colspan=1>71.032</td><td rowspan=1 colspan=1>71.221</td><td rowspan=2 colspan=1>71.21666.481</td><td></td><td rowspan=2 colspan=1>71.61266.757</td></tr><tr><td rowspan=1 colspan=4>10</td><td rowspan=1 colspan=1>65.456</td><td rowspan=1 colspan=1>66.271</td><td rowspan=1 colspan=1>66.368</td><td rowspan=1 colspan=1>66.484</td><td></td><td rowspan=1 colspan=1>66.757</td></tr><tr><td rowspan=2 colspan=4>2030</td><td rowspan=1 colspan=1>54.090</td><td rowspan=1 colspan=1>55.810</td><td rowspan=1 colspan=1>55.880</td><td rowspan=1 colspan=1>55.938</td><td rowspan=1 colspan=1>55.894</td><td rowspan=2 colspan=2>56.29142.054</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>39.124</td><td rowspan=2 colspan=1>41.44227.588</td><td rowspan=2 colspan=1>41.49228.010</td><td rowspan=1 colspan=1>41.516</td><td rowspan=2 colspan=1>41.55128.031</td><td rowspan=2 colspan=1>42.05428.102</td></tr><tr><td rowspan=1 colspan=2>40</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>24.068</td><td rowspan=1 colspan=1>28.044</td><td></td><td rowspan=2 colspan=1>28.10216.271</td></tr><tr><td rowspan=1 colspan=4>50</td><td rowspan=1 colspan=1>13.072</td><td rowspan=1 colspan=1>15.860</td><td rowspan=1 colspan=1>15.941</td><td rowspan=1 colspan=1>15.954</td><td rowspan=1 colspan=1>15.982</td><td></td></tr></table>
|
| 129 |
+
|
| 130 |
+
We did the same noise image classification experiments on these different contextual modules to give a comparison. We use the Loop $1 + 2$ model as the remaining fixed part. The performance of these modules are listed in Figure 4. The differences among these contextual modules lie in how the gate map is generated and what information is to be gated. The best model is obtained by generating the gate map from contextual map and then use it to gate top-down information. By comparing it with Module 1, we find that using only top-down information to generate the map and control total data flow is not adequate, possibly because top-down information is too abstract and coarse. By comparing the best module with Module 2, we find that only top-down information is necessary to be gated. A direct addition of bottom-up map with the output of the gate is adequate to keep all the details in lower level feature maps.
|
| 131 |
+
|
| 132 |
+
# 4.5.3 FEATURE ANALYSIS
|
| 133 |
+
|
| 134 |
+
We drew t-SNE visualization of feature representations of both final fully connected layers and layers with recurrent connections attached (e.g. conv2 2, conv3 3, conv4 3). We selected 5 out of 1000 categories from ImageNet validation set. To effectively capture the changes of feature representations of intermediate convolutional layers, we used ImageNet bounding box annotations and did an average pooling of all the feature responses corresponding to the object bounding box. By comparing the representations of both networks, we can find that the Contextual Recurrent Network is able to form a more distinct clustering than VGG16 network. Notice that we also tested the presentation when a high noise (standard deviation equal to 30) is added to the images. We can find a consistent improvement over VGG16 network in both intermediate representations and representations directly linked to the final classification task. The results are shown in Figure 5.
|
| 135 |
+
|
| 136 |
+
# 4.5.4 UNROLLING PROCESS
|
| 137 |
+
|
| 138 |
+
There is another finding that the contextual module dynamics in recurrent connections not only helps to refine the low-level feature representation during inference, it can also refine the feedforward weights, resulting in better performance in computer vision tasks even in the first iteration, acting as a regularizer. The results are shown in Table 6.
|
| 139 |
+
|
| 140 |
+
# 5 CONCLUSION
|
| 141 |
+
|
| 142 |
+
In this paper, we proposed a novel Contextual Recurrent Convolutional Network. Based on the recurrent connections between layers in the hierarchy of a feedforward deep convolutional neural network, the new network can show some robust properties in some computer vision tasks compared with its feedforward baseline. Moreover, the network shares many common properties with biological visual system. We hope this work will not only shed light on the effectiveness of recurrent connections in robust learning and general computer vision tasks, but also give people some inspirations to bridge the gap between computer vision models and real biological visual system.
|
| 143 |
+
|
| 144 |
+
# REFERENCES
|
| 145 |
+
|
| 146 |
+
Santiago A Cadena, George H Denfield, Edgar Y Walker, Leon A Gatys, Andreas S Tolias, Matthias Bethge, and Alexander S Ecker. Deep convolutional models improve predictions of macaque v1 responses to natural images. bioRxiv, 2017. doi: 10.1101/201764. URL https://www. biorxiv.org/content/early/2017/10/11/201764.
|
| 147 |
+
|
| 148 |
+
Chunshui Cao, Xianming Liu, Yi Yang, Yinan Yu, Jiang Wang, Zilei Wang, Yongzhen Huang, Liang Wang, Chang Huang, Wei Xu, Deva Ramanan, and Thomas S. Huang. Look and think twice: Capturing top-down visual attention with feedback convolutional neural networks. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7- 13, 2015, pp. 2956–2964. IEEE Computer Society, 2015. doi: 10.1109/ICCV.2015.338. URL https://doi.org/10.1109/ICCV.2015.338.
|
| 149 |
+
|
| 150 |
+
Kyunghyun Cho, Bart van Merrienboer, C¸ aglar Gulc¸ehre, Fethi Bougares, Holger Schwenk, and ¨ Yoshua Bengio. Learning phrase representations using RNN encoder-decoder for statistical machine translation. CoRR, abs/1406.1078, 2014. URL http://arxiv.org/abs/1406. 1078.
|
| 151 |
+
|
| 152 |
+
Radoslaw Martin Cichy, Aditya Khosla, Dimitrios Pantazis, Antonio Torralba, and Aude Oliva. Comparison of deep neural networks to spatio-temporal cortical dynamics of human visual object recognition reveals hierarchical correspondence. Scientific Reports, 6:27755 EP –, 06 2016. URL http://dx.doi.org/10.1038/srep27755.
|
| 153 |
+
|
| 154 |
+
Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term recurrent convolutional networks for visual recognition and description. In CVPR, 2015.
|
| 155 |
+
|
| 156 |
+
Daniel J. Felleman and David C. Van Essen. Distributed hierarchical processing in the primate cerebral cortex. Cerebral Cortex, 1(1):1–47, 1991. doi: 10.1093/cercor/1.1.1-a. URL http: //dx.doi.org/10.1093/cercor/1.1.1-a.
|
| 157 |
+
|
| 158 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997. doi: 10.1162/neco.1997.9.8.1735. URL https://doi.org/10.1162/ neco.1997.9.8.1735.
|
| 159 |
+
|
| 160 |
+
Saumya Jetley, Nicholas A. Lord, Namhoon Lee, and Philip H. S. Torr. Learn to pay attention. CoRR, abs/1804.02391, 2018. URL http://arxiv.org/abs/1804.02391.
|
| 161 |
+
|
| 162 |
+
Seyed-Mahdi Khaligh-Razavi and Nikolaus Kriegeskorte. Deep supervised, but not unsupervised, models may explain it cortical representation. PLOS Computational Biology, 10(11):1–29, 11 2014. doi: 10.1371/journal.pcbi.1003915. URL https://doi.org/10.1371/journal. pcbi.1003915.
|
| 163 |
+
|
| 164 |
+
Nikolaus Kriegeskorte. Deep Neural Networks: A New Framework for Modeling Biological Vision and Brain Information Processing. Annual Review of Vision Science, 1(1):417–446, November 2015. doi: 10.1146/annurev-vision-082114-035447. URL http://www.annualreviews. org/doi/10.1146/annurev-vision-082114-035447.
|
| 165 |
+
|
| 166 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Leon Bottou, and Kilian Q. Weinberger (eds.), ´ Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States., pp. 1106–1114, 2012.
|
| 167 |
+
|
| 168 |
+
Xin Li, Zequn Jie, Jiashi Feng, Changsong Liu, and Shuicheng Yan. Learning with rethinking: Recurrently improving convolutional neural networks through feedback. Pattern Recognition, 79:183–194, 2018.
|
| 169 |
+
|
| 170 |
+
Drew Linsley, Junkyung Kim, Vijay Veerabadran, and Thomas Serre. Learning long-range spatial dependencies with horizontal gated-recurrent units. CoRR, abs/1805.08315, 2018. URL http: //arxiv.org/abs/1805.08315.
|
| 171 |
+
|
| 172 |
+
Aran Nayebi, Daniel Bear, Jonas Kubilius, Kohitij Kar, Surya Ganguli, David Sussillo, James J. DiCarlo, and Daniel L. K. Yamins. Task-driven convolutional recurrent models of the visual system. CoRR, abs/1807.00053, 2018. URL http://arxiv.org/abs/1807.00053.
|
| 173 |
+
|
| 174 |
+
Randall O’Reilly, Dean Wyatte, Seth Herd, Brian Mingus, and David Jilk. Recurrent processing during object recognition. Frontiers in Psychology, 4:124, 2013. ISSN 1664-1078. doi: 10. 3389/fpsyg.2013.00124. URL https://www.frontiersin.org/article/10.3389/ fpsyg.2013.00124.
|
| 175 |
+
|
| 176 |
+
Karim Rajaei, Yalda Mohsenzadeh, Reza Ebrahimpour, and Seyed-Mahdi Khaligh-Razavi. Beyond core object recognition: Recurrent processes account for object recognition under occlusion. bioRxiv, 2018. doi: 10.1101/302034. URL https://www.biorxiv.org/content/ early/2018/04/17/302034.
|
| 177 |
+
|
| 178 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
|
| 179 |
+
|
| 180 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556.
|
| 181 |
+
|
| 182 |
+
Courtney J. Spoerer, Patrick McClure, and Nikolaus Kriegeskorte. Recurrent convolutional neural networks: A better model of biological object recognition. Frontiers in Psychology, 8:1551, 2017. ISSN 1664-1078. doi: 10.3389/fpsyg.2017.01551. URL https://www.frontiersin. org/article/10.3389/fpsyg.2017.01551.
|
| 183 |
+
|
| 184 |
+
C. Wah, S. Branson, P. Welinder, P. Perona, and S. Belongie. The Caltech-UCSD Birds-200-2011 Dataset. Technical report, 2011.
|
| 185 |
+
|
| 186 |
+
Hao Wang, Xingyu Lin, Yimeng Zhang, and Tai Sing Lee. Learning robust object recognition using composed scenes from generative models. CoRR, abs/1705.07594, 2017a. URL http: //arxiv.org/abs/1705.07594.
|
| 187 |
+
|
| 188 |
+
Jianyu Wang, Cihang Xie, Zhishuai Zhang, Jun Zhu, Lingxi Xie, and Alan L. Yuille. Detecting semantic parts on partially occluded objects. CoRR, abs/1707.07819, 2017b. URL http:// arxiv.org/abs/1707.07819.
|
| 189 |
+
|
| 190 |
+
Yunbo Wang, Mingsheng Long, Jianmin Wang, Zhifeng Gao, and Philip S Yu. Predrnn: Recurrent neural networks for predictive learning using spatiotemporal lstms. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 879–888. Curran Associates, Inc., 2017c.
|
| 191 |
+
|
| 192 |
+
D L K Yamins, H Hong, C F Cadieu, E A Solomon, D Seibert, and J J DiCarlo. Performanceoptimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 111(23):8619–8624, June 2014. doi: 10.1073/pnas.1403112111. URL http://www.pnas.org/cgi/doi/10.1073/pnas.1403112111.
|
| 193 |
+
|
| 194 |
+
Daniel L K Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature Neuroscience, 19(3):356–365, February 2016. doi: 10.1038/nn.4244. URL http://www.nature.com/doifinder/10.1038/nn.4244.
|
| 195 |
+
|
| 196 |
+
Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. CoRR, abs/1612.03928, 2016. URL http://arxiv.org/abs/1612.03928.
|
| 197 |
+
|
| 198 |
+
Zhishuai Zhang, Cihang Xie, Jianyu Wang, Lingxi Xie, and Alan L. Yuille. Deepvoting: An explainable framework for semantic part detection under partial occlusion. CoRR, abs/1709.04577, 2017. URL http://arxiv.org/abs/1709.04577.
|
| 199 |
+
|
| 200 |
+
Table 7: ImageNet classification top-1 accuracy.
|
| 201 |
+
|
| 202 |
+
<table><tr><td>Models</td><td>Imagenet</td></tr><tr><td>VGG16 (Simonyan & Zisserman,2014)</td><td>71.076</td></tr><tr><td>VGG-LR-2 (Li et al., 2018)</td><td>71.550</td></tr><tr><td>VGG-CRCN-2</td><td>71.632</td></tr></table>
|
| 203 |
+
|
| 204 |
+
# 6 SUPPLEMENTARY MATERIALS
|
| 205 |
+
|
| 206 |
+
# 6.1 DETAILS OF DIFFERENT CONTEXTUAL MODULES
|
| 207 |
+
|
| 208 |
+
We tested three other possible contextual modules in Section 4. Here are the detailed formulations of the three modules.
|
| 209 |
+
|
| 210 |
+
$$
|
| 211 |
+
\begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\ { { c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \end{array}
|
| 212 |
+
$$
|
| 213 |
+
|
| 214 |
+
$$
|
| 215 |
+
\begin{array} { c } { { O _ { k } ^ { ( t ) } = g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) ) } } \\ { { c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k - 1 } ^ { ( t - 1 ) } ) ) } } \end{array}
|
| 216 |
+
$$
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\begin{array} { c } { { { \cal O } _ { k } ^ { ( t ) } = g a t e \_ c o n t e x t u a l * O _ { k + h ( k ) } ^ { ( t - 1 ) } + g a t e * c o n t e x t u a l + O _ { k } ^ { ( t - 1 ) } } } \\ { { g a t e = \mathrm { T a n h } ( \mathrm { C o n v } _ { 1 \times 1 } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) ) ) } } \\ { { \displaystyle c o n t e x t u a l = \mathrm { C o n v } _ { 3 \times 3 } ( \mathrm { C o n c a t } ( \mathrm { U p s a m p l e } ( O _ { h ( k ) } ^ { ( t - 1 ) } ) , O _ { k } ^ { ( t - 1 ) } ) ) } } \\ { { \displaystyle g a t e \_ c o n t e x t u a l = \mathrm { T a n h } ( c o n t e x t u a l ) } } \end{array}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
In the module described by Eqs. (3), we first generated the gate by the top-down layer. Then we used the gate to control the contextual information generated by concatenating bottom-up layer and top-down layer. To stable the information flow, we added it with the bottom-up layer.
|
| 223 |
+
|
| 224 |
+
In the module described by Eqs. (4), we first generated the gate by contextual information which is the same as our proposed module. Then we used the gate to control the contextual information itself which we thought was a feasible way to store the largest information. To stable the information flow, we also added it with the bottom-up layer.
|
| 225 |
+
|
| 226 |
+
We generated two gates by both contextual information and top-down layer in the module described by Eqs. (5). Then we used the gate contextual to control the top-down information and used the gate to control the contextual information. To stable the information flow, we also added it with the bottom-up layer.
|
| 227 |
+
|
| 228 |
+
# 6.2 IMAGE EXAMPLES OF DIFFERENT TASKS
|
| 229 |
+
|
| 230 |
+
In this section, we showed some examples of image occlusion task and adversarial noise task.
|
| 231 |
+
|
| 232 |
+
In the left of Figure 6, we showed one image occlusion example. And we showed one adversarial noise example in the right of Figure 6.
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
Figure 6: Examples of different task. Left: An example of image occlusion task. We quantified the scale of occluders in the image. Right: An example of Adversarial Attack noise. We can see the noise is not obvious to the human eyes but can lead a significant influence to the neural network. We used Fast Gradient Sign Non-target to generate the noise. The left is the original image and the right one is the image adding the noise.
|
| 236 |
+
|
| 237 |
+
Table 8: Noise image classification top-1 accuracy on Imagenet.
|
| 238 |
+
|
| 239 |
+
<table><tr><td></td><td rowspan="2">Models VGG16</td><td rowspan="2">VGG-LR-2</td><td rowspan="2">VGG-CRCN-2</td></tr><tr><td>Noise Level</td></tr><tr><td>0</td><td>71.076</td><td>71.551</td><td>71.632</td></tr><tr><td>10</td><td>65.456</td><td>66.012</td><td>67.620</td></tr><tr><td>20</td><td>54.090</td><td>54.640</td><td>56.988</td></tr><tr><td>30</td><td>39.124</td><td>39.634</td><td>42.686</td></tr><tr><td>40</td><td>24.068</td><td>24.721</td><td>28.120</td></tr><tr><td>50</td><td>13.072</td><td>13.907</td><td>17.102</td></tr></table>
|
| 240 |
+
|
| 241 |
+
# 6.3 IMAGENET TOP1 ACCURACY
|
| 242 |
+
|
| 243 |
+
In Table 7, we showed the Imagenet Top1 accuracy results. Notice that we did not compare our model with VGG-ATT model proposed in (Jetley et al., 2018) because their model is not reasonable on high resolution image dataset. Therefore, their model cannot extract effective attention map from the ImageNet images.
|
| 244 |
+
|
| 245 |
+
# 6.4 NOISE IMAGENET TOP1 ACCURACY
|
| 246 |
+
|
| 247 |
+
In Table 8, we showed the Imagenet Top1 accuracy results with different level of Gaussian noise. VGG16 here means the standard VGG16 model. Notice that we also compared our model with (Li et al., 2018)’s model which we name ”VGG-LR-2”.
|
md/train/Hy7fDog0b/Hy7fDog0b.md
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AMBIENTGAN: GENERATIVE MODELS FROM LOSSY MEASUREMENTS
|
| 2 |
+
|
| 3 |
+
# Eric Price
|
| 4 |
+
|
| 5 |
+
Ashish Bora Department of Computer Science University of Texas at Austin ashish.bora@utexas.edu
|
| 6 |
+
|
| 7 |
+
Department of Computer Science University of Texas at Austin ecprice@cs.utexas.edu
|
| 8 |
+
|
| 9 |
+
Alexandros G. Dimakis
|
| 10 |
+
Department of Electrical and Computer Engineering
|
| 11 |
+
University of Texas at Austin
|
| 12 |
+
dimakis@austin.utexas.edu
|
| 13 |
+
|
| 14 |
+
# ABSTRACT
|
| 15 |
+
|
| 16 |
+
Generative models provide a way to model structure in complex distributions and have been shown to be useful for many tasks of practical interest. However, current techniques for training generative models require access to fully-observed samples. In many settings, it is expensive or even impossible to obtain fullyobserved samples, but economical to obtain partial, noisy observations. We consider the task of learning an implicit generative model given only lossy measurements of samples from the distribution of interest. We show that the true underlying distribution can be provably recovered even in the presence of per-sample information loss for a class of measurement models. Based on this, we propose a new method of training Generative Adversarial Networks (GANs) which we call AmbientGAN. On three benchmark datasets, and for various measurement models, we demonstrate substantial qualitative and quantitative improvements. Generative models trained with our method can obtain $2 { - } 4 \mathbf { x }$ higher inception scores than the baselines.
|
| 17 |
+
|
| 18 |
+
# 1 INTRODUCTION
|
| 19 |
+
|
| 20 |
+
Generative models are powerful tools to concisely represent the structure in large datasets. An implicit generative model is a mechanism that only specifies a stochastic procedure to produce samples from a probability distribution. These models are attractive since they do not require an explicit parametrization of the probability distribution they are trying to model.
|
| 21 |
+
|
| 22 |
+
Recently, there has been substantial progress in neural-network based implicit generative models within the autoregressive and the adversarial framework. The adversarial framework was pioneered by Generative Adversarial Networks (GANs) [Goodfellow et al. (2014)]. In these models, a generator network attempts to map samples from a simple low-dimensional distribution (such as standard Gaussian) to points in a high-dimensional space that resemble the learned data distribution. At the same time, a discriminator network attempts to distinguish between real and generated samples. By setting up a min-max game between them, the two networks are jointly trained. The latent probability distribution along with the learned generator network define a stochastic procedure that can produce new samples. The adversarial framework has been shown to be extremely successful in modeling complex distributions [Berthelot et al. (2017); Vondrick et al. (2016); Pascual et al. (2017); Wu et al. (2016)], and the priors induced by these models are useful for various applications [Shrivastava et al. (2016); Ho & Ermon (2016)].
|
| 23 |
+
|
| 24 |
+
This procedure for training generative models requires access to a large number of fully-observed samples from the desired distribution. Unfortunately, obtaining multiple high-resolution samples can be expensive or impractical for some applications. For example, many sensing and tomography problems (e.g. MRI, CT Scan) require a large number of projections for good reconstruction. Compressed sensing [Donoho (2006); Candes et al. (2006)] attempts to ameliorate this problem using models of the data structure. Recent work has shown that generative models can be particularly effective for easier sensing [Bora et al. (2017); Mardani et al. (2017)]—but if sensing is expensive in the first place, how can we collect enough data to train a generative model to start with?
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1: AmbientGAN training. The output of the generator is passed through a simulated random measurement function $f _ { \Theta }$ . The discriminator must decide if a measurement is real or generated.
|
| 28 |
+
|
| 29 |
+
This work solves this chicken-and-egg problem by training a generative model directly from noisy or incomplete samples. We show that our observations can be even projections or more general measurements of different types and the unknown distribution is still provably recoverable. A critical assumption for our framework and theory to work is that the measurement process is known and satisfies certain technical conditions.
|
| 30 |
+
|
| 31 |
+
We present several measurement processes for which it is possible to learn a generative model from a dataset of measured samples, both in theory and in practice. Our approach uses a new way of training GANs, which we call AmbientGAN. The idea is simple: rather than distinguish a real image from a generated image as in a traditional GAN, our discriminator must distinguish a real measurement from a simulated measurement of a generated image; see Figure 1. We empirically demonstrate the effectiveness of our approach on three datasets and a variety of measurement models. Our method is able to construct good generative models from extremely noisy observations and even from low dimensional projections with drastic per-sample information loss. We show this qualitatively by exhibiting samples with good visual quality, and quantitatively by comparing inception scores [Salimans et al. (2016)] to baseline methods.
|
| 32 |
+
|
| 33 |
+
Theoretical results. We first consider measurements that are noisy, blurred versions of the desired images. That is, we consider convolving the original image with a Gaussian kernel and adding independent Gaussian noise to each pixel (our actual theorem applies to more general kernels and noise distributions). Because of the noise, this process is not invertible for a single image. However, we show that the distribution of measured images uniquely determines the distribution of original images. This implies that a pure Nash equilibrium for the GAN game must find a generative model that matches the true distribution. We show similar results for a dropout measurement model, where each pixel is set to zero with some probability $p$ , and a random projection measurement model, where we observe the inner product of the image with a random Gaussian vector.
|
| 34 |
+
|
| 35 |
+
Empirical results. Our empirical work also considers measurement models for which we do not have provable guarantees. We present results on some of our models now and defer the full exploration to Section 8.
|
| 36 |
+
|
| 37 |
+
In Fig. 2, we consider the celebA dataset of celebrity faces [Liu et al. (2015)] under randomly placed occlusions, where a randomly placed square containing $1 / 4$ of the pixels is set to zero. It is hard to inpaint individual images, so cleaning up the data by inpainting and then learning a GAN on the result yields significant artifacts. By incorporating the measurement process into the GAN training, we can produce much better samples.
|
| 38 |
+
|
| 39 |
+
In Fig. 3a we consider learning from noisy, blurred version of images from the celebA dataset. Each image is convolved with a Gaussian kernel and then IID Gaussian noise is added to each pixel.
|
| 40 |
+
|
| 41 |
+

|
| 42 |
+
Figure 2: (Left) Samples of lossy measurements used for training. Samples produced by (middle) a baseline that trains from inpainted images, and (right) our model.
|
| 43 |
+
|
| 44 |
+
(a) (left) Samples of lossy measurements. Each image is a blurred noisy version of the original. Samples produced by (middle) a baseline that uses Wiener deconvolution, and (right) our model.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Figure 3: Results with Convolve $^ +$ Noise on celebA (left) and 1D-projections on MNIST (right).
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
|
| 51 |
+
(b) Samples produced by our model trained from two 1D projections of each image. On left, the training data does not include the angle of the projections, so it cannot identify orientation or chirality. On right, the training data includes the angle.
|
| 52 |
+
|
| 53 |
+
Learning a GAN on images denoised by Wiener deconvolution leads to poor sample quality while our models are able to produce cleaner samples.
|
| 54 |
+
|
| 55 |
+
In Fig. 3b, we consider learning a generative model on the 2D images in the MNIST handwritten digit dataset [LeCun et al. (1998)] from pairs of 1D projections. That is, measurements consist of picking two random lines and projecting the image onto each line, so the observed value along the line is the sum of all pixels that project to that point. We consider two variants: in the first, the choice of line is forgotten, while in the second the measurement includes the choice of line. We find for both variants that AmbientGAN recovers a lot of the underlying structure, although the first variant cannot identify the distribution up to rotation or reflection.
|
| 56 |
+
|
| 57 |
+
# 2 RELATED WORK
|
| 58 |
+
|
| 59 |
+
There are two distinct approaches to constructing neural network based implicit generative models;
|
| 60 |
+
autoregressive [Kingma & Welling (2013); Oord et al. (2016b;a)], and adversarial [Goodfellow et al.
|
| 61 |
+
(2014)]. Some combination approaches have also been successful [Mescheder et al. (2017)].
|
| 62 |
+
|
| 63 |
+
The adversarial framework has been shown to be extremely powerful in modeling complex data distributions such as images [Radford et al. (2015); Arjovsky et al. (2017); Berthelot et al. (2017)], video [Liang et al. (2017); Vondrick et al. (2016)], and 3D models [Achlioptas et al. (2017); Wu et al. (2016)]. A learned generative model can be useful for many applications. A string of papers [Bora et al. (2017); Zhu et al. (2016); Yeh et al. (2016)] explore the utility of generative priors to solve ill-posed inverse problems. [Shrivastava et al. (2016)] demonstrate that synthetic data can be made more realistic using GANs. [Isola et al. (2016)] and [Zhu et al. (2017)] show how to translate images from one domain to another using GANs.
|
| 64 |
+
|
| 65 |
+
The idea of operating generators and discriminators on different spaces has been proposed before. [Neyshabur et al. (2017)] explores an interesting connection of training stability with low dimensional projections of samples. They show that training a generator against an array of discriminators, each operating on a different low-dimensional projection of the data can improve stability. Our work is also closely related to [Gadelha et al. (2016)] where the authors create 3D object shapes from a dataset of 2D projections. We note that their setup is a special case of the AmbientGAN framework where the measurement process creates 2D projections using weighted sums of voxel occupancies.
|
| 66 |
+
|
| 67 |
+
# 3 NOTATION AND OUR APPROACH
|
| 68 |
+
|
| 69 |
+
Throughout, we use superscript $\cdot _ { r } ,$ to denote real or true distribution, superscript $\dot { \boldsymbol g }$ ’ for the generated distributions, $\cdot _ { x } { \mathrm { : } }$ ’ for the underlying space and $\cdot _ { y } ,$ for measurements. Let $p _ { x } ^ { r }$ be a real underlying distribution over $\mathbb { R } ^ { n }$ . We observe lossy measurements performed on samples from $p _ { x } ^ { r }$ . If we let $m$ be the size of each observed measurement, then, each measurement is an output of some measurement function $f _ { \theta } : \mathbb { R } ^ { n } \mathbb { R } ^ { m }$ , parameterized by $\theta$ . We allow the measurement function to be stochastic by letting the parameters of the measurement functions have a distribution $p _ { \theta }$ . With this notation, for a given $x$ and $\theta$ , the measurements are given by $y = f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ . We assume that it is easy to sample $\Theta \sim p _ { \theta }$ and to compute $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ for any $x$ and $\theta$ . The distributions $p _ { x } ^ { r }$ and $p _ { \theta }$ naturally induce a distribution over the measurements $y$ which we shall denote by $p _ { y } ^ { r }$ . In other words, if $X \sim p _ { x } ^ { r }$ and $\Theta \sim p _ { \theta }$ , then $Y = f _ { \Theta } ( X ) \sim p _ { y } ^ { r }$ .
|
| 70 |
+
|
| 71 |
+
Our task is the following: there is some unknown distribution $p _ { x } ^ { r }$ and a known distribution $p _ { \theta }$ . We are given a set of IID realizations $\{ y _ { 1 } , y _ { 2 } , \dots , y _ { s } \}$ from the distribution $p _ { y } ^ { r }$ . Using these, our goal is to create an implicit generative model of $p _ { x } ^ { r }$ , i.e., a stochastic procedure that can sample from $p _ { x } ^ { r }$ .
|
| 72 |
+
|
| 73 |
+
Our main idea is to combine the measurement process with the adversarial training framework, as shown in Fig. 1. Just like in the standard GAN setting, let $Z \in \mathbb { R } ^ { k } , Z \sim p _ { z }$ be a random latent vector for a distribution $p _ { z }$ that is easy to sample from, such as IID Gaussian or IID uniform. Let $G : \mathbb { R } ^ { k } \mathbb { R } ^ { n }$ be a generator. Let $X ^ { g } = G ( Z )$ , and let $p _ { x } ^ { g }$ be the distribution of $X ^ { g }$ . Thus, our goal is to learn a generator $G$ such that $p _ { x } ^ { g }$ is close to $p _ { x } ^ { r }$ .
|
| 74 |
+
|
| 75 |
+
However, unlike the standard GAN setting, we do not have access to the desired objects $( X \sim p _ { x } ^ { r } )$ . Instead, we only have a dataset of measurements (samples from $Y \sim p _ { y } ^ { r } )$ . Our main idea is to simulate random measurements on the generated objects $X ^ { g }$ , and use the discriminator to distinguish real measurements from fake measurements. Thus, we sample a random measurement function $f _ { \Theta }$ by sampling $\Theta \sim p _ { \theta }$ and apply it on $X ^ { g }$ to obtain $Y ^ { g } = \bar { { f } _ { \Theta } } ( X ^ { g } ) = f _ { \Theta } ( { G } ( Z ) )$ . Let $p _ { y } ^ { g }$ be the distribution of $Y ^ { g }$ . We set up the discriminator to predict if a given $y$ is a sample from the real measurement distribution $p _ { u } ^ { r }$ as opposed to the generated measurement distribution $p _ { y } ^ { g }$ . Thus, the discriminator is a function $\dot { D } : \mathbb { R } ^ { \dot { m } } \mathbb { R }$ .
|
| 76 |
+
|
| 77 |
+
We let $q ( \cdot )$ be the quality function that is used to define the objective, based on the discriminator output. For vanilla GAN, $q ( x ) = \log ( x )$ and for Wasserstein GAN [Arjovsky et al. (2017)], $q ( x ) =$ $x$ . Accordingly, the AmbientGAN objective is the following:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } \mathbb { E } _ { Y ^ { r } \sim p _ { y } ^ { r } } [ q ( D ( Y ^ { r } ) ) ] + \mathbb { E } _ { Z \sim p _ { z } , \Theta \sim p _ { \theta } } [ q ( 1 - D ( f _ { \Theta } ( G ( Z ) ) ) ) ] .
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
We additionally require $f _ { \theta }$ to be differentiable with respect to its inputs for all $\theta$ . We implement $G$ and $D$ as feedforward neural networks. With these assumptions, our model is end-to-end differentiable and can be trained using an approach similar to the standard gradient-based GAN training procedure. In each iteration, we sample $Z \sim p _ { z }$ , $\Theta \sim p _ { \theta }$ , and $Y ^ { r } \sim \mathrm { U N I F } \{ y _ { 1 } , y _ { 2 } , . . . , y _ { s } \}$ to use them to compute stochastic gradients of the objective with respect to parameters in $G$ and $D$ by backpropagation. We alternate between updates to parameters of $D$ and updates to parameters of $G$ .
|
| 84 |
+
|
| 85 |
+
We note that our approach is compatible with and complementary to the various improvements proposed to the GAN objective, network architectures, and the training procedures. Additionally, we can easily incorporate additional information, such as per sample labels, in our framework through conditional versions of the generator and discriminator. This is exemplified in our experiments, where we use unconditional and conditional versions of DCGAN [Radford et al. (2015)], unconditional Wasserstein GAN with gradient penalty [Gulrajani et al. (2017)], and an Auxiliary Classifier Wasserstein GAN [Odena et al. (2016)] with gradient penalty.
|
| 86 |
+
|
| 87 |
+
# 4 MEASUREMENT MODELS
|
| 88 |
+
|
| 89 |
+
Now, we describe the measurement models that we use for our theoretical and empirical results. We primarily focus on 2D images and thus our measurement models are tailored to this setting. The AmbientGAN learning framework, however, is more general and can be used for other data formats and other measurement models as well. For the rest of this section, we assume that input to the measurement function $( x )$ is a 2D image. We consider the following measurement models:
|
| 90 |
+
|
| 91 |
+
Block-Pixels: Each pixel is independently set to zero with probability $p$ . Convolve+Noise: Let $k$ be a convolution kernel and let $\Theta \sim p _ { \theta }$ be the distribution of noise. Then the measurements are given by $f _ { \Theta } ( x ) = k * x + \Theta$ , where $^ *$ is the convolution operator. Block-Patch: A randomly chosen $k \times k$ patch is set to zero. Keep-Patch: All pixels outside a randomly chosen $k \times k$ patch are set to zero. Extract-Patch: A random $k \times k$ patch is extracted. Note that unlike the previous measurement function, the information about the location of the patch is lost. Pad-Rotate-Project: We pad the image on all four sides by zeros. Then we rotate the image by a random angle $\mathbf { \eta } ^ { ( \theta ) }$ about its center. The padding is done to make sure that the original pixels stay within the boundary. Finally, for each channel in the image, we sum the pixels along the vertical axis to get one measurement vector. PadRotate-Project- $\theta$ : This is the same as the previous measurement function, except that along with the projection values, the chosen angle is also included in the measurements. Gaussian-Projection: We project onto a random Gaussian vector which is included in the measurements. So, $\Theta \sim \mathcal { N } ( 0 , I _ { n } )$ , and $f _ { \Theta } ( x ) = ( \Theta , \langle \Theta , x \rangle )$ .
|
| 92 |
+
|
| 93 |
+
# 5 THEORETICAL RESULTS
|
| 94 |
+
|
| 95 |
+
We show that we can provably recover the true underlying distribution $p _ { x } ^ { r }$ for certain measurement models. Our broad approach is to show that there is a unique distribution $p _ { x } ^ { r }$ consistent with the observed measurement distribution $p _ { y } ^ { r }$ , i.e., the mapping of distributions of samples $p _ { x } ^ { r }$ to distribution of measurements $p _ { y } ^ { r }$ is invertible even though the map from an individual image $x$ to its measurements $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } )$ is not. If this holds, then the following lemma immediately gives a consistency guarantee with the AmbientGAN training procedure.
|
| 96 |
+
|
| 97 |
+
Lemma 5.1. As in Section 3, let $p _ { x } ^ { r }$ be the data distribution, $p _ { \theta }$ be the distribution over parameters of the measurement functions and $p _ { y } ^ { r }$ be the induced measurement distribution. Further, assume that for the given $p _ { \theta }$ , there is a unique probability distribution $p _ { x } ^ { r }$ that induces the given measurement distribution $p _ { y } ^ { r }$ . Then, for the vanilla GAN model [Goodfellow et al. (2014)], if the Discriminator $D$ is optimal, so that $\begin{array} { r } { D ( \cdot ) = \frac { p _ { y } ^ { r } ( \cdot ) } { p _ { y } ^ { r } ( \cdot ) + p _ { y } ^ { g } ( \cdot ) } } \end{array}$ , then a generator $G$ is optimal iff $p _ { x } ^ { g } = p _ { x } ^ { r }$ .
|
| 98 |
+
|
| 99 |
+
All proofs including this one are deferred to Appendix A. Note that the previous lemma makes a non-trivial assumption of uniqueness of the true underlying distribution given the measurement distribution. The next few theorems show that this assumption is satisfied under Gaussian-Projection, Convolve $^ +$ Noise and Block-Pixels measurement models, thus showing that that we can recover the true underlying distribution with the AmbientGAN framework.
|
| 100 |
+
|
| 101 |
+
Theorem 5.2. For the Gaussian-Projection measurement model (Section 4), there is a unique underlying distribution $p _ { x } ^ { r }$ that can induce the observed measurement distribution $p _ { y } ^ { r }$ .
|
| 102 |
+
|
| 103 |
+
Theorem 5.3. Let $\mathcal F ( \cdot )$ denote the Fourier transform and let $\operatorname { s u p p } ( \cdot )$ be the support of a function. Consider the Convolve $^ +$ Noise measurement model (Section 4) with the convolution kernel $k$ and additive noise distribution $p _ { \theta }$ . If $\operatorname { s u p p } ( \mathcal { F } ( k ) ) ^ { c } = \phi$ and $\operatorname { s u p p } ( \mathcal { F } ( p _ { \theta } ) ) ^ { c } = \phi$ , then there is a unique distribution $p _ { x } ^ { r }$ that can induce the measurement distribution $p _ { y } ^ { r }$ .
|
| 104 |
+
|
| 105 |
+
We remark that the required conditions in the preceding theorem are easily satisfied for the common setting of Gaussian blurring kernel with additive Gaussian noise. The same guarantee can be generalized for any continuous and invertible function instead of a convolution. We omit the details.
|
| 106 |
+
|
| 107 |
+
Our next theorem makes an assumption of a finite discrete set of pixel values. This assumption holds in most practical scenarios since images are represented with a finite number of discrete values per channel. In this setting, in addition to a consistency guarantee, we also give a sample complexity result for approximately learning the distributions in the AmbientGAN framework.
|
| 108 |
+
|
| 109 |
+
Theorem 5.4. Assume that each image pixel takes values in a finite set P. Thus $x \in P ^ { n } \subset \mathbb { R } ^ { n }$ . Assume $0 \in P$ , and consider the Block-Pixels measurement model (Section 4) with $p$ being the probability of blocking a pixel. If $p < 1$ , then there is a unique distribution $p _ { x } ^ { r }$ that can induce the measurement distribution $p _ { y } ^ { r }$ . Further, for any $\epsilon > 0$ , $\delta \in ( 0 , 1 ]$ , given a dataset of
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
s = \Omega \left( \frac { | P | ^ { 2 n } } { \left( 1 - p \right) ^ { 2 n } \epsilon ^ { 2 } } \log { \left( \frac { | P | ^ { n } } { \delta } \right) } \right)
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
IID measurement samples from $p _ { y } ^ { r }$ , if the discriminator $D$ is optimal, then with probability $\geq 1 - \delta$ over the dataset, any optimal generator $G$ must satisfy $d _ { T V } ( p _ { x } ^ { g } , p _ { x } ^ { r } ) \leq \epsilon$ , where $d _ { T V } ( \cdot , \cdot )$ is the total variation distance.
|
| 116 |
+
|
| 117 |
+
# 6 DATASETS AND MODEL ARCHITECTURES
|
| 118 |
+
|
| 119 |
+
We used three datasets for our experiments. MNIST is a dataset of $2 8 \times 2 8$ images of handwritten digits [LeCun et al. (1998)]. CelebA is a dataset of face images of celebrities [Liu et al. (2015)]. We use an aligned and cropped version where each image is $6 4 \times 6 4$ RGB. The CIFAR-10 dataset consists of $3 2 \times 3 2$ RGB images from 10 different classes [Krizhevsky & Hinton (2009)].
|
| 120 |
+
|
| 121 |
+
We briefly describe the generative models we used for our experiments. More details on architectures and hyperparameters can be found in the appendix. For the MNIST dataset, we use two GAN models. The first model is a conditional DCGAN which follows the architecture in [Radford et al. $( 2 0 1 5 ) ] ^ { 1 }$ , while the second model is an unconditional Wasserstein GAN with gradient penalty (WGANGP) which follows the architecture in [Gulrajani et al. $( 2 0 1 7 ) ] ^ { 2 }$ . For the celebA dataset, we use an unconditional DCGAN and follow the architecture in [Radford et al. $( 2 0 1 5 ) ] ^ { 3 }$ . For the CIFAR-10 dataset, we use an Auxiliary Classifier Wasserstein GAN with gradient penalty (ACWGANGP) which follows the residual architecture in [Gulrajani et al. $( 2 0 1 7 ) ] ^ { 4 }$ .
|
| 122 |
+
|
| 123 |
+
For measurements with 2D outputs, i.e. Block-Pixels, Block-Patch, Keep-Patch, Extract-Patch, and Convolve $+$ Noise (see Section 4), we use the same discriminator architectures as in the original work. For 1D projections, i.e. Pad-Rotate-Project, Pad-Rotate-Project- $\theta$ , we use fully connected discriminators. The architecture of the fully connected discriminator used for the MNIST dataset was 25-25-1 and for the celebA dataset was 100-100-1.
|
| 124 |
+
|
| 125 |
+
# 7 BASELINES
|
| 126 |
+
|
| 127 |
+
Now, we describe some baseline approaches that we implemented to evaluate the relative performance of the AmbientGAN framework. Recall that we have a dataset of IID samples $\{ y _ { 1 } , y _ { 2 } , . . . . y _ { s } \}$ from the measurement distribution $p _ { y } ^ { r }$ and our goal is to create an implicit generative model for $p _ { x } ^ { r }$ .
|
| 128 |
+
|
| 129 |
+
A crude baseline is to ignore that any measurement happened at all. In other words, for cases where the measurements lie in the same space as the full-samples (for example Convolve+Noise) we can learn a generative model directly on the measurements and test how well it approximates the true distribution $p _ { x } ^ { r }$ . We call this the “ignore” baseline.
|
| 130 |
+
|
| 131 |
+
A stronger baseline is based on the following observation: If the measurement functions $f _ { \theta }$ were invertible, and we observed $\theta _ { i }$ for each measurement $y _ { i }$ in our dataset, we could just invert the functions to obtain full-samples $x _ { i } = f _ { \theta _ { i } } ^ { - 1 } ( y _ { i } )$ . Then we could directly learn a generative model using these full-samples. Notice that both assumptions are violated in the AmbientGAN setting. First, we may not observe $\theta _ { i }$ and second, the functions may not be invertible. Indeed all the measurement models in Section 4 violate one of the assumptions. However, we can try to approximate an inverse function and use the inverted samples to train a generative model. Thus, given a measurement $y _ { i } = f _ { \boldsymbol { \theta } _ { i } } ( x _ { i } )$ , we try to “unmeasure” it and obtain $\widehat { x } _ { i }$ , an estimate of $x _ { i }$ . We then learn a generative bmodel with the estimated inverse samples and test how well it approximates $p _ { x } ^ { r }$ .
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 4: Results with Block-Pixels on celebA. (left) Samples of lossy measurements. Each pixel is blocked independently with probability $p = 0 . 9 5$ . Samples produced by (middle) unmeasure-blur baseline, and (right) our model.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
|
| 138 |
+
(a) (left) Samples of lossy measurements. All except a randomly chosen $3 2 \times 3 2$ patch is set to zero. (right) Samples produced by our model.
|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
(b) Samples produced by our model with Pad-Rotate-Project- $\theta$ measurements.
|
| 142 |
+
Figure 5: Results on celebA with (a) Keep-Patch, and (b) 1D projections.
|
| 143 |
+
|
| 144 |
+
For the measurement models described in Section 4, we now describe the methods we used to obtain approximate inverse functions: (a) For the Block-Pixels measurements, a simple approximate inverse function is to just blur the image so that zero pixels are filled in from the surrounding. We also implemented a more sophisticated approach to fill in the pixels by using total variation inpainting. (b) For Convolve+Noise measurements with a Gaussian kernel and additive Gaussian Noise, we approximate the inverse by a Wiener deconvolution. (c) For Block-Patch measurements, we use the Navier Stokes based inpainting method [Bertalmio et al. (2001)] to fill in the zero pixels.
|
| 145 |
+
|
| 146 |
+
For other measurement models, it is unclear how to obtain an approximate inverse function. For the Keep-Patch measurement model, no pixels outside a box are known and thus inpainting methods are not suitable. Inverting Extract-Patch measurements is even harder since the information about the position of the patch is also lost. For the Pad-Rotate-Project- $\theta$ measurements, a conventional technique is to sample many angles, and use techniques for inverting the Radon transform [Deans (2007)]. However, since we observe only a few projections at a time, these methods aren’t readily applicable. Inverting Pad-Rotate-Project measurements is even harder since it lacks information about $\theta$ . So, on this subset of experiments, we report only the results with the AmbientGAN models.
|
| 147 |
+
|
| 148 |
+
# 8 QUALITATIVE RESULTS
|
| 149 |
+
|
| 150 |
+
We present some samples generated by the baselines and our models. For each experiment, we show the samples from the dataset of measurements $( Y ^ { r } )$ available for training, samples generated by the baselines (when applicable) and the samples generated by our models $( X ^ { g } )$ . We show samples only for a selected value of parameter settings. More results are provided in the appendix. All results on MNIST are deferred to the appendix.
|
| 151 |
+
|
| 152 |
+
Block-Pixels: Fig. 4 shows results on celebA with DCGAN and Fig. 6 on CIFAR-10 with ACWGANGP. We see that the samples are heavily degraded in our measurement process (left image). Thus, it is challenging for baselines to invert the measurements process, and correspondingly, they do not produce good samples (middle image). Our models are able to produce images with good visual quality (right image).
|
| 153 |
+
|
| 154 |
+
Convolve+Noise: We use a Gaussian kernel and IID Gaussian noise. Fig. 3a shows results on celebA with DCGAN. We see that the measurements are drowned in noise (left image) and the baselines struggle to extract the original image, giving samples of low quality (middle image). Our models are able to produce samples with clear faces (right image).
|
| 155 |
+
|
| 156 |
+

|
| 157 |
+
Figure 6: Results with Block-Pixels on CIFAR-10. (left) Samples of lossy measurements. Each pixel is blocked independently with probability $p = 0 . 8$ . Samples produced by (middle) unmeasure-blur baseline, and (right) our model.
|
| 158 |
+
|
| 159 |
+
Block-Patch, Keep-Patch: Fig. 2 shows the results for Block-Patch and Fig. 5a for Keep-Patch measurements on celebA with DCGAN. On both measurement distributions, our models are able to create coherent faces (right image) by observing only parts of one image at a time.
|
| 160 |
+
|
| 161 |
+
1D projections: Pad-Rotate-Project and Pad-Rotate-Project- $\theta$ measurement models exhibit drastic signal degradation; most of the information in a sample is lost during the measurements process. For our experiments, we use two measurements at a time. Fig. 3b shows the results on MNIST with DCGAN. While the first model is able to learn only up to rotation and reflection (left image), we note that generated digits have similar orientations and chirality within each class without any explicit incentive. We hypothesize that the model prefers this mode because it is easier to learn with consistent orientation per class. The second measurement model contains the rotation angle and thus produces upright digits (right image). While in both cases, the generated images are of lesser visual quality, our method demonstrates that we can produce images of digits given only 1D projections.
|
| 162 |
+
|
| 163 |
+
Failure case: In Fig. 5b, we show the samples obtained from our model trained on celebA dataset with Pad-Rotate-Project- $\cdot \theta$ measurements with a DCGAN. We see that the model has learned a very crude outline of a face, but lacks details. This highlights the difficulty in learning complex distributions with just 1D projections and a need for better understanding of distribution recovery under projection measurement model as well as better methods for training GANs.
|
| 164 |
+
|
| 165 |
+
# 9 QUANTITATIVE RESULTS
|
| 166 |
+
|
| 167 |
+
We report inception scores [Salimans et al. (2016)] to quantify the quality of the generative models learned in the AmbientGAN framework. For the CIFAR-10 dataset, we use the Inception model[Szegedy et al. (2016)] trained on the ImageNet dataset [Deng et al. $( 2 0 0 9 ) ] ^ { 1 }$ . For computing a similar score on MNIST, we trained a classification model with two conv+pool layers followed by two fully connected layers2. The final test set accuracy of this model was $9 9 . 2 \%$ .
|
| 168 |
+
|
| 169 |
+
# 9.1 MNIST
|
| 170 |
+
|
| 171 |
+
For Block-Pixels measurements on MNIST, we trained several models with our approach and the baselines, each with a different probability $p$ of blocking pixels. For each model, after convergence, we computed the inception score using the network described above. A plot of the inception scores as a function of $p$ is shown in Fig. 7 (left). We note that at $p = 0$ , i.e. if no pixels are blocked, our model is equivalent to a conventional GAN. As we increase $p$ , the baseline models quickly start to perform poorly, while the AmbientGAN models continue to perform relatively well.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 7: Results on MNIST with WGANGP. (left) Block-Pixels (right) Convolve+Noise
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
Figure 8: Quantitative results on CIFAR-10 with ACWGANGP, Block-Pixels measurement. (left) Inception score vs blocking probability $p$ . (right) Inception score vs training iteration with darkness proportional to $1 - p$ . Vertical bars indicate $9 5 \%$ confidence intervals.
|
| 178 |
+
|
| 179 |
+
For the Convolve+Noise measurements with a Gaussian kernel of radius 1 pixel, and additive Gaussian noise with zero mean and standard deviation $\sigma$ , we trained several models on MNIST by varying the value of $\sigma$ . A plot of the inception score as a function of $\sigma$ is shown in Fig. 7 (right). We see that for small variance of additive noise, Wiener deconvolution and the “ignore” baseline perform quite well. However, as we start to increase the noise levels, these baselines quickly deteriorate in performance, while the AmbientGAN models maintain a high inception score.
|
| 180 |
+
|
| 181 |
+
For 1D projection measurements, we report the inception scores for the samples produced by the AmbientGAN models trained with two projection measurements at a time. The Pad-Rotate-Project model produces digits at various orientations and thus does quite poorly, achieving an inception score of just 4.18. The model with Pad-Rotate-Project- $\cdot \theta$ measurements produces well-aligned digits and achieves an inception score of 8.12. For comparison, the vanilla GAN model trained with fullyobserved samples achieves an inception score of 8.99. Thus, the second model comes quite close to the performance of the fully-observed case while being trained only on 1D projections.
|
| 182 |
+
|
| 183 |
+
# 9.2 CIFAR-10
|
| 184 |
+
|
| 185 |
+
In Fig. 8 (left), we show a plot of inception score vs the probability of blocking pixels $p$ in the BlockPixels measurement model on CIFAR-10. We note that the total variation inpainting method is quite slow and the performance on MNIST was about the same as unmeasure-blur baseline. So, we do not run inpainting baselines on the CIFAR-10 dataset. From the plots, we see a trend similar to the plot obtained with MNIST (Fig. 7, left), showing the superiority of our approach over baselines. We show the inception score as a function of training iteration in Fig. 8 (right).
|
| 186 |
+
|
| 187 |
+
# 10 CONCLUSION
|
| 188 |
+
|
| 189 |
+
Generative models are powerful tools, but constructing a generative model requires a large, highquality dataset of the distribution of interest. We show how to relax this requirement, by learning a distribution from a dataset that only contains incomplete, noisy measurements of the distribution. We hope that this will allow for the construction of new generative models of distributions for which no high-quality dataset exists.
|
| 190 |
+
|
| 191 |
+
# ACKNOWLEDGEMENTS
|
| 192 |
+
|
| 193 |
+
We would like to thank Philipp Krahenb ¨ uhl, Ajil Jalal, Surbhi Goel, and Jessica Hoffmann for ¨ helpful discussions. This research has been supported by NSF Grants CCF 1407278, 1422549, 1618689, DMS 1723052, ARO YIP W911NF-14-1-0258 and NVIDIA Corporation.
|
| 194 |
+
|
| 195 |
+
# REFERENCES
|
| 196 |
+
|
| 197 |
+
Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Representation learning and adversarial generation of 3d point clouds. arXiv preprint arXiv:1707.02392, 2017.
|
| 198 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 199 |
+
Marcelo Bertalmio, Andrea L Bertozzi, and Guillermo Sapiro. Navier-stokes, fluid dynamics, and image and video inpainting. In Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, volume 1, pp. I–I. IEEE, 2001.
|
| 200 |
+
David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017.
|
| 201 |
+
Ashish Bora, Ajil Jalal, Eric Price, and Alexandros G Dimakis. Compressed sensing using generative models. arXiv preprint arXiv:1703.03208, 2017.
|
| 202 |
+
Emmanuel J Candes, Justin K Romberg, and Terence Tao. Stable signal recovery from incomplete and inaccurate measurements. Communications on pure and applied mathematics, 59(8):1207– 1223, 2006.
|
| 203 |
+
Harald Cramer and Herman Wold. Some theorems on distribution functions. ´ Journal of the London Mathematical Society, 1(4):290–294, 1936.
|
| 204 |
+
Stanley R Deans. The Radon transform and some of its applications. Courier Corporation, 2007.
|
| 205 |
+
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.
|
| 206 |
+
David L Donoho. Compressed sensing. IEEE Transactions on information theory, 52(4):1289– 1306, 2006.
|
| 207 |
+
Matheus Gadelha, Subhransu Maji, and Rui Wang. 3d shape induction from 2d views of multiple objects. arXiv preprint arXiv:1612.05872, 2016.
|
| 208 |
+
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.
|
| 209 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017.
|
| 210 |
+
Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, pp. 4565–4573, 2016.
|
| 211 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016.
|
| 212 |
+
Diederik $\mathrm { \bf P }$ Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 213 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
|
| 214 |
+
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.
|
| 215 |
+
Xiaodan Liang, Lisa Lee, Wei Dai, and Eric P Xing. Dual motion gan for future-flow embedded video prediction. arXiv preprint arXiv:1708.00284, 2017.
|
| 216 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3730–3738, 2015.
|
| 217 |
+
Morteza Mardani, Enhao Gong, Joseph Y Cheng, Shreyas Vasanawala, Greg Zaharchuk, Marcus Alley, Neil Thakur, Song Han, William Dally, John M Pauly, et al. Deep generative adversarial networks for compressed sensing automates mri. arXiv preprint arXiv:1706.00051, 2017.
|
| 218 |
+
Lars Mescheder, Sebastian Nowozin, and Andreas Geiger. Adversarial variational bayes: Unifying variational autoencoders and generative adversarial networks. arXiv preprint arXiv:1701.04722, 2017.
|
| 219 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, and Ayan Chakrabarti. Stabilizing gan training with multiple random projections. arXiv preprint arXiv:1705.07831, 2017.
|
| 220 |
+
Augustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with auxiliary classifier gans. arXiv preprint arXiv:1610.09585, 2016.
|
| 221 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016a.
|
| 222 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016b.
|
| 223 |
+
Santiago Pascual, Antonio Bonafonte, and Joan Serra. Segan: Speech enhancement generative \` adversarial network. arXiv preprint arXiv:1703.09452, 2017.
|
| 224 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015.
|
| 225 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2234–2242, 2016.
|
| 226 |
+
Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Josh Susskind, Wenda Wang, and Russ Webb. Learning from simulated and unsupervised images through adversarial training. arXiv preprint arXiv:1612.07828, 2016.
|
| 227 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2818–2826, 2016.
|
| 228 |
+
Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In Advances In Neural Information Processing Systems, pp. 613–621, 2016.
|
| 229 |
+
Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pp. 82–90, 2016.
|
| 230 |
+
Raymond Yeh, Chen Chen, Teck Yian Lim, Mark Hasegawa-Johnson, and Minh N Do. Semantic image inpainting with perceptual and contextual losses. arXiv preprint arXiv:1607.07539, 2016.
|
| 231 |
+
|
| 232 |
+
Jun-Yan Zhu, Philipp Krahenb ¨ uhl, Eli Shechtman, and Alexei A Efros. Generative visual manipu- ¨ lation on the natural image manifold. In European Conference on Computer Vision, pp. 597–613. Springer, 2016.
|
| 233 |
+
|
| 234 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017.
|
| 235 |
+
|
| 236 |
+
# APPENDIX A
|
| 237 |
+
|
| 238 |
+
# 10.1 PROOF OF LEMMA 5.1
|
| 239 |
+
|
| 240 |
+
Lemma. As in Section 3, let $p _ { x } ^ { r }$ be the data distribution, $p _ { \theta }$ be the distribution over parameters of the measurement functions and $p _ { y } ^ { r }$ be the induced measurement distribution. Further, assume that for the given $p _ { \theta }$ , there is a unique probability distribution $p _ { x } ^ { r }$ that induces the given measurement distribution $p _ { y } ^ { r }$ . Then, for the vanilla GAN model [Goodfellow et al. (2014)], if the Discriminator $D$ is optimal, so that
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
D ( \cdot ) = \frac { p _ { y } ^ { r } ( \cdot ) } { p _ { y } ^ { r } ( \cdot ) + p _ { y } ^ { g } ( \cdot ) } ,
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
then a generator $G$ is optimal iff $p _ { x } ^ { g } = p _ { x } ^ { r }$
|
| 247 |
+
|
| 248 |
+
Proof. From the same argument as in Theorem 1 in [Goodfellow et al. (2014)], it follows that $p _ { y } ^ { g } =$ $p _ { y } ^ { r }$ . Then, since there is a unique probability distribution $p _ { x } ^ { r }$ that can induce the given measurement distribution, it follows that $p _ { x } ^ { g } = p _ { x } ^ { r }$ . The converse is trivially true. □
|
| 249 |
+
|
| 250 |
+
# 10.2 PROOF OF THEOREM 5.2
|
| 251 |
+
|
| 252 |
+
Theorem. For the Gaussian-Projection measurement model (Section 4), there is a unique underlying distribution $p _ { x } ^ { r }$ that can induce the observed measurement distribution $p _ { y } ^ { r }$ .
|
| 253 |
+
|
| 254 |
+
Proof. We note that Since $\Theta \sim \mathcal { N } ( 0 , I _ { n } )$ , all possible directions for projections are covered. Further, since the measurement model includes the projection vector $\Theta$ as a part of the measurements, in order to match the measurement distribution, the underlying distribution $p _ { x } ^ { r }$ must be such that all 1D marginals are matched. Thus, by Cramer-Wold theorem [Cramer & Wold (1936)], any sequence ´ of random vectors that match the 1D marginals must converge in distribution to the true underlying distribution. Thus, in particular, there is a unique probability distribution $p _ { x } ^ { r }$ that can match all 1D marginals obtained with the Gaussian projection measurements. □
|
| 255 |
+
|
| 256 |
+
# 10.3 PROOF OF THEOREM 5.3
|
| 257 |
+
|
| 258 |
+
Theorem. Let $\mathcal F ( \cdot )$ denote the Fourier transform and let $\operatorname { s u p p } ( \cdot )$ be the support of a function. Consider the Convolve+Noise measurement model (Section 4) with the convolution kernel $k$ and additive noise distribution $p _ { \theta }$ . If $\operatorname { s u p p } ( \mathcal { F } ( k ) ) ^ { c } = \phi$ and $\operatorname { s u p p } ( \mathcal { F } ( p _ { \theta } ) ) ^ { c } = \phi$ , then there is a unique distribution $p _ { x } ^ { r }$ that can induce the measurement distribution $p _ { y } ^ { r }$ .
|
| 259 |
+
|
| 260 |
+
Proof. Let $X \sim p _ { x }$ . Let $\Theta \sim p _ { \theta }$ . Let $Z = k * X$ so that $Z \sim p _ { z }$ , and $Y = Z + \Theta$ , so $Y \sim p _ { y }$ . With a slight abuse of notation, we will denote the probability density functions (pdf) also by $p$ subscripted with the variable name. Then we have
|
| 261 |
+
|
| 262 |
+
$$
|
| 263 |
+
\begin{array} { r l } & { \quad \quad Z = k * X , } \\ & { \Leftrightarrow \mathcal { F } ( Z ) = \mathcal { F } ( k ) \mathcal { F } ( X ) , } \\ & { \Leftrightarrow \mathcal { F } ( X ) = \mathcal { F } ( Z ) / \mathcal { F } ( k ) , } \\ & { \quad \quad \Leftrightarrow X = \mathcal { F } ^ { - 1 } ( \mathcal { F } ( Z ) / \mathcal { F } ( k ) ) , } \end{array}
|
| 264 |
+
$$
|
| 265 |
+
|
| 266 |
+
where the penultimate step follows since by assumption, $\mathcal { F } ( k )$ is nowhere 0. In the last step, ${ \mathcal { F } } ^ { - 1 }$ is the inverse Fourier transform.
|
| 267 |
+
|
| 268 |
+
Thus, there is a bijective map between $X$ and $Z$ . Since the Fourier and the inverse Fourier are continuous transformations, this map is also continuous. So, we can write $Z = h ( X )$ , where $h$ is a bijective, differentiable function. So, the pdfs of $X$ and $Z$ are related as
|
| 269 |
+
|
| 270 |
+
$$
|
| 271 |
+
p _ { x } ( \cdot ) = p _ { z } ( h ( \cdot ) ) \left| { \operatorname* { d e t } ( J _ { h } ( \cdot ) ) } \right| ,
|
| 272 |
+
$$
|
| 273 |
+
|
| 274 |
+
where $J _ { h } ( \widetilde { x } )$ is the Jacobian of $h$ evaluated at $\tilde { x }$
|
| 275 |
+
|
| 276 |
+
Now, note that since Y is a sum of two random variables, its pdf is a convolution of the individual probability density functions. So we have:
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
p _ { y } = p _ { z } * p _ { \theta }
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
Taking the Fourier transform on both sides, we have
|
| 283 |
+
|
| 284 |
+
$$
|
| 285 |
+
\begin{array} { r l } & { \mathcal { F } ( { p _ { y } } ) = \mathcal { F } ( { p _ { z } } ) \mathcal { F } ( { p _ { \theta } } ) , } \\ & { \Leftrightarrow \mathcal { F } ( { p _ { z } } ) = \mathcal { F } ( { p _ { y } } ) / \mathcal { F } ( { p _ { \theta } } ) , } \\ & { \qquad \Leftrightarrow p _ { z } = \mathcal { F } ^ { - 1 } ( \mathcal { F } ( { p _ { y } } ) / \mathcal { F } ( { p _ { \theta } } ) ) , } \end{array}
|
| 286 |
+
$$
|
| 287 |
+
|
| 288 |
+
where the penultimate step follows since by assumption, $\mathcal { F } ( p _ { \theta } )$ is nowhere 0.
|
| 289 |
+
|
| 290 |
+
Combining the two results, we have a reverse map from the measurement distribution $p _ { y }$ to a sample distribution $p _ { x }$ . Thus, the reverse map uniquely determines the true underlying distribution $p _ { x }$ , concluding the proof. □
|
| 291 |
+
|
| 292 |
+
# 10.4 PROOF OF THEOREM 5.4
|
| 293 |
+
|
| 294 |
+
We first state a slightly different version of Theorem 1 from [Goodfellow et al. (2014)] for the discrete setting. We shall use $[ n ]$ to denote the set $\{ 1 , 2 , \ldots n \}$ , and use $\mathbb { I } ( \cdot )$ to denote the indicator function.
|
| 295 |
+
|
| 296 |
+
Lemma 10.1. Consider a dataset of measurement samples $\left\{ y _ { 1 } , y _ { 2 } , \dots y _ { s } \right\}$ , where each $y _ { i } \in [ t ]$ . We define the empirical version of the vanilla GAN objective as
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\operatorname* { m i n } _ { G } \operatorname* { m a x } _ { D } \frac { 1 } { s } \sum _ { i = 1 } ^ { s } \log ( D ( y _ { i } ) ) + \mathbb { E } _ { Y ^ { g } \sim p _ { y } ^ { g } } [ \log ( 1 - D ( Y ^ { g } ) ) ] .
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
For $j \in [ t ]$ , let $\hat { p } _ { y } ^ { r } ( j ) = \sum \mathbb { I } ( y _ { i } = j ) / s$ be the empirical distribution of samples. Then the optimal discriminator for the empirical objective is such that
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
D ( \cdot ) = \frac { \hat { p } _ { y } ^ { r } ( \cdot ) } { \hat { p } _ { y } ^ { r } ( \cdot ) + p _ { y } ^ { g } ( \cdot ) } .
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
Additionally, if we fix the discriminator to be optimal, then any optimal generator must satisfy $p _ { y } ^ { g } = \hat { p } _ { y } ^ { r }$ .
|
| 309 |
+
|
| 310 |
+
Proof. The Empirical Risk Minimization (ERM) version of the loss is equivalent to the taking expectation of the data dependent term with respect to the empirical distribution. Replacing the real data distribution with the empirical version in the proof of Theorem 1 from [Goodfellow et al. (2014)], we obtain the result. □
|
| 311 |
+
|
| 312 |
+
Now we give a proof of Theorem 5.4.
|
| 313 |
+
|
| 314 |
+
Theorem. Assume that each image pixel takes values in a finite set P. Thus $x \in P ^ { n } \subset \mathbb { R } ^ { n }$ . Assume $0 \in P$ , and consider the Block-Pixels measurement model (Section 4) with $p$ being the probability of blocking a pixel. If $p < 1$ , then there is a unique distribution $p _ { x } ^ { r }$ that can induce the measurement distribution $p _ { y } ^ { r }$ . Further, for any $\epsilon > 0$ , $\delta \in ( 0 , 1 ]$ , given a dataset of
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
s = \Omega \left( \frac { | P | ^ { 2 n } } { { ( 1 - p ) } ^ { 2 n } \epsilon ^ { 2 } } \log { \left( \frac { | P | ^ { n } } { \delta } \right) } \right)
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
IID measurement samples from $p _ { y } ^ { r }$ , if the discriminator $D$ is optimal, then with probability $\geq 1 - \delta$ over the dataset, any optimal generator $G$ must satisfy $d _ { T V } ( p _ { x } ^ { g } , p _ { x } ^ { r } ) \leq \epsilon$ , where $d _ { T V } ( \cdot , \cdot )$ is the total variation distance.
|
| 321 |
+
|
| 322 |
+
Proof. We first consider a more general case and apply that to the Block-Pixels model. Consider a discrete distribution $p _ { x }$ over $[ t ]$ . We apply random measurement functions to samples from $p _ { x }$ to obtain measurements. Assume that each measurement also belongs to the same set, i.e. $[ t ]$ . Let $A \ \in \ \mathbb { R } ^ { t \times t }$ be the transition matrix so that $A _ { i j }$ is the probability (under the randomness in measurement functions) that measurement $i$ was produced by sample $j$ . Then the distribution over measurements $p _ { y }$ can be written in terms of $p _ { x }$ and $A$ as:
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
p _ { y } = A p _ { x }
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
Thus, if the matrix $A$ is invertible, we can guarantee that the distribution $p _ { x }$ is recoverable from $p _ { y }$
|
| 329 |
+
|
| 330 |
+
Assuming $A$ is invertible, we now turn to the sample complexity. Let $\lambda$ be the minimum of magnitude of eigenvalues of $A$ . Since $A$ is invertible, $\lambda > 0$ . Let the dataset of measurements be $\left\{ y _ { 1 } , y _ { 2 } , \dots y _ { s } \right\}$ . For $j \in [ t ]$ and for $k \in [ s ]$ , Let $Y _ { k } ^ { j } = \mathbb { I } ( y _ { k } = j )$ . Then for any $\epsilon > 0$ , we have
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
\begin{array} { r l } { \mathbb { E } \left( \left| | \hat { \nu } _ { y } ^ { \star } - \bar { p } _ { y } ^ { \star } | \right| \geq \frac { \lambda ^ { 2 } \epsilon ^ { 2 } } { t } \right) = } & { \mathbb { E } \left( \displaystyle \sum _ { i = 1 } ^ { t } \bar { ( \hat { \nu } _ { y } ^ { \star } ( j ) - p _ { i } ^ { \star } ( j ) ) ^ { 2 } } \geq \frac { \lambda ^ { 2 } \epsilon ^ { 2 } } { t } \right) , } \\ & { \leq \mathbb { E } \left( \displaystyle \sum _ { i = 1 } ^ { t } \left( \bar { ( \hat { \nu } _ { y } ^ { \star } ( j ) - p _ { i } ^ { \star } ( j ) ) ^ { 2 } } \geq \frac { \lambda ^ { 2 } \epsilon ^ { 2 } } { \lambda ^ { 2 } } \right) \right) , } \\ & { \leq \displaystyle \sum _ { i = 1 } ^ { t } \mathbb { E } \left( | | \hat { \nu } _ { y } ^ { \star } ( j ) - p _ { i } ^ { \star } ( j ) | \geq \frac { \lambda ^ { 2 } } { t } \right) , } \\ & { = \displaystyle \sum _ { j = 1 } ^ { t } \mathbb { E } \left( \left| \sum _ { i = 1 } ^ { t } \bar { \lambda } _ { i } ^ { j } - p _ { i } ^ { \star } ( j ) \right| \geq \frac { \lambda ^ { 2 } } { t } \right) , } \\ & { \leq \displaystyle \sum _ { j = 1 } ^ { t } \exp \left( | \sum _ { i = 1 } ^ { t } \bar { \lambda } _ { i } ^ { j } - p _ { i } ^ { \star } ( j ) | \right) \lesssim \frac { \lambda ^ { 2 } } { t } \int _ { 0 } ^ { t } \int _ { 0 } ^ { t } \int _ { 0 } ^ { t } \hat { \nu } ( j ) , } \\ & { \leq \displaystyle \sum _ { j = 1 } ^ { t } \exp ( - 2 \lambda \hat { \nu } _ { i } ^ { 2 } \epsilon ^ { 2 } j ) ^ { 2 } , } \\ & { = 2 \exp ( - 2 \lambda \hat { \nu } _ { i } ^ { 2 } \epsilon ^ { 2 } j ) . } \end{array}
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
where we used union bound and Chernoff inequalities. Setting this to $\delta$ , we get
|
| 337 |
+
|
| 338 |
+
$$
|
| 339 |
+
s = \frac { t ^ { 2 } } { 2 \lambda ^ { 2 } \epsilon ^ { 2 } } \log \left( \frac { 2 t } { \delta } \right) .
|
| 340 |
+
$$
|
| 341 |
+
|
| 342 |
+
From Lemma 10.1, we know that the optimal generator must satisfy $p _ { y } ^ { g } = \hat { p } _ { y } ^ { r }$ . By invertibility of $A$ , we know that $p _ { x } ^ { g } = A ^ { - 1 } p _ { y } ^ { g }$ , and that $p _ { x } ^ { r } = A ^ { - 1 } p _ { y } ^ { r }$ . Thus, we obtain that with probability $\geq 1 - \delta$ ,
|
| 343 |
+
|
| 344 |
+
$$
|
| 345 |
+
\begin{array} { r l } { 2 d _ { T V } ( p _ { z } ^ { \theta } , p _ { x } ^ { \theta ^ { \prime } } ) = \| p _ { x } ^ { \theta } - p _ { x } ^ { \theta ^ { \prime } } \| _ { 0 } , } & { } \\ & { \leq \sqrt { t } \| p _ { x } ^ { \theta ^ { \prime } } - p _ { x } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { = \sqrt { t } \| A ^ { - } \boldsymbol { b } _ { y } ^ { \theta ^ { \prime } } - p _ { x } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { = \sqrt { t } \| A ^ { - } \boldsymbol { b } _ { y } ^ { \theta ^ { \prime } } - p _ { x } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { = \sqrt { t } \| A ^ { - 1 } ( p _ { y } ^ { \theta ^ { \prime } } + \bar { p } _ { y } ^ { \theta ^ { \prime } } - p _ { y } ^ { \theta ^ { \prime } } ) - p _ { x } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { = \sqrt { t } \| p _ { x } ^ { \theta } + A ^ { - 1 } ( \bar { p } _ { y } ^ { \theta ^ { \prime } } - p _ { y } ^ { \theta ^ { \prime } } ) - p _ { z } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { \leq \sqrt { t } \| A ^ { - 1 } \| _ { 2 } \| \bar { p } _ { y } ^ { \theta ^ { \prime } } - p _ { y } ^ { \theta ^ { \prime } } \| _ { 2 } , } \\ & { \leq \sqrt { t } \frac { 1 } { \lambda } \frac { \lambda \epsilon } { \sqrt { t } } , } \\ & { = \epsilon , } \end{array}
|
| 346 |
+
$$
|
| 347 |
+
|
| 348 |
+
Now we turn to the specific case of Block-Pixels measurement. We proceed by dividing the set of all possible $| P | ^ { n }$ images into $n + 1$ classes. The $i \cdot$ -th class has those images that have exactly $i$ pixels with zero value. We sort the images according to their class number (arbitrary ordering within the class) and consider the transition matrix $A$ . Note that given an image from class $i$ it must have $j \geq i$ zero pixels after the measurement. Also, no image in class $i$ can produce another image in the same class after measurements. Thus, the transition matrix is lower triangular.
|
| 349 |
+
|
| 350 |
+
Since each pixel is blocked independently with probability $p$ and since there are $n$ pixels, the event that no pixels are blocked occurs with probability $\left( 1 - p \right) ^ { n }$ . Thus, every image has at least $\left( 1 - p \right) ^ { n }$ chance of being unaffected by the measurements. Any unaffected image maps to itself and thus forms diagonal entries in the transition matrix. So, we observe that the diagonal entries of the transition matrix are strictly positive and their minimum value is $\left( 1 - p \right) ^ { n }$ .
|
| 351 |
+
|
| 352 |
+
For a triangular matrix, the diagonal entries are precisely the eigenvalues and hence we have proved that $A$ is invertible and the smallest eigenvalue is $( 1 { \overset { \cdot } { - } } p ) ^ { n }$ . Combined with the result above, by setting $\lambda = ( 1 - p ) ^ { n }$ , and $t = | P | ^ { n }$ , we conclude the proof.
|
| 353 |
+
|
| 354 |
+
# APPENDIX B
|
| 355 |
+
|
| 356 |
+
# 10.5 MODEL ARCHITECTURE DETAILS
|
| 357 |
+
|
| 358 |
+
The DCGAN model on MNIST follows the architecture in [Radford et al. (2015)]. The noise input to the generator $( Z )$ has 100 dimensions where each coordinate is sampled IID Uniform on $[ - 1 , 1 ]$ . The generator uses two linear layers followed by two deconvolutional layers. The labels are concatenated with the inputs of each layer. The discriminator uses two convolutional layers followed by two linear layers. As with the generator, the labels are concatenated with the inputs of each layer. Batch-norm is used in both generator and the discriminator.
|
| 359 |
+
|
| 360 |
+
The WGANGP model on MNIST follows the architecture in [Gulrajani et al. (2017)]. The generator takes in a latent vector of 128 dimensions where each coordinate is sampled IID Uniform on $[ - 1 , 1 ]$ . The generator then applies one linear and three deconvolutional layers. The discriminator uses three convolutional layers followed by one linear layer. Batch-norm is not used.
|
| 361 |
+
|
| 362 |
+
The unconditional DCGAN model on celebA follows the architecture in [Radford et al. (2015)]. The latent vector has 100 dimensions where each coordinate is Uniform on $[ - 1 , 1 ]$ . The generator applies one linear layer followed by four deconvolutional layers. The discriminator uses four convolutional layers followed by a linear layer. Batch-norm is used in both generator and the discriminator.
|
| 363 |
+
|
| 364 |
+
The ACWGANGP model on CIFAR-10 follows the residual architecture in [Gulrajani et al. (2017)]. The latent vector has 128 dimensions where each coordinate is sampled from IID standard Gaussian distribution. The generator has a linear layer followed by three residual blocks. Each residual block consists of two repetitions of the following three operations: conditional batch normalization followed by a nonlinearity followed by an upconvolution layer. The residual blocks are followed by another conditional batch normalization, a final convolution, and a final tanh non-linearity. The discriminator consists of one residual block with two convolutional layers followed by three residual blocks, and a final linear layer.
|
| 365 |
+
|
| 366 |
+
# APPENDIX C
|
| 367 |
+
|
| 368 |
+
Here, we present some more results for various measurement models.
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
Figure 9: Results on MNIST with (a) Keep-Patch, and (b) Extract-Patch
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
Figure 10: Results with Convolve+Noise on MNIST. Each image is blurred with a Gaussian kernel of radius 1 pixel and noise of std dev $\sigma$ is added. Rows from top to bottom have $\sigma = 0 . 0$ , 0.1, 0.2, and 0.5 respectively. Columns from left to right are: (1) Samples of lossy measurements. (2) Samples produced by ignore baseline. (3) Samples produced by unmeasure-wiener-deconvolution baseline. (4) Samples produced by our model.
|
| 375 |
+
|
| 376 |
+

|
| 377 |
+
Figure 11: Results with Block-Pixels on MNIST. Rows from top to bottom have blocking probability 0.1, 0.5, 0.8, 0.9, 0.95 and 0.99 respectively. Columns from left to right are: (1) Samples of lossy measurements. (2) Samples produced by unmeasure-blur baseline. (3) Samples produced by unmeasure-inpaint-total-variation baseline. (4) Samples produced by our model.
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 12: Results with Block-Patch on MNIST. (left) Samples of lossy measurements. A randomly chosen $1 4 \times 1 4$ patch is set to zero. (middle) Samples produced by unmeasure-navier-stokesinpainting baseline. (right) Samples produced by the our model.
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
Figure 13: Results with Convolve+Noise on celebA. Each image is blurred with a Gaussian kernel of radius 1 pixel and noise of std dev $\sigma$ is added. Rows from top to bottom have $\sigma = 0 . 0$ , 0.1, and 0.2 respectively. The left column shows samples of lossy measurements. The right column shows samples produced by our model.
|
| 384 |
+
|
| 385 |
+

|
| 386 |
+
Figure 14: Results with Block-Pixels on celebA. Rows from top to bottom have blocking probability 0.5, 0.8, 0.9, and 0.98 respectively. The left column shows samples of lossy measurements. The right column shows samples produced by our model.
|
| 387 |
+
|
| 388 |
+

|
| 389 |
+
Figure 15: Results with Block-Pixels on CIFAR-10. Rows from top to bottom have blocking probability 0.1, 0.5, 0.9, and 0.95 respectively. Columns from left to right are: (1) Samples of lossy measurements. (2) Samples produced by unmeasure-blur baseline. (3) Samples produced by our model.
|
| 390 |
+
|
| 391 |
+

|
| 392 |
+
Figure 16: MNIST with WGANGP (left) Robustness experiment with Block-Pixels measurement (right) Compressed sensing using AmbientGAN. Vertical bars indicate $9 5 \%$ confidence intervals.
|
| 393 |
+
|
| 394 |
+
# 10.6 ROBUSTNESS TO MEASUREMENT MODEL MISMATCH
|
| 395 |
+
|
| 396 |
+
So far, in our analysis and experiments, we assumed that the parametric form of the measurement function and the distribution of those parameters is exactly known. This was then used for simulating the stochastic measurement process. Here, we consider the case where the parameter distribution is only approximately known. In this case, one would like the training process to be robust, i.e. the quality of the learned generator to be close to the case where the parameter distribution is exactly known. Through the following experiment, we empirically demonstrate that the AmbientGAN approach is robust to systematic mismatches in the parameter distribution of the measurement function.
|
| 397 |
+
|
| 398 |
+
Consider the Block-Pixels measurement model (Section 4). We use the MNIST dataset. Pixels are blocked with probability $p ^ { * } = 0 . 5$ to obtain a dataset of measurements. For several values of blocking probability $p$ for the measurement function applied to the output of the generator, we train AmbientGAN models with this dataset. After training, we compute the inception score of the learned generators and plot it as a function of $p$ in Fig. 16 (left). We note that the plot peaks at $p = p ^ { * } = 0 . 5$ and gradually drops on both sides. This suggests that our method is somewhat robust to parameter distribution mismatch.
|
| 399 |
+
|
| 400 |
+
# 10.7 COMPRESSED SENSING USING AMBIENTGAN
|
| 401 |
+
|
| 402 |
+
We provide further evidence that the generator learned through AmbientGAN approach captures the data distribution well. Generative models have been shown to improve sensing over sparsitybased approaches [Bora et al. (2017)]. We attempt to use the GAN learned using our procedure for compressed sensing.
|
| 403 |
+
|
| 404 |
+
We trained an AmbientGAN with Block-Pixels measurement model (Section 4) on MNIST with $p = 0 . 5$ . Using the learned generator, we followed the rest of the procedure in [Bora et al. (2017)] using their code3. Fig. 16 (right) shows a plot of reconstruction error vs the number of measurements, comparing Lasso with AmbienGAN. Thus, we observe a similar reduction in the number of measurements while using AmbientGAN trained with corrupted samples instead of a regular GAN trained with fully observed samples.
|
md/train/LJjC6DmSkgT/LJjC6DmSkgT.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Continual Learning via Local Module Composition
|
| 2 |
+
|
| 3 |
+
Oleksiy Ostapenko12 Pau Rodríguez3 Massimo Caccia123 Laurent Charlin145 1Mila - Quebec AI Institute, 2Université de Montréal, 3ServiceNow, 4HEC Montréal, 5Canada CIFAR AI Chair
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Modularity is a compelling solution to continual learning (CL), the problem of modeling sequences of related tasks. Learning and then composing modules to solve different tasks provides an abstraction to address the principal challenges of CL including catastrophic forgetting, backward and forward transfer across tasks, and sub-linear model growth. We introduce local module composition (LMC), an approach to modular CL where each module is provided a local structural component that estimates a module’s relevance to the input. Dynamic module composition is performed layer-wise based on local relevance scores. We demonstrate that agnosticity to task identities (IDs) arises from (local) structural learning that is module-specific as opposed to the task- and/or model-specific as in previous works, making LMC applicable to more CL settings compared to previous works. In addition, LMC also tracks statistics about the input distribution and adds new modules when outlier samples are detected. In the first set of experiments, LMC performs favorably compared to existing methods on the recent Continual Transfer-learning Benchmark without requiring task identities. In another study, we show that the locality of structural learning allows LMC to interpolate to related but unseen tasks (OOD), as well as to compose modular networks trained independently on different task sequences into a third modular network without any fine-tuning. Finally, in search for limitations of LMC we study it on more challenging sequences of 30 and 100 tasks, demonstrating that local module selection becomes much more challenging in presence of a large number of candidate modules. In this setting best performing LMC spawns much fewer modules compared to an oracle based baseline, however it reaches a lower overall accuracy. The codebase is available under https://github.com/oleksost/LMC.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
The goal of continual learning (CL) is to learn efficiently from a non-stationary stream of tasks without (catastrophically) forgetting previous tasks [62]. CL is often modeled as a trade-off between knowledge retention (stability) and knowledge expansion (plasticity) [26, 64]. Parameter sharing can provide control over this trade-off. For example, learning a single model shared across tasks results in better knowledge transfer and faster learning at the expense of forgetting [46, 57]. Conversely, learning a separate model per task eliminates forgetting but minimizes transfer and data efficiency [2, 41].
|
| 12 |
+
|
| 13 |
+
Modular learning aims at balancing transfer and forgetting by learning a set of specialized modules that can be recomposed to solve (new) tasks while only updating a subset of relevant modules or adding new modules [6, 47, 27]. In principle, a modular learner capable of composing modules in meaningful structures can provide additional benefits including (i) computational gains due to only executing modules that are relevant to a task [47, 4]; (ii) memory gains due to instantiating a sub-linear number of modules w.r.t. the number of tasks; (iii) systematic [8] and out-of-distribution (OOD) generalization [18] through knowledge recombination; and (iv) biological plausibility [91, 90, 96].
|
| 14 |
+
|
| 15 |
+
Designing modular methods for CL comes with two main challenges. The first is how and when to add new modules to ensure sufficient plasticity to learn new tasks. Existing modular methods use greedy search variants, expanding the model when it improves validation performance [92, 63]. The second challenge is how to compose that is, retrieve task-specific structural knowledge given a new task (previously seen or not).
|
| 16 |
+
|
| 17 |
+
Existing methods rely on a task’s identifier (ID) to retrieve task-specific structural knowledge, which comes either in the form of an optimal module layout [92] or as a model- and task-specific controller network that generates modular layouts [63]. Unfortunately, in many realistic CL scenarios task identities are unavailable at test time [23, 35, 14]. Lifting this limitation is challenging since standard mechanisms for task inference, for example, leveraging a task-inference model, could be subject to forgetting themselves.
|
| 18 |
+
|
| 19 |
+
To address both challenges, we equip each module with a local structural component that predicts a score indicating how relevant the module is for a given input. In-distribution inputs result in high scores, while out-of-distribution inputs result in low scores. In other words, modules self-determine their relevance given an input.
|
| 20 |
+
|
| 21 |
+
This local component is used for composing modules: for each datum, modules are combined at each layer according to their normalized scores without requiring a task’s ID (§3). The local component is also used for module expansion: a new module is instantiated if all the current modules flag their input as being locally out-of-distribution (§3.1). Further, new shallow modules (i.e. closer to the input) are first trained in a projection phase to maximize the relatedness scores of subsequent, deeper, modules (§3.2). This process projects the output of new modules into the representation space expected by the subsequent modules and ensures the compatibility between low- and high-level modules.
|
| 22 |
+
|
| 23 |
+
In a set of studies, we explore the performance and versatility of our local structural approach, which we call Local Module Composer (LMC). First, we show that LMC reaches superior or comparable performance to existing modular and non-modular methods without requiring task IDs at test time using the Continual Transfer Learning (CTrL) benchmark, designed to evaluate transfer and forgetting in CL [92] (§4.1). Then, we demonstrate how LMC, relying on its projection phase, can solve out-ofdistribution (OOD) tasks not seen during the continual training (§4.2). We also show it is possible to combine modules from independently trained models into a new model to solve tasks seen by each of the independent models without any finetuning (§4.3). Finally, an analysis of longer task sequences (30 and 100 tasks) reveals that LMC tends to spawn much fewer modules to reach good performance than the fully task-aware MNTDP [92] counterpart. However, LMC reaches slightly lower accuracy on longer sequences than MNTDP, which highlights the difficulty of automatic task-ID agnostic module selection in the presence of a large number of candidate modules. In Appendix F we demonstrate the applicability of LMC in the meta-continual learning (meta-CL) setting, a task-agnostic setting by nature.
|
| 24 |
+
|
| 25 |
+
We highlight that by relying on a local (per-module) structural component, LMC offers a modular CL approach that i) does not require task IDs during test in the standard task incremental settings; ii) balances parameter sharing to yield strong CL performances compared to baselines that require access to the task ID; iii) in our experiments instantiates a sub-linear number of modules; iv) permits recombination of modules at test time enabling OOD generalization as well as (v) the ability to combine independently trained models in a third model without fine-tuning. Notably, the OOD generalization is only possible if the agent is task-agnostic in the module selection process, since OOD tasks were not observed at training, the learner has to interpolate between the learned tasks, and a (categorial) task ID is of no use.
|
| 26 |
+
|
| 27 |
+
# 2 Background: Modular Continual Learning
|
| 28 |
+
|
| 29 |
+
Let $\mathcal { F } ( x ; \theta ) : \mathcal { X } \mathcal { Y }$ be a learner parametrized with a set of parameters $\theta$ . In task-incremental CL, the learner is exposed to a sequence of tasks. Each task is composed of a training set $D _ { t }$ of $( x , y )$ pairs and a task identifier (ID) $t$ [92, 46]. The goal is to learn an optimal $\theta ^ { * }$ that minimizes the loss $\mathcal { L }$ for all observed tasks:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\theta ^ { * } = \underset { \theta } { \arg \operatorname* { m i n } } \sum _ { t = 1 } ^ { T } \mathbb { E } _ { ( x , y ) \sim D _ { t } } [ \mathcal { L } ( \mathcal { F } ( x ; \theta ) , y ) ] .
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
Figure 1: Modular Layer Scheme. Each black rectangle is a module. Inside each module, the functional component receives the input $x ^ { ( l - 1 ) }$ and feeds its output to the structural component . m The output of the structural component is used to calculate the importance score $\gamma _ { m } ^ { ( l ) }$ using Eq. 5, which are normalized to obtain the attention vector . The layer output is the weighted sum of the functional outputs of each module. $\mu$ and $\sigma$ are the running mean and variance of the scores $\gamma _ { m } ^ { ( l ) }$ used to detect outlier inputs and to trigger module addition.
|
| 37 |
+
|
| 38 |
+
The parameter sharing trade-off between tasks can be addressed through different architectural design choices for $\mathcal { F }$ . For example, $\mathcal { F }$ can be a monolithic network that shares parameters $\theta$ across all tasks. Most existing task incremental CL methods use a task-specific output head, requiring the task ID to select the output head corresponding to the task at hand [46, 87, 1].
|
| 39 |
+
|
| 40 |
+
At the other end of the spectrum are the expert based solutions that learn an independent model, a.k.a.
|
| 41 |
+
expert, for each task [2, 83]. In this case, each expert trains task-specific parameters $\boldsymbol { \theta } = \{ \boldsymbol { \theta } ^ { ( t ) } \} _ { t = 1 } ^ { T }$ .
|
| 42 |
+
|
| 43 |
+
To balance parameter sharing and transfer, modular methods organize their parameters in a series of modules $M = \{ m _ { k } ^ { ( l ) } \}$ with parameters $\boldsymbol { \theta } = \{ \boldsymbol { \theta } _ { k } ^ { ( l ) } \}$ , where $\theta _ { k } ^ { ( l ) }$ denotes the parameters of module at layer in $\mathcal { F }$ . In general, a module can be any parametric function. In our experiments, unless otherwise stated, a module consists of a single convolutional layer followed by batch-norm, ReLU activation, and a max-pooling operation.
|
| 44 |
+
|
| 45 |
+
Modules can be composed conditioned on a sample, a batch of samples, or a task. Let $\psi$ denote a specific composition of modules that gives rise to a distinct prediction function; we make this dependence explicit: $\mathcal { F } ( x ; \theta , \psi )$ . Importantly, sharing modules across tasks should lead to desirable transfer properties.
|
| 46 |
+
|
| 47 |
+
Veniat et al. [92] frames modular CL as finding an optimal layout $\psi ^ { ( t ) }$ for each task, where each layout selects a single module per layer per task (hard selection):
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\theta ^ { * } , \Psi ^ { * } = \underset { \theta , \Psi } { \arg \operatorname* { m i n } } \sum _ { t = 1 } ^ { T } \mathbb { E } _ { ( x , y ) \sim D _ { t } } [ \mathcal { L } ( \mathcal { F } ( x ; \theta , \psi ^ { ( t ) } ) , y ) ] .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
In this case the set of layouts $\Psi = \{ \psi ^ { ( t ) } \}$ grows with the number of tasks, while modules can be reused across different task-specific layouts resulting in sub-linear growth pattern. They design a method called MNTDP to search the exponentially large space of modular layouts by only considering layouts resulting from adding a new module per layer to the best prior path (past task’s path with the highest nearest neighbor accuracy on a new task) starting at the top layer. This solution relies on task IDs to retrieve $\psi ^ { ( t ) }$ at test time.
|
| 54 |
+
|
| 55 |
+
Another way of composing modules uses dynamic routing [63, 82, 47, 65]. The module layout is generated by a structural function $\psi = s ( x )$ , hence different inputs take different routes through $\mathcal { F }$ . It is standard to approximate the structural function using a neural network $\psi = s ( x ; \phi )$ with structural parameters $\phi$ . This framework has been applied to CL in [63] by learning a separate structural function per task $\psi ^ { ( t ) } = s ( x ; \phi ^ { ( t ) } )$ . The task IDs are used to retrieve the correct structural function:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\theta ^ { * } , \Phi ^ { * } = \underset { \theta , \Phi } { \arg \operatorname* { m i n } } \sum _ { t = 1 } ^ { T } \mathbb { E } _ { ( x , y ) \sim D _ { t } } [ \mathcal { L } ( \mathcal { F } ( x ; \theta , s ( x ; \phi ^ { ( t ) } ) ) , y ) ] ,
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
where $\Phi = \{ \phi ^ { ( t ) } \}$ is the set of structural parameters for all tasks.
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 2: Two-phase training. Each module contains a functional (rectangle) and structural (trapezoid) component. Their color intensity denotes the strength of their activation. Components with dashed contours are trained, solid contours represent fixed components, arrows show the gradient flow: black arrow — functional signal, pink — structural signal. (A) All modules are trained on task 0. (B) Task 1 arrives, a new module is added at layer 1, which is first trained to project its output into the representation of the modules above via the structural signal (the functional signal is optional). No module addition is allowed during the projection phase. (C) Module addition is allowed again, both signals are used for training. (D) As task 3 arrives, a new module is added at layer 1 again, projection phase is triggered. (E) A new module is added at the layer 2, both new modules are now trained in the second projection phase. (F) Both new modules are trained using both signals.
|
| 65 |
+
|
| 66 |
+
The above methods require task IDs at both training and testing time. Next we introduce our modular CL approach that only relies on task IDs during training.
|
| 67 |
+
|
| 68 |
+
# 3 Local Module Composer (LMC)
|
| 69 |
+
|
| 70 |
+
We propose LMC, a modular approach where each module consists of a functional component $f ( x ; \theta _ { m } ^ { ( \bar { l } ) } )$ and a structural component $s ( x ; \phi _ { m } ^ { ( l ) } )$ , see Figure 1. The functional components are responsible for learning to solve the prediction task and are trained via the usual task loss $\mathcal { L }$ (e.g. cross-entropy loss for classification). The structural components receive the corresponding functional output as their input (see Figure 1) and are responsible for dynamic routing through $\mathcal { F }$ . Structural parameters $\phi$ are trained using a structural loss $\bar { \mathcal { L } } ^ { ( s t . ) }$ computed locally at each module.
|
| 71 |
+
|
| 72 |
+
Intuitively, the structural component of a module should serve as a density estimator of the outputs of the functional component. The module’s contribution to the layer’s output is proportional to the likelihood of the input sample under the estimated density. In our instantiation, the structural component produces a relatedness score: a lower score for inputs that are more likely to belong to the distribution on which a given module was trained, and a higher score for inputs that are out-of-distribution for the given module. Hence, the likelihood of the input sample is approximated by the negative relatedness score.
|
| 73 |
+
|
| 74 |
+
Given an input data sample $x ^ { ( 0 ) } = x$ , the output $x ^ { ( l ) }$ of a layer $l$ is defined as the weighted sum of the functional outputs of all $| M ^ { ( l ) } |$ local modules and used as input to the subsequent layer $l + 1$ :
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\boldsymbol { x } ^ { ( l ) } = \sum _ { m = 1 } ^ { | M ^ { ( l ) } | } w _ { m } ^ { ( l ) } \cdot f ( \boldsymbol { x } ^ { ( l - 1 ) } ; \boldsymbol { \theta } _ { m } ^ { ( l ) } ) .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
The functional output of the network is equal to the output of the final layer: $\mathcal { F } ( x ; \theta , \phi ) = x ^ { ( L ) }$ . In the last layer $\mathcal { F }$ implements a single output-head per task. At training time, the task ID is available and we update only the output-head corresponding to the currently learned task. At test time, the task ID is not available and we select the output head with the highest activation weight $w _ { m } ^ { ( L ) }$ , i.e., the last layer performs hard module selection.
|
| 81 |
+
|
| 82 |
+
The module activation weights $w _ { m } ^ { ( l ) }$ are computed by normalizing the vector of local relatedness scores $\gamma ^ { ( l ) } \in \mathbb { R } ^ { | M ^ { ( l ) } | }$ . Each element of $\gamma ^ { ( l ) }$ is obtained from the negative structural loss which approximates the likelihood of each module:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l } & { \gamma _ { m } ^ { ( l ) } = - \mathcal { L } ^ { ( s t . ) } \Bigl ( s \bigl [ f ( x ^ { ( l - 1 ) } ; \theta _ { m } ^ { ( l ) } ) ; \phi _ { m } ^ { ( l ) } \bigr ] \Bigr ) , } \\ & { w _ { m } ^ { ( l ) } = \mathrm { s o f t m a x } ( \gamma ^ { ( l ) } ) _ { m } . } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
Modules with lower structural loss get higher activation weights. Note that in practice, it can be useful to bias the module selection towards the expected module selection in a batch, assuming that samples within a batch are likely to belong to the same task. We discuss this point further in $\ S \operatorname { A . 1 }$ .
|
| 89 |
+
|
| 90 |
+
Instead of using the softmax function, it is possible perform hard selection taking the module with the highest score [82], or alternatively selecting top-k modules [88]. In both cases, LMC’s structural parameters stay differentiable due to the local nature of structural learning. Note that in the case of global structural objective, hard module selection would require applying tools for non-differentiable learning such as Expectation Maximization [47] or reinforcement-learning based methods [82, 5].
|
| 91 |
+
|
| 92 |
+
The overall LMC objective consists of optimizing both functional and structural losses:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\theta ^ { * } , \phi ^ { * } = \underset { \theta , \phi } { \operatorname { a r g m i n } } \sum _ { t = 1 } ^ { T } \mathbb { E } _ { ( x , y ) \sim D _ { t } } \Big [ \mathcal { L } \big ( \mathcal { F } ( x ; \theta , \phi ) , y \big ) + \sum _ { l = 0 } ^ { L } \sum _ { m = 0 } ^ { | M ^ { ( l ) } | } \mathcal { L } _ { m } ^ { ( s t . ) } \big ( s [ f ( x ^ { ( l - 1 ) } ; \theta _ { m } ^ { ( l ) } ) ; \phi _ { m } ^ { ( l ) } ] \big ) \Big ] .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
As in [92], learning is performed w.r.t. only newly introduced modules to prevent forgetting.
|
| 99 |
+
|
| 100 |
+
Structural component. We test two instantiations of the structural component $s$ and loss $\mathcal { L } _ { m } ^ { ( s t . ) }$ . In the first one, $s$ is an invertible neural network [80]. Here we use the invertible architecture proposed by Dinh et al. [21]. As shown by Hocquet et al. [37], for this invertible architecture the structural objective can be defined as from collapsing to an all-ze $\mathcal { L } _ { m } ^ { ( s t . ) } ( x ) = | | x | | _ { 2 }$ . Intuitively, an invertible architecture prevents $\mathcal { L } _ { m } ^ { ( s t . ) }$
|
| 101 |
+
|
| 102 |
+
In the second instantiation, $s$ and $f$ form an autoencoder and $\mathcal { L } _ { m } ^ { ( s t . ) } ( x ) = | | x ^ { ( l - 1 ) } - x | | ^ { 2 }$ is the reconstruction error with respect to the module’s input $x ^ { ( l - 1 ) }$ . Aljundi et al. [2] used a similar idea was for selecting the most relevant expert network conditioned on a task. Unless stated otherwise, modules in the feature extractor use the autoencoder as their structural component, while output heads use invertible $s$ — these combinations worked well in practice.
|
| 103 |
+
|
| 104 |
+
# 3.1 Expansion strategy
|
| 105 |
+
|
| 106 |
+
It is necessary to expand $\mathcal { F }$ as new tasks arrive to acquire new knowledge. A new module is added to a layer when all modules in this layer detect an outlier input. To this end, we track the running statistics of the relatedness score $\gamma$ for each module — mean $\mu$ and variance $\sigma$ (see Figure 1), and calculate a z-score for each sample in the batch and each module at a layer:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
z _ { m } = \frac { w _ { m } - \mu _ { m } } { \sigma _ { m } } .
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
An input is considered an outlier if its $\mathbf { Z }$ -score is larger than a predefined threshold $z ^ { \prime }$ (see Appendix B.6 for an ablation study of $z ^ { \prime }$ values). The expansion decision can be made on the per-sample (i.e., if an outlier sample is detected) or a per-batch basis (i.e., $z$ is averaged over the mini-batch). Unless stated otherwise, in our experiments, the decision was made on a per-batch basis. Additionally, at training the parameters of existing modules are fixed once the task changes. If during a forward pass through $\mathcal { F }$ module addition is triggered at multiple layers, we start adding modules at the layer closest to the input.
|
| 113 |
+
|
| 114 |
+
# 3.2 Training
|
| 115 |
+
|
| 116 |
+
Each module in LMC receives two types of learning signal: a structural signal resulting from minimizing $\mathcal { L } _ { m } ^ { ( s t . ) }$ , and a functional signal resulting from minimizing the global functional loss $\mathcal { L }$ All structural components $s$ are trained only with the structural signal that is calculated locally to each module.
|
| 117 |
+
|
| 118 |
+
The training of functional components proceeds in two phases: projection and accumulation. Whenever the expansion strategy triggers the addition of a new module (i.e., $z _ { m } > z ^ { \prime } \forall m \in$ $\{ 0 , \ldots , | M ^ { ( l ) } | \} )$ , starting with layers closest to the input, LMC initiates the projection phase. During this phase, the new module is trained to minimize the structural loss from all the layers above and no new-module addition is allowed. This procedure makes the representation of new modules compatible with subsequent modules and enables their composition. This procedure “encourages” already-learned modules to be reused, preventing over-spawning new modules. The functional signal is optional during projection (we kept it in all experiments unless otherwise stated).
|
| 119 |
+
|
| 120 |
+
Table 1: CTrL results: we report accuracy $( \uparrow \mathcal { A } )$ , forgetting $( \uparrow \mathcal { F } )$ with standard deviations calculated over 6 different runs. We report the mean number of modules (M) over these runs, where ∗ marks methods with fixed capacity. The first block comprises a set of standard CL baselines including regularization and replay based methods. The second block are the modular methods, third – modular and replay based methods that are task ID agnostic (A), and the last block are the two finetuning baselines. (H) indicates hard module selection. (S) indicates single-head as detailed in the main text.
|
| 121 |
+
|
| 122 |
+
<table><tr><td></td><td colspan="3">si</td><td colspan="3">S+</td><td colspan="3">Sin</td><td colspan="3">Sout</td><td colspan="3">Spl</td></tr><tr><td>MODEL</td><td>A</td><td>F</td><td>M</td><td>A</td><td>F</td><td>M</td><td>A</td><td>F</td><td>M</td><td>A</td><td>F</td><td>M</td><td>A</td><td>F</td><td>M</td></tr><tr><td>HAT[87]</td><td>63.7±0.7</td><td>-1.3±0.6</td><td>24*</td><td>61.4±0.5</td><td>-0.2±0.2</td><td>24*</td><td>50.1±0.8</td><td>0.0±0.1</td><td>24*</td><td>61.9±1.3</td><td>-3.2±1.3</td><td>24*</td><td>61.2±0.7</td><td>-0.1±0.2</td><td>20*</td></tr><tr><td>EWC[46]</td><td>62.7±0.7</td><td>-3.6±0.9</td><td>24*</td><td>53.4±1.8</td><td>-2.3±0.4</td><td>24*</td><td>56.3±2.5</td><td>-9.1±3.3</td><td>24*</td><td>62.5±0.9</td><td>-3.6±0.9</td><td>24*</td><td>54.2±3.1</td><td>-4.2±2.7</td><td>20*</td></tr><tr><td>O-EWC[85]</td><td>62.0±0.7</td><td>-3.2±0.7</td><td>24*</td><td>54.6±0.7</td><td>-1.3±1.0</td><td>24*</td><td>54.2±3.1</td><td>-10.8±3.1</td><td>24*</td><td>62.4±0.6</td><td>-3.0±0.9</td><td>24*</td><td>52.3±1.4</td><td>-5.7±1.3</td><td>20*</td></tr><tr><td>ER[81,16]</td><td>60.6±0.7</td><td>-2.1±0.9</td><td>4*</td><td>63.0±0.6</td><td>3.8±0.8</td><td>4*</td><td>63.8±1.4</td><td>-1.9±0.6</td><td>4*</td><td>60.7±1.0</td><td>-1.5±0.5</td><td>4*</td><td>60.5±1.0</td><td>0.5±0.9</td><td>4*</td></tr><tr><td>EXPERTS</td><td>62.7±0.9</td><td>0.0</td><td>24</td><td>63.2±0.8</td><td>0.0</td><td>24</td><td>63.1±0.7</td><td>0.0</td><td>24</td><td>63.1±0.7</td><td>0.0</td><td>24</td><td>63.9±0.5</td><td>0.0</td><td>20</td></tr><tr><td>MNTDP[92]</td><td>66.3±0.8</td><td>0.0</td><td>13.7</td><td>62.6±0.7</td><td>0.0</td><td>21.0</td><td>67.9±0.9</td><td>0.0</td><td>16.0</td><td>65.8±0.9</td><td>0.0</td><td>15.0</td><td>64.0±0.2</td><td>0.0</td><td>17.2</td></tr><tr><td>SG-F[63]</td><td>63.6±1.5</td><td>0.0</td><td>14.7</td><td>61.5±0.6</td><td>0.0</td><td>20.8</td><td>65.5±1.8</td><td>0.0</td><td>17.5</td><td>64.1±1.3</td><td>0.0</td><td>16.2</td><td>62.0±1.3</td><td>0.0</td><td>16.0</td></tr><tr><td>LMC(- A)</td><td>66.6±1.5 -0.0±0.1</td><td></td><td>15.3</td><td>60.1±2.7</td><td>-1.4±2.4</td><td>21.3</td><td>69.5±1.0</td><td>0.0±0.1</td><td>20.0</td><td>66.7±2.2</td><td>-0.1±0.1</td><td>15.5</td><td>61.6±4.8</td><td>-3.5±3.1</td><td>18.2</td></tr><tr><td>MNTDP(A)</td><td>41.9±2.5</td><td>-2.8±0.6</td><td>14.8</td><td>43.2±1.3-10.8±2.020.7|3</td><td></td><td></td><td></td><td>|32.7±13.6-15.2±13.2]</td><td>17.2</td><td>37.9±2.7</td><td>-5.8±3.5</td><td>13.3</td><td>35.1±3.6</td><td>5-16.4±4.6 15.8</td><td></td></tr><tr><td>LMC(A)</td><td>67.2±1.5</td><td>-0.5±0.4</td><td>15.7</td><td>62.2±4.5</td><td>2.3±1.6</td><td>22.3</td><td>68.5±1.7</td><td>-0.1±0.1</td><td>19.7</td><td>55.1±3.4</td><td>-7.1±4.0</td><td>15.5</td><td>63.5±1.9</td><td>-1.0±1.5</td><td>19.0</td></tr><tr><td>LMC(A,H)</td><td>64.9±1.5 -0.2±0.2</td><td></td><td>16.2</td><td>55.8±2.5</td><td>-0.3±1.2</td><td>15.3</td><td>67.6±2.7</td><td>-0.8±1.0</td><td>21.5</td><td>54.2±3.6</td><td>-2.9±2.0</td><td>15.9</td><td>53.8��5.7</td><td>3.1±5.5</td><td>10.8</td></tr><tr><td>SG-F(A)</td><td>29.5±3.5 -35.3±4.0 14.3</td><td></td><td></td><td>20.4±4.4</td><td>-39.3±6.716.0</td><td></td><td>24.4±5.6</td><td>-38.7±4.0</td><td>18.7</td><td>30.5±4.5</td><td>-34.0±5.512.2</td><td></td><td>19.4±1.0</td><td>-41.8±1.6</td><td>15.5</td></tr><tr><td>ER(A,S)[81,16]</td><td>60.4±1.0 -0.5±0.7</td><td></td><td>4*</td><td>65.3±0.9</td><td>6.0±1.0</td><td>4*</td><td>58.8±3.2</td><td>-4.2±3.7</td><td>4*</td><td>47.6±1.5</td><td>-7.6±1.6</td><td>4*</td><td>58.6±1.3</td><td>-1.2±1.5</td><td>4*</td></tr><tr><td>FINETUNE</td><td>47.5±1.5 -14.9±1.4</td><td></td><td>4*</td><td>31.4±3.7 -29.3±3.84*</td><td></td><td></td><td>39.7±5.0</td><td>-23.9±5.7</td><td>4*</td><td>45.4±4.0 -15.5±3.7</td><td></td><td>4*</td><td>29.1±3.1 - 29.2±3.2</td><td></td><td>4*</td></tr><tr><td>FINETUNE L</td><td>52.1±1.4 -15.7±1.7 24*</td><td></td><td></td><td>38.2±3.2</td><td>2-25.8±3.324*</td><td></td><td>49.3±2.0</td><td>-18.4±2.0</td><td>24*</td><td>49.3±2.1</td><td>-18.4±2.0</td><td>24*</td><td>37.1±2.1</td><td>-26.0±2.2</td><td>20*</td></tr></table>
|
| 123 |
+
|
| 124 |
+
In the accumulation phase, new module addition is allowed again and all non-frozen modules are trained with both signals. The functional components of new modules still receive a signal from the structural components of modules above. The two-phase training is explained schematically in Figure 2 and implementation details are provided in Appendix A.
|
| 125 |
+
|
| 126 |
+
# 4 Experiments
|
| 127 |
+
|
| 128 |
+
We now evaluate the performance, empirical capabilities, and properties of LMC in four different CL settings. First, in $\ S 4 . 1$ we study a standard task-incremental CL setting (task-ID agnostic and aware) using the Continual Transfer Learning Benchmark (CTrL) [92]. Next, we explore the properties of LMC through other CL settings. In $\ S 4 . 2$ we evaluate the continual OOD generalization ability of the proposed LMC. In $\ S 4 . 3$ we show the ability of LMC to combine modules form independently trained models. In Appendix F, we evaluate LMC in the Continual Meta-Learning setting.
|
| 129 |
+
|
| 130 |
+
# 4.1 Continual transfer learning using the CTrL benchmark
|
| 131 |
+
|
| 132 |
+
The CTrL benchmark was proposed to systematically evaluate properties of CL methods with a focus on modular architectures [92]. It consists of 5 streams of visual image classification tasks. The first stream $S ^ { - } = ( t _ { 1 } ^ { + } , t _ { 2 } , t _ { 3 } , t _ { 4 } , t _ { 5 } , t _ { 1 } )$ consists of a sequence of 6 tasks, where the first and last task are the same except the first has an order of magnitude more training samples $( ^ { 6 6 + 7 9 } )$ than other tasks. This stream is designed to evaluate the direct transfer ability of models, i.e. a modular learner should be able to reuse the first task’s modules for the last task. The $S ^ { + } = ( t _ { 1 } , t _ { 2 } , t _ { 3 } , t _ { 4 } , t _ { 5 } , t _ { 1 } ^ { + } )$ stream is similar to $S ^ { - }$ , but now the last task comes with more data than the other tasks (including the first one). Here, the modular learner should be able to update its knowledge, i.e. performance on the first task should improve after learning the last task. In the $S ^ { i n } = ( t _ { 1 } , t _ { 2 } , t _ { 3 } , t _ { 4 } , t _ { 5 } , t _ { 1 } ^ { \prime } )$ stream the first $t _ { 1 }$ and the last $t _ { 1 } ^ { \prime }$ tasks are similar, with a slight input distribution change (e.g. different background color). In the $S ^ { o u t } = ( t _ { 1 } ^ { + } , t _ { 2 } , t _ { 3 } , t _ { 4 } , t _ { 5 } , t _ { 1 } ^ { \prime \prime } )$ stream the first task $t _ { 1 }$ and the last task $t _ { 1 } ^ { \prime \prime }$ differ in the amount of training data and the output distribution, i.e. the labels of the last task are randomly permuted. The plasticity stream $S ^ { p l } = \mathsf { \bar { ( } } t _ { 1 } , t _ { 2 } , t _ { 3 } , t _ { 4 } , t _ { 5 } )$ evaluates the ability to learn a stream of unrelated and potentially interfering tasks, i.e., transfer from unrelated tasks can harm performance. Descriptive statistics for all datasets are in Appendix B.1.
|
| 133 |
+
|
| 134 |
+
We compare to several baselines. Finetune: trains a single model (wider model marked with L) for all tasks. Experts: trains a model per task. We also compare with the several recently proposed modular CL baselines, which achieve competitive results in CTrL and require task IDs at test time. MNTDP [92]: a recent search-based module selection approach described in more detail in $\ S 2$ . MNTDP requires the task ID to retrieve the previously found best structure for each test task. $\mathbf { M N T D P ( A ) }$ : a task ID agnostic version of MNTDP we created, which selects the path with the lowest entropy in the output distribution. SG-F [63]: Soft-gating with fixed modules, a modular method mentioned in $\ S 2$ . It relies on a task-specific structural network that generates soft-gating vectors for each layer of the modular learner and fixes learned modules when new tasks arrive. We slightly adapted the original expansion strategy of SG-F in order to conform to our experimental setup; details are in Appendix B.2. SG- $\mathbf { F } _ { \left( \mathbf { A } \right) }$ : a version of SG-F with a single structural network shared across tasks. HAT[87]: learns attention masks for activations that gate the gradients to prevent forgetting. The task ID is used to select a task-specific attention mask for inference.
|
| 135 |
+
|
| 136 |
+
We also compare to several standard CL methods. EWC [46]: trains a single model for all tasks while applying parameter-regularization to minimize forgetting. O-EWC:[85] online version of EWC that does not require storing a separate approximation of the Fisher information matrix per task. ER [16]: trains a single model while replaying samples from previously seen tasks. The size of the replay buffer corresponds to the memory size of the LMC assuming the worse case linear growth pattern (i.e., LMC with 24 modules on a 6-task sequence). ER(A,S): task ID agnostic version of ER that uses a single output head to classify all classes from all tasks: i.e. after learning stream $S ^ { - }$ the output head has 50 output neurons and the output classes of the last task are considered the same as the ones of the first task.
|
| 137 |
+
|
| 138 |
+
We use several versions of LMC. $\mathbf { L M C } _ { ( \lnot \mathbf { A } ) }$ a version of LMC that uses the task ID for output head selection (not module selection as MNTDP). LMC(A): the default version of LMC. It equips output heads with structural components and is therefore task ID agnostic at test time. LMC(A,H): a version of task ID agnostic LMC that performs hard module selection, i.e., taking the module with the highest relevance score per layer. All methods use the same architecture (described in Appendix A.4) together with the Adam [44] optimizer. HAT is the only method that uses SGD.
|
| 139 |
+
|
| 140 |
+
Similar to Veniat et al. [92], we use the following evaluation metrics: $( \mathcal { A } )$ average accuracy on all seen tasks at the end of CL training; Forgetting $( \mathcal { F } )$ — difference between accuracy at the end of the training and accuracy after learning the task averaged across tasks [60]; Number of modules (M) at the end of the continual training procedure. Formal definitions of all metrics are in Appendix B.3.
|
| 141 |
+
|
| 142 |
+
Table 1 reports performance using the CTrL benchmark. Overall, modular methods tend to outperform ER and the regularization based methods (HAT and EWC). Among the modular methods, soft-gating SG-F(A,F) with a single controller shared among all the tasks performed the worst. This baseline showcases the problem of forgetting in the global structural component (a.k.a. controller) of dynamic routing methods such as the one proposed by Mendez and Eaton [63]. A version of LMC performs the best on the $S ^ { - }$ , $S ^ { i n }$ and $S ^ { o u t }$ streams.
|
| 143 |
+
|
| 144 |
+
Notably, $\mathrm { L M C } _ { ( \mathrm { A } ) }$ , which does not rely on task IDs at test time, outperformed all other task ID agnostic methods such as $\mathbf { M N T D P _ { ( A ) } }$ and ER(A,S) on all streams but $S ^ { + }$ , and always performed on par with task ID aware methods. On the $S ^ { o u t }$ stream low performance is expected for task-ID agnostic methods due to output distribution shift: i.e., at test time we notice that LMC correctly assigns samples from the last task $t _ { 1 } ^ { \prime \prime }$ to the first task’s $t _ { 1 } ^ { + }$ output head. However, the resulting classification accuracy is low because the labels of the last task are randomly permuted in this stream.
|
| 145 |
+
|
| 146 |
+
The task ID agnostic $\mathrm { L M C } _ { ( \mathrm { A } ) }$ outperforms task ID aware LMC on the $S ^ { - }$ and $S ^ { + }$ streams. Here, LMC(A) selects modules (and the output head) which were predominantly trained on the task that provided more training data (e.g. $t _ { 1 } ^ { + }$ in $S ^ { - }$ stream), hence transferring knowledge between the first and the last tasks. In contrast, $\mathbf { L M C } _ { ( \neg \mathbf { A } ) }$ when tested on the last task $t _ { 1 }$ is forced to select the output head belonging to this task, which was trained on less data than the output head of $t _ { 1 } ^ { + }$ task, leading to lower accuracy. In addition, we observed that versions of LMC often exhibit high variance (e.g. see $S ^ { + }$ , $S ^ { o u t }$ and $S ^ { p l }$ streams). This may be caused by the larger amount of trainable parameters compared to other models and relatively small amount of training data. Finally, low performance of
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Figure 3: Continual OOD-generalization: matrices show test accuracy on seen and unseen tasks (onand off-diagonal tasks respectively). In each sub-figure $\mathbf { X }$ -axis shows the MNIST class-combination used to build the task, y-axis gives the foreground-background colors. Only diagonal tasks are learned continually. While non-modular EWC (a) and modular MNTDP (b) can prevent forgetting, $\mathbf { L M C _ { ( \neg A ) } }$ (c) is able to generalize to OOD tasks as well. $\mathrm { L M C } _ { \left( \lnot \mathbf { A } \right) }$ without projection phase performs poorly as shown in (d).
|
| 150 |
+
|
| 151 |
+
LMC(A,H) emphasizes the importance of soft modular attention for LMC. Additional results, including a transfer metric [92], are in Appendix B.4.
|
| 152 |
+
|
| 153 |
+
# 4.2 Compositional OOD generalization
|
| 154 |
+
|
| 155 |
+
This second study tests the ability of LMC to recombine modules for OOD generalization. We use a colored-MNIST dataset — a variation of the standard MNIST dataset of hand-written digits from 0 to 9 [43] in which digits are colorized. We design a simple sequence of tasks as follows. First, we define two high-level features: the foreground-background color combination (using the colors red, black, green, blue) and the class (0–9). Then, we create five non-overlapping tasks of two (digit) classes each: $\left\{ 0 - 1 , \quad \ldots , \quad 8 - 9 \right\}$ . At training time the model is continually trained using a sequence of these tasks, however, each task is only seen in one of five different foreground-background combinations {red-black, green-black, blue-black, black-red, black-green}. At test time we measure the generalization ability to seen and unseen combinations of classes and colors.
|
| 156 |
+
|
| 157 |
+
In Figure 3 we present the accuracy matrices for different learners when tested on all 25 combinations of colors and classes after it has been trained only on the 5 tasks on the diagonal.
|
| 158 |
+
|
| 159 |
+
We compare the performance of $\mathbf { L M C } _ { ( \neg \mathbf { A } ) }$ with EWC [46], MNTDP [92], and an ablated version of LMC without the projection phase. We observe that the OOD accuracy attained by LMC is significantly higher than EWC and MNTDP. Since the model trained with EWC is monolithic, the digit-background color combinations are entangled with the digits’ shape for each task, hindering OOD generalization. In contrast, modular approaches such as MNTDP and LMC learn a different module combination for each task. In contrast to MNTDP, LMC’s module selection does not rely on task identifiers and each module is selected in a local manner based on its compatibility with the current input. This allows LMC to interpolate between previously seen tasks being able to dynamically compose existing modules to adapt to tasks that have not been seen at training. Because MNTDP’s module selection relies on a database of task-specific structures found to be optimal for the corresponding task at training, this method must reuse the predefined module compositions based on task IDs. This forces MNTDP to use modules that were trained using a different color combination, and results in e.g. a $2 4 \%$ accuracy drop with respect to LMC on [0,1] when the foreground and background colors are inverted w.r.t. the seen combination.
|
| 160 |
+
|
| 161 |
+
In Figure 3d we report results for LMC without applying the projection phase. The projection phase adapts the representation of newly introduced modules to match the distribution expected by the subsequent modules. As expected, we found that skipping it severely degrades performance. This result validates the usefulness of the projection phase to achieve an efficient local module selection. In Appendix E we plot the average module selection for all 25 test tasks, showing how modules are reused for the OOD tasks.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 5: Results on $S ^ { l o n g }$ and $S ^ { l o n g 3 0 }$ sequences for different hyperparameter values (we select only runs with reasonably good performance, i.e. $4 \%$ ), same plots plots for all conducted runs can be found in Appendix C).
|
| 165 |
+
|
| 166 |
+
# 4.3 Combining modular learners
|
| 167 |
+
|
| 168 |
+
In earlier sections we show cross-task reusability of modules, here we test the cross-model reusability. We motivate the practical importance of this kind of reusability with a federated learning example: a privacy preserving training might be required for LMC1 and LMC2, trained on the premises of customers 1 and 2, after which their modules can be combined in a single central entity — LMC3, located on premises of the cloud service provider. LMC3 is required to perform tasks seen by both independent LMCs but can not be finetuned as it has no access to the original training data distributions.
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 4: Performance of combining independently trained LMC1 and LMC2 into LMC3.
|
| 172 |
+
|
| 173 |
+
In Figure 4 we test the ability of LMC to preserve and transfer knowledge in such setting. To this end, we design the following tasks: fMNIST $^ +$ and fMNIST-. Both are sampled from the fashion-MNIST dataset [98] but the latter comes with an order of magnitude less training data. cMNIST-r is a variant of the colored-MNIST dataset where the background of $9 5 \%$ of the training samples is colored in red and $5 \%$ in green. For the cMNIST-g dataset these proportions are inverted and $9 5 \%$ of the training samples is colored in green. The test set contains $50 \%$ of samples with green and $50 \%$ with red background. We trained LMC1 continually on MNIST, fMNIST $^ +$ , and cMNIST-r tasks. We trained LMC2 on fMNIST-, cMNIST- $\mathbf { g }$ , and SVHN. We then combined the modules of both LMCs layer-wise to obtain LMC3.
|
| 174 |
+
|
| 175 |
+
We observed positive transfer for both cMNIST and fMNIST- tasks with LMC3. We found that LMC3 selects different modules originating from different LMCs conditioned on test samples with different background colors — LMC1’s modules were specialized on red background while LMC2’s on green (selected paths presented in Appendix D). Notably, cross-model reusability without fine-tuning is novel to LMC and can be attributed to the local nature of the structural component. Using a global structural component as in [63] would require tuning a separate structural component specifically for LMC3. In case of task-specific routing of proposed for MNTDP [92], additional search would be needed to discover task-specific paths through the consolidated LMC3 model. In both cases the access to the orinal training data distributions would be required and privacy would not be preserved.
|
| 176 |
+
|
| 177 |
+
# 4.4 Longer task sequences
|
| 178 |
+
|
| 179 |
+
Here we study the performance LMC on longer task sequences consisting of $3 0 - S ^ { l o n g 3 0 }$ , and $1 0 0 -$ $S ^ { l o n g }$ tasks. The $S ^ { \bar { l } o n g }$ sequence corresponds to the one proposed by Veniat et al. [92] as part of the CTrL benchmark. $S ^ { l o n g 3 0 }$ is a 30-tasks subset of $S ^ { l o n g }$ (see Appendix B.1 for details).
|
| 180 |
+
|
| 181 |
+
We first report the average test accuracy $( \mathcal { A } )$ and the total number of modules (M) of the models selected through cross-validation. $S ^ { l o n j 3 0 }$ : MNTDP $\scriptstyle A = 6 4 . 5 8$ , $\scriptstyle \mathbf { M } = 6 4$ ; LMC(¬A): $\scriptstyle A = 6 2 . 4 4$ , ${ \bf M } { = } 5 0$ $S ^ { l o n g }$ : MNTDP $\scriptstyle A = 6 8 . 9 2$ , $\mathbf { M } { = } 1 4 2$ ; $\mathbf { L M C _ { ( \neg A ) } }$ : $\scriptstyle A = 6 3 . 8 8$ , $\mathbf { M } = 3 2$ . While the gap between the accuracy of LMC and MNTDP on $S ^ { l o n g 3 0 }$ is only $1 . 8 6 \%$ -points, in the case of $S ^ { l o n g }$ this gap grows to $6 . 5 8 \%$ - points. It is important to highlight that in contrast to LMC, MNTDP’s module selection is performed by a task ID aware oracle. We further analyze the trade-off between the number of modules and accuracy in Figure 5, where we plot the number of modules (M) against average test accuracy $( \mathcal { A } )$ for models that resulted from training with different hyperparameters. For both streams, we observe that LMC tends to spawn much fewer modules than MNTDP. However, MNTDP shines in the presence of large number of modules and achieves higher overall test accuracy on these streams. Interestingly, as can be clearly observed on the $S ^ { l o n g }$ stream, LMC reaches higher accuracy with smaller number of modules: e.g. ${ \sim } 6 4 \%$ with 32 modules, while adding modules leads to lower accuracy: e.g. ${ \sim } 6 1 \%$ with 98 modules. This result suggests that local task ID agnostic module selection becomes more challenging for LMC in presence of a large number of modules.
|
| 182 |
+
|
| 183 |
+
# 5 Related work
|
| 184 |
+
|
| 185 |
+
Modularity in neural networks is studied in the context of scalability [9], and more recently as a way to achieve compositionality and systematic generalization [6, 47, 15, 8, 27, 19] as well as for multi-task learning [65, 82]. From the causal point of view, a data generation process could be thought as a composition of independent causal modules [75]. Researchers model these kinds of systems using a set of independent modules, where each module is invariant to changes in the other modules induced by e.g. distribution shifts [84, 76]. This idea is crystallized by Parascandolo et al. [74], who propose a way to learn a set of causal independent mechanisms as mixture-of-experts. Building up on this ideas, others show evidence of compositional OOD generalization [61]. Recently, [66] argue for a more wholistic view on CL including OOD generalization as an important desiderata.
|
| 186 |
+
|
| 187 |
+
Continual learning methods typically address the problem of forgetting through parameter regularization [46, 70, 99], replay [89, 78, 3, 73, 54, 12, 97, 39, 81, 13] or dynamic architectures (and MoEs) [83, 87, 52, 85, 53, 41]. Our work falls under the umbrella of the latter and shares its advantage of having the capacity to adapt to a large number of related tasks. Our focus is on improving modular CL approaches, which despite their advantages, have only recently been studied in the CL literature [63, 92]. The main difference with our work is that we use a local composition mechanism instead of a global one. We detail this difference in $\ S 2$ and also compare to these methods in $\ S 4 . 1$ .
|
| 188 |
+
|
| 189 |
+
Continual-meta learning focuses on fast learning and remembering [25, 35, 33, 41], often emphasising the online performance on OOD tasks [14]. As argued by Jerfel et al. [41] modularity can be useful in this setting to minimize interference between tasks. They proposed a way to train a MoE model, with each expert focusing on a cluster of tasks leveraging Bayesian nonparametrics. LMC aims at decomposing knowledge into layer-wise composable modules further reducing modular granularity. Continual-meta learning is often confused with its counterpart meta-continual learning [40, 11, 93], in which algorithm are learning to continually learn.
|
| 190 |
+
|
| 191 |
+
The rapid growth of continual learning has lead researchers to work on empirical studies [20, 58, 56], surveys [32, 42, 55, 66, 67] as well as CL-specific software [72, 22, 59].
|
| 192 |
+
|
| 193 |
+
# 6 Conclusion
|
| 194 |
+
|
| 195 |
+
We develop LMC, a method to learn and compose a series of modules on a continual stream of tasks fulfilling some of the basic desiderata of modular CL such as module specialization, avoidance of collapse, and sublinear growth. In LMC, structural information is learned and stored locally for each module. It is the locality of the structural component that enables generalization to related but unseen tasks, and that permits combining different LMCs without fine-tuning.
|
| 196 |
+
|
| 197 |
+
Future work could focus on achieving more efficient sub-linear model growth through OOD generalization and reusability of modules. Additionally, while the benefits of modularity for CL are well understood, the implications of the CL regime on modularity and compositionality have not been studied extensively. It is possible that providing knowledge to the learner in incremental chunks results in the implicit supervision needed to better disentangle it into specialized and composable modules. Another promising direction is removing the need for task boundaries during training and developing more robust architectures for the local structural component (related discussions are in Appendix A.3, and limitations in Appendix G).
|
| 198 |
+
|
| 199 |
+
References
|
| 200 |
+
[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. CoRR, abs/1711.09601, 2017.
|
| 201 |
+
[2] Rahaf Aljundi, Punarjay Chakravarty, and Tinne Tuytelaars. Expert gate: Lifelong learning with a network of experts. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3366–3375, 2017.
|
| 202 |
+
[3] Rahaf Aljundi, Lucas Caccia, Eugene Belilovsky, Massimo Caccia, Min Lin, Laurent Charlin, and Tinne Tuytelaars. Online continual learning with maximal interfered retrieval. In Advances in Neural Information Processing Systems 32, pages 11849–11860. Curran Associates, Inc., 2019.
|
| 203 |
+
[4] Mohammed Amer and Tomás Maul. A review of modularization techniques in artificial neural networks. Artificial Intelligence Review, 52(1):527–561, 2019.
|
| 204 |
+
[5] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Learning to compose neural networks for question answering. arXiv preprint arXiv:1601.01705, 2016.
|
| 205 |
+
[6] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 39–48, 2016.
|
| 206 |
+
[7] Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint arXiv:1810.09502, 2018.
|
| 207 |
+
[8] Dzmitry Bahdanau, Shikhar Murty, Michael Noukhovitch, Thien Huu Nguyen, Harm de Vries, and Aaron Courville. Systematic generalization: What is required and can it be learned? In International Conference on Learning Representations, 2018.
|
| 208 |
+
[9] Dana H Ballard. Modular learning in neural networks. In AAAI, pages 279–284, 1987.
|
| 209 |
+
[10] Jens Behrmann, Will Grathwohl, Ricky TQ Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. In International Conference on Machine Learning, pages 573–582. PMLR, 2019.
|
| 210 |
+
[11] Lucas Caccia and Joelle Pineau. Special: Self-supervised pretraining for continual learning. arXiv preprint arXiv:2106.09065, 2021.
|
| 211 |
+
[12] Lucas Caccia, Eugene Belilovsky, Massimo Caccia, and Joelle Pineau. Online learned continual compression with stacked quantization module. ArXiv, abs/1911.08019, 2019.
|
| 212 |
+
[13] Lucas Caccia, Rahaf Aljundi, Tinne Tuytelaars, Joelle Pineau, and Eugene Belilovsky. Reducing representation drift in online continual learning. arXiv preprint arXiv:2104.05025, 2021.
|
| 213 |
+
[14] Massimo Caccia, Pau Rodriguez, Oleksiy Ostapenko, Fabrice Normandin, Min Lin, Lucas Caccia, Issam Laradji, Irina Rish, Alexande Lacoste, David Vazquez, et al. Online fast adaptation and knowledge accumulation: a new approach to continual learning. arXiv preprint arXiv:2003.05856, 2020.
|
| 214 |
+
[15] Michael Chang, Abhishek Gupta, Sergey Levine, and Thomas L Griffiths. Automatically composing representation transformations as a means for generalization. In International Conference on Learning Representations, 2018.
|
| 215 |
+
[16] Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K Dokania, Philip HS Torr, and M Ranzato. Continual learning with tiny episodic memories. 2019.
|
| 216 |
+
[17] 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.
|
| 217 |
+
[18] Rodolfo Corona, Daniel Fried, Coline Devin, Dan Klein, and Trevor Darrell. Modularity improves out-of-domain instruction following. arXiv preprint arXiv:2010.12764, 2020.
|
| 218 |
+
[19] Róbert Csordás, Sjoerd van Steenkiste, and Jürgen Schmidhuber. Are neural nets modular? inspecting functional modularity through differentiable weight masks. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id $= ^ { \prime }$ 7uVcpu-gMD.
|
| 219 |
+
[20] Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. Continual learning: A comparative study on how to defy forgetting in classification tasks. arXiv preprint arXiv:1909.08383, 2019.
|
| 220 |
+
[21] Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 221 |
+
[22] Arthur Douillard and Timothée Lesort. Continuum: Simple management of complex continual learning scenarios. ArXiv, abs/2102.06253, 2021.
|
| 222 |
+
[23] Sebastian Farquhar and Yarin Gal. Towards robust evaluations of continual learning. arXiv preprint arXiv:1805.09733, 2018.
|
| 223 |
+
[24] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning (ICML), 2017.
|
| 224 |
+
[25] Chelsea Finn, Aravind Rajeswaran, Sham Kakade, and Sergey Levine. Online meta-learning. In International Conference on Machine Learning, pages 1920–1930. PMLR, 2019.
|
| 225 |
+
[26] Robert M French. Pseudo-recurrent connectionist networks: An approach to the’sensitivitystability’dilemma. Connection Science, 9(4):353–380, 1997.
|
| 226 |
+
[27] Anirudh Goyal, Alex Lamb, Jordan Hoffmann, Shagun Sodhani, Sergey Levine, Yoshua Bengio, and Bernhard Schölkopf. Recurrent independent mechanisms. arXiv preprint arXiv:1909.10893, 2019.
|
| 227 |
+
[28] Anirudh Goyal, Aniket Didolkar, Alex Lamb, Kartikeya Badola, Nan Rosemary Ke, Nasim Rahaman, Jonathan Binas, Charles Blundell, Michael Mozer, and Yoshua Bengio. Coordination among neural modules through a shared global workspace. arXiv preprint arXiv:2103.01197, 2021.
|
| 228 |
+
[29] Erin Grant, Chelsea Finn, Sergey Levine, Trevor Darrell, and Thomas Griffiths. Recasting gradient-based meta-learning as hierarchical bayes. arXiv preprint arXiv:1801.08930, 2018.
|
| 229 |
+
[30] Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
|
| 230 |
+
[31] Sharut Gupta, Praveer Singh, Ken Chang, Mehak Aggarwal, Nishanth Arun, Liangqiong Qu, Katharina Hoebel, Jay Patel, Mishka Gidwani, Ashwin Vaswani, et al. The unreasonable effectiveness of batch-norm statistics in addressing catastrophic forgetting across medical institutions. arXiv preprint arXiv:2011.08096, 2020.
|
| 231 |
+
[32] Raia Hadsell, Dushyant Rao, Andrei A Rusu, and Razvan Pascanu. Embracing change: Continual learning in deep neural networks. Trends in Cognitive Sciences, 2020.
|
| 232 |
+
[33] James Harrison, Apoorva Sharma, Chelsea Finn, and Marco Pavone. Continuous meta-learning without tasks. arXiv preprint arXiv:1912.08866, 2019.
|
| 233 |
+
[34] Xu He, Jakub Sygnowski, Alexandre Galashov, Andrei A. Rusu, Yee Whye Teh, and Razvan Pascanu. Task agnostic continual learning via meta learning. ArXiv, abs/1906.05201, 2019.
|
| 234 |
+
[35] Xu He, Jakub Sygnowski, Alexandre Galashov, Andrei A Rusu, Yee Whye Teh, and Razvan Pascanu. Task agnostic continual learning via meta learning. arXiv preprint arXiv:1906.05201, 2019.
|
| 235 |
+
[36] Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. arXiv preprint arXiv:1812.04606, 2018.
|
| 236 |
+
[37] Guillaume Hocquet, Olivier Bichler, and Damien Querlioz. Ova-inn: Continual learning with invertible neural networks. arXiv preprint arXiv:2006.13772, 2020.
|
| 237 |
+
[38] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International conference on machine learning, pages 448–456. PMLR, 2015.
|
| 238 |
+
[39] David Isele and Akansel Cosgun. Selective experience replay for lifelong learning. In AAAI conference on artificial intelligence, 2018.
|
| 239 |
+
[40] Khurram Javed and Martha White. Meta-learning representations for continual learning. In Advances in Neural Information Processing Systems 32, pages 1820– 1830. Curran Associates, Inc., 2019. URL http://papers.nips.cc/paper/ 8458-meta-learning-representations-for-continual-learning.pdf.
|
| 240 |
+
[41] Ghassen Jerfel, Erin Grant, Tom Griffiths, and Katherine A Heller. Reconciling meta-learning and continual learning with online mixtures of tasks. In Advances in Neural Information Processing Systems, pages 9122–9133, 2019.
|
| 241 |
+
[42] Khimya Khetarpal, Matthew Riemer, Irina Rish, and Doina Precup. Towards continual reinforcement learning: A review and perspectives, 2020.
|
| 242 |
+
[43] Byungju Kim, Hyunwoo Kim, Kyungsu Kim, Sungjin Kim, and Junmo Kim. Learning not to learn: Training deep neural networks with biased data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9012–9020, 2019.
|
| 243 |
+
[44] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/ abs/1412.6980.
|
| 244 |
+
[45] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 245 |
+
[46] 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.
|
| 246 |
+
[47] Louis Kirsch, Julius Kunze, and David Barber. Modular networks: Learning to decompose neural computation. Advances in Neural Information Processing Systems, 31:2408–2418, 2018.
|
| 247 |
+
[48] Ivan Kobyzev, Simon Prince, and Marcus Brubaker. Normalizing flows: An introduction and review of current methods. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020.
|
| 248 |
+
[49] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 249 |
+
[50] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
|
| 250 |
+
[51] Yann LeCun and Corinna Cortes. MNIST handwritten digit database. 2010. URL http://yann. lecun.com/exdb/mnist/.
|
| 251 |
+
[52] Jeongtae Lee, Jaehong Yoon, Eunho Yang, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. CoRR, abs/1708.01547, 2017.
|
| 252 |
+
[53] Soochan Lee, Junsoo Ha, Dongsu Zhang, and Gunhee Kim. A neural dirichlet process mixture model for task-free continual learning. arXiv preprint arXiv:2001.00689, 2020.
|
| 253 |
+
[54] Timothée Lesort, Hugo Caselles-Dupré, Michael Garcia-Ortiz, Jean-François Goudou, and David Filliat. Generative Models from the perspective of Continual Learning. In International Joint Conference on Neural Networks (IJCNN), 2019.
|
| 254 |
+
[55] Timothée Lesort, Massimo Caccia, and Irina Rish. Understanding continual learning settings with data distribution drift analysis, 2021.
|
| 255 |
+
[56] Timothée Lesort, Thomas George, and Irina Rish. Continual learning in deep networks: an analysis of the last layer, 2021.
|
| 256 |
+
[57] Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017.
|
| 257 |
+
[58] Vincenzo Lomonaco, Lorenzo Pellegrini, Pau Rodríguez, Massimo Caccia, Qi She, Yu Chen, Quentin Jodelet, Ruiping Wang, Zheda Mai, David Vázquez, German Ignacio Parisi, Nikhil Churamani, Marc Pickett, Issam H. Laradji, and Davide Maltoni. Cvpr 2020 continual learning in computer vision competition: Approaches, results, current challenges and future directions. ArXiv, abs/2009.09929, 2020.
|
| 258 |
+
[59] Vincenzo Lomonaco, Lorenzo Pellegrini, Andrea Cossu, Antonio Carta, Gabriele Graffieti, Tyler L. Hayes, Matthias De Lange, Marc Masana, Jary Pomponi, Gido van de Ven, Martin Mundt, Qi She, Keiland Cooper, Jeremy Forest, Eden Belouadah, Simone Calderara, German I. Parisi, Fabio Cuzzolin, Andreas Tolias, Simone Scardapane, Luca Antiga, Subutai Amhad, Adrian Popescu, Christopher Kanan, Joost van de Weijer, Tinne Tuytelaars, Davide Bacciu, and Davide Maltoni. Avalanche: an end-to-end library for continual learning. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2nd Continual Learning in Computer Vision Workshop, 2021.
|
| 259 |
+
[60] David Lopez-Paz and Marc’Aurelio Ranzato. Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, pages 6467–6476, 2017.
|
| 260 |
+
[61] Kanika Madan, Nan Rosemary Ke, Anirudh Goyal, Bernhard Schölkopf, and Yoshua Bengio. Fast and slow learning of recurrent independent mechanisms. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=Lc28QAB4ypz.
|
| 261 |
+
[62] Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pages 109–165. Elsevier, 1989.
|
| 262 |
+
[63] Jorge A Mendez and Eric Eaton. Lifelong learning of compositional structures. arXiv preprint arXiv:2007.07732, 2020.
|
| 263 |
+
[64] Martial Mermillod, Aurélia Bugaiska, and Patrick Bonin. The stability-plasticity dilemma: Investigating the continuum from catastrophic forgetting to age-limited learning effects. Frontiers in psychology, 4:504, 2013.
|
| 264 |
+
[65] Elliot Meyerson and Risto Miikkulainen. Beyond shared hierarchies: Deep multitask learning through soft layer ordering. arXiv preprint arXiv:1711.00108, 2017.
|
| 265 |
+
[66] Martin Mundt, Yong Won Hong, Iuliia Pliushch, and Visvanathan Ramesh. A wholistic view of continual learning with deep neural networks: Forgotten lessons and the bridge to active and open world learning, 2020.
|
| 266 |
+
[67] Martin Mundt, Steven Lang, Quentin Delfosse, and Kristian Kersting. Cleva-compass: A continual learning evaluation assessment compass to promote research transparency and comparability, 2021.
|
| 267 |
+
[68] Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Do deep generative models know what they don’t know? arXiv preprint arXiv:1810.09136, 2018.
|
| 268 |
+
[69] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
|
| 269 |
+
[70] Cuong V. Nguyen, Yingzhen Li, Thang D. Bui, and Richard E. Turner. Variational continual learning. In International Conference on Learning Representations (ICLR), 2018.
|
| 270 |
+
[71] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018.
|
| 271 |
+
[72] Fabrice Normandin, Florian Golemo, Oleksiy Ostapenko, Pau Rodriguez, Matthew D Riemer, Julio Hurtado, Khimya Khetarpal, Dominic Zhao, Ryan Lindeborg, Timothée Lesort, Laurent Charlin, Irina Rish, and Massimo Caccia. Sequoia: A software framework to unify continual learning research, 2021.
|
| 272 |
+
[73] Oleksiy Ostapenko, Mihai Puscas, Tassilo Klein, Patrick Jahnichen, and Moin Nabi. Learning to remember: A synaptic plasticity driven framework for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11321–11329, 2019.
|
| 273 |
+
[74] Giambattista Parascandolo, Niki Kilbertus, Mateo Rojas-Carulla, and Bernhard Schölkopf. Learning independent causal mechanisms. In International Conference on Machine Learning, pages 4036–4044. PMLR, 2018.
|
| 274 |
+
[75] Judea Pearl. Causality. Cambridge university press, 2009.
|
| 275 |
+
[76] Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. Elements of causal inference: foundations and learning algorithms. The MIT Press, 2017.
|
| 276 |
+
[77] Mohammad Pezeshki, Sékou-Oumar Kaba, Yoshua Bengio, Aaron Courville, Doina Precup, and Guillaume Lajoie. Gradient starvation: A learning proclivity in neural networks. arXiv preprint arXiv:2011.09468, 2020.
|
| 277 |
+
[78] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In Computer Vision and Pattern Recognition (CVPR), 2017.
|
| 278 |
+
[79] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. arXiv preprint arXiv:1803.00676, 2018.
|
| 279 |
+
[80] Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International conference on machine learning, pages 1530–1538. PMLR, 2015.
|
| 280 |
+
[81] David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy Lillicrap, and Gregory Wayne. Experience replay for continual learning. In Advances in Neural Information Processing Systems, 2019.
|
| 281 |
+
[82] Clemens Rosenbaum, Ignacio Cases, Matthew Riemer, and Tim Klinger. Routing networks and the challenges of modular and compositional computation. arXiv preprint arXiv:1904.12774, 2019.
|
| 282 |
+
[83] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016.
|
| 283 |
+
[84] B Schölkopf, D Janzing, J Peters, E Sgouritsa, K Zhang, and J Mooij. On causal and anticausal learning. In 29th International Conference on Machine Learning (ICML 2012), pages 1255–1262. International Machine Learning Society, 2012.
|
| 284 |
+
[85] Jonathan Schwarz, Jelena Luketina, Wojciech M Czarnecki, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. arXiv preprint arXiv:1805.06370, 2018.
|
| 285 |
+
[86] Joan Serra, Didac Suris, Marius Miron, and Alexandros Karatzoglou. Overcoming catastrophic forgetting with hard attention to the task. International Conference on Machine Learning (ICML), 2018.
|
| 286 |
+
[87] Joan Serra, Didac Suris, Marius Miron, and Alexandros Karatzoglou. Overcoming catastrophic forgetting with hard attention to the task. In International Conference on Machine Learning, pages 4548–4557. PMLR, 2018.
|
| 287 |
+
[88] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer, 2017.
|
| 288 |
+
[89] Andrea Soltoggio. Short-term plasticity as cause–effect hypothesis testing in distal reward learning. Biological cybernetics, 109(1):75–94, 2015.
|
| 289 |
+
[90] Olaf Sporns and Richard F Betzel. Modular brain networks. Annual review of psychology, 67:613–640, 2016.
|
| 290 |
+
[91] Saul Sternberg. Modular processes in mind and brain. Cognitive neuropsychology, 28(3-4):156–208, 2011.
|
| 291 |
+
[92] Tom Veniat, Ludovic Denoyer, and Marc’Aurelio Ranzato. Efficient continual learning with modular networks and task-driven priors. arXiv preprint arXiv:2012.12631, 2020.
|
| 292 |
+
[93] Johannes von Oswald, Dominic Zhao, Seijin Kobayashi, Simon Schug, Massimo Caccia, Nicolas Zucchet, and João Sacramento. Learning where to learn: Gradient sparsity in meta and continual learning. NeurIPS 2021, 2021.
|
| 293 |
+
[94] Yaqing Wang, Quanming Yao, James T Kwok, and Lionel M Ni. Generalizing from a few examples: A survey on few-shot learning. ACM Computing Surveys (CSUR), 53(3):1��34, 2020.
|
| 294 |
+
[95] Ziyu Wang, Bin Dai, David Wipf, and Jun Zhu. Further analysis of outlier detection with deep generative models. arXiv preprint arXiv:2010.13064, 2020.
|
| 295 |
+
[96] James CR Whittington and Rafal Bogacz. An approximation of the error backpropagation algorithm in a predictive coding network with local hebbian synaptic plasticity. Neural computation, 29(5):1229–1262, 2017.
|
| 296 |
+
[97] Chenshen Wu, Luis Herranz, Xialei Liu, Joost van de Weijer, Bogdan Raducanu, et al. Memory replay gans: Learning to generate new categories without forgetting. Advances in Neural Information Processing Systems, 31:5962–5972, 2018.
|
| 297 |
+
[98] Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 298 |
+
[99] Chen Zeno, Itay Golan, Elad Hoffer, and Daniel Soudry. Task agnostic continual learning using online variational bayes, 2018.
|
| 299 |
+
|
| 300 |
+
# Acknowledgments and Disclosure of Funding
|
| 301 |
+
|
| 302 |
+
Laurent Charlin holds a CIFAR AI Chair Program and acknowledges support from Samsung Electronics Co., Ldt., Google, and NSERC. Massimo Caccia was supported through MITACS during his part time employment with Element AI the ServiceNow company. Massimo Caccia was also supported by Amazon, during his part time employment there. We would like to thank Mila and Compute Canada for providing computational resources. We also would like to thank Irina Rish for useful discussions.
|
md/train/S1xoy3CcYX/S1xoy3CcYX.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ADVERSARIAL EXAMPLES ARE A NATURAL CONSEQUENCE OF TEST ERROR IN NOISE
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Over the last few years, the phenomenon of adversarial examples — maliciously constructed inputs that fool trained machine learning models — has captured the attention of the research community, especially when the adversary is restricted to making small modifications of a correctly handled input. At the same time, less surprisingly, image classifiers lack human-level performance on randomly corrupted images, such as images with additive Gaussian noise. In this work, we show that these are two manifestations of the same underlying phenomenon. We establish this connection in several ways. First, we find that adversarial examples exist at the same distance scales we would expect from a linear model with the same performance on corrupted images. Next, we show that Gaussian data augmentation during training improves robustness to small adversarial perturbations and that adversarial training improves robustness to several types of image corruptions. Finally, we present a model-independent upper bound on the distance from a corrupted image to its nearest error given test performance and show that in practice we already come close to achieving the bound, so that improving robustness further for the corrupted image distribution requires significantly reducing test error. All of this suggests that improving adversarial robustness should go hand in hand with improving performance in the presence of more general and realistic image corruptions. This yields a computationally tractable evaluation metric for defenses to consider: test error in noisy image distributions.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
State-of-the-art computer vision models can achieve superhuman performance on many image classification tasks. Despite this, these same models still lack the robustness of the human visual system to various forms of image corruptions. For example, they are distinctly subhuman when classifying images distorted with additive Gaussian noise (Dodge & Karam, 2017b), they lack robustness to different types of blur, pixelation, and changes in brightness (Hendrycks & Dietterich, 2018), lack robustness to random translations of the input (Azulay & Weiss, 2018), and even make errors when foreign objects are inserted into the field of view (Rosenfeld et al., 2018). At the same time, they also are sensitive to small, worst-case perturbations of the input, so-called “adversarial examples” (Szegedy et al., 2014). This latter phenomenon has struck many in the machine learning community as surprising and has attracted a great deal of research interest, while the former seems to inspire less surprise and has received considerably less attention.
|
| 12 |
+
|
| 13 |
+
Our classification models make errors on two different sorts of inputs: those found by randomly sampling from some predetermined distribution, and those found by an adversary deliberately searching for the closest error to a given point. In this work, we ask what, if anything, is the difference between these two types of error. Given that our classifiers make errors in these corrupted image distributions, there must be a closest such error; do we find that this closest error appears at the distance we would expect from the model’s performance in noise, or is it in fact “surprisingly” close?
|
| 14 |
+
|
| 15 |
+
The answer to this question has strong implications for the way we approach the task of eliminating these two types of errors. An assumption underlying most of the work on adversarial examples is that solving it requires a different set of methods than the ones being developed to improve model generalization. The adversarial defense literature focuses primarily on improving robustness to small perturbations of the input and rarely reports improved generalization in any distribution.
|
| 16 |
+
|
| 17 |
+
We claim that, on the contrary, adversarial examples are found at the same distance scales that one should expect given the performance on noise that we see in practice. We explore the connection between small perturbation adversarial examples and test error in noise in two different ways.
|
| 18 |
+
|
| 19 |
+
First, in Sections 4 and 5, we provide empirical evidence of a close relationship between test performance in Gaussian noise and adversarial perturbations. We show that the errors we find close to the clean image and the errors we sample under Gaussian noise are part of the same large set and show some visualizations that illustrate this relationship. (This analysis builds upon prior work (Fawzi et al., 2018; 2016) which makes smoothness assumptions on the decision boundary to relate these two quantities.) This suggests that training procedures designed to improve adversarial robustness might reduce test error in noise and vice versa. We provide results from experiments which show that this is indeed the case: for every model we examined, either both quantities improved or neither did. In particular, a model trained on Gaussian noise shows significant improvements in adversarial robustness, comparable to (but not quite as strong as) a model trained on adversarial examples. We also found that an adversarially trained model on CIFAR-10 shows improved robustness to random image corruptions.
|
| 20 |
+
|
| 21 |
+
Finally, in Section 6, we establish a relationship between the error rate of an image classification model in the presence of Gaussian noise and the existence of adversarial examples for noisy versions of test set images. In this setting we can actually prove a rigorous, model-independent bound relating these two quantities that is achieved when the error set is a half space, and we see that the models we tested are already quite close to this optimum. Therefore, for these noisy image distributions, our models are already almost as adversarially robust as they can be given the error rates we see, so the only way to defend against adversarial examples is to reduce test error.
|
| 22 |
+
|
| 23 |
+
In this work we will investigate several different models trained on the MNIST, CIFAR-10 and ImageNet datasets. For MNIST and CIFAR-10 we look at the naturally trained and adversarially trained models which have been open-sourced by Madry et al. (2017). We also trained the same model on CIFAR-10 with Gaussian data augmentation. For ImageNet, we investigate Wide ResNet-50 trai]ned with Gaussian data augmentation. We were unable to study the effects of adversarial training on ImageNet because no robust open sourced model exists (we considered the models released in Tramèr et al. (2017) but found that they only minimally improve robustness to the white box PGD adversaries we consider here). Additional training details can be found in Appendix A.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORK
|
| 26 |
+
|
| 27 |
+
The broader field of adversarial machine learning studies general ways in which an adversary may interact with an ML system, and dates back to 2004 (Dalvi et al., 2004; Biggio & Roli, 2018). Since the work of Szegedy et al. (2014), a subfield has focused specifically on the phenomenon of small adversarial perturbations of the input, or “adversarial examples.” In Szegedy et al. (2014) it was proposed these adversarial examples occupy a dense, measure-zero subset of image space. However, more recent work has provided evidence that this is not true. For example, Fawzi et al. (2016); Franceschi et al. (2018) shows that under linearity assumptions of the decision boundary small adversarial perturbations exist when test error in noise is non-zero. Gilmer et al. (2018b) showed for a specific data distribution that there is a fundamental upper bound on adversarial robustness in terms of test error. Mahloujifar et al. (2018) has generalized these results to a much broader class of distributions.
|
| 28 |
+
|
| 29 |
+
Recent work has proven for a synthetic data distribution that adversarially robust generalization requires more data (Schmidt et al., 2018). The distribution they consider when proving this result is a mixture of high dimensional Gaussians. As we will soon discuss, every set $E$ of small measure in the high dimensional Gaussian distribution has large boundary measure. Therefore, at least for the data distribution considered, the main conclusion of this work, “adversarially robust generalization requires more data”, is a direct corollary of the statement “generalization requires more data.”
|
| 30 |
+
|
| 31 |
+
# 3 TEST ERROR AND ADVERSARIAL ROBUSTNESS
|
| 32 |
+
|
| 33 |
+
Understanding the relationship between nearby errors and model generalization requires understanding the geometry of the error set of a statistical classifier, that is, the set of points in the input space on which the classifier makes an incorrect prediction. In particular, the assertion that these adversarial examples are a distinct phenomenon from test error is equivalent to stating that the error set is in some sense poorly behaved. We study two functions of a model’s error set $E$ .
|
| 34 |
+
|
| 35 |
+
The first quantity, test error under a given distribution of inputs $q ( x )$ , is the probability that a random sample from the distribution $q$ is in $E$ . We will denote this $\mathbb { P } _ { x \sim q } [ x \in E ]$ ; reducing this quantity when $q$ is the natural data distribution is the goal of supervised learning. While one usually takes $q$ to be the distribution from which the training set was sampled, we will also consider other distributions over the course of this paper.
|
| 36 |
+
|
| 37 |
+
When $q$ includes points from outside the natural data distribution, a decision needs to be made about the labels in order to define $E$ . The only such cases we will consider in this paper are noisy perturbations of training or test points, and we will always assume that the noise is at a scale which is small enough not to change the label. This assumption is commonly made in works which study model robustness to random corruptions of the input (Hendrycks & Dietterich, 2018; Dodge & Karam, 2017b). Some examples noisy images can be found in Figure 7 in the appendix.
|
| 38 |
+
|
| 39 |
+
The second quantity is called adversarial robustness. For an input $x$ and a metric on the input space $d$ , let $d ( x , E )$ denote the distance from $x$ to the nearest point of $E$ . For any $\epsilon$ , let $E _ { \epsilon }$ denote the set $\{ x : d ( x , E ) < \epsilon \}$ , the set of points within $\epsilon$ of an error. The adversarial robustness of the model is then $\mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ]$ , the probability that a random sample from $q$ is within distance $\epsilon$ of some point in the error set. Reducing this quantity is the goal of much of the adversarial defense literature. When we refer to “adversarial examples” in this paper, we will always mean these nearby errors.
|
| 40 |
+
|
| 41 |
+
In geometric terms we can think of $\mathbb { P } _ { x \sim q } [ x \in E ]$ as a sort of volume of the error set while $\mathbb { P } _ { x \sim q } [ x \in$ $E _ { \epsilon } ]$ is related to its surface area. More directly, $\mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ]$ is what we will call the $\epsilon$ -boundary measure, the volume under $q$ of the region within $\epsilon$ of the surface or the interior.
|
| 42 |
+
|
| 43 |
+
The adversarial example phenomenon is then simply that, for small $\epsilon$ , $\mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ]$ can be large even when $\mathbb { P } _ { x \sim q } [ x \in E ]$ is small. In other words, most correctly classified inputs are very close to a misclassified point, even though the model is very accurate. In high-dimensional spaces this phenomenon is not isolated to the error sets of statistical classifiers. In fact almost every nonempty set of small volume has large $\epsilon$ -boundary measure, even sets that seem very well-behaved. As a simple example, consider the measure of the set $E = \{ x \in \mathbb { R } ^ { n } : | | x | | _ { 2 } < 1 \}$ under the Gaussian distribution $q = \dot { \mathcal { N } } ( 0 , \sigma ^ { 2 } I )$ . For $n = 1 0 0 0$ , $\sigma = 1 . 0 5 / \sqrt { n }$ , and $\epsilon = 0 . 1$ , we have $\mathbb { P } _ { x \sim q } [ x \in E ] \approx 0 . 0 2$ and $\mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ] \approx 0 . 9 8$ , so most samples from $q$ will be close to $E$ despite the fact that $E$ has relatively little measure under the Gaussian distribution. If we relied only on our low-dimensional spatial intuition, we might be surprised to find how consistently small adversarial perturbations could be found — $98 \%$ of our test points would have an error at distance 0.1 or less even though only $2 \%$ are misclassified.
|
| 44 |
+
|
| 45 |
+
In high dimensions, it is much easier for most points to be close to some set even if that set itself has a small volume. Contrary to what one might expect from our low-dimensional intuition, this does not require the set in question to be somehow pathological; in our example, it was just a ball. Therefore, when we see that some image classifier has errors in some noise distribution $q$ (so that $\mathbb { P } _ { x \sim q } [ x \in E ]$ is appreciably bigger than zero) it is possible that $E _ { \epsilon }$ is much larger even if $E$ is quite simple, so the existence of small worst-case perturbations should be expected given imperfect robustness to large average-case corruptions. In the sections that follow we will make this precise.
|
| 46 |
+
|
| 47 |
+
# 4 ERRORS IN NOISE SUGGEST ADVERSARIAL EXAMPLES FOR CLEAN IMAGES
|
| 48 |
+
|
| 49 |
+
The Linear Case. For linear models, the relationship between errors in Gaussian noise and small perturbations of a clean image is exact. For an image $x$ , let $d ( x )$ be the distance from $x$ to decision boundary and let $\sigma ( x , \mu )$ be the $\sigma$ for which $\mathbb { P } _ { x \sim q } [ x \in E ]$ is some fixed error rate $\mu$ . (As we mentioned in the introduction, we assume that $\sigma$ is small enough that adding this noise does not change the “correct” label.) Then we have $d ( x ) = - \sigma ( x , \mu ) { \Phi } ^ { - 1 } \bar { ( \mu ) }$ , where
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\Phi ( t ) = \frac { 1 } { \sqrt { 2 \pi } } \int _ { - \infty } ^ { t } \exp ( - x ^ { 2 } / 2 ) d x
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
is the cdf of the univariate standard normal distribution.
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 1: Comparing the distance to decision boundary with the $\sigma$ for which the error rate in Gaussian noise is $1 \%$ . Each point represents 50 images from the test set, and the median values for each coordinate are shown. (The PGD attack was run with $\epsilon = 1$ , so the distances to the decision boundary reported here are cut off at 1.) We also see histograms of the $x$ coordinates. (A misclassified point is assigned $\sigma = 0 .$ .)
|
| 59 |
+
|
| 60 |
+
Note that this equality depends only on the error rate $\mu$ and the standard deviation $\sigma$ of a single component, and not directly on the dimension. This might seem at odds with the emphasis on high-dimensional geometry in Section 3. The dimension does appear if we consider the norm of a√ typical sample from $\mathcal { N } ( 0 , \overbar { \boldsymbol { \sigma } ^ { 2 } } I )$ , which is $\sigma { \sqrt { n } }$ . As the dimension increases, so does the ratio between the distance to a noisy image and the distance to the decision boundary.
|
| 61 |
+
|
| 62 |
+
The decision boundary of a neural network is, of course, not linear. However, by computing the ratio between $d ( x )$ and $\sigma ( x , \mu )$ for neural networks and comparing it to what it would be for a linear model, we can investigate the question posed in the introduction: do we see adversarial examples at the distances we do because of pathologies in the shape of the error set, or do we find them at about the distances we would expect given the error rates we see in noise? We ran experiments on the error sets of several neural image classifiers and found evidence that is much more consistent with the second of these two possibilities. This relationship was also explored in Fawzi et al. (2016; 2018); here we additionally measure how data augmentation affects this relationship.
|
| 63 |
+
|
| 64 |
+
We examined this relationship for neural networks when $\mu = 0 . 0 1$ . For each test point, we compared $\sigma ( x , \mu )$ to an estimate of $d ( x )$ . It is not actually possible to compute $d ( x )$ precisely for the error set of a neural network. In fact, finding the distance to the nearest error is NP-hard (Katz et al., 2017). Instead, the best we can do is to search for an error using a method like PGD (Madry et al., 2017) and report the nearest error we can find.
|
| 65 |
+
|
| 66 |
+
Figure 1 shows the results for several CIFAR-10 and ImageNet models, including ordinary trained models, models trained on noise with $\sigma = 0 . 4$ , and an adversarially trained CIFAR-10 model. We also included a line representing how these quantities would be related for a linear model.
|
| 67 |
+
|
| 68 |
+
We can see that none of the models we examined have nearby errors at a scale much smaller than we would expect from a linear model. Indeed, while the adversarially trained model does deviate from the linear case to a greater extent than the others, it does so in the direction of greater distances to the decision boundary. Moreover, we can see from the histograms that both of the interventions that increase $d ( x )$ also increase $\sigma ( x , \mu )$ . So, to explain the distances to the errors we can find using PGD, it is not necessary to rely on any great complexity in the shape of the error set; a linear model with the same error rates in noise would have errors just as close.
|
| 69 |
+
|
| 70 |
+

|
| 71 |
+
Figure 2: Two-dimensional slices of image space through different triples of points together with the classes assigned by a trained model. The black circle in both images has radius 31.4, corresponding√ to noise with $\sigma = \mathrm { { 3 1 . 4 } } / \sqrt { n } = 0 . 0 8$ .
|
| 72 |
+
|
| 73 |
+
Left: An image from the test set (black), a random misclassified Gaussian perturbation at standard deviation 0.08 (blue), and an error found using PGD (red). The estimated measure of the cyan region (“miniature poodle”) in the Gaussian distribution is about $0 . 1 \%$ . The small diamond-shaped region in the center of the image is the $l _ { \infty }$ ball of radius 8/255.
|
| 74 |
+
|
| 75 |
+
Right: A slice at a larger scale with the same black point, together with an error from the clean set (blue) and an adversarially constructed error (red) which are both assigned to the same class (“elephant”).
|
| 76 |
+
|
| 77 |
+
Visualizing the Decision Boundary. In Figure 2 we drew some pictures of two-dimensional slices of image space through several different triples of points. (Similar visualizations have previously appeared in Fawzi et al. (2018), and are called “church window plots.”)
|
| 78 |
+
|
| 79 |
+
We see some common themes. In the figure on the left, we see that an error found in Gaussian noise lies in the same connected component of the error set as an error found using PGD, and that at this scale that component visually resembles a half space. This figure also illustrates the relationship between test error and adversarial robustness. To measure adversarial robustness is to ask whether or not there are any errors in the $l _ { \infty }$ ball — the small diamond-shaped region in the center of the image — and to measure test error in noise is to measure the volume of the error set in the defined noise distribution. At least in this slice, nothing distinguishes the PGD error from any other point in the error set apart from its proximity to the center point.
|
| 80 |
+
|
| 81 |
+
The figure on the right shows a different slice through the same test point but at a larger scale. This slice includes an ordinary test error along with an adversarial perturbation of the center image constructed with the goal of maintaining visual similarity while having a large $l _ { 2 }$ distance. The two errors are both classified (incorrectly) by the model as “elephant.” This adversarial error is actually farther from the center than the test error, but they still clearly belong to the same connected component. This suggests that defending against worst-case content-preserving perturbations (Gilmer et al., 2018a) requires removing all errors at a scale comparable to the distance between unrelated pairs of images. Many more church window plots can be found in Appendix G.
|
| 82 |
+
|
| 83 |
+
# 5 COMPARING ADVERSARIAL TRAINING TO TRAINING ON NOISE
|
| 84 |
+
|
| 85 |
+
For a linear model, improving generalization in the presence of noise is equivalent to increasing the distance to the decision boundary. The results from the previous section suggest that a similar relationship should hold for other statistical classifiers, including neural networks. That is, augmenting the training data distribution with noisy images ought to increase the distance to the decision boundary, and augmenting the training distribution with small-perturbation adversarial examples should improve performance in noise. Here we present evidence that this is the case.
|
| 86 |
+
|
| 87 |
+
We analyzed the performance of the models described in Section 1 on four different noise distributions: two types of Gaussian noise, pepper noise (Hendrycks & Dietterich, 2018), and a randomized variant of the stAdv adversarial attack introduced in Xiao et al. (2018). We used both ordinary, spherical Gaussian noise and what we call “PCA noise,” which is Gaussian noise supported only on the subspace spanned by the first 100 principal components of the training set. Pepper noise randomly assigns channels of the image to 1 with some fixed probability. Details of the stAdv attack can be found in Appendix B, but it visually similar to Gaussian blurring where $\sigma$ controls the severity of the blurring. Example images that have undergone each of the noise transformations we used can be found in Appendix I. Each model was also tested for $l _ { p }$ robustness with a variety of norms and $\epsilon$ ’s using the same PGD attack as in Section 4.
|
| 88 |
+
|
| 89 |
+
Table 1: The performance of the models we considered under various noise distributions, together with our measurements of those models’ robustness to small $l _ { p }$ perturbations. For all the robustness tests we used PGD with 100 steps and a step size of $\epsilon / 2 5$ . The adversarially trained CIFAR-10 model is the open sourced model from Madry et al. (2017).
|
| 90 |
+
|
| 91 |
+
<table><tr><td>Dataset</td><td colspan="4">CIFAR-10</td><td colspan="3">ImageNet</td></tr><tr><td>Training</td><td>Vanilla</td><td>Noise σ=0.1</td><td>Noise σ=0.4</td><td>Adv</td><td>Vanilla</td><td>Noise g =0.4</td><td>Noise g=0.8</td></tr><tr><td>Noise Type</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Clean</td><td>95.0%</td><td>93.5%</td><td>84.0%</td><td>87.3%</td><td>76.0%</td><td>74.4%</td><td>72.6%</td></tr><tr><td>PCA100,σ = 0.2</td><td>93.2%</td><td>92.3%</td><td>83.6%</td><td>86.5%</td><td>45.5%</td><td>56.5%</td><td>59.7%</td></tr><tr><td>PCA100,σ = 0.4</td><td>82.6%</td><td>83.1%</td><td>81.0%</td><td>80.6%</td><td>13.5%</td><td>17.7%</td><td>19.7%</td></tr><tr><td>Pepper, p = 0.1</td><td>20.2%</td><td>53.3%</td><td>81.2%</td><td>38.4%</td><td>31.3%</td><td>70.0%</td><td>69.1%</td></tr><tr><td>Pepper,p= 0.3</td><td>12.3%</td><td>18.9%</td><td>58.0%</td><td>21.1%</td><td>5.4%</td><td>56.0%</td><td>61.5%</td></tr><tr><td>Gaussian,σ = 0.1</td><td>29.1%</td><td>89.0%</td><td>85.1%</td><td>77.8%</td><td>60.7%</td><td>73.3%</td><td>71.7%</td></tr><tr><td>Gaussian,σ = 0.2</td><td>13.5%</td><td>38.8%</td><td>83.5%</td><td>42.1%</td><td>27.9%</td><td>70.5%</td><td>69.3%</td></tr><tr><td>stAdv, σ = 0.5</td><td>52.3%</td><td>84.4%</td><td>77.9%</td><td>81.7%</td><td>57.3%</td><td>67.3%</td><td>69.0%</td></tr><tr><td>stAdv, σ = 2.0</td><td>17.4%</td><td>30.6%</td><td>52.1%</td><td>27.0%</td><td>11.4%</td><td>27.2%</td><td>31.3%</td></tr><tr><td>lp robustness</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>l2,∈= 0.5</td><td>0.3%</td><td>39.2%</td><td>54.5%</td><td>58.3%</td><td>7.9%</td><td>43.8%</td><td>47.7%</td></tr><tr><td>l2,∈= 1.0</td><td>0.0%</td><td>9.5%</td><td>25.1%</td><td>29.7%</td><td>0.5%</td><td>16.8%</td><td>22.5%</td></tr><tr><td>l,∈=1/255</td><td>26.2%</td><td>84.4%</td><td>76.6%</td><td>83.5%</td><td>0.8%</td><td>20.1%</td><td>25.0%</td></tr><tr><td>l,∈=4/255</td><td>0.4%</td><td>39.8%</td><td>49.6%</td><td>68.3%</td><td>0.0%</td><td>0.1%</td><td>0.1%</td></tr><tr><td>l,∈=8/255</td><td>0.0%</td><td>10.3%</td><td>20.0%</td><td>45.4%</td><td>0.0%</td><td>0.0%</td><td>0.0%</td></tr></table>
|
| 92 |
+
|
| 93 |
+
For CIFAR-10, standard Gaussian data augmentation yields comparable (but slightly worse) results to adversarial training on all considered metrics. For ImageNet we found that Gaussian data augmentation improves robustness to small $l _ { 2 }$ perturbations as well as robustness to other noise corruptions. The results are shown in Table 1. This holds both for generalization in all noises considered and for robustness to small perturbations. We found that performing data augmentation with heavy Gaussian noise $\mathit { \check { \sigma } } = 0 . 4$ for CIFAR-10 and $\sigma = 0 . 8$ for ImageNet) worked best. The adversarially trained CIFAR-10 models were trained in the $l _ { \infty }$ metric and they performed especially well on worst-case perturbations in this metric. Prior work has observed that Gaussian data augmentation helps small perturbation robustness on MNIST (Kannan et al., 2018), but to our knowledge we are the first to measure this on CIFAR-10 and ImageNet.
|
| 94 |
+
|
| 95 |
+
Neither augmentation method shows much improved generalization in PCA noise. We hypothesize that adversarially trained models learn to project away the high-frequency information in the input, which would do little to improve performance in PCA noise, which is supported in the low-frequency subspace of the data distribution. Further work would be required to establish this.
|
| 96 |
+
|
| 97 |
+
We also considered the MNIST adversarially trained model from Madry et al. (2017), and found it to be a special case where although robustness to small perturbations was increased generalization in noise was not improved. This is because this model violates the linearity assumption discussed in Section 4. This overfitting to the $l _ { \infty }$ metric has been observed in prior work (Sharma & Chen, 2017). More details can be found in Appendix D.
|
| 98 |
+
|
| 99 |
+
Although no $l _ { p }$ -robust open sourced ImageNet model exists, recent work has found that the adversarially trained models on Tiny ImageNet from Kannan et al. (2018) generalize very well on a large suite of common image corruptions (Hendrycks & Dietterich, 2018).
|
| 100 |
+
|
| 101 |
+
Failed Adversarial Defenses Do Not Improve Generalization in Noise. We performed a similar analysis on seven previously published adversarial defense strategies. These methods have already been shown to result in masking gradients, which cause standard optimization procedures to fail to find errors, rather than actually improving small perturbation robustness (Athalye et al., 2018). We find that these methods also show no improved generalization in Gaussian noise. The results are shown in Figure 3. Given how easy it is for a method to show improved robustness to standard optimization procedures without changing the decision boundary in any meaningful way, we strongly recommend that future defense efforts evaluate on out-of-distribution inputs such as the noise distributions we consider here. The current standard practice of evaluating solely on gradient-based attack algorithms is making progress more difficult to measure.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 3: The performance in Gaussian noise of several previously published defenses for ImageNet, along with a model trained on Gaussian noise at $\sigma = 0 . 4$ for comparison. For each point we ran ten trials; the error bars show one standard deviation. All of these defenses are now known not to improve adversarial robustness (Athalye et al., 2018). The defense strategies include bitdepth reduction (Guo et al., 2017), JPEG compression (Guo et al., 2017; Dziugaite et al., 2016; Liu et al., 2018; Aydemir et al., 2018; Das et al., 2018; 2017), Pixel Deflection (Prakash et al., 2018), total variance minimization (Guo et al., 2017), respresentation-guided denoising (Liao et al., 2018), and random resizing and random padding of the input image (Xie et al., 2017).
|
| 105 |
+
|
| 106 |
+
Obtaining Zero Test Error in Noise is Nontrivial. It is important to note that applying Gaussian data augmentation does not reduce error rates in Gaussian noise to zero. For example, we performed Gaussian data augmentation on CIFAR-10 at $\sigma = . 1 5$ and obtained $9 9 . 9 \%$ training accuracy but $7 7 . 5 \%$ test accuracy in the same noise distribution. (For comparison, the naturally trained obtains $9 5 \%$ clean test accuracy.) Previous work (Dodge & Karam, 2017b) has also observed that obtaining perfect generalization in large Gaussian noise is nontrivial. This mirrors Schmidt et al. (2018), which found that small perturbation robustness did not generalize to the test set. This is perhaps not surprising given that error rates on the clean test set are also non-zero. Although the model is in some sense “superhuman” with respect to clean test accuracy, it still makes many mistakes on the clean test set that a human would never make. We collected some examples in Appendix I. More detailed results on training and testing in noise can be found in Appendices C and H.
|
| 107 |
+
|
| 108 |
+
# 6 ERRORS IN NOISE IMPLY ADVERSARIAL EXAMPLES FOR NOISY IMAGES
|
| 109 |
+
|
| 110 |
+
The Gaussian Isoperimetric Inequality. Let $x$ be a correctly classified image and consider the distribution $q$ of Gaussian perturbations of $x$ with some fixed variance $\sigma ^ { 2 } I$ . For this distribution, there is a precise sense in which small adversarial perturbations exist only because test error is nonzero. That is, given the error rates we actually observe on noisy images, most noisy images must be close to the error set. This result holds completely independently of any assumptions about the model and follows from a fundamental geometric property of the high-dimensional Gaussian distribution, which we will now make precise.
|
| 111 |
+
|
| 112 |
+
For an image $x$ and the corresponding noisy image distribution $q$ , let $\epsilon _ { q } ^ { * } ( E )$ be the median distance from one of these noisy images to the nearest error. (In other words, it is the $\epsilon$ for which $\mathbb { P } _ { x \sim q } [ x \in$ $\begin{array} { r } { { E } _ { \epsilon } { } ] = \frac { 1 } { 2 } } \end{array}$ .) As before, let $\mathbb { P } _ { x \sim q } [ x \in E ]$ be the probability that a random Gaussian perturbation of $x$ lies in $E$ . It is possible to deduce a bound relating these two quantities from the Gaussian isoperimetric inequality (Borell, 1975). The form we will use is:
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
Figure 4: The adversarial example phenomenon occurs for noisy images as well as clean ones. Starting with a noisy image that that is correctly classified, one can apply carefully crafted imperceptible noise to it which causes the model to output an incorrect answer. This occurs even though the error rate among random Gaussian perturbations of this image is small (less than . $1 \%$ for the ImageNet panda shown above). In fact, we prove that the presence of errors in Gaussian noise logically implies that small adversarial perturbations exists around noisy images. The only way to “defend” against such adversarial perturbations is to reduce the error rate in Gaussian noise.
|
| 116 |
+
|
| 117 |
+
Theorem (Gaussian Isoperimetric Inequality). Let $q = \mathcal { N } ( 0 , \sigma ^ { 2 } I )$ be the Gaussian distribution on $\mathbb { R } ^ { n }$ with variance $\sigma ^ { 2 } I$ , and let $\mu = \mathbb { P } _ { x \sim q } [ x \in E ]$ .
|
| 118 |
+
|
| 119 |
+
Write $\begin{array} { r } { \Phi ( t ) = \frac { 1 } { \sqrt { 2 \pi } } \int _ { - \infty } ^ { t } \exp ( - x ^ { 2 } / 2 ) d x } \end{array}$ , the cdf of the univariate standard normal distribution. If $\begin{array} { r } { \mu \geq \frac { 1 } { 2 } } \end{array}$ , then $\epsilon _ { q } ^ { * } ( E ) = 0$ . Otherwise, $\epsilon _ { q } ^ { * } ( E ) \leq - \sigma \Phi ^ { - 1 } ( \mu )$ , with equality when $E$ is a half space.
|
| 120 |
+
|
| 121 |
+
In particular, for any machine learning model for which the error rate in the distribution $q$ is at least $\mu$ , the median distance to the nearest error is at most $- \sigma \Phi ^ { - 1 } ( \mu )$ . (Note that $\Phi ^ { - 1 } ( \mu )$ is negative when $\mu < \textstyle { \frac { 1 } { 2 } }$ .) Because each coordinate of a multivariate normal is a univariate normal, $- \Phi ^ { - 1 } ( \mu )$ is the distance to a half space for which the error rate is $\mu$ when $\sigma = 1$ . (We have the same indirect dependence on dimension here as we saw in Section 4: the distance to a typical sample from the Gaussian is $\sigma { \sqrt { n } }$ .)
|
| 122 |
+
|
| 123 |
+
In Appendix E we will give the more common statement of the Gaussian isoperimetric inequality along with a proof of the version presented here. In geometric terms, we can say that a half space is the set $E$ of a fixed volume that minimizes the surface area under the Gaussian measure, similar to how a circle is the set of fixed area that minimizes the perimeter. So among models with some fixed test error $\mathbb { P } _ { x \sim q } [ x \in E ]$ , the most robust on this distribution are the ones whose error set is a half space.
|
| 124 |
+
|
| 125 |
+
Comparing Neural Networks to the Isoperimetric Bound. We evaluated these quantities for several models and many images from the CIFAR-10 and ImageNet test sets. Just like for clean images, we found that most noisy images are both correctly classified and very close to a visually similar image which is not. (See Figure 4.)
|
| 126 |
+
|
| 127 |
+
As we mentioned in Section 4, it is not actually possible to compute $\epsilon _ { q } ^ { * }$ precisely for the error set of a neural network, so we again report an estimate. For each test image, we took 1,000 samples from the corresponding Gaussian and estimated $\epsilon _ { q } ^ { * }$ using PGD with 200 steps on each sample and reported the median.
|
| 128 |
+
|
| 129 |
+
We find that for the five models we considered on CIFAR-10 and ImageNet, the relationship between our estimate of $\epsilon _ { q } ^ { * } ( E )$ and $\mathbb { P } _ { x \sim q } [ x \in E ]$ is already close to optimal. This is visualized in Figure 5. Note that in both cases, adversarial training does improve robustness to small perturbations, but the gains are primarily because error rates in Gaussian noise were dramatically improved, and less because the surface area of the error set was decreased. In particular, many test points do not appear on these graphs because error rates in noise were so low that we did not find any errors among the 100,000 samples we used. For example, for the naturally trained CIFAR model, about $1 \%$ of the points lie off the left edge of the plot, compared to about $59 \%$ for the adversarially trained model and $70 \%$ for the model trained on noise. This shows that adversarial training on small perturbations improved generalization to large random perturbations, as the isoperimetric inequality says it must.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 5: These plots give two ways to visualize the relationship between the error rate in noise and the distance from noisy points to the decision boundary (found using PGD). Each point on each plot represents one image from the test set. On the left, we compare the error rate of the model on Gaussian perturbations at $\sigma = 0 . 1$ to the distance from the median noisy point to its nearest error. On the right, we compare the $\sigma$ at which the error rate is 0.01 to this same median distance. (The plots on the right are therefore similar to the plots in Figure 1.) The thick black line at the top of each plot is the upper bound provided by the Gaussian isoperimetric inequality. We include data from a model trained on clean images, an adversarially trained model, and a model trained on Gaussian noise $( \sigma = 0 . 4 .$ ) As mentioned in Section 1, we were unable to run this experiment on an adversarially robust ImageNet model.
|
| 133 |
+
|
| 134 |
+
Not all models or functions will be this close to optimal. As a simple example, if we took one of the CIFAR models shown in Figure 5 and modified it so that the model outputs an error whenever each coordinate of the input is an integer multiple of $1 0 ^ { - 6 }$ , the resulting model would have an error within ${ \sqrt { { \frac { 1 } { 2 } } \cdot 1 0 ^ { - 6 } \cdot \mathrm { d i m } ( \mathrm { C I F A R } ) } } \approx 0 . 0 3 9$ of every point. In this case, adversarial examples would be a distinct phenomenon from test performance, since $\epsilon _ { q } ^ { * } ( E )$ would be far from optimal.
|
| 135 |
+
|
| 136 |
+
The contrast between these two settings is important for adversarial defense design. If adversarial examples arose from a badly behaved decision boundary (as in the latter case), then it would make sense to design defenses which attempt to smooth out the decision boundary in some way. However, because we observe that image models are already close to the optimal bound on robustness for a fixed error rate in noise, future defense design should attempt to improve generalization in noise. Currently there is a considerable subset of the adversarial defense literature which develops methods that would remove any small “pockets” of errors but which don’t improve model generalization. One example is Xie et al. (2017) which proposes randomly resizing the input to the network as a defense strategy. Unfortunately, this defense, like many others, has been shown to be ineffective against stronger adversaries (Carlini & Wagner, 2017a;b; Athalye et al., 2018).
|
| 137 |
+
|
| 138 |
+
# 7 CONCLUSION
|
| 139 |
+
|
| 140 |
+
We proved a fundamental relationship between generalization in noisy image distributions and the existence of small adversarial perturbations. By appealing to the Gaussian isoperimetric inequality, we formalized the notion of what it means for a decision boundary to be badly behaved. We showed that, for noisy images, there is very little room to improve robustness without also decreasing the volume of the error set, and we provided evidence that small perturbations of clean images can also be explained in a similar way. These results show that small-perturbation adversarial robustness is closely related to generalization in the presence of noise and that future defense efforts can measure progress by measuring test error in different noise distributions.
|
| 141 |
+
|
| 142 |
+
Indeed, several such noise distributions have already been proposed, and other researchers have developed methods which improve generalization in these distributions (Hendrycks & Dietterich, 2018; Dodge & Karam, 2017b;a; Vasiljevic et al., 2016; Zheng et al., 2016). Our work suggests that adversarial defense and improving generalization in noise involve attacking the same set of errors in two different ways — the first community tries to remove the errors on the boundary of the error set while the second community tries to reduce the volume of the error set. The isoperimetric inequality connects these two perspectives, and suggests that improvements in adversarial robustness should result in improved generalization in noise and vice versa. Adversarial training on small perturbations on CIFAR-10 also improved generalization in noise, and training on noise improved robustness to small perturbations.
|
| 143 |
+
|
| 144 |
+
In the introduction we referred to a question from Szegedy et al. (2014) about why we find errors so close to our test points while the test error itself is so low. We can now suggest an answer: despite what our low-dimensional visual intuition may lead us to believe, these errors are not in fact unnaturally close given the error rates we observe in noise. There is a sense, then, in which we simply haven’t reduced the test error enough to expect to have removed most nearby errors.
|
| 145 |
+
|
| 146 |
+
While we focused on the Gaussian distribution, similar conclusions can be made about other distributions. In general, in high dimensions, the $\epsilon$ -boundary measure of a typical set is large even when its volume is small, and this observation does not depend on anything specific about the Gaussian distribution. The Gaussian distribution is a special case in that we can easily prove that all sets will have large $\epsilon$ -boundary measure. Mahloujifar et al. (2018) proved a similar theorem for a larger class of distributions. For other data distributions not every set has large $\epsilon$ -boundary measure, but under some additional assumptions it still holds that most sets do. An investigation of this relationship on the MNIST distribution can be found in Gilmer et al. (2018b, Appendix G).
|
| 147 |
+
|
| 148 |
+
We believe it would be beneficial for the adversarial defense literature to start reporting generalization in noisy image distributions, such as the common corruption benchmark introduced in Hendrycks & Dietterich (2018), rather than the current practice of only reporting empirical estimates of adversarial robustness. There are several reasons for this recommendation.
|
| 149 |
+
|
| 150 |
+
1. Measuring test error in noise is significantly easier than measuring adversarial robustness — computing adversarial robustness perfectly requires solving an NP-hard problem for every point in the test set (Katz et al., 2017). Since Szegedy et al. (2014), hundreds of adversarial defense papers have been published. To our knowledge, only one (Madry et al., 2017) has reported robustness numbers which were confirmed by a third party. We believe the difficulty of measuring robustness under the usual definition has contributed to this unproductive situation.
|
| 151 |
+
2. Measuring test error in noise would also allow us to determine whether or not these methods improve robustness in a trivial way, such as how the robust MNIST model learned to threshold the input, or whether they have actually succeeded in improving generalization outside the natural data distribution.
|
| 152 |
+
3. All of the failed defense strategies we examined failed to improve generalization in noise. For this reason, we should be highly skeptical of defense strategies that only claim improved $l _ { p }$ -robustness but do not demonstrate robustness in more general settings.
|
| 153 |
+
4. Finally, if the goal is improving the security of our models in adversarial settings, errors in the presence of noise are already indicative that our models are not secure. Until our models are perfectly robust in the presence of average-case corruptions, they will not be robust in worst-case settings. The usefulness of $l _ { p }$ -robustness in realistic threat models is limited when attackers are not constrained to making small modifications.
|
| 154 |
+
|
| 155 |
+
The interest in measuring $l _ { p }$ robustness arose from a sense of surprise that errors could be found so close to correctly classified points. But from the perspective described in this paper, the phenomenon is less surprising. Statistical classifiers make a large number of errors outside the data on which they were trained, and small adversarial perturbations are simply the nearest ones.
|
| 156 |
+
|
| 157 |
+
# REFERENCES
|
| 158 |
+
|
| 159 |
+
Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. arXiv preprint arXiv:1802.00420, 2018.
|
| 160 |
+
|
| 161 |
+
Ayse Elvan Aydemir, Alptekin Temizel, and Tugba Taskaya Temizel. The effects of jpeg and jpeg2000 compression on attacks using adversarial examples. arXiv preprint arXiv:1803.10418, 2018.
|
| 162 |
+
|
| 163 |
+
Aharon Azulay and Yair Weiss. Why do deep convolutional networks generalize so poorly to small image transformations? arXiv preprint arXiv:1805.12177, 2018.
|
| 164 |
+
|
| 165 |
+
Battista Biggio and Fabio Roli. Wild patterns: Ten years after the rise of adversarial machine learning. Pattern Recognition, 84:317–331, 2018.
|
| 166 |
+
|
| 167 |
+
Christer Borell. The Brunn-Minkowski inequality in Gauss space. Inventiones mathematicae, 30(2): 207–216, 1975.
|
| 168 |
+
|
| 169 |
+
Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. arXiv preprint arXiv:1705.07263, 2017a.
|
| 170 |
+
|
| 171 |
+
Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In Security and Privacy (SP), 2017 IEEE Symposium on, pp. 39–57. IEEE, 2017b.
|
| 172 |
+
|
| 173 |
+
Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv preprint arXiv:1805.09501, 2018.
|
| 174 |
+
|
| 175 |
+
Nilesh Dalvi, Pedro Domingos, Sumit Sanghai, Deepak Verma, et al. Adversarial classification. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 99–108. ACM, 2004.
|
| 176 |
+
|
| 177 |
+
Nilaksh Das, Madhuri Shanbhogue, Shang-Tse Chen, Fred Hohman, Li Chen, Michael E Kounavis, and Duen Horng Chau. Keeping the bad guys out: Protecting and vaccinating deep learning with jpeg compression. arXiv preprint arXiv:1705.02900, 2017.
|
| 178 |
+
|
| 179 |
+
Nilaksh Das, Madhuri Shanbhogue, Shang-Tse Chen, Fred Hohman, Siwei Li, Li Chen, Michael E Kounavis, and Duen Horng Chau. Shield: Fast, practical defense and vaccination for deep learning using jpeg compression. arXiv preprint arXiv:1802.06816, 2018.
|
| 180 |
+
|
| 181 |
+
Samuel Dodge and Lina Karam. Quality resilient deep neural networks. arXiv preprint arXiv:1703.08119, 2017a.
|
| 182 |
+
|
| 183 |
+
Samuel Dodge and Lina Karam. A study and comparison of human and deep learning recognition performance under visual distortions. In Computer Communication and Networks (ICCCN), 2017 26th International Conference on, pp. 1–7. IEEE, 2017b.
|
| 184 |
+
|
| 185 |
+
Gintare Karolina Dziugaite, Zoubin Ghahramani, and Daniel M Roy. A study of the effect of jpg compression on adversarial images. arXiv preprint arXiv:1608.00853, 2016.
|
| 186 |
+
|
| 187 |
+
Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Robustness of classifiers: from adversarial to random noise. In Advances in Neural Information Processing Systems, pp. 1632–1640, 2016.
|
| 188 |
+
|
| 189 |
+
Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard, and Stefano Soatto. Empirical study of the topology and geometry of deep networks. In IEEE CVPR, number CONF, 2018.
|
| 190 |
+
|
| 191 |
+
Jean-Yves Franceschi, Alhussein Fawzi, and Omar Fawzi. Robustness of classifiers to uniform $\ell _ { p }$ and Gaussian noise. arXiv preprint arXiv:1802.07971, 2018.
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
Justin Gilmer, Luke Metz, Fartash Faghri, Samuel S Schoenholz, Maithra Raghu, Martin Wattenberg, and Ian Goodfellow. Adversarial spheres. arXiv preprint arXiv:1801.02774, 2018b.
|
| 196 |
+
|
| 197 |
+
Chuan Guo, Mayank Rana, Moustapha Cisse, and Laurens van der Maaten. Countering adversarial images using input transformations. arXiv preprint arXiv:1711.00117, 2017.
|
| 198 |
+
|
| 199 |
+
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.
|
| 200 |
+
|
| 201 |
+
Dan Hendrycks and Thomas G Dietterich. Benchmarking neural network robustness to common corruptions and surface variations. arXiv preprint arXiv:1807.01697, 2018.
|
| 202 |
+
|
| 203 |
+
Harini Kannan, Alexey Kurakin, and Ian Goodfellow. Adversarial logit pairing. arXiv preprint arXiv:1803.06373, 2018.
|
| 204 |
+
|
| 205 |
+
Guy Katz, Clark Barrett, David L Dill, Kyle Julian, and Mykel J Kochenderfer. Reluplex: An efficient smt solver for verifying deep neural networks. In International Conference on Computer Aided Verification, pp. 97–117. Springer, 2017.
|
| 206 |
+
|
| 207 |
+
Fangzhou Liao, Ming Liang, Yinpeng Dong, Tianyu Pang, Jun Zhu, and Xiaolin Hu. Defense against adversarial attacks using high-level representation guided denoiser. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1778–1787, 2018.
|
| 208 |
+
|
| 209 |
+
Zihao Liu, Qi Liu, Tao Liu, Yanzhi Wang, and Wujie Wen. Feature distillation: Dnn-oriented jpeg compression against adversarial examples. arXiv preprint arXiv:1803.05787, 2018.
|
| 210 |
+
|
| 211 |
+
Aleksander Madry, Aleksander Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial examples. arXiv preprint arXiv:1706.06083, 2017.
|
| 212 |
+
|
| 213 |
+
Saeed Mahloujifar, Dimitrios I Diochnos, and Mohammad Mahmoody. The curse of concentration in robust learning: Evasion and poisoning attacks from concentration of measure. arXiv preprint arXiv:1809.03063, 2018.
|
| 214 |
+
|
| 215 |
+
Aaditya Prakash, Nick Moran, Solomon Garber, Antonella DiLillo, and James Storer. Deflecting adversarial attacks with pixel deflection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8571–8580, 2018.
|
| 216 |
+
|
| 217 |
+
Amir Rosenfeld, Richard Zemel, and John K Tsotsos. The elephant in the room. arXiv preprint arXiv:1808.03305, 2018.
|
| 218 |
+
|
| 219 |
+
Ludwig Schmidt, Shibani Santurkar, Dimitris Tsipras, Kunal Talwar, and Aleksander M ˛adry. Adversarially robust generalization requires more data. arXiv preprint arXiv:1804.11285, 2018.
|
| 220 |
+
|
| 221 |
+
Yash Sharma and Pin-Yu Chen. Breaking the madry defense model with l1-based adversarial examples. arXiv preprint arXiv:1710.10733, 2017.
|
| 222 |
+
|
| 223 |
+
Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In International Conference on Learning Representations, 2014. URL http://arxiv.org/abs/1312.6199.
|
| 224 |
+
|
| 225 |
+
Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. arXiv preprint arXiv:1705.07204, 2017.
|
| 226 |
+
|
| 227 |
+
Igor Vasiljevic, Ayan Chakrabarti, and Gregory Shakhnarovich. Examining the impact of blur on recognition by convolutional networks. arXiv preprint arXiv:1611.05760, 2016.
|
| 228 |
+
|
| 229 |
+
Z. Wang and A. C. Bovik. Mean squared error: Love it or leave it? a new look at signal fidelity measures. IEEE Signal Processing Magazine, 26(1):98–117, 2009.
|
| 230 |
+
|
| 231 |
+
Chaowei Xiao, Jun-Yan Zhu, Bo Li, Warren He, Mingyan Liu, and Dawn Song. Spatially transformed adversarial examples. arXiv preprint arXiv:1801.02612, 2018.
|
| 232 |
+
|
| 233 |
+
Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. arXiv preprint arXiv:1711.01991, 2017.
|
| 234 |
+
|
| 235 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 236 |
+
|
| 237 |
+
Stephan Zheng, Yang Song, Thomas Leung, and Ian Goodfellow. Improving the robustness of deep neural networks via stability training. In Proceedings of the ieee conference on computer vision and pattern recognition, pp. 4480–4488, 2016.
|
| 238 |
+
|
| 239 |
+
<table><tr><td>0</td><td>0.00625</td><td>0.0125</td><td>0.025</td><td>0.075</td><td>0.15</td><td>0.25</td></tr><tr><td>Training Accuracy</td><td>100%</td><td>100%</td><td>100%</td><td>100%</td><td>99.9%</td><td>99.4%</td></tr><tr><td>Test Accuracy</td><td>96.0%</td><td>95.5%</td><td>94.8%</td><td>90.4%</td><td>77.5%</td><td>62.2%</td></tr></table>
|
| 240 |
+
|
| 241 |
+
Table 2: Wide ResNet-28-10 (Zagoruyko & Komodakis, 2016) trained and tested on CIFAR-10 with Gaussian noise with standard deviation $\sigma$ .
|
| 242 |
+
|
| 243 |
+
Table 3: The models from Section 1 trained and tested on ImageNet with Gaussian noise with standard deviation $\sigma$ ; the column labeled 0 refers to a model trained only on clean images.
|
| 244 |
+
|
| 245 |
+
<table><tr><td>0</td><td>0</td><td>0.1</td><td>0.2</td><td>0.4</td><td>0.6</td><td>0.8</td></tr><tr><td>Clean Training Accuracy</td><td>91.5%</td><td>90.8%</td><td>89.9%</td><td>87.7%</td><td>86.1%</td><td>84.6%</td></tr><tr><td>Clean Test Accuracy</td><td>75.9%</td><td>75.5%</td><td>75.2%</td><td>74.2%</td><td>73.3%</td><td>72.4%</td></tr><tr><td>Noisy Training Accuracy</td><td></td><td>89.0%</td><td>85.7%</td><td>78.3%</td><td>71.7%</td><td>65.2%</td></tr><tr><td>Noisy Test Accuracy</td><td>一</td><td>73.9%</td><td>70.9%</td><td>65.2%</td><td>59.7%</td><td>54.0%</td></tr></table>
|
| 246 |
+
|
| 247 |
+
# A TRAINING DETAILS
|
| 248 |
+
|
| 249 |
+
Models trained on CIFAR-10. We trained the Wide-ResNet-28-10 model (Zagoruyko & Komodakis, 2016) using standard data augmentation of flips, horizontal shifts and crops in addition to Gaussian noise independently sampled for each image in every minibatch. The models were trained with the open-source code by Cubuk et al. (2018) for 200 epochs, using the same hyperparameters which we summarize here: a weight decay of 5e-4, learning rate of 0.1, batch size of 128. The learning rate was decayed by a factor of 0.2 at epochs 60, 120, 160.
|
| 250 |
+
|
| 251 |
+
Models trained on ImageNet. The ResNet-50 model (He et al., 2016) was trained with a learning rate of 1.6, batch size of 4096, and weight decay of 1e-4. During training, random crops and horizontal flips were used, in addition to the Gaussian noise independently sampled for each image in every minibatch. The models were trained for 90 epochs, where the learning rate was decayed by a factor of 0.1 at epochs 30, 60, and 80. Learning rate was linearly increased from 0 to the value of 1.6 over the first 5 epochs.
|
| 252 |
+
|
| 253 |
+
# B NOISE ATTACK DETAILS
|
| 254 |
+
|
| 255 |
+
Here we provide more detail for the noise distributions considered in Section 5. The stAdv attack defines a flow field over the pixels of the image and shifts the pixels according to this flow. The field is parameterized by a latent $Z$ . When we measure accuracy against our randomized variant of this attack, we randomly sample $Z$ from a multivariate Gaussian distribution with standard deviation $\sigma$ To implement this attack we used the open sourced code from Xiao et al. (2018). PCA-100 noise first samples noise from a Gaussian distribution $\mathcal { N } ( 0 , \sigma )$ , and then projects this noise onto the first $1 0 0 \mathrm { P C A } ^ { - }$ components of the data. For ImageNet, the input dimension is too large to perform a PCA decomposition on the entire dataset. So we first perform a PCA decomposition on $3 0 \mathrm { x } 3 0 \mathrm { x } 1$ patches taken from different color channels of the data. To general the noise we first sample from a 900 dimensional Gaussian, then project this into the basis spanned by the top $1 0 0 \mathrm { P C A }$ components, then finally tile this projects to the full $2 9 9 \mathrm { x } 2 9 9$ dimension of the input. Each color channel is constructed independently in this fashion.
|
| 256 |
+
|
| 257 |
+
# C TRAINING AND TESTING ON GAUSSIAN NOISE
|
| 258 |
+
|
| 259 |
+
In Section 5, we mentioned that it is not trivial to learn the distribution of noisy images simply by augmenting the training data distribution. In Tables 2 and 3 we present more information about the performance of the models we trained and tested on various scales of Gaussian noise.
|
| 260 |
+
|
| 261 |
+
<table><tr><td></td><td>Clean</td><td>Pepper p=0.2</td><td>Gaussian σ = 0.3</td><td>stAdv σ = 1.0</td><td>PCA-100 σ= 0.3</td></tr><tr><td>Model Clean</td><td>Accuracy 99.2%</td><td>Accuracy 81.4%</td><td>Accuracy 96.9%</td><td>Accuracy 89.5%</td><td>Accuracy 63.3%</td></tr><tr><td>Adv</td><td>98.4%</td><td>27.5%</td><td>78.2%</td><td>93.2%</td><td>47.1%</td></tr></table>
|
| 262 |
+
|
| 263 |
+
Table 4: The performance of ordinarily and adversarially trained MNIST models on various noise distributions.
|
| 264 |
+
|
| 265 |
+
# D RESULTS ON MNIST
|
| 266 |
+
|
| 267 |
+
MNIST is a special case when it comes to the relationship between small adversarial perturbations and generalization in noise. Indeed prior has already observed that an MNIST model can trivially become robust to small $l _ { \infty }$ perturbations by learning to threshold the input (Schmidt et al., 2018), and observed that the model from Madry et al. (2017) indeed seems to do this. When we investigated this model in different noise distributions we found it generalizes worse than a naturally trained model, results are shown in Table 4. Given that it is possible for a defense to overfit to a particular $l _ { p }$ metric, future work would be strengthened by demonstrating improved generalization outside the natural data distribution.
|
| 268 |
+
|
| 269 |
+
# E THE GAUSSIAN ISOPERIMETRIC INEQUALITY
|
| 270 |
+
|
| 271 |
+
Here we will discuss the Gaussian isoperimetric inequality more thoroughly than we did in the text. We will present some of the geometric intuition behind the theorem, and in the end we will show how the version quoted in the text follows from the form in which the inequality is usually stated.
|
| 272 |
+
|
| 273 |
+
The historically earliest version of the isoperimetric inequality, and probably the easiest to understand, is about areas of subsets of the plane and has nothing to do with Gaussians at all. It is concerned with the following problem: among all measurable subsets of the plane with area $A$ , which ones have the smallest possible perimeter?1 One picture to keep in mind is to imagine that you are required to fence off some region of the plane with area $A$ and you would like to use as little fence as possible. The isoperimetric inequality says that the sets which are most “efficient” in this sense are balls.
|
| 274 |
+
|
| 275 |
+
Some care needs to be taken with the definition of the word “perimeter” here — what do we mean by the perimeter of some arbitrary subset of $\mathbb { R } ^ { 2 } ?$ The definition that we will use involves the concept of the $\epsilon$ -boundary measure we discussed in the text. For any set $E$ and any $\epsilon > 0$ , recall that we defined the $\epsilon$ -extension of $E$ , written $E _ { \epsilon }$ , to be the set of all points which are within $\epsilon$ of a point in $E$ ; writing $A ( E )$ for the area of $E$ , we then define the perimeter of $E$ to be
|
| 276 |
+
|
| 277 |
+
$$
|
| 278 |
+
\operatorname { s u r f } ( E ) : = \operatorname* { l i m } _ { \epsilon \to 0 } \operatorname* { i n f } _ { \epsilon } { \frac { 1 } { \epsilon } } \left( A ( E _ { \epsilon } ) - A ( E ) \right) .
|
| 279 |
+
$$
|
| 280 |
+
|
| 281 |
+
A good way to convince yourself that this is reasonable is to notice that, for small $\epsilon$ , $E _ { \epsilon } - E$ looks like a small band around the perimeter of $E$ with width $\epsilon$ . The isoperimetric inequality can then be formally expressed as giving a bound on the quantity inside the limit in terms of what it would be for a ball. (This is slightly stronger than just bounding the perimeter, that is, bounding the limit itself, but this stronger version is still true.) That is, for any measurable set $E \subseteq \mathbb { R } ^ { 2 }$ ,
|
| 282 |
+
|
| 283 |
+
$$
|
| 284 |
+
\frac { 1 } { \epsilon } ( A ( E _ { \epsilon } ) - A ( E ) ) \geq 2 \sqrt { \pi A ( E ) } + \epsilon \pi .
|
| 285 |
+
$$
|
| 286 |
+
|
| 287 |
+
It is a good exercise to check that we have equality here when $E$ is a ball.
|
| 288 |
+
|
| 289 |
+
There are many generalizations of the isoperimetric inequality. For example, balls are also the subsets in $\mathbb { R } ^ { n }$ which have minimal surface area for a given fixed volume, and the corresponding set on the surface of a sphere is a “spherical cap,” the set of points inside a circle drawn on the surface of the sphere. The version we are most concerned with in this paper is the generalization to a Gaussian distribution. Rather than trying to relate the volume of $E$ to the volume of $E _ { \epsilon }$ , the Gaussian isoperimetric inequality is about the relationship between the probability that a random sample from the Gaussian distribution lands in $E$ or $E _ { \epsilon }$ . Other than this, though, the question we are trying to answer is the same: for a given probability $p$ , among all sets $E$ for which the probability of landing in $E$ is $p$ , when is the probability of landing in $E _ { \epsilon }$ as small as possible?
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 6: The Gaussian isoperimetric inequality relates the amount of probability mass contained in a set $E$ to the amount contained in its $\epsilon$ -extension $E _ { \epsilon }$ . A sample from the Gaussian is equally likely to land in the pink set on the left or the pink set on the right, but the set on the right has a larger $\epsilon$ -extension. The Gaussian isoperimetric inequality says that the sets with the smallest possible $\epsilon$ -extensions are half spaces.
|
| 293 |
+
|
| 294 |
+
The Gaussian isoperimetric inequality says that the sets that do this are half spaces. (See Figure 6.) Just as we did in the plane, it is convenient to express this as a bound on the probability of landing in $E _ { \epsilon }$ for an arbitrary measurable set $E$ . This can be stated as follows:
|
| 295 |
+
|
| 296 |
+
Theorem. Consider the standard normal distribution $q$ on $\mathbb { R } ^ { n }$ , and let $E$ be a measurable subset of $\mathbb { R } ^ { n }$ . Write
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\Phi ( t ) = \frac { 1 } { \sqrt { 2 \pi } } \int _ { - \infty } ^ { t } \exp ( x ^ { 2 } / 2 ) d x ,
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
the cdf of the one-variable standard normal distribution.
|
| 303 |
+
|
| 304 |
+
For a measurable subset $E \subseteq \mathbb { R } ^ { n }$ , write $\alpha ( E ) = \Phi ^ { - 1 } ( \mathbb { P } _ { x \sim q } [ x \in E ] )$ . Then for any $\epsilon \geq 0$ ,
|
| 305 |
+
|
| 306 |
+
$$
|
| 307 |
+
\begin{array} { r } { \mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ] \geq \Phi ( \alpha ( E ) + \epsilon ) . } \end{array}
|
| 308 |
+
$$
|
| 309 |
+
|
| 310 |
+
The version we stated in the text involved $\epsilon _ { q } ^ { * } ( E )$ , the median distance from a random sample from $q$ to the closest point in $E$ . This is the same as the smallest $\epsilon$ for which $\begin{array} { r } { \mathbb { P } _ { x \sim q } [ x \in E _ { \epsilon } ] = \frac { 1 } { 2 } } \end{array}$ . So, when $\epsilon = \epsilon _ { q } ^ { * } ( E )$ , the left-hand side of the Gaussian isoperimetric inequality is $\textstyle { \frac { 1 } { 2 } }$ , giving us that $\begin{array} { r } { \Phi ( \alpha + \epsilon _ { q } ^ { * } ( E ) ) \le \frac { 1 } { 2 } } \end{array}$ .
|
| 311 |
+
|
| 312 |
+
Since $\Phi ^ { - 1 }$ is a strictly increasing function, applying it to both sides preserves the direction of this inequality. But $\Phi ^ { - 1 } ( \ O _ { 2 } ^ { 1 } ) = 0$ , so we in fact have that $\epsilon _ { q } ^ { * } ( E ) \leq - \alpha$ , which is the statement we wanted.
|
| 313 |
+
|
| 314 |
+
# F VISUALIZING THE OPTIMAL CURVES
|
| 315 |
+
|
| 316 |
+
The optimal bound according to the isoperimetric inequality gives surprisingly strong bounds in terms of the existence of worst-case $l _ { 2 }$ perturbations and error rates in Gaussian noise. In Figure 7 we plot the optimal curves for various values of $\sigma$ , visualize images sampled from $x + N ( 0 , \sigma )$ , and visualize images at various $l _ { 2 }$ distance from the unperturbed clean image. Even for very large noise $( \sigma = . 6 )$ ), test error needs to be less than $1 0 ^ { - 1 5 }$ in order to have worst-case perturbations be larger than 5.0. In order to visualize worst-case perturbations at varying $l _ { 2 }$ distances, we visualize an image that minimizes similarity according to the SSIM metric (Wang & Bovik, 2009). These images are found by performing gradient descent to minimize the SSIM metric subject to the containt that $| | x - x _ { a d v } | | _ { 2 } < \epsilon$ .
|
| 317 |
+
|
| 318 |
+

|
| 319 |
+
Figure 7: Top: The optimal curves on Imagenet for different values of $\sigma$ . Middle: Visualizing different coordinates of the optimal curves. First, random samples from $x + N ( 0 , \sigma I )$ for different values of $\sigma$ . Bottom: Images at different $l _ { 2 }$ distances from the unperturbed clean image. Each image visualized is the image at the given $l _ { 2 }$ distance which minimizes visual similarity according to the SSIM metric. Note that images at $l _ { 2 } < 5$ have almost no perceptible change from the clean image despite the fact that SSIM visual similarity is minimized.
|
| 320 |
+
|
| 321 |
+
G CHURCH WINDOW PLOTS
|
| 322 |
+
|
| 323 |
+
In this section we include many more visualizations of the sorts of church window plots we discussed briefly in Section 4. We will show an ordinarily trained model’s predictions on several different slices through the same CIFAR test point which illustrate different aspects of the story told in this paper. These images are best viewed in color.
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
Figure 8: A slice through a clean test point (black, center image), the closest error found using PGD (blue, top image), and a random error found using Gaussian noise (red, bottom image). For this visualization, and all others in this section involving Gaussian noise, we used noise with $\sigma = 0 . 0 5$ , at which the error rate was about $1 . 7 \%$ . In all of these images, the black circle indicates the distance at which the typical such Gaussian sample will lie. The plot on the right shows the probability that the model assigned to its chosen class. Green indicates a correct prediction, gray or white is an incorrect prediction, and brighter means more confident.
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
Figure 9: A slice through a clean test point (black, center image), the closest error found using PGD (blue, top image), and the average of a large number of errors randomly found using Gaussian noise (red, bottom image). The distance from the clean image to the PGD error was 0.12, and the distance from the clean image to the averaged error was 0.33. The clean image is assigned the correct class with probability $9 9 . 9 9 9 5 \%$ and the average and PGD errors are assigned the incorrect class with probabilities $5 5 . 3 \%$ and $6 1 . 4 \%$ respectively. However, it is clear from this image that moving even a small amount into the orange region will increase these latter numbers significantly. For example, the probability assigned to the PGD error can be increased to $9 9 \%$ by moving it further from the clean image in the same direction by a distance of 0.07.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 10: A slice through a clean test point (black, center image), a random error found using Gaussian noise (blue, top image), and the average of a large number of errors randomly found using Gaussian noise (red, bottom image).
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 11: A slice through a clean test point (black, center image) and two random errors found using Gaussian noise (blue and red, top and bottom images). Note that both random errors lie very close to the decision boundary, and in this slice the decision boundary does not appear to come close to the clean image.
|
| 336 |
+
|
| 337 |
+

|
| 338 |
+
Figure 12: A slice through three random errors found using Gaussian noise. (Note, in particular, that the black point in this visualization does not correspond to the clean image.)
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 13: A completely random slice through the clean image.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 15: The cdf of the error rates in noise for images in the test set. The blue curve corresponds to a model trained and tested on noise with $\sigma = 0 . 1$ , and the green curve is for a model trained and tested at $\sigma = 0 . 3$ . For example, the left most point on the blue curve indicates that about $40 \%$ of test images had an error rate of at least $1 0 ^ { - 3 }$ .
|
| 345 |
+
|
| 346 |
+

|
| 347 |
+
Figure 14: Some visualizations of the same phenomenon, but using the “pepper noise” discussed in Section 5 rather than Gaussian noise. In all of these visualizations, we see the slice through the clean image (black, center image), the same PGD error as above (red, bottom image), and a random error found using pepper noise (blue, top image). In the visualization on the left, we used an amount of noise that places the noisy image further from the clean image than in the Gaussian cases we considered above. In the visualization in the center, we selected a noisy image which was assigned to neither the correct class nor the class of the PGD error. In the visualization on the right, we selected a noisy image which was assigned to the same class as the PGD error.
|
| 348 |
+
|
| 349 |
+
# H THE DISTRIBUTION OF ERROR RATES IN NOISE
|
| 350 |
+
|
| 351 |
+
Using some of the models that were trained on noise, we computed, for each image in the CIFAR test set, the probably that a random Gaussian perturbation will be misclassified. A histogram is shown in Figure 15. Note that, even though these models were trained on noise, there are still many errors around most images in the test set. While it would have been possible for the reduced performance in noise to be due to only a few test points, we see clearly that this is not the case.
|
| 352 |
+
|
| 353 |
+
# I A COLLECTION OF MODEL ERRORS
|
| 354 |
+
|
| 355 |
+
In this section we first show a collection of iid test errors for the ResNet-50 model on the ImageNet validation set. We also visualize the severity of the different noise distributions considered in this work, along with model errors found by random sampling in these distributions.
|
| 356 |
+
|
| 357 |
+

|
| 358 |
+
Figure 16: A collection of adversarially chosen model errors. These errors appeared in the ImageNet validation set. Despite the high accuracy of the model there remain plenty of errors in the test set that a human would not make.
|
| 359 |
+
|
| 360 |
+

|
| 361 |
+
Figure 17: A collection of adversarially chosen model errors. These errors appeared in the ImageNet validation set. Despite the high accuracy of the model there remain plenty of errors in the test set that a human would not make.
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 18: Visualizing the severity of PCA noise, along with model errors found in this noise distribution.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 19: Visualizing the severity of Gaussian noise, along with model errors found in this noise distribution. Note the model shown here was trained at noise level $\sigma = . 6$ .
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 20: Visualizing the severity of pepper noise.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 21: Visualizing the severity of the randomized stAdv attack.
|
md/train/SJNRHiAcYX/SJNRHiAcYX.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BOOSTING TRUST REGION POLICY OPTIMIZATION BY NORMALIZING FLOWS POLICY
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We propose to improve trust region policy search with normalizing flows policy. We illustrate that when the trust region is constructed by KL divergence constraint, normalizing flows policy can generate samples far from the ’center’ of the previous policy iterate, which potentially enables better exploration and helps avoid bad local optima. We show that normalizing flows policy significantly improves upon factorized Gaussian policy baseline, with both TRPO and ACKTR, especially on tasks with complex dynamics such as Humanoid.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
In on-policy optimization, vanilla policy gradient algorithms suffer from occasional updates with large step size, which lead to collecting bad samples that the policy cannot recover from (Schulman et al., 2015). Motivated to overcome such instability, Trust Region Policy Optimization (TRPO) (Schulman et al., 2015) constraints the KL divergence between consecutive policies to achieve much more stable updates. However, with factorized Gaussian policy, such KL divergence constraint can put a very stringent restriction on the new policy, making it either hard to bypass locally optimal solutions or slow down the learning process.
|
| 12 |
+
|
| 13 |
+
Can we improve the learning process of trust region policy search by using a more expressive policy class? Intuitively, a more expressive policy class has more capacity to represent complex distributions and the KL constraint may not impose very strict restriction on the sample space. Though prior works (Haarnoja et al., 2017; 2018b;a) have proposed to use implicit generative models as policies, their focus is on off-policy learning. In this work, we show how normalizing flows can be combined with on-policy learning and boost the performance of trust region policy optimization.
|
| 14 |
+
|
| 15 |
+
The structure of our paper is as follows. In Section 2 and 3, we provide backgrounds on TRPO and related work. In Section 4, we introduce normalizing flows for control and analyze why KL constraint may not impose a constraint on the sampled action space. On illustrative examples, we show that normalizing flows policy can learn policies with correlated actions and multi-modal policies, which allows for potentially more efficient exploration. In Section 5, we show by comprehensive experiment results that normalizing flows significantly outperforms baseline policy classes when combined with trust region policy search algorithms.
|
| 16 |
+
|
| 17 |
+
# 2 BACKGROUND
|
| 18 |
+
|
| 19 |
+
# 2.1 MARKOV DECISION PROCESS
|
| 20 |
+
|
| 21 |
+
In the standard formulation of Markov Decision Process (MDP), at time step $t \geq 0$ , an agent is in state $s _ { t } \in S$ , takes an action $a _ { t } \in { \mathcal { A } }$ , receives an instant reward $r _ { t } = r ( s _ { t } , a _ { t } ) \in \mathbb { R }$ and transitions to a next state $s _ { t + 1 } \sim p ( \cdot | s _ { t } , a _ { t } ) \in \mathcal { S }$ . Let $\pi : S \mapsto P ( { \mathcal { A } } )$ be a policy, where $P ( A )$ is a set of distribution over the action space $\mathcal { A }$ . The discounted cumulative reward under policy $\pi$ is
|
| 22 |
+
|
| 23 |
+
$$
|
| 24 |
+
J ( \pi ) = \mathbb { E } _ { \pi } \big [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } r _ { t } \big ] ,
|
| 25 |
+
$$
|
| 26 |
+
|
| 27 |
+
where $\gamma \in [ 0 , 1 )$ is a discount factor. The objective of RL is to search for a policy $\pi$ that achieves the maximum cumulative reward $\pi ^ { * } = \arg \operatorname* { m a x } _ { \pi } J ( \pi )$ . For convenience, we define action value function
|
| 28 |
+
|
| 29 |
+
$Q ^ { \pi } ( s , a ) = \mathbb { E } _ { \pi } \big [ J ( \pi ) | s _ { 0 } = s , a _ { 0 } = a \big ]$ and value function $V ^ { \pi } ( s ) = \mathbb { E } _ { \pi } \big [ J ( \pi ) | s _ { 0 } = s , a _ { 0 } \sim \pi ( \cdot | s _ { 0 } ) \big ]$ .
|
| 30 |
+
We also define the advantage function $A ^ { \pi } ( s , a ) = Q ^ { \pi } ( s , a ) - V ^ { \pi } ( s )$ .
|
| 31 |
+
|
| 32 |
+
# 2.2 POLICY OPTIMIZATION
|
| 33 |
+
|
| 34 |
+
One way to search for $\pi ^ { * }$ is through direct policy search within a given policy class $\pi _ { \theta } , \theta \in \Theta$ where $\Theta$ is the parameter space for the policy parameter. We can update the paramter $\theta$ with policy gradient ascent, by computing $\begin{array} { r } { \nabla _ { \theta } J ( \pi _ { \theta } ) = \dot { \mathbb { E } } _ { \pi _ { \theta } } \Big [ \sum _ { t = 0 } ^ { \infty } A ^ { \pi _ { \theta } } \big ( s _ { t } , a _ { t } \big ) \dot { \nabla } _ { \theta } \log \pi _ { \theta } \big ( a _ { t } | s _ { t } \big ) \Big ] } \end{array}$ , then updating $\theta _ { \mathrm { n e w } } \theta + \alpha \nabla _ { \theta } J ( \pi _ { \theta } )$ for some learning rate $\alpha > 0$ . Alternatively, the update can be formulated as trust region optimization problem
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\begin{array} { r l } & { \displaystyle \operatorname* { m a x } _ { \theta _ { \mathrm { n e w } } } \mathbb { E } _ { \pi _ { \theta } } \Big [ \frac { \pi _ { \theta _ { \mathrm { n e w } } } \big ( a _ { t } | s _ { t } \big ) } { \pi _ { \theta } \big ( a _ { t } | s _ { t } \big ) } A ^ { \pi _ { \theta } } \big ( s _ { t } , a _ { t } \big ) \Big ] , } \\ & { \quad \quad \quad | \theta _ { \mathrm { n e w } } - \theta | | _ { 2 } \leq \epsilon , } \end{array}
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
for some $\epsilon > 0$ . If we do a linear approximation of the objective in (2), - πθnew (at|st)π (a |s ) Aπθ (st, at) ≈ $\mathbb { E } _ { \pi _ { \theta } } \left[ A ^ { \pi _ { \theta } } ( s _ { t } , a _ { t } ) \right] + \nabla _ { \theta } J ( \pi _ { \theta } ) ^ { T } ( \theta _ { \mathrm { n e w } } - \theta )$ , we recover the gradient update by properly choosing $\epsilon$ .
|
| 41 |
+
|
| 42 |
+
# 2.3 TRUST REGION POLICY OPTIMIZATION
|
| 43 |
+
|
| 44 |
+
Trust Region Policy Optimization (TRPO) (Schulman et al., 2015) applies information theoretic constraints instead of Euclidean constraints on $\theta _ { \mathrm { n e w } }$ and $\theta$ to better capture the geometry on the parameter space induced by the policy. In particular, consider the following trust region formulation
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\begin{array} { r l r } & { } & { \underset { \theta _ { \mathrm { n e w } } } { \operatorname* { m a x } } \mathbb { E } _ { \boldsymbol { \pi } _ { \boldsymbol { \theta } } } \big [ \frac { \pi _ { \boldsymbol { \theta } _ { \mathrm { n e w } } } \big ( \boldsymbol { a } _ { t } \big | \boldsymbol { s } _ { t } \big ) } { \pi _ { \boldsymbol { \theta } } \big ( \boldsymbol { a } _ { t } \big | \boldsymbol { s } _ { t } \big ) } A ^ { \pi _ { \boldsymbol { \theta } } } \big ( \boldsymbol { s } _ { t } , \boldsymbol { a } _ { t } \big ) \big ] , } \\ & { } & { \mathbb { E } _ { s } \left[ \mathbb { K L } [ \pi _ { \boldsymbol { \theta } } \big ( \cdot | \boldsymbol { s } \big ) \big | \big | \pi _ { \theta _ { \mathrm { n e w } } } \big ( \cdot | \boldsymbol { s } \big ) \big ] \right] \leq \epsilon , } \end{array}
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\mathbb { E } _ { s } \left[ \cdot \right]$ is w.r.t. the state visit distribution induced by $\pi _ { \theta }$ . The trust region enforced by the KL divergence entails that the update according to (3) optimizes a lower bound of $J ( \pi _ { \theta } )$ , so as to avoid accidentally taking large steps that irreversibly degrade the policy performance during training as in vanilla policy gradient (2) (Schulman et al., 2015). For a practical algorithm, the trust region constraint is approximated by a second order expansion $\mathbb { E } _ { s } \big [ \mathbb { K L } [ \pi _ { \theta } ( \cdot | s ) | | \overline { { \pi } } _ { \theta _ { \mathrm { n e w } } } ( \cdot | s ) ] \big ] \approx$ $( \theta _ { \mathrm { n e w } } - \theta ) ^ { T } \hat { H } ( \theta _ { \mathrm { n e w } } - \theta ) \leq \epsilon$ where $\begin{array} { r } { \hat { H } = \frac { \partial ^ { 2 } } { \partial \theta _ { \mathrm { - } } ^ { 2 } } \mathbb { E } _ { \pi _ { \theta } } \left[ \mathbb { K L } [ { \pi _ { \theta } ( \cdot | s ) } | | { \pi _ { \theta _ { \mathrm { n e w } } } ( \cdot | \bar { s } ) } ] \right] } \end{array}$ is the expected Fisher information matrix. If we also linearly approximate the objective, the trust region formulation turns into a quadratic programming
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\begin{array} { r } { \underset { \theta _ { \mathrm { n e w } } } { \operatorname* { m a x } } \nabla _ { \theta } J ( \pi _ { \theta } ) ^ { T } ( \theta _ { \mathrm { n e w } } - \theta ) , } \\ { ( \theta _ { \mathrm { n e w } } - \theta ) ^ { T } \hat { H } ( \theta _ { \mathrm { n e w } } - \theta ) \leq \epsilon . } \end{array}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
The optimal solution to (4) is $\propto \hat { H } ^ { - 1 } \nabla _ { \theta } J ( \pi _ { \theta } )$ . In cases where $\pi _ { \theta }$ is parameterized by a neural network with a large number of parameters, $\hat { H } ^ { - 1 }$ is formidable to compute. Instead, (Schulman et al., 2015) proposes to approximate $\bar { \hat { H } } ^ { - 1 } \nabla _ { \theta } J ( \pi _ { \theta } )$ by conjugate gradient (CG) descent (Wright & Nocedal, 1999) since it only requires relatively cheap Hessian-vector products. Given the approximated gradient direction $\hat { g } \approx \hat { H } ^ { - 1 } \nabla _ { \theta } J ( \pi _ { \theta } )$ obtained from CG, the KL constraint is enforced by setting $\begin{array} { r } { \Delta \theta = \sqrt { \frac { \epsilon } { \hat { g } ^ { T } \hat { H } \hat { g } } } \hat { g } } \end{array}$ . Finally a line search is carried out to determine a scaler $s$ by enforcing the exact KL constraint $\mathbb { E } _ { \pi _ { \theta } } \left[ \mathbb { K L } [ \pi _ { \theta + s \Delta \theta } | | \pi _ { \theta } ] \right] \leq \epsilon$ and finally $\theta _ { \mathrm { n e w } } \theta + s \Delta \theta$ .
|
| 57 |
+
|
| 58 |
+
ACKTR ACKTR (Wu et al.) proposes to replace the above CG descent of TRPO by Kroneckerfactored approximation (Martens $\&$ Grosse, 2015) when computing the inverse of Fisher information matrix $\hat { H } ^ { - 1 }$ . This approximation is more stable than CG descent and yields performance gain over conventional TRPO.
|
| 59 |
+
|
| 60 |
+
# 3 RELATED WORK
|
| 61 |
+
|
| 62 |
+
Most on-policy optimization algorithms are based on policy gradient theorem for function approximation (Sutton et al., 2000). Vanilla policy gradient algorithms are typically more stable than off-policy learning due to their optimization based formulation, but can suffer from instability as a result of occasionally large step sizes. In policy based algorithms, updating policies with very large step sizes can be catastrophic to the learning process since the policy will collect bad samples and potentially never recover (Schulman et al., 2015). Natural policy gradient (Kakade, 2002) applies natural gradient for the policy updates, which accounts for the information geometry induced by the policy and makes the update more stable. More recently, Trust region policy optimization (Schulman et al., 2015) derives a tractable trust region policy search algorithm based on the lower bound formulation of (Kakade & Langford, 2002) and achieves promising results on simulated locomotion tasks. The trust region is approximated by the Fisher information matrix, whose inverse is further approximated by conjugate gradient iterations (Wright & Nocedal, 1999). To further improve the scalability and numerical performance of TRPO, ACKTR (Wu et al.) applies Kronecker-factored approximation (Martens & Grosse, 2015) to invert the Fisher information matrix. Orthogonal to prior works, we aim to improve TRPO with a more expressive policy representation, and we show significant improvements on both TRPO and ACKTR. We limit our attention to (Dinh et al., 2014) while other normalizing flows architectures might provide additional benefits (Kingma & Dhariwal, 2018).
|
| 63 |
+
|
| 64 |
+
A number of recent prior works have proposed to boost RL algorithms with expressive policy classes. For off-policy learning, Soft Q-learning (SQL) (Haarnoja et al., 2017) takes an implicit generative model as the policy and trains the policy by Stein variational gradient (Liu & Wang, 2016). Similarly, (Tang & Agrawal, 2018) applies an implicit policy along with a discriminator to compute entropy regularized gradient for the implicit distribution. Latent space policy (Haarnoja et al., 2018a) applies normalizing flows as the policy and displays promising results on hierarchical tasks. Soft Actor Critic (SAC) applies a mixture of Gaussian as the policy. So far, expressive policy classes have shown improvement over baselines in the domain of off-policy learning. However, it is not clear whether such benefits come from an enriched policy class or a novel algorithmic procedure. In this work, we fix the trust region search algorithms and study the net effect of expressive policy classes.
|
| 65 |
+
|
| 66 |
+
By definition, normalizing flows stacks layers of invertible transformations to map a source noise into target samples (Dinh et al., 2016; Rezende & Mohamed, 2015). Through invertible transformations, normalizing flows retains tractable probability densities while being very expressive. Normalizing flows is widely applied in probabilistic generative modeling, such as variational inference (Rezende & Mohamed, 2015). Previous works have proposed to represent policies using normalizing flows in the context of off-policy learning (Haarnoja et al., 2018a). Complement to prior works, we show that normalizing flows can significantly boost the performance of on-policy optimization.
|
| 67 |
+
|
| 68 |
+
# 4 NORMALIZING FLOWS POLICY FOR ON-POLICY OPTIMIZATION
|
| 69 |
+
|
| 70 |
+
# 4.1 NORMALIZING FLOWS FOR CONTROL
|
| 71 |
+
|
| 72 |
+
We construct a stochastic policy with normalizing flows. Normalizing flows (Rezende & Mohamed, 2015; Dinh et al., 2016) have been applied in variational inference and probabilistic modeling to represent complex distributions. In general, consider transforming a source noise $\epsilon \sim \rho _ { 0 } ( \cdot )$ by a series of invertible nonlinear functions $g _ { \theta _ { i } } ( \cdot ) , 1 \leq i \leq K$ each with parameter $\theta _ { i }$ , to output a target sample $x$ ,
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
x = g _ { \theta _ { K } } \circ g _ { \theta _ { K - 1 } } \circ \ldots \circ g _ { \theta _ { 2 } } \circ g _ { \theta _ { 1 } } ( \epsilon ) .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
Let $\Sigma _ { i }$ be the inverse of the Jacobian matrix of $g _ { \boldsymbol { \theta } } ( \cdot )$ , then the log density of $x$ is computed by change of variables formula,
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\log p ( x ) = \log p ( \epsilon ) + \sum _ { i = 1 } ^ { K } \log \operatorname* { d e t } ( \Sigma _ { i } ) .
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
For a general invertible transformation $g _ { \theta _ { i } } ( \cdot )$ , computing $\operatorname* { d e t } ( \Sigma _ { i } )$ is expensive. We follow the architecture of (Dinh et al., 2014) to ensure that $\operatorname* { d e t } ( \Sigma _ { i } )$ is computed in linear time. To combine state information, we embed state $s$ by another neural network $\boldsymbol { L } _ { \boldsymbol { \theta } _ { s } } ( \cdot )$ with parameter $\theta _ { s }$ and output a state vector $L _ { \theta _ { s } } ( s )$ with the same dimension as $\epsilon$ . We can then insert the state vector between any two layers of (5) to make the distribution conditional on state $s$ . In our implementation, we insert the state vector after the first transformation (we detail our architecture design in the Appendix B).
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
a = g _ { \theta _ { K } } \circ g _ { \theta _ { K - 1 } } \circ \ldots \circ g _ { \theta _ { 2 } } \circ ( L _ { \theta _ { s } } ( s ) + g _ { \theta _ { 1 } } ( \epsilon ) ) .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
Though the additive form of $L _ { \theta _ { s } } ( s )$ and $g _ { \theta _ { 1 } } ( \epsilon )$ may in theory limit the capacity of the model, in experiments below we show that the resulting policy is still very expressive. For simplicity, we denote the above transformation (7) as $a = f _ { \theta } ( s , \epsilon )$ with parameter $\bar { \theta } = \bar { \{ \theta _ { s } , \theta _ { i } , 1 \leq i \leq \bar { K } \} }$ . It is obvious that the transformation $a = f _ { \theta } ( s , \epsilon )$ is still invertible between $a$ and $\epsilon$ , which is critical for computing $\log \pi _ { \theta } ( a | s )$ according to (6). Such representations build complex policy distributions with explicit probability density $\pi _ { \boldsymbol { \theta } } ( \cdot | \boldsymbol { s } )$ , and hence entail training using score function gradient estimators.
|
| 91 |
+
|
| 92 |
+
In on-policy optimizations, it is necessary to compute gradients of the entropy $\nabla _ { \boldsymbol { \theta } } \mathbb { H } \big [ \pi _ { \boldsymbol { \theta } } ( \cdot \vert s ) \big ]$ , either for computing Hessian vector product (Schulman et al., 2015) or for entropy regularization (Schulman et al., 2015; 2017; Mnih et al., 2016). For normalizing flows there is no analytic form for entropy, we use samples to estimate entropy by re-parameterization, $\mathbb { H } [ \pi _ { \theta } ( \cdot | s ) ] =$ $\begin{array} { r } { { \mathbb E } _ { a \sim \pi _ { \theta } ( \cdot | s ) } \big [ - \log \pi _ { \theta } ( a | s ) \big ] = { \mathbb E } _ { \epsilon \sim \rho _ { 0 } ( \cdot ) } \big [ - \log \pi _ { \theta } ( f _ { \theta } ( s , \epsilon ) | s ) \big ] } \end{array}$ . The gradient of the entropy can be easily computed by a pathwise gradient and easily implemented using back-propagation $\nabla _ { \boldsymbol { \theta } } \mathbb { H } \big [ \pi _ { \boldsymbol { \theta } } ^ { * } ( \cdot | s ) \big ] \stackrel { * } { = } \mathbb { E } _ { \boldsymbol { \epsilon } \sim \boldsymbol { \rho } _ { 0 } ( \cdot ) } \big [ \mathbin { - } \nabla _ { \boldsymbol { \theta } } \log \pi _ { \boldsymbol { \theta } } ^ { * } \big ( f _ { \boldsymbol { \theta } } ( s , \boldsymbol { \epsilon } ) | s \big ) \big ] .$ .
|
| 93 |
+
|
| 94 |
+
# 4.2 NORMALIZING FLOWS POLICY VS. GAUSSIAN POLICY UNDER KL CONSTRAINT
|
| 95 |
+
|
| 96 |
+
We analyze the properties of normalizing flows policy vs. Gaussian policy under the KL constraints of trust region policy search. As a low dimensional toy example, assume we have a factorized Gaussian in $\mathbb { R } ^ { 2 }$ with zero mean and diagonal covariance $\mathbb { I } \cdot \sigma ^ { 2 }$ where $\sigma ^ { 2 } = 0 . 1 ^ { 2 }$ . Let $\hat { \pi } _ { o }$ be the empirical distribution formed by samples drawn from this Gaussian. We can define a KL ball centered on $\hat { \pi } _ { o }$ as all distributions such that a KL constraint is satisfied $\begin{array} { r } { B ( \hat { \pi } _ { o } , \epsilon ) = \{ \pi : \mathbb { K L } [ \hat { \pi } _ { o } | | \pi ] \leq \epsilon \} } \end{array}$ . We study a typical normalizing flows distribution and factorized Gaussian distribution on the boundary of such a KL ball (such that $\mathbb { K L } [ \hat { \pi } _ { o } | | \pi ] = \epsilon )$ . We find such distributions by randomly initializing the distribution parameters then running gradient updates until $\mathbb { K L } [ \hat { \pi } _ { o } | | \pi ] \} \approx \epsilon$ . In Figure 1 (a) we show the log probability contour of such a factorized Gaussian vs. normalizing flows, and in (b) we show their samples (blue are samples from the distributions on the boundary of the KL ball and red are samples to generate $\hat { \pi } _ { o . }$ ). As seen from both the contour and the sample plot, though both distributions have infinite support, normalizing flows distribution has much larger variance than the factorized Gaussian, which also leads to a much larger effective support, even though both satisfy the KL constraint to the origin distribution $\mathbb { K L } [ \hat { \pi } _ { o } | | \pi ] \bar { = } \epsilon$ .
|
| 97 |
+
|
| 98 |
+
In Figure 1 (c), we show the samples drawn from factorized Gaussian and normalizing flows distribution with fixed levels of entropy $H$ . To obtain distributions with fixed entropy, we randomly initialize the distribution parameters with $\mathbb { H } [ \pi ]$ as the entropy then obtain the desired level of entropy by minimizing $( \mathbb { H } [ \pi ] - \mathbf { \bar { H } } ) ^ { 2 }$ until convergence. As seen from the sample plot (red for Gaussian and blue for normalizing flows), under the same entropy level, normalizing flows distribution has significantly larger spread than factorized Gaussian.
|
| 99 |
+
|
| 100 |
+
As analyzed above, under similar entropy level and KL constraint, normalizing flows tends to have a probability density function that decays at a much slower rate than Gaussian from the ’center’, which produces a much wider effective support on the sample space. In practice, this usually produces much better exploration and helps the agent to bypass bad locally optimal solutions. For a factorized Gaussian distribution, enforcing a KL constraint does not allow the new distribution to generate samples that are too far from the ’center’ of the old distribution. On the other hand, for a normalizing flows distribution, the KL constraint does not hinder the new distribution to have a very distinct support from the reference distribution (as suggested in Figure 1), hence allowing for more efficient exploration.
|
| 101 |
+
|
| 102 |
+
# 4.3 EXPRESSIVENESS OF NORMALIZING FLOWS POLICY
|
| 103 |
+
|
| 104 |
+
We illustrate two potential strengths of the normalizing flows policy: learning correlated actions and learning multi-modal policy. First consider a 2D bandit problem where the action $a \in [ - 1 , 1 ] ^ { 2 }$ and $r ( a ) = - a ^ { T } \Sigma ^ { - 1 } a$ for some positive semidefinite matrix $\Sigma$ . In the context of conventional RL objective $J ( \pi )$ , the optimal policy is deterministic $\pi ^ { * } = [ 0 , 0 ] ^ { T }$ . However, in maximum entropy RL (Haarnoja et al., 2017; 2018b) where the objective is $J ( \pi ) + c \mathbb { H } [ \pi ]$ , the optimal policy is $\pi _ { \mathrm { e n t } } ^ { * } \propto \exp ( \frac { r ( a ) } { c } )$ , a Gaussian with e show the sampl $\textstyle { \frac { \Sigma } { c } }$ as the covariance matrix (red curves show the density contours).generated by various trained policies to see whether they manage to learn the correlations between actions in the maximum entropy policy $\pi _ { \mathrm { e n t } } ^ { * }$ . We find that factorized
|
| 105 |
+
|
| 106 |
+

|
| 107 |
+
Figure 1: Analyzing normalizing flows vs. Gaussian: (a)(b) Consider a 2D Gaussian distribution with zero mean and factorized variance $\sigma ^ { 2 } = 0 . 1 ^ { 2 }$ . Samples from the Gaussian form an empirical distribution $\hat { \pi } _ { o }$ (red dots in (b)) and define the KL ball $\begin{array} { r } { B ( \hat { \pi } _ { o } , \epsilon ) = \bar { \{ \pi : \mathbb { K L } [ \hat { \pi } _ { o } | | \pi ] \leq \epsilon \} } } \end{array}$ centered at $\hat { \pi } _ { o }$ . Find a typical normalizing flows distribution and a Gaussian distribution at the boundary of $B ( \hat { \pi } , 0 . 0 1 )$ such that the constraint is tight. (a) Contour of log probability of a normalizing flows distribution (right) vs. Gaussian distribution (left); (b) Samples (blue dots) generated from normalizing flows distribution (right) and Gaussian distribution (left). (c) Samples generated from a normalizing flows policy (blue) vs. Gaussian policy (red) with the same entropy $H$ , left panel is $H = - 1 . 0$ and right panel $H = - 4 . 0$ .
|
| 108 |
+
|
| 109 |
+
Gaussian cannot capture the correlations due to the factorized distribution. Though Gaussian mixtures models (GMM) with $K \geq 2$ components are more expressive than factorized Gaussian, all the modes seem to collapse to the same location and suffer the same issue as factorized Gaussian. On the other hand, normalizing flows policy is much more flexible and can fairly accurately capture the correlation structure of $\pi _ { \mathrm { e n t } } ^ { * }$ .
|
| 110 |
+
|
| 111 |
+
To illustrate multi-modality, consider again a 2D bandit problem (Figure 2 (b)) with reward $r ( a ) =$ $\mathrm { m a x } _ { i \in I } \{ ( a - \mu _ { i } ) ^ { T } \Lambda _ { i } ^ { - } ( a - \mu _ { i } ) \}$ where $\Lambda _ { i } , i \in I$ are diagonal matrices and $\mu _ { i } , i \in I$ are modes of the reward landscape. In our example we set $| I | = 2$ two modes and the reward contours are plotted as red curves. Notice that GMM with varying $K$ can still easily collapse to one of the two modes while the normalizing flows policy generates samples that cover both modes.
|
| 112 |
+
|
| 113 |
+
To summarize the above two cases, since the maximum entropy objective $J ( \pi ) + c \mathbb { H } [ \pi ] \ =$ $- \mathbb { K L } [ \pi | | \pi _ { \mathrm { e n t } } ^ { * } ]$ , the policy search problem is equivalent to a variational inference problem where the variational distribution is $\pi$ and the target distribution is $\pi _ { \mathrm { e n t } } ^ { * } \propto \exp ( \frac { r ( a ) } { c } )$ . Since normalizing flows policy is a more expressive class of distribution than GMM and factorized Gaussian, we also expect the approximation to the target distribution to be much better (Rezende & Mohamed, 2015).
|
| 114 |
+
|
| 115 |
+
The properties of normalizing flows illustrated in Section 4.2 and Section 4.3 potentially allow for better exploration during training, and help bypass bad locally optimal solutions. For a more realistic example, we illustrate such benefits with the locomotion task of Ant robot (Brockman et al., 2016). In Figure 2 (c) we show the robot’s 2D center-of-mass trajectories generated by normalizing flows policy (red) vs. Gaussian policy (blue) after training for $2 \cdot 1 0 ^ { 6 }$ time steps. We observe that the trajectories by normalizing flows policy are much more widespread, while trajectories of Gaussian policy are quite concentrated at the initial position (the origin $[ 0 . 0 , 0 . 0 ] )$ . Behaviorally, Gaussian policy gets the robot to jump forward quickly, which achieves high immediate rewards but terminates the episode prematurely (due to a termination condition of the task). On the other hand, normalizing flows policy bypasses such locally optimal behavior by getting the robot to move forward in a fairly slow but steady manner, even occasionally move in the opposite direction to what reward function specifies (Details in the Appendix E).
|
| 116 |
+
|
| 117 |
+
# 5 EXPERIMENTS
|
| 118 |
+
|
| 119 |
+
In experiments we aim to address the following questions: (1) Do normalizing flows policies outperform simple policies (e.g. factorized Gaussian baseline) with trust region search algorithms on benchmark tasks? (2) How sensitive are normalizing flows policies to hyper-parameters compared to Gaussian policies? To address (1), we compare normalizing flows policy against factorized Gaussian and mixture of Gaussians policies on OpenAI gym MuJoCo (Brockman et al., 2016; Todorov, 2008), rllab (Duan et al., 2016) and Roboschool Humanoid (Schulman et al., 2017) locomotion tasks as illustrated in Figure 8. We show that normalizing flows policy can fairly uniformly outperform policies with simple distributions, especially on tasks with highly complex dynamics. We show results for both TRPO and ACKTR. To address (2), we randomly sample hyper-parameters for both normalizing flows policy and Gaussian policy, and compare their quantiles.
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 2: Expressiveness of normalizing flows policy: (a) Bandit problem with reward $\boldsymbol { r } ( \boldsymbol { a } ) = - \boldsymbol { a } ^ { T } \boldsymbol { \Sigma } ^ { - 1 } \boldsymbol { a } ,$ . The maximum entropy optimal policy is a Gaussian distribution with $\Sigma$ as its covariance (red contours). normalizing flows policy (blue) can capture such covariance while Gaussian cannot (green). (b) Bandit problem with multimodal reward (red contours the reward landscape). normalizing flows policy can capture the multimodality (blue) while Gaussian cannot (green). (c) Trajectories of Ant robot. The trajectories of Gaussian policy center at the initial position (the origin [0.0, 0.0]), while trajectories of normalizing flows policy are much more widespread.
|
| 123 |
+
|
| 124 |
+
Implementation Details. As we aim to study the net effect of an expressive policy on trust region policy search, we make minimal modification to the original TRPO/ACKTR algorithms during implementations. For both algorithms, the policy entropy $\mathbb { H } [ \pi _ { \theta } ( \cdot | s ) ]$ is analytically computed when $\pi _ { \theta }$ is factorized Gaussian, and is estimated by samples when $\pi _ { \theta }$ is GMM for $K \geq 2$ or normalizing flows. The KL divergence is approximated by samples instead of analytically computed in a similar way. We leave all hyper-parameter settings in the Appendix A.
|
| 125 |
+
|
| 126 |
+
# 5.1 LOCOMOTION BENCHMARKS
|
| 127 |
+
|
| 128 |
+
TRPO In Figure 3 we show the results on benchmark control problems from MuJoCo. We compare four policy classes under TRPO: factorized Gaussian (blue curves), GMM with $K = 2$ (yellow curves), GMM with $K = 5$ (green curves) and normalizing flows (red curves). For GMM, each cluster has the same probability weight and each cluster is a factorized Gaussian with independent parameters. We train each policy for a fixed number of time steps and report both mean and standard deviation of the performance averaged across 5 random seeds. We find that though GMM policies with $K \geq 2$ outperform factorized Gaussian on relatively hard tasks such as Ant and HalfCheetah, they suffer from less stable learning for Humanoid tasks. However, normalizing flows consistently outperforms GMM and factorized Gaussian policies on a wide range of tasks, especially tasks with highly complex dynamics such as Humanoid.
|
| 129 |
+
|
| 130 |
+
In Table 1, we compare with recently proposed policy classes which aim at bounding the support of policy distributions, such as Beta distribution (Chou et al., 2017) and Gaussian+tanh to bound the distribution mean. We evaluate the policies on benchmark tasks with relatively complex dynamics and show mean $\pm$ std rewards and we highlight the top two policies. We find that normalizinng flows policy consistently performs well across all complex tasks, while the performance of other policies is not as uniformly good. Also we find that bounding the final outputs by applying tanh at the final layer for normalizing flows does not perform as well, we omit the results here.
|
| 131 |
+
|
| 132 |
+
To further illustrate the strength of normalizing flows policy on Humanoid tasks, we evaluate normalizing flows vs. factorized Gaussian on Roboschool Humanoid tasks shown in Figure 4. We observe that ever since the early stage of learning (steps $\leq 1 0 ^ { 7 }$ ) normalizing flows policy (red curves) already outperforms Gaussian (blue curves) by a large margin. In (a)(b), Gaussian is stuck in a locally optimal gait and cannot progress, while normalizing flows can bypass such locally optimal gaits and makes consistent improvement.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 3: MuJoCo Benchmark: learning curves on MuJoCo locomotion tasks. Tasks with (L) are from rllab. Each curve is averaged over 5 random seeds and shows mean $\pm$ std performance. Each curve corresponds to a different policy representation (Red: Normalizing flows (labelled as implicit), Green: GMM $K = 5$ , Yellow: GMM $K = 2$ , Blue: Gaussian). Vertical axis is the cumulative rewards and horizontal axis is the number of time steps.
|
| 136 |
+
|
| 137 |
+
<table><tr><td>Tasks</td><td>Gaussian</td><td>Gaussian+tanh</td><td>Beta</td><td>NF</td></tr><tr><td>Ant</td><td>-76 ±14</td><td>-89±13</td><td>2362 ± 305</td><td>1982 ± 407</td></tr><tr><td>HalfCheetah</td><td>1576± 782</td><td>386±78</td><td>1643 ±819</td><td>2900 ± 554</td></tr><tr><td>Humanoid</td><td>3560 ± 288</td><td>6350 ± 486</td><td>3199 ± 2222</td><td>5222 ± 2436</td></tr><tr><td>Humanoid (L)</td><td>64.7 ± 7.6</td><td>38.2 ± 2.3</td><td>37.8 ± 3.4</td><td>87.2 ±19.6</td></tr><tr><td>Sim. Humanoid (L)</td><td>6.5± 0.2</td><td>4.4±0.1</td><td>4.2 ± 0.2</td><td>8.0 ±1.8</td></tr><tr><td>Humanoid Standup</td><td>137955 ± 9238</td><td>133558 ± 9238</td><td>111497 ± 15031</td><td>142568 ± 9296</td></tr></table>
|
| 138 |
+
|
| 139 |
+
Table 1: A comparison of various policy classes on complex benchmark tasks. For each task, we show the cumulative rewards (mean $\pm$ std) after training for $1 0 ^ { 7 }$ steps across 5 seeds (for Humanoid (L) it is $7 \cdot 1 0 ^ { 6 }$ steps). For each task, the top two results are highlighted in bold font.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 4: Roboschool Humanoid Benchmark $:$ learning curves on Roboschool Humanoid locomotion tasks. Each curve corresponds to a separate random seed and we show two seeds per policy class. Each color corresponds to a different policy representation (Red: Normalizing flows (labelled as implicit), Blue: Gaussian). Vertical axis is the cumulative rewards and horizontal axis is the number of time steps.
|
| 143 |
+
|
| 144 |
+
ACKTR We also evaluate different policy classes combined with ACKTR (Wu et al.). In Figure 5, we compare factorized Gaussian (red curves) against normalizing flows (blue curves) on a suite of MuJoCo and Roboschool control tasks. We train each policy for a fixed number of time steps and report both mean and standard deviation of the performance averaged across 3 random seeds. Though ACKTR $^ +$ normalizing flows does not uniformly outperform Gaussian on all tasks, we find that for tasks with relatively complex dynamics (e.g. Ant and Humanoid), normalizing flows policy achieves significant performance gains. We find that the effect of an expressive policy class is fairly orthogonal to the additional training stability introduced by ACKTR over TRPO and the combined algorithm achieves even better performance.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 5: MuJoCo and Roboschool Benchmarks $:$ learning curves on locomotion tasks for ACKTR. Each curve is averaged over 3 random seeds and shows mean $\pm$ std performance. Each curve corresponds to a different policy representation (Red: Normalizing flows (labelled as implicit), Blue: Gaussian). Vertical axis is the cumulative rewards and horizontal axis is the number of time steps. Tasks with (R) are from Roboschool.
|
| 148 |
+
|
| 149 |
+
# 5.2 SENSITIVITY TO HYPER-PARAMETERS AND ABLATION STUDY
|
| 150 |
+
|
| 151 |
+
We evaluate the policy classes’ sensitivities to hyper-parameters in Figure 6, where we compare Gaussian vs. normalizing flows. Recall that $\epsilon$ is the constant for KL constraint. For each policy, we uniformly random sample $\log _ { 1 0 } \epsilon \in [ - 3 . 0 , - 2 . 0 ]$ and one of five random seeds, and train policies with TRPO for a fixed number of time steps. The final performance (cumulative rewards) is recorded and Figure 6 in Appendix C shows the quantile plots of final rewards across multiple tasks. We see that normalizing flows policy is generally much more robust to such hyper-parameters, importantly to $\epsilon$ . We speculate that such additional robustness partially stems from the fact that for normalizing flows policy, the KL constraint does not pose very stringent restriction on the sampled action space, which allows the system to efficiently explore even when $\epsilon$ is small.
|
| 152 |
+
|
| 153 |
+
We carry out a small ablation study that addresses how hyper-parameters inherent to normalizing flows can impact the results. Recall that normalizing flows for control (Section 3) consists of $K$ transformations, with the first transformation embedding the state $s$ into a vector $L _ { \theta _ { s } } ( s )$ . Here we implement $L _ { \theta _ { s } } ( s )$ as a two-layer neural networks with $l _ { 1 }$ hidden units per layer. We evaluate on the policy performance as we vary $K \in \{ 2 , 4 , 6 \}$ and $l _ { 1 } \in \{ 3 , 5 , 7 \}$ . We find that the performance of normalizing flows policies are fairly robust to such hyper-parameters (see Appendix C).
|
| 154 |
+
|
| 155 |
+
# 6 CONCLUSION
|
| 156 |
+
|
| 157 |
+
We propose normalizing flows as a novel on-policy architecture to boost the performance of trust region policy search. In particular, we observe that normalizing flows policy can generate samples away from the old policy while enforcing the KL constraint, which entails potentially better exploration. We evaluate performance of normalizing flows policy combined with trust region algorithms (TRPO, ACKTR) and show that they outperform factorized Gaussian and GMM policies. We propose that such policy classes be used as baselines for future benchmarking.
|
| 158 |
+
|
| 159 |
+
# REFERENCES
|
| 160 |
+
|
| 161 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 162 |
+
|
| 163 |
+
Po-Wei Chou, Daniel Maturana, and Sebastian Scherer. Improving stochastic policy gradients in continuous control with deep reinforcement learning using the beta distribution. In International Conference on Machine Learning, pp. 834–843, 2017.
|
| 164 |
+
|
| 165 |
+
Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, and Yuhuai Wu. Openai baselines. https://github.com/ openai/baselines, 2017.
|
| 166 |
+
|
| 167 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 168 |
+
|
| 169 |
+
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
|
| 170 |
+
|
| 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 |
+
|
| 173 |
+
Tuomas Haarnoja, Haoran Tang, Pieter Abbeel, and Sergey Levine. Reinforcement learning with deep energy-based policies. arXiv preprint arXiv:1702.08165, 2017.
|
| 174 |
+
|
| 175 |
+
Tuomas Haarnoja, Kristian Hartikainen, Pieter Abbeel, and Sergey Levine. Latent space policies for hierarchical reinforcement learning. arXiv preprint arXiv:1804.02808, 2018a.
|
| 176 |
+
|
| 177 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018b.
|
| 178 |
+
|
| 179 |
+
Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In ICML, volume 2, pp. 267–274, 2002.
|
| 180 |
+
|
| 181 |
+
Sham M Kakade. A natural policy gradient. In Advances in neural information processing systems, pp. 1531–1538, 2002.
|
| 182 |
+
|
| 183 |
+
Diederik P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible 1x1 convolutions. arXiv preprint arXiv:1807.03039, 2018.
|
| 184 |
+
|
| 185 |
+
Qiang Liu and Dilin Wang. Stein variational gradient descent: A general purpose bayesian inference algorithm. In Advances In Neural Information Processing Systems, pp. 2378–2386, 2016.
|
| 186 |
+
|
| 187 |
+
James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In International conference on machine learning, pp. 2408–2417, 2015.
|
| 188 |
+
|
| 189 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, pp. 1928–1937, 2016.
|
| 190 |
+
|
| 191 |
+
Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. arXiv preprint arXiv:1505.05770, 2015.
|
| 192 |
+
|
| 193 |
+
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.
|
| 194 |
+
|
| 195 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 196 |
+
|
| 197 |
+
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.
|
| 198 |
+
|
| 199 |
+
Yunhao Tang and Shipra Agrawal. Implicit policy for reinforcement learning. arXiv preprint arXiv:1806.06798, 2018.
|
| 200 |
+
|
| 201 |
+
Emanuel Todorov. General duality between optimal control and estimation. In Decision and Control, 2008. CDC 2008. 47th IEEE Conference on, pp. 4286–4292. IEEE, 2008.
|
| 202 |
+
|
| 203 |
+
Stephen Wright and Jorge Nocedal. Numerical optimization. Springer Science, 35(67-68):7, 1999.
|
| 204 |
+
|
| 205 |
+
Yuhuai Wu, Elman Mansimov, Roger B Gross, Shun Liao, and Jummy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. Advances in neural information processing systems, pp. 5279–5288.
|
| 206 |
+
|
| 207 |
+
# A HYPER-PARAMETERS
|
| 208 |
+
|
| 209 |
+
Implementations. All implementations of algorithms (TRPO and ACKTR) are based on OpenAI baselines (Dhariwal et al., 2017). We implement our own GMM policy and normalizing flows policy. Environments are based on OpenAI gym (Brockman et al., 2016), rllab (Duan et al., 2016) and Roboschool (Schulman et al., 2017).
|
| 210 |
+
|
| 211 |
+
Common Interface to the Algorithms. We remark that various policy classes have exactly the same interface to TRPO and ACKTR. In particular, TRPO and ACKTR only requires the computation of $\log \pi _ { \theta } ( a | s )$ (and its derivative). Different policy classes only differ in how they parameterize $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ and can be easily plugged into the algorithmic procedure originally designed for Gaussian (Dhariwal et al., 2017).
|
| 212 |
+
|
| 213 |
+
factorized Gaussian Policy. A factorized Gaussian policy has the form $\pi _ { \theta } ( \cdot | s ) = \mathbb { N } ( \mu _ { \theta } ( s ) , \Sigma )$ , where $\Sigma$ is a diagonal matrix with $\Sigma _ { i i } = \sigma _ { i } ^ { 2 }$ . We use the default hyper-parameters in baselines for factorized Gaussian policy. The mean $\mu _ { \boldsymbol { \theta } } ( s )$ parameterized by a two-layer neural network with 64 hidden units per layer and tanh activation function. The standard deviation $\sigma _ { i } ^ { 2 }$ is each a single variable shared across all states.
|
| 214 |
+
|
| 215 |
+
factorized Gaussian+tanh Policy. The architecture is the same as above but the final layer is added a tanh transformation to ensure that the mean $\mu _ { \theta } ( s ) \in [ - 1 , 1 ]$ .
|
| 216 |
+
|
| 217 |
+
GMM Policy. A GMM policy has the form $\begin{array} { r } { \pi _ { \theta } ( \cdot | s ) = \sum _ { i = 1 } ^ { K } p _ { i } \mathbb { N } ( \mu _ { \theta } ^ { ( i ) } ( s ) , \Sigma _ { i } ) } \end{array}$ , where the cluster weight $\begin{array} { r } { p _ { i } = \frac { 1 } { K } } \end{array}$ is fixed and $\mu _ { \theta } ^ { ( i ) } ( s ) , \Sigma _ { i }$ are Gaussian parameters for the ith cluster. Each Gaussian has the same parameterization as the factorized Gaussian above.
|
| 218 |
+
|
| 219 |
+
Beta Policy. A Beta distribution policy has the form $\pi ( \alpha _ { \theta } ( s ) , \beta _ { \theta } ( s ) )$ where $\alpha _ { \theta } ( s )$ and $\beta _ { \theta } ( s )$ are shape/rate parameters parameterized by two-layer neural network $f _ { \theta } ( s )$ with a softplus at the end, i.e. $\alpha _ { \theta } ( s ) \stackrel { - } { = } \log ( \exp ( { \mathbf { \bar { f } } } _ { \theta } ( s ) ) + 1 ) + 1$ , following (Chou et al., 2017). Actions sampled from this distribution have a strictly finite support. We notice that this parameterization introduces potential instability during optimization: for example, when we want to converge on policies that sample actions at the boundary, we require $\alpha _ { \theta } ( s ) \infty$ or $\beta _ { \theta } ( s ) \infty$ , which might be very unstable. We also observe such instability in practice.
|
| 220 |
+
|
| 221 |
+
normalizing flows Policy. A normalizing flows policy has a generative form: the sample $a \sim$ $\pi _ { \boldsymbol { \theta } } ( \cdot | \boldsymbol { s } )$ can be generated via $a = f _ { \theta } ( s , \epsilon )$ with $\epsilon \sim \rho _ { 0 } ( \cdot )$ . The detailed architecture of $f _ { \theta } ( s , \epsilon )$ is in the appendix below.
|
| 222 |
+
|
| 223 |
+
Others. Value functions are all parameterized as two-layer neural networks with 64 hidden units per layer and tanh activation function. Trust region sizes are enforced via a constraint parameter $\epsilon$ , where $\epsilon \in \lbrace 0 . 0 1 , 0 . 0 0 1 \rbrace$ for TRPO and $\epsilon \in \lbrace 0 . 0 2 , 0 . 0 0 2 \rbrace$ for ACKTR. All other hyper-parameters are default parameters from the baselines implementations.
|
| 224 |
+
|
| 225 |
+
# B NORMALIZING FLOWS POLICY ARCHITECTURE
|
| 226 |
+
|
| 227 |
+
We design the neural network architecture following the idea of (Dinh et al., 2014; 2016). Recall that normalizing flows (Rezende & Mohamed, 2015) consists of layers of transformation as follows ,
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
x = g _ { \theta _ { K } } \circ g _ { \theta _ { K - 1 } } \circ \ldots \circ g _ { \theta _ { 2 } } \circ g _ { \theta _ { 1 } } ( \epsilon ) .
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
where each $g _ { \theta _ { i } } ( \cdot )$ is an invertible transformation. We focus on how to design each atomic transformation $g _ { \theta _ { i } } ( \cdot )$ . We overload the notations and let $x , y$ be the input/output of a generic layer $g _ { \boldsymbol { \theta } } ( \cdot )$ ,
|
| 234 |
+
|
| 235 |
+
$$
|
| 236 |
+
y = g _ { \boldsymbol { \theta } } ( x ) .
|
| 237 |
+
$$
|
| 238 |
+
|
| 239 |
+
We design a generic transformation $g _ { \boldsymbol { \theta } } ( \cdot )$ as follows. Let $x _ { I }$ be the components of $x$ corresponding to subset indices $I \subset \{ 1 , 2 . . . m \}$ . Then we propose as in (Dinh et al., 2016),
|
| 240 |
+
|
| 241 |
+
$$
|
| 242 |
+
\begin{array} { r } { y _ { 1 : d } = x _ { 1 : d } \qquad } \\ { y _ { d + 1 : m } = x _ { d + 1 : m } \odot \exp ( s ( x _ { 1 : d } ) ) + t ( x _ { 1 : d } ) , } \end{array}
|
| 243 |
+
$$
|
| 244 |
+
|
| 245 |
+
where $t ( \cdot ) , s ( \cdot )$ are two arbitrary functions $t , s : \mathbb { R } ^ { d } \mapsto \mathbb { R } ^ { m - d }$ . It can be shown that such transformation entails a simple Jacobien matrix $\begin{array} { r } { | \frac { \partial y } { \partial x ^ { T } } | = \exp ( \sum _ { j = 1 } ^ { m - d } [ s ( x _ { 1 : d } ) ] _ { j } ) } \end{array}$ where $[ s ( x _ { 1 : d } ) ] _ { j }$ refers to the $j$ th component of $s ( x _ { 1 : d } )$ for $1 \leq j \leq m - d$ . For each layer, we can permute the input $x$ before apply the simple transformation (8) so as to couple different components across layers. Such coupling entails a complex transformation when we stack multiple layers of (8). To define a policy, we need to incorporate state information. We propose to preprocess the state $s \in \mathbb { R } ^ { n }$ by a neural network $\ L _ { \theta _ { s } } ( \cdot )$ with parameter $\theta _ { s }$ , to get a state vector $\bar { L _ { \theta _ { s } } ( s ) \in \mathbb { R } ^ { m } }$ . Then combine the state vector into (8) as follows,
|
| 246 |
+
|
| 247 |
+
$$
|
| 248 |
+
\begin{array} { c } { { z _ { 1 : d } = x _ { 1 : d } } } \\ { { z _ { d + 1 : m } = x _ { d + 1 : m } \odot \exp ( s ( x _ { 1 : d } ) ) + t ( x _ { 1 : d } ) } } \\ { { y = z + L _ { \theta _ { s } } ( s ) . } } \end{array}
|
| 249 |
+
$$
|
| 250 |
+
|
| 251 |
+
It is obvious that $x y$ is still bijective regardless of the form of $\boldsymbol { L } _ { \boldsymbol { \theta } _ { s } } ( \cdot )$ and the Jacobien matrix is easy to compute accordingly.
|
| 252 |
+
|
| 253 |
+
In locomotion benchmark experiments, we implement $s , t$ both as 4-layers neural networks with $l _ { 1 } = 3$ units per hidden layer. We stack $K = 4$ transformations: we implement (9) to inject state information only after the first transformation, and the rest is conventional coupling as in (8). $L _ { \theta _ { s } } ( s )$ is implemented as a feedforward neural network with 2 hidden layers each with 64 hidden units. Value function critic is implemented as a feedforward neural network with 2 hidden layers each with 64 hidden units with rectified-linear between hidden layers.
|
| 254 |
+
|
| 255 |
+
# C SENSITIVITY TO HYPER-PARAMETERS AND ABLATION STUDY
|
| 256 |
+
|
| 257 |
+
In Figure 7, we show the ablation study of normalizing flows policy. We evaluate how the training curves change as we change the hyper-parameters of normalizing flows: number of transformation $K \in \{ 2 , 4 , 6 \}$ and number of hidden units $l _ { 1 } \in \{ 3 , 5 , 7 \}$ in the embedding function $\boldsymbol { L } _ { \boldsymbol { \theta } _ { s } } ( \cdot )$ . We find that the performance of normalizing flows policy is fairly robust to changes in $K$ and $l _ { 1 }$ . When $K$ varies, $l _ { 1 }$ is set to 3 by default. When $l _ { 1 }$ varies, $K$ is set to 4 by default.
|
| 258 |
+
|
| 259 |
+

|
| 260 |
+
Figure 6: Sensitivity to Hyper-parameters: quantile plots of policies’ performance on MuJoCo benchmark tasks under various hyper-parameter settings. For each plot, we randomly generate 30 hyper-parameters for the policy and train for a fixed number of time steps. Reacher for ${ 1 0 } ^ { 6 }$ steps, Hopper and HalfCheetah for $2 \cdot 1 0 ^ { 6 }$ steps and SimpleHumanoid for $\approx 5 \cdot 1 0 ^ { 6 }$ steps. normalizing flows policy is in general more robust to Gaussian policy.
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 7: Sensitivity to normalizing flows Hyper-parameters: training curves of normalizing flows policy under different hyper-parameter settings (number of hidden units $l _ { 1 }$ and number of transformation $K$ , on Reacher and Hopper task. Each training curve is averaged over 5 random seeds and we show the mean $\pm$ std performance. Vertical axis is the cumulative rewards and horizontal axis is the number of time steps.)
|
| 264 |
+
|
| 265 |
+
# D ILLUSTRATION OF LOCOMOTION TASKS
|
| 266 |
+
|
| 267 |
+

|
| 268 |
+
Figure 8: Illustration of benchmark tasks in OpenAI MuJoCo (Brockman et al., 2016; Todorov, 2008), rllab (top line) (Duan et al., 2016) and Roboschool (bottom line) (Schulman et al., 2017).
|
| 269 |
+
|
| 270 |
+
# E REWARD STRUCTURE OF ANT LOCOMOTION TASK
|
| 271 |
+
|
| 272 |
+
For Ant locomotion task (Brockman et al., 2016), the state space $S \subset \mathbb { R } ^ { 1 1 6 }$ and action space $\mathcal { A } \subset \mathbb { R } ^ { 8 }$ . The state space consists of all the joint positions and joint velocities of the Ant robot, while the action space consists of the torques applied to joints. The reward function at time $t$ is $r _ { t } \propto v _ { x }$ where $v _ { x }$ is the center-of-mass velocity of along the $\mathbf { X }$ -axis. In practice the reward function also includes terms that discourage large torques and encourages the Ant robot to stay alive (as defined by not flipping itself over).
|
| 273 |
+
|
| 274 |
+
Intuitively, the reward function encourages the robot to move along x-axis as fast as possible. This is reflected in Figure 2 (c) as the trajectories (red) generated by the normalizing flows policy is spreading along the $\mathbf { X }$ -axis. Occasionally, the robot also moves in the opposite direction.
|
md/train/Sklv5iRqYX/Sklv5iRqYX.md
ADDED
|
@@ -0,0 +1,523 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MULTI-DOMAIN ADVERSARIAL LEARNING
|
| 2 |
+
|
| 3 |
+
Alice Schoenauer Sebag1,† alice.schoenauer@polytechnique.org
|
| 4 |
+
|
| 5 |
+
Louise Heinrich1, louise.heinrich@ucsf.edu
|
| 6 |
+
|
| 7 |
+
Marc Schoenauer2, marc.schoenauer@inria.fr
|
| 8 |
+
|
| 9 |
+
Michele Sebag2, sebag@lri.fr
|
| 10 |
+
|
| 11 |
+
Lani F. $\mathbf { W } \mathbf { u } ^ { 1 }$ , lani.wu@ucsf.edu
|
| 12 |
+
|
| 13 |
+
Steven J. Altschuler1 steven.altschuler@ucsf.edu
|
| 14 |
+
|
| 15 |
+
1 Department of Pharmaceutical Chemistry UCSF, San Francisco, CA 94158
|
| 16 |
+
|
| 17 |
+
2 INRIA-CNRS-UPSud-UPSaclay TAU, U. Paris-Sud, 91405 Orsay
|
| 18 |
+
|
| 19 |
+
# ABSTRACT
|
| 20 |
+
|
| 21 |
+
Multi-domain learning (MDL) aims at obtaining a model with minimal average risk across multiple domains. Our empirical motivation is automated microscopy data, where cultured cells are imaged after being exposed to known and unknown chemical perturbations, and each dataset displays significant experimental bias. This paper presents a multi-domain adversarial learning approach, MULANN, to leverage multiple datasets with overlapping but distinct class sets, in a semisupervised setting. Our contributions include: i) a bound on the average- and worst-domain risk in MDL, obtained using the $\mathcal { H }$ -divergence; ii) a new loss to accommodate semi-supervised multi-domain learning and domain adaptation; iii) the experimental validation of the approach, improving on the state of the art on three standard image benchmarks, and a novel bioimage dataset, CELL.1
|
| 22 |
+
|
| 23 |
+
# 1 INTRODUCTION
|
| 24 |
+
|
| 25 |
+
Advances in technology have enabled large scale dataset generation by life sciences laboratories. These datasets contain information about overlapping but non-identical known and unknown experimental conditions. A challenge is how to best leverage information across multiple datasets on the same subject, and to make discoveries that could not have been obtained from any individual dataset alone.
|
| 26 |
+
|
| 27 |
+
Transfer learning provides a formal framework for addressing this challenge, particularly crucial in cases where data acquisition is expensive and heavily impacted by experimental settings. One such field is automated microscopy, which can capture thousands of images of cultured cells after exposure to different experimental perturbations (e.g from chemical or genetic sources). A goal is to classify mechanisms by which perturbations affect cellular processes based on the similarity of cell images. In principle, it should be possible to tackle microscopy image classification as yet another visual object recognition task. However, two major challenges arise compared to mainstream visual object recognition problems (Russakovsky et al., 2015). First, biological images are heavily impacted by experimental choices, such as microscope settings and experimental reagents. Second, there is no standardized set of labeled perturbations, and datasets often contain labeled examples for a subset of possible classes only. This has limited microscopy image classification to single datasets and does not leverage the growing number of datasets collected by the life sciences community. These challenges make it desirable to learn models across many microscopy datasets, that achieve both good robustness w.r.t. experimental settings and good class coverage, all the while being robust to the fact that datasets contain samples from overlapping but distinct class sets.
|
| 28 |
+
|
| 29 |
+
Multi-domain learning (MDL) aims to learn a model of minimal risk from datasets drawn from distinct underlying distributions (Dredze et al., 2010), and is a particular case of transfer learning (Pan & Yang, 2010). As such, it contrasts with the so-called domain adaptation (DA) problem (Bickel et al., 2007; Ben-David et al., 2010; Ganin et al., 2016; Pan & Yang, 2010). DA aims at learning a model with minimal risk on a distribution called "target" by leveraging other distributions called "sources". Notably, most DA methods assume that target classes are identical to source classes, or a subset thereof in the case of partial DA (Cao et al., 2018; Zhang et al., 2018).
|
| 30 |
+
|
| 31 |
+
The expected benefits of MDL, compared to training a separate model on each individual dataset, are two-fold. First, MDL leverages more (labeled and unlabeled) information, allowing better generalization while accommodating the specifics of each domain (Dredze et al., 2010; Xiao et al., 2016). Thus, MDL models have a higher chance of ab initio performing well on a new domain − a problem referred to as domain generalization (Muandet et al., 2013) or zero-shot domain adaptation (Yang & Hospedales, 2015). Second, MDL enables knowledge transfer between domains: in unsupervised and semi-supervised settings, concepts learned on one domain are applied to another, significantly reducing the need for labeled examples from the latter (Pan & Yang, 2010).
|
| 32 |
+
|
| 33 |
+
Learning a single model from samples drawn from $n$ distributions raises the question of available learning guarantees regarding the model error on each distribution. Kifer et al. (2004) introduced the notion of $\mathcal { H }$ -divergence to measure the distance between source and target marginal distributions in DA. Ben-David et al. (2006; 2010) have shown that a finite sample estimate of this divergence can be used to bound the target risk of the learned model.
|
| 34 |
+
|
| 35 |
+
The contributions of our work are threefold. First, we extend the DA guarantees to MDL (Sec. 3.1), showing that the risk of the learned model over all considered domains is upper bounded by the oracle risk and the sum of the $\mathcal { H }$ -divergences between any two domains. Furthermore, an upper bound on the classifier imbalance (the difference between the individual domain risk, and the average risk over all domains) is obtained, thus bounding the worst-domain risk. Second, we propose the approach Multi-domain Learning Adversarial Neural Network (MULANN), which extends Domain Adversarial Neural Networks (DANNs) (Ganin et al., 2016) to semi-supervised DA and MDL. Relaxing the DA assumption, MULANN handles the so-called class asymmetry issue (when each domain may contain varying numbers of labeled and unlabeled examples of a subset of all possible classes), through designing a new loss (Sec. 3.2). Finally, MULANN is empirically validated in both DA and MDL settings (Sec. 4), as it significantly outperforms the state of the art on three standard image benchmarks (Saenko et al., 2010; Le Cun et al., 1998), and a novel bioimage benchmark, CELL, where the state of the art involves extensive domain-dependent pre-processing.
|
| 36 |
+
|
| 37 |
+
Notation. Let $\mathcal { X }$ denote an input space and $\mathcal { V } = \{ 1 , \ldots , L \}$ a set of classes. For $i = 1 , \ldots , n$ dataset $S _ { i }$ is an iid sample drawn from distribution $\mathcal { D } _ { i }$ on $\mathcal { X } \times \mathcal { V }$ . The marginal distribution of $\mathcal { D } _ { i }$ on $\mathcal { X }$ is denoted by $\mathcal { D } _ { i } ^ { \mathcal { X } }$ . Let $\mathcal { H }$ be a hypothesis space; for each $h$ in $\mathcal { H }$ $( h : \mathcal { X } \mapsto \mathcal { Y } )$ ) we define the risk under distribution $\mathcal { D } _ { i }$ as $\epsilon _ { i } ( h ) = \mathbb { P } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } ( h ( \mathbf { x } ) \neq y ) . \ h _ { i } ^ { \star }$ (respectively $h ^ { \star }$ ) denotes the oracle hypothesis according to distribution $\mathcal { D } _ { i }$ (resp. with minimal total risk over all domains):
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
\begin{array} { c } { \displaystyle \epsilon _ { i } ^ { \star } = \epsilon _ { i } ( h _ { i } ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \epsilon _ { i } ( h ) } \\ { \displaystyle \bar { \epsilon } ( h ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \bar { \epsilon } ( h ) = \underset { h \in \mathcal { H } } { m i n } \frac { 1 } { n } \sum _ { i } \epsilon _ { i } ( h ) } \end{array}
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
In the semi-supervised setting, the label associated with an instance might be missing. In the following, "domain" and "distribution" will be used interchangeably, and the "classes of a domain" denote the classes for which labeled or unlabeled examples are available in this domain.
|
| 44 |
+
|
| 45 |
+
# 2 STATE OF THE ART
|
| 46 |
+
|
| 47 |
+
Machine learning classically relies on the iid setting: when training and test samples are independently drawn from the same joint distribution $P ( X , Y )$ (Vapnik, 1998). Two other settings emerged in the 1990s, "concept drift" and "covariate shift". They respectively occur when conditional data distributions $P ( { \cal Y } | { \bar { \cal X } } )$ and marginal data distributions $P ( X )$ change, either continuously or abruptly, across training data or between train and test data (Shimodaira, 2000). Since then, transfer learning has come to designate methods to learn across drifting, shifting or distinct distributions, or even distinct tasks (Pratt et al., 1991; Pan & Yang, 2010). Restricting ourselves to addressing a single task on a common input space, we distinguish two objectives: minimizing the learning risk over all considered distributions (MDL), or over a single target distribution while exploiting samples from richer source(s) (DA). MDL is thus distinct from multiple source DA by their respective focus on the average risk over all distributions, versus target accuracy only. Samples from the different domains can be all, partially, or not labeled (supervised, semi-supervised and unsupervised settings). Finally, different domains can involve the same classes, or some domains can involve classes not included in other domains, referred to as class asymmetry.
|
| 48 |
+
|
| 49 |
+
In MDL, the different domains can be taken into account by maintaining shared and domain-specific parameters (Dredze et al., 2010), or through a domain-specific use of shared parameters. The domaindependent use of these parameters can be learned, e.g. using domain-guided dropout (Xiao et al., 2016), or based on prior knowledge about domain semantic relationships (Yang & Hospedales, 2015).
|
| 50 |
+
|
| 51 |
+
Early DA approaches leverage source examples to learn on the target domain in various ways, e.g. through reweighting source datapoints (Mansour, 2009; Huang et al., 2006; Gong et al., 2013), or defining an extended representation to learn from both source and target (Daumé III & Marcu, 2006). Other approaches proceed by aligning the source and target representations with PCA-based correlation alignment (Sun et al., 2016), or subspace alignment (Fernando et al., 2015). In the field of computer vision, a somewhat related way of mapping examples in one domain onto the other is image-to-image translation, possibly in combination with a generative adversarial network (see references in Appendix A).
|
| 52 |
+
|
| 53 |
+
Intuitively, the difficulty of DA crucially depends on the distance between source and target distribution. Accordingly, a large set of DA methods proceed by reducing this distance in the original input space $\mathcal { X }$ , e.g. via importance sampling (Bickel et al., 2007) or by modifying the source representation using optimal transport (Courty et al., 2017; Damodaran et al., 2018). Another option is to map source and target samples on a latent space where they will have minimal distance. Neural networks have been intensively exploited to build such latent spaces, either through generative adversarial mechanisms (Tzeng et al., 2017; Ghifary et al., 2016), or through combining task objective with an approximation of the distance between source(s) and target. Examples of used distances include the Maximum Mean Discrepancy due to Gretton et al. (2007) (Tzeng et al., 2014; Bousmalis et al., 2016), some of its variants (Long et al., 2015; 2016), the $\mathcal { L } _ { 2 }$ contrastive divergence (Motiian et al., 2017), the Frobenius norm of the output feature correlation matrices (Sun & Saenko, 2016), or the $\mathcal { H }$ -divergence (Ben-David et al., 2006; 2010; Ganin et al., 2016; Pei et al., 2018; Long et al., 2017) (more in Sec. 3). Most DA methods assume that source(s) and target contain examples from the same classes; in particular, in standard benchmarks such as OFFICE (Saenko et al., 2010), all domains contain examples from the same classes. Notable exceptions are partial DA methods, where target classes are expected to be a subset of source classes e.g. (Zhang et al., 2018; Cao et al., 2018). DA and partial DA methods share two drawbacks when applied to semi-supervised MDL with non-identical domain class sets. First, neither generic nor partial DA methods try to mitigate the impact of unlabeled samples from a class without any labeled counterparts. Second, as they focus on target performance, (partial) DA methods do not discuss the impact of extra labeled source classes on source accuracy. However, as shown in Sec. 4.3, class asymmetry can heavily impact model performance if not accounted for.
|
| 54 |
+
|
| 55 |
+
Bioinformatics is increasingly appreciating the need for domain adaptation methods (Borgwardt et al., 2006; Schweikert et al., 2008; Xu & Yang, 2011; Vallania et al., 2017). Indeed, experimentalists regularly face the issues of concept drift and covariate shift. Most biological experiments that last more than a few days are subject to technical variations between groups of samples, referred to as batch effects. Batch effects in image-based screening data are usually tackled with specific normalization methods (Birmingham et al., 2009). More recently, work by Ando et al. (2017) applied CorAl (Sun et al., 2016) for this purpose, aligning each batch with the entire experiment. DA has been applied to image-based datasets for improving or accelerating image segmentation tasks (Becker et al., 2015; van Opbroek et al., 2015; Bermúdez-Chacón et al., 2016; Kamnitsas et al., 2017). However, to our knowledge, MDL has not yet been used in Bioimage Informatics, and this work is the first to leverage distinct microscopy screening datasets using MDL.
|
| 56 |
+
|
| 57 |
+
# 3 MULTI-DOMAIN ADVERSARIAL LEARNING
|
| 58 |
+
|
| 59 |
+
The $\mathcal { H }$ -divergence has been introduced to bound the DA risk (Ben-David et al., 2006; 2010; Ganin et al., 2016). This section extends the DA theoretical results to the MDL case (Sec. 3.1), supporting
|
| 60 |
+
|
| 61 |
+
the design of the MULANN approach (Sec. 3.2). The reader is referred to Appendix B for formal definitions and proofs.
|
| 62 |
+
|
| 63 |
+
# 3.1 $\mathcal { H }$ -DIVERGENCE FOR MDL
|
| 64 |
+
|
| 65 |
+
The distance between source and target partly governs the difficulty of DA. The $\mathcal { H }$ -divergence has been introduced to define such a distance which can be empirically estimated with proven guarantees (Batu et al., 2000; Kifer et al., 2004). This divergence measures how well one can discriminate between samples from two marginals. It inspired an adversarial approach to DA (Ganin et al., 2016), through the finding of a feature space in which a binary classification loss between source and target projections is maximal, and thus their $\mathcal { H }$ -divergence minimal. Furthermore, the target risk is upper-bounded by the empirical source risk, the empirical $\mathcal { H }$ -divergence between source(s) and target marginals, and the oracle DA risk (Ben-David et al., 2006; 2010; Zhang et al., 2012).
|
| 66 |
+
|
| 67 |
+
Bounding the MDL loss using the $\mathcal { H }$ -divergence. A main difference between DA and MDL is that MDL aims to minimize the average risk over all domains while DA aims to minimize the target risk only. Considering for simplicity a binary classification MDL problem and taking inspiration from (Mansour et al., 2008; Ben-David et al., 2010), the MDL loss can be formulated as an optimal convex combination of domain risks. A straightforward extension of Ben-David et al. (2010) (Theorem 2 in Appendix B.2) establishes that the compound empirical risk is upper bounded by the sum of: i) the oracle risk on each domain; ii) a statistical learning term involving the VC dimension of $\mathcal { H }$ ; iii) the divergence among any two domains as measured by their $\mathcal { H }$ -divergence and summed oracle risk. This result states that, assuming a representation in which domains are as indistinguishable as possible and on which every 1- and 2-domain classification task is well addressed, then there exists a model that performs well on all of them. In the 2-domain case, the bound is minimized when one minimizes the convex combination of losses in the same proportion as samples.
|
| 68 |
+
|
| 69 |
+
Bounding the worst risk. The classifier imbalance w.r.t. the $i$ -th domain is defined as $| \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) |$ The extent to which marginal $\mathcal { D } _ { i }$ can best be distinguished by a classifier from $\mathcal { H }$ (i.e., the $\mathcal { H }$ - divergence), and the intrinsic difficulty $\boldsymbol { \epsilon } _ { i } ^ { \star }$ of the $i$ -th classification task, yield an upper-bound on the classifier imbalance (proof in Appendix B.3):
|
| 70 |
+
|
| 71 |
+
Proposition 1. Given an input space $\mathcal { X }$ , n distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 , 1 \}$ and hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , for any $h \in \mathcal H$ , let $\epsilon _ { i } ( h )$ (respectively $\bar { \epsilon } ( h ) .$ ) denote the classification risk of $h$ w.r.t. distribution $\mathcal { D } _ { i }$ (resp. its average risk over all $\mathcal { D } _ { i }$ ). The risk imbalance $| \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) |$ is upper bounded as:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\vert \epsilon _ { i } ( h ) - \bar { \epsilon } ( h ) \vert \leq \epsilon _ { i } ^ { \star } + \frac { 1 } { n } { \sum _ { j } } \epsilon _ { j } ^ { \star } + \frac { 1 } { n } { \sum _ { j } } \left( d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \Delta _ { i j } \right)
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
Accordingly, every care taken to minimize $\mathcal { H }$ -divergences or $\Delta _ { i j }$ (e.g. using the class-wise contrastive losses (Motiian et al., 2017)) improves the above upper bound. An alternative bound of the classifier imbalance can be obtained by using the $\mathcal { H } \Delta \mathcal { H }$ -divergence (proposition 3, and corollaries 4, 5 for the 2-domain case in Appendix).
|
| 78 |
+
|
| 79 |
+
# 3.2 MULANN: MULTI-DOMAIN ADVERSARIAL LEARNING
|
| 80 |
+
|
| 81 |
+
As pointed out by e.g. Pei et al. (2018), when minimizing the $\mathcal { H }$ -divergence between two domains, a negative transfer can occur in the case of class asymmetry, when domains involve distinct sets of classes. For instance, if a domain has unlabeled samples from a class which is not present in the other domains, both global (Ganin et al., 2016) and class-wise (Pei et al., 2018) domain alignments will likely deteriorate at least one of the domain risks by putting the unlabeled samples close to labeled ones from the same domain. A similar issue arises if a domain has no (labeled or unlabeled) samples in classes which are represented in other domains. In general, unlabeled samples are only subject to constraints from the domain discriminator, as opposed to labeled samples. Thus, in the case of class asymmetry, domain alignment will tend to shuffle unlabeled samples more than labeled ones.
|
| 82 |
+
|
| 83 |
+
This limitation is addressed in MULANN by defining a new discrimination task referred to as Known Unknown Discrimination (KUD). Let us assume that, in each domain, a fraction $p ^ { \star }$ of unlabeled samples comes from extra classes, i.e. classes with no labeled samples within the domain. KUD aims at discriminating, within each domain, labeled samples from unlabeled ones that most likely belong to such extra classes. More precisely, unlabeled samples of each domain are ranked according to the entropy of their classification according to the current classifier, restricted to their domain classes.
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 1: Left: MULANN architecture. GRL: gradient reversal layer from Ganin et al. (2016). Right: impact of parameter $p$ in comparison with the groundtruth $p ^ { \star }$ on MNIST MNIST-M. $p = 0$ corresponds to DANN: no data flowed through the KUD module (see text for details).
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
|
| 90 |
+
Introducing the hyper-parameter $p$ , the top $p \%$ examples according to this classification entropy are deemed "most likely unknown", and thus discriminated from the labeled ones of the same domain. The KUD module aims at repulsing the most likely unknown unlabeled samples from the labeled ones within each domain (Fig. 1), thus resisting the contractive effects of global domain alignment.
|
| 91 |
+
|
| 92 |
+
Overall, MULANN involves $3 { + } n ^ { \prime }$ interacting modules, where $n ^ { \prime }$ is the number of domains with unlabeled data. The first module is the feature extractor with parameters $\theta _ { f }$ , which maps the input space $\mathcal { X }$ to some latent feature space $\Omega$ . $2 { + } n ^ { \prime }$ modules are defined on $\Omega$ : the classifier module, the domain discriminator module, and the $n ^ { \prime }$ KUD modules, with respective parameters $\theta _ { c }$ , $\theta _ { d }$ and $( \theta _ { u , i } ) _ { i }$ . All modules are simultaneously learned by minimizing loss $\mathcal { L } ( \theta _ { f } , \theta _ { c } , \theta _ { d } , \theta _ { u } )$ :
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\mathcal { L } ( \theta _ { f } , \theta _ { c } , \theta _ { d } , \theta _ { u } ) = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left( \mathcal { L } _ { c } ^ { i } ( \theta _ { f } , \theta _ { c } ) - \lambda \mathcal { L } _ { d } ^ { i } ( \theta _ { f } , \theta _ { d } ) \right) + \frac { \zeta } { n ^ { \prime } } \sum _ { j = 1 } ^ { n ^ { \prime } } \mathcal { L } _ { u } ^ { j } ( \theta _ { f } , \theta _ { u , j } )
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $\zeta$ and $\lambda$ are hyper-parameters, $\mathcal { L } _ { c } ^ { i } ( \theta _ { f } , \theta _ { c } )$ is the empirical classification loss on labeled examples in $S _ { i }$ , $\mathcal { L } _ { d } ^ { i } ( \theta _ { f } , \theta _ { d } )$ is the domain discrimination loss (multi-class cross-entropy loss of classifying examples from $S _ { i }$ in class $\romannumeral 1$ ), and $\mathcal { L } _ { u } ^ { i } ( \theta _ { f } , \theta _ { u , i } )$ is the KUD loss (binary cross-entropy loss of discriminating labelled samples from $S _ { i }$ from the "most likely unknown" unlabelled samples from $S _ { i }$ ).
|
| 99 |
+
|
| 100 |
+
The loss minimization aims to find a saddle point $( \hat { \theta } _ { f } , \hat { \theta } _ { y } , \hat { \theta } _ { d } , \hat { \theta } _ { u } )$ , achieving an equilibrium between the classification performance, the discrimination among domains (to be prevented) and the discrimination among labeled and some unlabeled samples within each domain (to be optimized). The sensitivity w.r.t. hyperparameter $p$ will be discussed in Sec. 4.3.
|
| 101 |
+
|
| 102 |
+
# 4 EXPERIMENTAL VALIDATION
|
| 103 |
+
|
| 104 |
+
This section reports on the experimental validation of MULANN in DA and MDL settings on three image datasets (Sec. 4.2), prior to analyzing MULANN and investigating the impact of class asymmetry on model performances (Sec. 4.3).
|
| 105 |
+
|
| 106 |
+
# 4.1 IMPLEMENTATION
|
| 107 |
+
|
| 108 |
+
Datasets The DA setting considers three benchmarks: DIGITS, including the well-known MNIST and MNIST-M (Le Cun et al., 1998; Ganin et al., 2016); Synthetic road signs and German traffic sign benchmark (Chigorin et al., 2012; Stallkamp et al., 2012) and OFFICE (Saenko et al., 2010). The MDL setting considers the new CELL benchmark, which is made of fluorescence microscopy images of cells (detailed in Appendix C). Each image contains tens to hundreds of cells that have been exposed to a given chemical compound, in three domains: California (C), Texas (T) and England (E). There are 13 classes across the three domains (Appendix, Fig. 2); a drug class is a group of compounds targeting a similar known biological process, e.g. DNA replication. Four domain shifts are considered: $C { } \mathrm { T } ,$ $\mathrm { T } { } \mathrm { E }$ , $\mathrm { E } { } \mathrm { C }$ and $\mathrm { C } \mathrm { T } \mathrm { E }$ .
|
| 109 |
+
|
| 110 |
+
Baselines and hyperparameters. In all experiments, MULANN is compared to DANN (Ganin et al., 2016) and its extension MADA (Pei et al., 2018) (that involves one domain discriminator module per class rather than a single global one). For DANN, MADA and MULANN, the same pre-trained VGG-16 architecture (Simonyan & Zisserman, 2014) from Caffe (Jia et al., 2014) is used for OFFICE and CELL2; the same small convolutional network as Ganin et al. (2016) is used for DIGITS (see Appendix D.1 for details). The models are trained in Torch (Collobert et al., 2011) using stochastic gradient descent with momentum $\mathrm { \Phi } ^ { \prime } \rho = 0 . 9 \mathrm { \Phi } ,$ ). As in (Ganin et al., 2016), no hyper-parameter grid-search is performed for OFFICE results - double cross-validation is used for all other benchmarks. Hyper-parameter ranges can be found in Appendix D.2.
|
| 111 |
+
|
| 112 |
+
Semi-supervised setting. For OFFICE and CELL, we follow the experimental settings from Saenko et al. (2010). A fixed number of labeled images per class is used for one of the domains in all cases (20 for Amazon, 8 for DSLR and Webcam, 10 in CELL). For the other domain, 10 labeled images per class are used for half of the classes (15 for OFFICE, 4 for CELL). For DIGITS and RoadSigns, all labeled source train data is used, whereas labeled target data is used for half of the classes only (5 for DIGITS, 22 for RoadSigns). In DA, the evaluation is performed on all target images from the unlabeled classes. In MDL, the evaluation is performed on all source and target classes (considering labeled and unlabeled samples).
|
| 113 |
+
|
| 114 |
+
Evaluation goals. A first goal is to assess MULANN performance comparatively to the baselines. A second goal is to assess how the experimental setting impacts model performance. As domain discriminator and KUD modules can use both labeled and unlabeled images, a major question regards the impact of seeing unlabeled images during training. Two experiments are conducted to assess this impact: a) the same unlabeled images are used for training and evaluation (referred to as fully transductive setting, noted FT) ; b) some unlabeled images are used for training, and others for evaluation (referred to as non-fully transductive setting, noted NFT). (The case where no unlabeled images are used during training is discarded due to poor results).
|
| 115 |
+
|
| 116 |
+
# 4.2 EVALUATION
|
| 117 |
+
|
| 118 |
+
DA on DIGITS, RoadSigns and OFFICE. Table 1 compares MULANN with DANN and MADA (Sec. 4.1). Other baselines include: Learning from source and target examples with no transfer loss; Published results from (Motiian et al., 2017) (legend CCSA), that uses a contrastive loss to penalizes large (resp. small) distances between same (resp. different) classes and different domains in the feature space; Published results from (Tzeng et al., 2015), an extension of DANN that adds a loss on target softmax values ("soft label loss"; legend Tseng15). Overall, MULANN yields the best results, significantly improving upon the former best results on the most difficult cases, i.e., $\mathrm { D } { } \mathrm { A }$ , $\mathbf { A } { } \mathbf { D }$ or $\mathrm { W } { \to } \mathrm { A }$ . As could be expected, the fully transductive results match or significantly outperform the non-fully transductive ones. Notably, MADA performs similarly to DANN on DIGITS and RoadSigns, but worse on OFFICE; a potential explanation is that MADA is hindered as the number of classes, and thus domain discriminators, increases (respectively 10, 32 and 43 classes).
|
| 119 |
+
|
| 120 |
+
MDL on CELL. A state of the art method for fluorescence microscopy images relies on tailored approaches for quantifying changes to cell morphology (Kang et al., 2016). Objects (cells) are segmented in each image, and circa 650 shape, intensity and texture features are extracted for each object in each image. The profile of each image is defined as the vector of its Kolmogorov-Smirnov statistics, computed for each feature by comparing its distribution to that of the same feature from pooled negative controls of the same plate3. Classification in profile space is realized using linear discriminant analysis, followed by k-nearest neighbor $\mathrm { L D A + k \mathrm { - } N N }$ ) ("Baseline P" in Table 2). As a state of the art shallow approach to MDL to be applied in profile space, CORAL (Sun et al., 2016) was chosen $( " ) { } ^ { \circ } + { \mathrm { C O R A L } } "$ in Table 2). A third baseline corresponds to fine-tuning VGG-16 without any transfer loss ("Baseline NN").
|
| 121 |
+
|
| 122 |
+
Table 2 compares DANN, MADA and MULANN to the baselines, where columns 4-7 (resp. 8-9) consider raw images (resp. the profile representations).4 The fact that a profile-based baseline generally outperforms an image-based baseline was expected, as profiles are designed to reduce the impact of experimental settings (column 4 vs. 8). The fact that standard deviations tend to be larger here than for OFFICE, RoadSigns or DIGITS is explained by a higher intra-class heterogeneity; some classes comprise images from different compounds with similar but not identical biological activity. Most interestingly, MULANN and $\mathrm { P + C O R A L }$ both improve classification accuracy on unlabeled classes at the cost of a slighty worse classification accuracy for the labeled classes (in all cases but one). This is explained as reducing the divergence between domain marginals on the latent feature space prevents the classifier from exploiting dataset-dependent biases. Overall, MULANN and $\mathrm { P } +$ CORAL attain comparable results on two-domain cases, with MULANN performing significantly better in the three-domain case. Finally, MULANN matches or significantly outperforms DANN and MADA.
|
| 123 |
+
|
| 124 |
+
Table 1: Classification results on target test set in the semi-supervised DA setting (average and stdev on 5 seeds or folds). Bold: results less than 1 stdev from the best in each column. See text.
|
| 125 |
+
|
| 126 |
+
<table><tr><td colspan="2">Source Target</td><td>Mnist Mnist-M</td><td>SynSigns GTSRB</td><td>DSLR Amazon</td><td>Amazon DSLR</td><td>Webcam DSLR</td><td>DSLR Webcam</td><td>Webcam Amazon</td><td>Amazon Webcam</td><td>OFFICE average</td></tr><tr><td colspan="2">Baseline</td><td>35.6 (0.6)</td><td>85.1 (1.2)</td><td>35.5 (0.5)</td><td>58.5 (1.7)</td><td>90.9 (1.8)</td><td>90.6 (0.6)</td><td>34.4 (2.7)</td><td>55.8 (1.5)</td><td>61.0</td></tr><tr><td colspan="2">Tzeng15 CCSA</td><td></td><td></td><td>43.1 (0.2)</td><td>68.0 (0.5)</td><td>97.5 (0.1)</td><td>90.0 (0.2)</td><td>40.5 (0.2)</td><td>59.3 (0.6)</td><td>66.4</td></tr><tr><td rowspan="3">NFT</td><td>DANN</td><td>90.4 (1.1) 89.8 (1.1))</td><td></td><td>42.6 (0.6) 50.9 (2.4)</td><td>70.5 (0.6)</td><td>96.2 (0.3)</td><td>90.0 (0.2) 91.9 (0.7)</td><td>43.6 (1.0)</td><td>63.3 (0.9)</td><td>67.8</td></tr><tr><td>MADA</td><td>89.9 (0.8)</td><td>88.7 (1.0)</td><td>44.8 (3.3)</td><td>68.6 (4.9) 64.0 (3.9)</td><td>88.8 (3.2) 88.2 (4.2)</td><td>89.1 (3.4)</td><td>48.8 (3.8) 44.7 (4.8)</td><td>73.0 (2.6) 72.2 (3.1)</td><td>70.3</td></tr><tr><td>MULANN</td><td>91.5 (0.4)</td><td>92.1 (1.4)</td><td>57.6 (3.9)</td><td>75.8 (3.7)</td><td>93.3 (2.5)</td><td>89.9 (1.6)</td><td>54.9 (3.9)</td><td>76.8 (3.1)</td><td>67.2 74.7</td></tr><tr><td rowspan="3">FT</td><td>DANN</td><td>90.6 (1.2)</td><td>86.7 (0.8)</td><td>52.2 (2.2)</td><td>77.4 (2.2)</td><td>94.6 (1.2)</td><td>90.7 (1.7)</td><td>53.0 (1.9)</td><td>74.3 (2.7)</td><td>73.7</td></tr><tr><td>MADA</td><td>91.0 (1.1)</td><td>84.8 (1.6)</td><td>51.6 (2.5)</td><td>78.8 (3.6)</td><td>91.7 (1.7)</td><td></td><td>88.8 (2.3) 53.8 (2.6)</td><td>73.5 (2.2)</td><td>73.0</td></tr><tr><td>MULANN</td><td>92.7 (0.6)</td><td>89.1 (1.5)</td><td>63.9 (2.4)</td><td>81.7 (1.7)</td><td>95.4 (2.4)</td><td>89.3 (2.8)</td><td>64.2 (2.5)</td><td>80.8 (2.7)</td><td>79.2</td></tr></table>
|
| 127 |
+
|
| 128 |
+
Table 2: CELL test classification accuracy results on all domains (average and stdev on 5 folds), in the fully transductive setting (see table 5 in Appendix for non-transductive ones, and sections C.4, C.5 for details about image and class selection).
|
| 129 |
+
|
| 130 |
+
<table><tr><td>Shift</td><td>Image set #classes</td><td></td><td>Baseline NN</td><td>IDANN</td><td>MADA</td><td>MULANN</td><td>Baseline P</td><td>P+Coral</td></tr><tr><td rowspan="3">E-C</td><td>E</td><td>7</td><td>63.7 (7.0)</td><td>62.9 (7.6)</td><td>59.5 (9.5)</td><td>64.4 (8.0)</td><td>74.1 (3.9)</td><td>58.4 (6.1)</td></tr><tr><td>C lab.</td><td>4</td><td>97.0 (1.6)</td><td>86.4 (10.3)</td><td>86.1 (6.5)</td><td>82.4 (10.2)</td><td>95.4 (3.2)</td><td>86.6 (6.0)</td></tr><tr><td>C unlab.</td><td>3</td><td>0.6 (1.2)</td><td>54.4 (18.3)</td><td>33.6 (17.5)</td><td>58.4 (19.7)</td><td>25.5 (5.7)</td><td>42.2 (9.5)</td></tr><tr><td rowspan="3">C-T</td><td>C</td><td>10</td><td>90.4 (1.8)</td><td>90.0 (1.3)</td><td>87.2 (2.4)</td><td>88.0 (3.6)</td><td>96.1 (1.0)</td><td>93.8 (0.9)</td></tr><tr><td>Tlab.</td><td>7</td><td>93.8 (2.0)</td><td>93.6 (1.8)</td><td>89.2 (2.4)</td><td>90.0 (1.9)</td><td>95.2 (3.1)</td><td>93.4 (3.0)</td></tr><tr><td>Tunlab.</td><td>3</td><td>36.4 (10.7)</td><td>68.3 (6.4)</td><td>63.7 (10.4)</td><td>91.6 (5.7)</td><td>68.1 (2.1)</td><td>86.0 (7.8)</td></tr><tr><td rowspan="3">T-E</td><td>T</td><td>7</td><td>88.9 (6.6)</td><td>90.8 (3.9)</td><td>87.7 (2.1)</td><td>85.7 (6.6)</td><td>89.3 (8.7)</td><td>90.3 (3.1)</td></tr><tr><td>E lab.</td><td>4</td><td>60.0 (5.3)</td><td>59.4 (6.8)</td><td>56.5 (12.3)</td><td>54.5 (6.5)</td><td>59.4 (8.1)</td><td>50.3 (6.4)</td></tr><tr><td>E unlab.</td><td>3</td><td>19.0 (14.4)</td><td>72.7 (10.1)</td><td>56.2 (16.6)</td><td>71.7 (21.9)</td><td>32.9 (12.3)</td><td>48.1 (10.0)</td></tr><tr><td rowspan="4">C-T-E T</td><td>C</td><td>7</td><td>89.8 (3.5)</td><td>87.8 (4.6)</td><td>92.8 (1.5)</td><td>88.8 (5.2)</td><td>96.3 (1.1)</td><td>89.3 (5.0)</td></tr><tr><td></td><td>7</td><td>92.6 (2.6)</td><td>90.2 (1.2)</td><td>94.2 (2.3)</td><td>92.5 (3.0)</td><td>96.8 (2.5)</td><td>89.9 (3.1)</td></tr><tr><td>E lab.</td><td>4</td><td>62.3 (5.5)</td><td>56.7 (4.2)</td><td>53.6 (8.5)</td><td>48.1 (5.3)</td><td>57.3 (6.1)</td><td>44.4 (7.2)</td></tr><tr><td>E unlab.</td><td>3</td><td>19.9 (13.5)</td><td>49.4 (6.5)</td><td>46.5 (6.9)</td><td>79.4 (5.3)</td><td>45.5 (13.6)</td><td>62.8 (7.2)</td></tr></table>
|
| 131 |
+
|
| 132 |
+
# 4.3 ANALYSES
|
| 133 |
+
|
| 134 |
+
Two complementary studies are conducted to investigate the impact of hyperparameter $p$ and that of class asymmetry. The tSNE (van der Maaten & Hinton, 2008) visualizations of the feature space for DANN, MADA and MULANN are displayed in Appendix, Fig. 3.
|
| 135 |
+
|
| 136 |
+
Sensitivity w.r.t. the fraction $p$ of "known unknowns". MULANN was designed to counter the negative transfer that is potentially caused by class asymmetry. This is achieved through the repulsion of labeled examples in each domain from the fraction $p$ of unlabeled examples deemed to belong to extra classes (not represented in the domain). The sensitivity of MULANN performance to the value of $p$ and its difference to the ground truth $p ^ { \star }$ is investigated on MNIST MNIST-M. A first remark is that discrepancies between $p$ and $p ^ { \star }$ has no influence on the accuracy on a domain without unlabeled datapoints (Fig. 4 in Appendix). Fig. 1, right, displays the error depending on $p$ for various values of $p ^ { \star }$ . As could have been expected, it is better to underestimate than to overestimate $p ^ { \star }$ ; it is even better to slightly underestimate it than to get it right, as the entropy ranking of unlabeled examples can be perturbed by classifier errors.
|
| 137 |
+
|
| 138 |
+
Table 3: Class content per case in the asymmetry experiments
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Case</td><td>Dom. 1 Lab.</td><td>Dom.2 Lab.|Unlab.</td><td></td></tr><tr><td>1</td><td>α,β</td><td>a β</td><td></td></tr><tr><td>2</td><td>a,β,</td><td>a α</td><td>B ,8</td></tr><tr><td>3</td><td>α,β</td><td></td><td>B,8</td></tr><tr><td>4</td><td>a,β,</td><td>α</td><td></td></tr></table>
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 3: Impact of asymmetry in class content between domains on OFFICE $( \mathsf { W } { \to } \mathbf { A } )$ for DANN, MADA and MULANN. See text for details. Better seen in color.
|
| 144 |
+
|
| 145 |
+
Impact of class/domain asymmetry. Section 4.2 reports on the classification accuracy when all classes are represented in all domains of a given shift. In the general case however, the classes represented by the unlabeled examples are unknown, hence there might exist "orphan" classes, with labeled or unlabeled samples, unique to a single domain. The impact of such orphan classes, referred to as class asymmetry, is investigated in the 2-domain case. Four types of samples are considered (Table 3): A class might have labeled examples in both domains $( \alpha )$ , labeled in one domain and unlabeled in the other domain $( \beta )$ , labeled in one domain and absent in the other one (orphan $\gamma$ ), and finally unlabeled in one domain and absent in the other one (orphan $\delta$ ). The impact of the class asymmetry is displayed on Fig. 3, reporting the average classification accuracy of $\alpha , \beta$ classes on domain 1 on the $\mathbf { X }$ -axis, and classification accuracy of unlabeled $\beta$ classes on domain 2 on the y-axis, for MULANN, DANN and MADA on OFFICE (on CELL in Fig. 5, Appendix).
|
| 146 |
+
|
| 147 |
+
A clear trend is that adding labeled orphans $\gamma$ (case $" 2 "$ , Fig. 3) entails a loss of accuracy for all algorithms compared to the no-orphan reference (case "1"). This is explained as follows: on the one hand, the $\gamma$ samples are subject to the classifier pressure as all labeled samples; on the other hand, they must be shuffled with samples from domain 2 due to the domain discriminator(s) pressure. Thus, the easiest solution is to shuffle the unlabeled $\beta$ samples around, and the loss of accuracy on these $\beta$ samples is very significant (the $" 2 "$ is lower on the $y$ -axis compared to "1" for all algorithms). The perturbation is less severe for the labeled $( \alpha , \beta )$ samples in domain 1, which are preserved by the classifier pressure $x$ -axis).
|
| 148 |
+
|
| 149 |
+
The results in case $" 3 "$ are consistent with the above explanation: since the unlabeled $\delta$ samples are only seen by the discriminator(s), their addition has little impact on either the labeled or unlabeled data classification accuracy (Figs. 3 and 5). Finally, there is no clear trend in the impact of both labeled and unlabeled orphans (case "4"): labeled $( \alpha , \beta )$ (resp. unlabeled $\beta$ ) are only affected for MADA on CELL (resp. MULANN on OFFICE). Overall, these results show that class asymmetry matters for practical applications of transfer learning, and can adversely affect all three adversarial methods (Figs. 3 and 5), with asymmetry in labeled class content ("2") being the most detrimental to model performance.
|
| 150 |
+
|
| 151 |
+
# 5 DISCUSSION AND FURTHER WORK
|
| 152 |
+
|
| 153 |
+
This paper extends the use of domain adversarial learning to multi-domain learning, establishing how the $\mathcal { H }$ -divergence can be used to bound both the risk across all domains and the worst-domain risk (imbalance on a specific domain). The stress is put on the notion of class asymmetry, that is, when some domains contain labeled or unlabeled examples of classes not present in other domains. Showing the significant impact of class asymmetry on the state of the art, this paper also introduces MULANN, where a new loss is meant to resist the contractive effects of the adversarial domain discriminator and to repulse (a fraction of) unlabeled examples from labeled ones in each domain.
|
| 154 |
+
|
| 155 |
+
The merits of the approach are satisfactorily demonstrated by comparison to DANN and MADA on DIGITS, RoadSigns and OFFICE, and results obtained on the real-world CELL problem establish a new baseline for the microscopy image community.
|
| 156 |
+
|
| 157 |
+
A perspective for further study is to bridge the gap between the proposed loss and importance sampling techniques, iteratively exploiting the latent representation to identify orphan samples and adapt the loss while learning. Further work will also focus on how to identify and preserve relevant domain-specific behaviours while learning in a domain adversarial setting (e.g., if different cell types have distinct responses to the same class of perturbations).
|
| 158 |
+
|
| 159 |
+
# ACKNOWLEDGMENTS
|
| 160 |
+
|
| 161 |
+
This work was supported by NIH RO1 CA184984 (LFW), R01GM112690 (SJA) and the Institute of Computational Health Sciences at UCSF (SJA and LFW). We thank the Shoichet lab (UCSF) for access to their GPUs and Theresa Gebert for suggestions and feedback.
|
| 162 |
+
|
| 163 |
+
# REFERENCES
|
| 164 |
+
|
| 165 |
+
D. Michael Ando, Cory McLean, and Marc Berndl. Improving phenotypic measurements in high-content imaging screens. bioRxiv, 2017. doi: 10.1101/161422. URL https://www.biorxiv.org/content/ early/2017/07/10/161422.
|
| 166 |
+
Asha Anoosheh, Eirikur Agustsson, Radu Timofte, and Luc Van Gool. Combogan: Unrestrained scalability for image domain translation. CoRR, abs/1712.06909, 2017.
|
| 167 |
+
Tugkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White. Testing that distributions are close. In 41st Annual Symposium on Foundations of Computer Science, FOCS 2000, 12-14 November 2000, Redondo Beach, California, USA, pp. 259–269, 2000. doi: 10.1109/SFCS.2000.892113. URL https://doi.org/10.1109/SFCS.2000.892113.
|
| 168 |
+
C. Becker, C. M. Christoudias, and P. Fua. Domain adaptation for microscopy imaging. IEEE Trans Med Imaging, 34(5):1125–1139, May 2015.
|
| 169 |
+
Shai Ben-David, John Blitzer, Koby Crammer, and Fernando Pereira. Analysis of representations for domain adaptation. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 137–144, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/ citation.cfm?id $= _ { c } ^ { \prime }$ 2976456.2976474.
|
| 170 |
+
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, May 2010.
|
| 171 |
+
Róger Bermúdez-Chacón, Carlos Becker, Mathieu Salzmann, and Pascal Fua. Scalable unsupervised domain adaptation for electron microscopy. In Sebastien Ourselin, Leo Joskowicz, Mert R. Sabuncu, Gozde Unal, and William Wells (eds.), Medical Image Computing and Computer-Assisted Intervention – MICCAI 2016, pp. 326–334, Cham, 2016. Springer International Publishing. ISBN 978-3-319-46723-8.
|
| 172 |
+
Steffen Bickel, Michael Brückner, and Tobias Scheffer. Discriminative learning for differing training and test distributions. In Proceedings of the 24th International Conference on Machine Learning, ICML ’07, pp. 81–88, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-793-3. doi: 10.1145/1273496.1273507. URL http://doi.acm.org/10.1145/1273496.1273507.
|
| 173 |
+
A. Birmingham, L. M. Selfors, T. Forster, D. Wrobel, C. J. Kennedy, E. Shanks, J. Santoyo-Lopez, D. J. Dunican, A. Long, D. Kelleher, Q. Smith, R. L. Beijersbergen, P. Ghazal, and C. E. Shamu. Statistical methods for analysis of high-throughput RNA interference screens. Nat. Methods, 6(8):569–575, Aug 2009.
|
| 174 |
+
K. M. Borgwardt, A. Gretton, M. J. Rasch, H. P. Kriegel, B. Scholkopf, and A. J. Smola. Integrating structured biological data by Kernel Maximum Mean Discrepancy. Bioinformatics, 22(14):49–57, Jul 2006.
|
| 175 |
+
Konstantinos Bousmalis, George Trigeorgis, Nathan Silberman, Dilip Krishnan, and Dumitru Erhan. Domain separation networks. CoRR, abs/1608.06019, 2016. URL http://arxiv.org/abs/1608.06019.
|
| 176 |
+
Olivier Bousquet and André Elisseeff. Stability and generalization. Journal of Machine Learning Research, 2: 499–526, 2002.
|
| 177 |
+
P. D. Caie, R. E. Walls, A. Ingleston-Orme, S. Daya, T. Houslay, R. Eagle, M. E. Roberts, and N. O. Carragher. High-content phenotypic profiling of drug response signatures across distinct cancer cells. Mol. Cancer Ther., 9(6):1913–1926, Jun 2010.
|
| 178 |
+
|
| 179 |
+
Zhangjie Cao, Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Partial transfer learning with selective adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
|
| 180 |
+
|
| 181 |
+
Alexander Chigorin, Gleb Krivovyaz, Alexander Velizhev, and Anton Konushin. A method for traffic sign detection in an image with learning from synthetic data. In 14th International Conference Digital Signal Processing and its Applications, volume 2, pp. 316–319, 2012. URL http://graphics.cs.msu.ru/ files/papers/dspa2012_chigorin_ts_recognition.pdf.
|
| 182 |
+
|
| 183 |
+
Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. Stargan: Unified generative adversarial networks for multi-domain image-to-image translation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018.
|
| 184 |
+
|
| 185 |
+
R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, 2011.
|
| 186 |
+
|
| 187 |
+
N. Courty, R. Flamary, D. Tuia, and A. Rakotomamonjy. Optimal transport for domain adaptation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 39(9):1853–1865, Sept 2017. ISSN 0162-8828. doi: 10.1109/TPAMI.2016.2615921.
|
| 188 |
+
|
| 189 |
+
Bharath Bhushan Damodaran, Benjamin Kellenberger, Rémi Flamary, Devis Tuia, and Nicolas Courty. Deepjdot: Deep joint distribution optimal transport for unsupervised domain adaptation. CoRR, abs/1803.10081, 2018. URL http://arxiv.org/abs/1803.10081.
|
| 190 |
+
|
| 191 |
+
Hal Daumé III and Daniel Marcu. Domain adaptation for statistical classifiers. J. Artif. Intell. Res., 26:101–126, 2006.
|
| 192 |
+
|
| 193 |
+
Mark Dredze, Alex Kulesza, and Koby Crammer. Multi-domain learning by confidence-weighted parameter combination. Machine Learning, 79(1):123–149, May 2010. ISSN 1573-0565. doi: 10.1007/s10994-009-5148-0. URL https://doi.org/10.1007/s10994-009-5148-0.
|
| 194 |
+
|
| 195 |
+
Basura Fernando, Tatiana Tommasi, and Tinne Tuytelaars. Joint cross-domain classification and subspace learning for unsupervised adaptation. Pattern Recognition Letters, 65:60–66, 2015. doi: 10.1016/j.patrec. 2015.07.009. URL https://doi.org/10.1016/j.patrec.2015.07.009.
|
| 196 |
+
|
| 197 |
+
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. URL http://jmlr.org/papers/v17/15-239.html.
|
| 198 |
+
|
| 199 |
+
Muhammad Ghifary, W. Bastiaan Kleijn, Mengjie Zhang, David Balduzzi, and Wen Li. Deep reconstructionclassification networks for unsupervised domain adaptation. In Computer Vision - ECCV, pp. 597–613, 2016.
|
| 200 |
+
|
| 201 |
+
Boqing Gong, Kristen Grauman, and Fei Sha. Connecting the dots with landmarks: Discriminatively learning domain-invariant features for unsupervised domain adaptation. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML’13, pp. I–222–I–230. JMLR.org, 2013. URL http://dl.acm.org/citation.cfm?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ 3042817.3042844.
|
| 202 |
+
|
| 203 |
+
Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander J. Smola. A kernel method for the two-sample-problem. In NIPS, pp. 513–520. MIT Press, 2007.
|
| 204 |
+
|
| 205 |
+
Jiayuan Huang, Alexander J. Smola, Arthur Gretton, Karsten M. Borgwardt, and Bernhard Scholkopf. Correcting sample selection bias by unlabeled data. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS’06, pp. 601–608, Cambridge, MA, USA, 2006. MIT Press. URL http://dl.acm.org/citation.cfm?id=2976456.2976532.
|
| 206 |
+
|
| 207 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. In CVPR, pp. 5967–5976. IEEE Computer Society, 2017.
|
| 208 |
+
|
| 209 |
+
Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
|
| 210 |
+
|
| 211 |
+
Eric Jones, Travis Oliphant, Pearu Peterson, et al. SciPy: Open source scientific tools for Python, 2001–. URL http://www.scipy.org/. [Online; accessed <today>].
|
| 212 |
+
|
| 213 |
+
Konstantinos Kamnitsas, Christian Baumgartner, Christian Ledig, Virginia Newcombe, Joanna Simpson, Andrew Kane, David Menon, Aditya Nori, Antonio Criminisi, Daniel Rueckert, and Ben Glocker. Unsupervised domain adaptation in brain lesion segmentation with adversarial networks. In Marc Niethammer, Martin Styner, Stephen Aylward, Hongtu Zhu, Ipek Oguz, Pew-Thian Yap, and Dinggang Shen (eds.), Information Processing in Medical Imaging, pp. 597–609, Cham, 2017. Springer International Publishing. ISBN 978-3- 319-59050-9.
|
| 214 |
+
|
| 215 |
+
J. Kang, C. H. Hsu, Q. Wu, S. Liu, A. D. Coster, B. A. Posner, S. J. Altschuler, and L. F. Wu. Improving drug discovery with high-content phenotypic screens by systematic selection of reporter cell lines. Nat. Biotechnol., 34(1):70–77, Jan 2016.
|
| 216 |
+
|
| 217 |
+
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, VLDB ’04, pp. 180–191. VLDB Endowment, 2004. ISBN 0-12-088469-0. URL http://dl.acm.org/citation.cfm?id $=$ 1316689.1316707.
|
| 218 |
+
|
| 219 |
+
Piotr Koniusz, Yusuf Tas, and Fatih Porikli. Domain adaptation by mixture of alignments of second- or higherorder scatter tensors. CoRR, abs/1611.08195, 2016. URL http://arxiv.org/abs/1611.08195.
|
| 220 |
+
|
| 221 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 1097–1105. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4824-imagenet-classification-with-deep-convolutional-neural-networks. pdf.
|
| 222 |
+
|
| 223 |
+
Y. Le Cun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, Nov 1998. ISSN 0018-9219. doi: 10.1109/5.726791.
|
| 224 |
+
|
| 225 |
+
Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett (eds.), Advances in Neural Information Processing Systems 30, pp. 700–708. Curran Associates, Inc., 2017. URL http://papers.nips.cc/paper/ 6672-unsupervised-image-to-image-translation-networks.pdf.
|
| 226 |
+
|
| 227 |
+
V. Ljosa, K. L. Sokolnicki, and A. E. Carpenter. Annotated high-throughput microscopy image sets for validation. Nat. Methods, 9(7):637, Jun 2012.
|
| 228 |
+
|
| 229 |
+
Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I. Jordan. Learning transferable features with deep adaptation networks. In Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37, ICML’15, pp. 97–105. JMLR.org, 2015. URL http://dl.acm.org/ citation.cfm?id=3045118.3045130.
|
| 230 |
+
|
| 231 |
+
Mingsheng Long, Jianmin Wang, and Michael I. Jordan. Deep transfer learning with joint adaptation networks. CoRR, abs/1605.06636, 2016. URL http://arxiv.org/abs/1605.06636.
|
| 232 |
+
|
| 233 |
+
Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I. Jordan. Domain adaptation with randomized multilinear adversarial networks. CoRR, abs/1705.10667, 2017. URL http://arxiv.org/abs/1705. 10667.
|
| 234 |
+
|
| 235 |
+
Yishay Mansour. Learning and domain adaptation. In Algorithmic Learning Theory, 20th International Conference, ALT, pp. 4–6, 2009.
|
| 236 |
+
|
| 237 |
+
Yishay Mansour, Mehryar Mohri, and Afshin Rostamizadeh. Domain adaptation with multiple sources. In Proceedings of the 21st International Conference on Neural Information Processing Systems, NIPS’08, pp. 1041–1048, USA, 2008. Curran Associates Inc. ISBN 978-1-6056-0-949-2. URL http://dl.acm.org/ citation.cfm?id ${ \boldsymbol { = } } { \boldsymbol { \zeta } }$ 981780.2981910.
|
| 238 |
+
|
| 239 |
+
Saeid Motiian, Marco Piccirilli, Donald A. Adjeroh, and Gianfranco Doretto. Unified deep supervised domain adaptation and generalization. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017.
|
| 240 |
+
|
| 241 |
+
Krikamol Muandet, David Balduzzi, and Bernhard Schölkopf. Domain generalization via invariant feature representation. In Proceedings of the 30th International Conference on International Conference on Machine Learning - Volume 28, ICML’13, pp. I–10–I–18. JMLR.org, 2013. URL http://dl.acm.org/ citation.cfm?id=3042817.3042820.
|
| 242 |
+
|
| 243 |
+
Nobuyuki Otsu. A Threshold Selection Method from Gray-level Histograms. IEEE Transactions on Systems, Man and Cybernetics, 9(1):62–66, 1979. doi: 10.1109/TSMC.1979.4310076. URL http://dx.doi. org/10.1109/TSMC.1979.4310076.
|
| 244 |
+
|
| 245 |
+
S. J. Pan and Q. Yang. A survey on transfer learning. IEEE Transactions on Knowledge and Data Engineering, 22(10):1345–1359, Oct 2010. ISSN 1041-4347.
|
| 246 |
+
|
| 247 |
+
Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence, 2018. URL https://www.aaai. org/ocs/index.php/AAAI/AAAI18/paper/view/17067.
|
| 248 |
+
|
| 249 |
+
L. Y. Pratt, J. Mostow, and C. A. Kamm. Direct transfer of learned information among neural networks. In Proceedings of the Ninth National Conference on Artificial Intelligence (AAAI-91), AAAI’91, pp. 584–589. Anaheim, CA, 1991. URL https://www.aaai.org/Papers/AAAI/1991/AAAI91-091.pdf.
|
| 250 |
+
|
| 251 |
+
S. Preibisch, S. Saalfeld, and P. Tomancak. Globally optimal stitching of tiled 3D microscopic image acquisitions. Bioinformatics, 25(11):1463–1465, Jun 2009.
|
| 252 |
+
|
| 253 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
|
| 254 |
+
|
| 255 |
+
Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In Kostas Daniilidis, Petros Maragos, and Nikos Paragios (eds.), Computer Vision – ECCV 2010, pp. 213–226, Berlin, Heidelberg, 2010. Springer Berlin Heidelberg. ISBN 978-3-642-15561-1.
|
| 256 |
+
|
| 257 |
+
Swami Sankaranarayanan, Yogesh Balaji, Carlos D. Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. CoRR, abs/1704.01705, 2017. URL http://arxiv.org/ abs/1704.01705.
|
| 258 |
+
|
| 259 |
+
C. A. Schneider, W. S. Rasband, and K. W. Eliceiri. NIH Image to ImageJ: 25 years of image analysis. Nat. Methods, 9(7):671–675, Jul 2012.
|
| 260 |
+
|
| 261 |
+
Gabriele Schweikert, Christian Widmer, Bernhard Schölkopf, and Gunnar Rätsch. An empirical analysis of domain adaptation algorithms for genomic sequence analysis. In Proceedings of the 21st International Conference on Neural Information Processing Systems, NIPS’08, pp. 1433–1440, USA, 2008. Curran Associates Inc. ISBN 978-1-6056-0-949-2. URL http://dl.acm.org/citation.cfm?id=2981780.2981959.
|
| 262 |
+
|
| 263 |
+
Hidetoshi Shimodaira. Improving predictive inference under covariate shift by weighting the log-likelihood function. Journal of Statistical Planning and Inference, 90(2):227–244, 2000.
|
| 264 |
+
|
| 265 |
+
Rui Shu, Hung H. Bui, Hirokazu Narui, and Stefano Ermon. A DIRT-T approach to unsupervised domain adaptation. In Proceedings of the 6th International Conference on Learning Representations (ICLR), 2018.
|
| 266 |
+
|
| 267 |
+
A. Sigal, R. Milo, A. Cohen, N. Geva-Zatorsky, Y. Klein, I. Alaluf, N. Swerdlin, N. Perzov, T. Danon, Y. Liron, T. Raveh, A. E. Carpenter, G. Lahav, and U. Alon. Dynamic proteomics in individual human cells uncovers widespread cell-cycle dependence of nuclear proteins. Nat. Methods, 3(7):525–531, Jul 2006.
|
| 268 |
+
|
| 269 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. URL http://arxiv.org/abs/1409.1556.
|
| 270 |
+
|
| 271 |
+
J. Stallkamp, M. Schlipsing, J. Salmen, and C. Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural Networks, pp. –, 2012. ISSN 0893-6080. doi: 10.1016/j.neunet.2012.02.016. URL http://www.sciencedirect.com/science/article/ pii/S0893608012000457.
|
| 272 |
+
|
| 273 |
+
T. Stoeger, N. Battich, M. D. Herrmann, Y. Yakimovich, and L. Pelkmans. Computer vision for image-based transcriptomics. Methods, 85:44–53, Sep 2015.
|
| 274 |
+
|
| 275 |
+
Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Gang Hua and Hervé Jégou (eds.), Computer Vision – ECCV 2016 Workshops, pp. 443–450, Cham, 2016. Springer International Publishing. ISBN 978-3-319-49409-8.
|
| 276 |
+
|
| 277 |
+
Baochen Sun, Jiashi Feng, and Kate Saenko. Return of frustratingly easy domain adaptation. In Proceedings of the 29th AAAI Conference on Artificial Intelligence, AAAI, 2016. URL http://arxiv.org/abs/ 1511.05547.
|
| 278 |
+
|
| 279 |
+
Yaniv Taigman, Adam Polyak, and Lior Wolf. Unsupervised cross-domain image generation. CoRR, abs/1611.02200, 2016. URL http://arxiv.org/abs/1611.02200.
|
| 280 |
+
|
| 281 |
+
E. Tzeng, J. Hoffman, T. Darrell, and K. Saenko. Simultaneous deep transfer across domains and tasks. In 2015 IEEE International Conference on Computer Vision (ICCV), pp. 4068–4076, Dec 2015. doi: 10.1109/ICCV.2015.463.
|
| 282 |
+
|
| 283 |
+
Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. CoRR, abs/1412.3474, 2014. URL http://arxiv.org/abs/1412.3474.
|
| 284 |
+
|
| 285 |
+
Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. CoRR, abs/1702.05464, 2017. URL http://arxiv.org/abs/1702.05464.
|
| 286 |
+
|
| 287 |
+
Francesco Vallania, Andrew Tam, Shane Lofgren, Steven Schaffert, Tej D. Azad, Erika Bongen, Meia Alsup, Michael Alonso, Mark Davis, Edgar Engleman, and Purvesh Khatri. Leveraging heterogeneity across multiple data sets increases accuracy of cell-mixture deconvolution and reduces biological and technical biases. bioRxiv, 2017. doi: 10.1101/206466. URL https://www.biorxiv.org/content/early/2017/10/20/ 206466.
|
| 288 |
+
|
| 289 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 9:2579–2605, 2008. URL http://www.jmlr.org/papers/v9/vandermaaten08a. html.
|
| 290 |
+
|
| 291 |
+
Annegreet van Opbroek, M. Arfan Ikram, Meike W. Vernooij, and Marleen de Bruijne. Transfer learning improves supervised image segmentation across imaging protocols. I E E E Transactions on Medical Imaging, 34(5):1018–1030, 2015. ISSN 0278-0062. doi: 10.1109/TMI.2014.2366792.
|
| 292 |
+
|
| 293 |
+
V. N. Vapnik. Statistical Learning Theory. Wiley, 1998.
|
| 294 |
+
|
| 295 |
+
Tong Xiao, Hongsheng Li, Wanli Ouyang, and Xiaogang Wang. Learning deep feature representations with domain guided dropout for person re-identification. In Proceedings of the \*\*th Conference on Computer Vision and Pattern Recognition, CVPR’16, 2016. URL http://arxiv.org/abs/1604.07528.
|
| 296 |
+
|
| 297 |
+
Qian Xu and Qiang Yang. A Survey of Transfer and Multitask Learning in Bioinformatics. Journal of Computing Science and Engineering, August 2011.
|
| 298 |
+
|
| 299 |
+
Yongxin Yang and Timothy M. Hospedales. A unified perspective on multi-domain and multi-task learning. In Proceedings of the 3d International Conference on Representation Learning, ICLR’15, 2015.
|
| 300 |
+
|
| 301 |
+
Zili Yi, Hao (Richard) Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-toimage translation. In ICCV, pp. 2868–2876. IEEE Computer Society, 2017.
|
| 302 |
+
|
| 303 |
+
Chao Zhang, Lei Zhang, and Jieping Ye. Generalization bounds for domain adaptation. In F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 25, pp. 3320–3328. Curran Associates, Inc., 2012. URL http://papers.nips.cc/paper/ 4684-generalization-bounds-for-domain-adaptation.pdf.
|
| 304 |
+
|
| 305 |
+
Jing Zhang, Zewei Ding, Wanqing Li, and Philip Ogunbona. Importance weighted adversarial nets for partial domain adaptation. CoRR, abs/1803.09210, 2018. URL http://arxiv.org/abs/1803.09210.
|
| 306 |
+
|
| 307 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, pp. 2242–2251. IEEE Computer Society, 2017.
|
| 308 |
+
|
| 309 |
+
# A EXTENDED STATE-OF-THE-ART: IMAGE TRANSLATION
|
| 310 |
+
|
| 311 |
+
In the field of computer vision, another way of mapping examples in one domain onto the other domain is image-to-image translation. In the supervised case (the true pairs made of an image and its translation are given), Pic2Pix (Isola et al., 2017) trains a conditional GAN to discriminate true pairs from fake ones. In the unsupervised case, another loss is designed to enforce cycle consistency (simultaneously learning the mapping $\phi$ from domain $A$ to $B$ , $\psi$ from $B$ to $A$ , and requiring $\phi o \psi = \mathrm { I d } )$ ) (Zhu et al., 2017; Yi et al., 2017). Note that translation approaches do not per se address domain adaptation as they are agnostic w.r.t. the classes. Additional losses are used to overcome this limitation: Domain transfer network (DTN) (Taigman et al., 2016) uses an auto-encoder-like loss in the latent space; GenToAdapt (Sankaranarayanan et al., 2017) uses a classifier loss in the latent space; UNIT (Liu et al., 2017) uses a VAE loss.
|
| 312 |
+
|
| 313 |
+
StarGAN (Choi et al., 2018) combines image-to-image translation with a GAN, where the discriminator is trained to discriminate true from fake pairs on the one hand, and the domain on the other hand. ComboGAN (Anoosheh et al., 2017) learns two networks per domain, an encoder and a decoder. DIRT-T (Shu et al., 2018) uses a conditional GAN and a classifier in the latent space, with two additional losses, respectively enforcing the cluster assumption (the classifier boundary should not cross high density region) and a virtual adversarial training (the hypothesis should be invariant under slight perturbations of the input).
|
| 314 |
+
|
| 315 |
+
Interestingly, DA and MDL (like deep learning in general) tend to combine quite some losses; two benefits are expected from using a mixture of losses, a smoother optimization landscape and a good stability of the representation (Bousquet & Elisseeff, 2002).
|
| 316 |
+
|
| 317 |
+
# B PROOFS
|
| 318 |
+
|
| 319 |
+
# B.1 DEFINITION OF THE $\mathcal { H }$ -DIVERGENCE
|
| 320 |
+
|
| 321 |
+
Definition. (Kifer et al., 2004; Ben-David et al., 2006; 2010) Given a domain $\mathcal { X }$ , two distributions $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ over that domain and a binary hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , the $\mathcal { H }$ -divergence between $\mathcal { D }$ and $\mathcal { D } ^ { \prime }$ is defined as:
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
d _ { \mathcal { H } } ( \mathcal { D } , \mathcal { D ^ { \prime } } ) = 2 \mathbf { \Pi } _ { h \in \mathcal { H } } ^ { s u p } | \mathbb { P } _ { \mathcal { D } } ( h ( \mathbf { x } ) = 1 ) - \mathbb { P } _ { \mathcal { D ^ { \prime } } } ( h ( \mathbf { x } ) = 1 ) |
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
B.2 BOUNDING MDL LOSS USING THE $\mathcal { H }$ -DIVERGENCE
|
| 328 |
+
|
| 329 |
+
Theorem 2. Given an input space $\mathcal { X }$ , we consider n distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ of $V C$ dimension $d$ . Let $\alpha$ and $\gamma$ be in the simplex of dimension $n$ . If $S$ is a sample of size m which contains $\gamma _ { i } m$ samples from $\mathcal { D } _ { i }$ , and $\hat { h }$ is the empirical minimizer of $\textstyle \sum _ { i } \alpha _ { i } { \hat { \epsilon } } _ { i }$ on $( S _ { i } ) _ { i }$ , then for any $\delta > 0$ , with probability at least $1 - \delta$ , the compound empirical error is upper bounded as:
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
\sum _ { i } \epsilon _ { i } ( \hat { h } ) \leq \sum _ { i } \epsilon _ { i } ^ { \star } + 4 n B ( \alpha ) + 2 \sum _ { i \leq j } ( \alpha _ { i } + \alpha _ { j } ) \left( d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \beta _ { i , j } \right)
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
with
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
B ( \alpha ) = \sqrt { \sum _ { j } \frac { \alpha _ { j } ^ { 2 } } { \gamma _ { j } } } \sqrt { \frac { 2 d \log ( 2 ( m + 1 ) ) + \log ( \frac { 4 } { \delta } ) } { m } }
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
and
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\beta _ { i , j } = \underset { h \in \mathcal { H } } { m i n } ~ ( \epsilon _ { i } ( h ) + \epsilon _ { j } ( h ) )
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
A tighter bound can be obtained by replacing $d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } )$ with $\scriptstyle { \frac { 1 } { 2 } } d _ { { \mathcal { H } } \Delta { \mathcal { H } } } ( D _ { i } , D _ { j } )$ . The H∆Hdivergence (Ben-David et al., 2010) operates on the symmetric difference hypothesis space $\mathcal { H } \Delta \mathcal { H }$ . However, divergence $\mathcal { H } \Delta \mathcal { H }$ does not lend itself to empirical estimation: even Ben-David et al. (2010) fall back on $\mathcal { H }$ -divergence in their empirical validation.
|
| 348 |
+
|
| 349 |
+
Proof of theorem 2 For $i , j$ we note $\beta _ { i , j } = \epsilon _ { i } ( h _ { i , j } ^ { \star } ) + \epsilon _ { j } ( h _ { i , j } ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \left( \epsilon _ { i } ( h ) + \epsilon _ { j } ( h ) \right)$ . For $\alpha$ in the $n$ -dimensional simplex and $h \in \mathcal H$ , we note $\begin{array} { r } { \epsilon _ { \alpha } ( h ) = \sum _ { i } \alpha _ { i } \epsilon _ { i } ( h ) } \end{array}$ .
|
| 350 |
+
|
| 351 |
+
We have for $\alpha$ in the simplex of dimension $n$ , $h \in \mathcal H$ and $j \in \{ 1 , \dots , m \}$ , using the triangle inequality (similarly to the proof of Theorem 4 in (Ben-David et al., 2010))
|
| 352 |
+
|
| 353 |
+
$$
|
| 354 |
+
\begin{array} { r l } { | \epsilon _ { \alpha } ( h ) - \epsilon _ { j } ( h ) | = } & { \displaystyle \left| \sum _ { i } \alpha _ { i } \left( \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | \right) \right| } \\ & { \leq \sum _ { i } \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | \right| } \\ & { \leq \displaystyle \sum _ { i } \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - y | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \quad + \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { i } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \quad + \alpha _ { i } \left| \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | - \mathbb { E } _ { \mathbf { x } \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - h _ { i , j } ^ { \star } ( \mathbf { x } ) | \right| } \\ & { \quad \leq \displaystyle \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \end{array}
|
| 355 |
+
$$
|
| 356 |
+
|
| 357 |
+
The last line follows from the definitions of $\beta _ { i , j }$ and $\mathcal { H }$ -divergence. Thus using lemma 6 in (Ben-David et al., 2010)
|
| 358 |
+
|
| 359 |
+
$$
|
| 360 |
+
\begin{array} { l } { \displaystyle \epsilon _ { j } ( \hat { h } ) \leq \epsilon _ { \alpha } ( \hat { h } ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( D _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( \hat { h } ) + 2 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( h _ { j } ^ { * } ) + 2 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { \alpha } ( h _ { j } ^ { * } ) + 4 B ( \alpha ) + \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \\ { \leq \epsilon _ { i } ^ { * } + 4 B ( \alpha ) + 2 \sum _ { i } \alpha _ { i } \left( \beta _ { i , j } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) \right) } \end{array}
|
| 361 |
+
$$
|
| 362 |
+
|
| 363 |
+
with
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
B ( \alpha ) = \sqrt { \sum _ { j } \frac { \alpha _ { j } ^ { 2 } } { \beta _ { j } } } \sqrt { \frac { 2 d \log ( 2 ( m + 1 ) ) + \log ( \frac { 4 } { \delta } ) } { m } }
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
Hence the result.
|
| 370 |
+
|
| 371 |
+
# B.3 BOUNDING DOMAIN IMBALANCE
|
| 372 |
+
|
| 373 |
+
Proof of proposition 1 We have for $h \in \mathcal H$ and $j \in [ 1 , \ldots , m ]$ , using the triangle inequality and the definition of $\epsilon _ { i } ^ { \star }$ (similarly to the proof of Theorem 1 in (Ben-David et al., 2006))
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
\begin{array} { r l } { \displaystyle \epsilon _ { j } ( h ) = \mathbb { P } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } ( h ( \mathbf { x } ) \neq y ) } & { } \\ { \displaystyle = \mathbb { E } _ { \mathbf { x } , y \sim \mathcal { D } _ { j } } | h ( \mathbf { x } ) - y | } & { } \\ { \displaystyle \leq \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \mathbb { E } _ { \mathcal { D } _ { j } } | h _ { j } ^ { \star } ( \mathbf { x } ) - y | } & { } \\ { \displaystyle \leq \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - \frac { 1 } { n } \sum _ { i } h _ { i } ^ { \star } ( \mathbf { x } ) | + \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | \frac { 1 } { n } \sum _ { i } h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \epsilon _ { j } ^ { \star } } & { } \\ { \displaystyle } & { \displaystyle \leq \frac { 1 } { n } \sum _ { i } \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h ( \mathbf { x } ) - h _ { i } ^ { \star } ( \mathbf { x } ) | + \frac { 1 } { n } \sum _ { i } \mathbb { E } _ { \mathcal { D } _ { j } ^ { x } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | + \epsilon _ { j } ^ { \star } } \end{array}
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
We have for $i$
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
\begin{array} { r l } & { \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | \leq \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | + | \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | - \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h ( \mathbf x ) - h _ { i } ^ { \star } ( \mathbf x ) | | } \\ & { \qquad \leq \epsilon _ { i } ( h ) + \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) } \end{array}
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
The second line follows from the triangle inequality and the definition of the $\mathcal { H }$ -divergence. Thus
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\epsilon _ { j } ( h ) \leq \frac { 1 } { n } \sum _ { i } \Big ( \epsilon _ { i } ( h ) + \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \mathbb { E } _ { \mathcal { D } _ { j } ^ { X } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | \Big ) + \epsilon _ { j } ^ { \star }
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
By symmetry we obtain
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\frac { 1 } { n } \sum _ { i } \epsilon _ { i } ( h ) \leq \epsilon _ { j } ( h ) + \frac { 1 } { n } \sum _ { i } \Big ( \epsilon _ { i } ^ { \star } + d _ { \mathcal { H } } ( \mathcal { D } _ { i } ^ { X } , \mathcal { D } _ { j } ^ { X } ) + \mathbb { E } _ { \mathcal { D } _ { i } ^ { X } } | h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) | \Big ) + \epsilon _ { j } ^ { \star }
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
Thus the result.
|
| 398 |
+
|
| 399 |
+
Proposition 3. Given a domain $\mathcal { X }$ , m distributions $\mathcal { D } _ { i }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$ and $j \in [ 1 , \dots , m ]$
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\epsilon _ { j } ( h ) - \frac { 1 } { n } { \sum _ { i } } \epsilon _ { i } ( h ) | \leq 2 \left( \epsilon _ { j } ^ { \star } + \frac { 1 } { n } { \sum _ { i } } \epsilon _ { i } ^ { \star } \right) + \epsilon _ { j } ( h ^ { \star } ) + \beta + \frac { 1 } { n } { \sum _ { i } } d _ { \mathcal { H } } ( \mathscr { D } _ { i } ^ { X } , \mathscr { D } _ { j } ^ { X } ) + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathscr { D } _ { i } , \mathscr { D } _ { j } )
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
where
|
| 406 |
+
|
| 407 |
+
$$
|
| 408 |
+
\beta = \sum _ { j } \epsilon _ { j } ( h ^ { \star } ) = \operatorname* { m i n } _ { h \in \mathcal { H } } \sum _ { j } \epsilon _ { j } ( h )
|
| 409 |
+
$$
|
| 410 |
+
|
| 411 |
+
Proof For $i , j \in [ i , \dots , m ]$ we have
|
| 412 |
+
|
| 413 |
+
$$
|
| 414 |
+
\begin{array} { r l } & { \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h _ { i } ^ { \star } ( \mathbf { x } ) - h _ { j } ^ { \star } ( \mathbf { x } ) \rvert \le \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h _ { j } ^ { \star } ( \mathbf { x } ) - h ^ { \star } ( \mathbf { x } ) \rvert + \mathbb { E } _ { \mathcal { D } _ { i } } \lvert h ^ { \star } ( \mathbf { x } ) - h _ { i } ^ { \star } ( \mathbf { x } ) \rvert } \\ & { \qquad \le \mathbb { E } _ { \mathcal { D } _ { j } } \lvert h _ { j } ^ { \star } ( \mathbf { x } ) - h ^ { \star } ( \mathbf { x } ) \rvert + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) + \epsilon _ { i } ( h ^ { \star } ) + \epsilon _ { i } ^ { \star } } \\ & { \qquad \le \epsilon _ { i } ( h ^ { \star } ) + \epsilon _ { j } ( h ^ { \star } ) + \epsilon _ { i } ^ { \star } + \epsilon _ { j } ^ { \star } + \frac { 1 } { 2 } d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { i } , \mathcal { D } _ { j } ) } \end{array}
|
| 415 |
+
$$
|
| 416 |
+
|
| 417 |
+
The second line follows from Lemma 3 from (Ben-David et al., 2010), and the third from the triangle inequality. From this and proposition 1 we obtain the result.
|
| 418 |
+
|
| 419 |
+
# Corollaries for the 2-domain case
|
| 420 |
+
|
| 421 |
+
Corollary 4. Given a domain $\mathcal { X }$ , two distributions $\mathcal { D } _ { S }$ and $\mathcal { D } _ { T }$ over $\mathcal { X } \times \{ 0 , 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\begin{array} { c } { \left. \epsilon _ { S } ( h ) - \epsilon _ { T } ( h ) \right. \leq \epsilon _ { T } ^ { \star } + \epsilon _ { S } ^ { \star } + \Delta + d _ { \mathcal { H } } ( \mathcal { D } _ { S } ^ { X } , \mathcal { D } _ { T } ^ { X } ) } \\ { \Delta = m a x ( E _ { \mathcal { D } _ { T } ^ { X } } | { h } _ { S } ^ { \star } ( { \bf x } ) - { h } _ { T } ^ { \star } ( { \bf x } ) | , E _ { \mathcal { D } _ { S } ^ { X } } | { h } _ { S } ^ { \star } ( { \bf x } ) - { h } _ { T } ^ { \star } ( { \bf x } ) | ) } \end{array}
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
Corollary 5. Given a domain $\mathcal { X }$ , two distributions $\mathcal { D } _ { S }$ and $\mathcal { D } _ { T }$ over $\mathcal { X } \times \{ 0 ; 1 \}$ and a hypothesis class $\mathcal { H }$ on $\mathcal { X }$ , we have for $h \in \mathcal H$
|
| 428 |
+
|
| 429 |
+
$$
|
| 430 |
+
\begin{array} { r } { | \epsilon _ { S } ( h ) - \epsilon _ { T } ( h ) | \le 2 ( \epsilon _ { T } ^ { \star } + \epsilon _ { S } ^ { \star } ) + \beta + \frac 1 2 d _ { \mathcal { H } \Delta \mathcal { H } } ( \mathcal { D } _ { S } , \mathcal { D } _ { T } ) + d _ { \mathcal { H } } ( \mathcal { D } _ { S } ^ { X } , \mathcal { D } _ { T } ^ { X } ) } \end{array}
|
| 431 |
+
$$
|
| 432 |
+
|
| 433 |
+
where
|
| 434 |
+
|
| 435 |
+
$$
|
| 436 |
+
\beta = \epsilon _ { S } ( h ^ { \star } ) + \epsilon _ { T } ( h ^ { \star } ) = \underset { h \in \mathcal { H } } { m i n } \epsilon _ { S } ( h ) + \epsilon _ { T } ( h )
|
| 437 |
+
$$
|
| 438 |
+
|
| 439 |
+
# C CELL DATASET
|
| 440 |
+
|
| 441 |
+
# C.1 TEXAS DOMAIN
|
| 442 |
+
|
| 443 |
+
This dataset is extracted from that published in (Kang et al., 2016). It contains 455 biologically active images, in 11 classes, on four 384-well plates, in three channels: H2B-CFP, XRCC5-YFP and cytoplasmic-mCherry. Our analysis used 10 classes: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’HDAC’, ’Hsp90’, ’MT’, ’PLK’, ’Proteasome’, ’mTOR’.
|
| 444 |
+
|
| 445 |
+
On top of the quality control from the original paper, a visual quality control was implemented to remove images with only apoptotic cells, and XRCC5-YFP channel images were smoothed using a median filter of size 2 using SciPy (Jones et al., 2001–).
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 2: Examples from six classes in the Bio dataset (red: cell nuclei, blue: cell cytoplasm, magnification: 10X). Empty squares: the domain does not contain any known examples from this class. Best seen in color.
|
| 449 |
+
|
| 450 |
+
# C.2 CALIFORNIA DOMAIN
|
| 451 |
+
|
| 452 |
+
This dataset is designed to be similar to the Texas domain (Kang et al., 2016), generated using the same cell line, but in a different laboratory, by a different biologist, and using different equipment. It contains 1,077 biologically active images, in 10 classes, on ten 384-well plates, in three channels: H2B-CFP, XRCC5-YFP and cytoplasmic-mCherry. The classes are: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’HDAC’, ’Hsp90’, ’MT’, ’PLK’, ’Proteasome’, ’mTOR’.
|
| 453 |
+
|
| 454 |
+
Cell culture, drug screening and image acquisition Previously (Kang et al., 2016), retroviral transduction of a marker plasmid "pSeg" was used to stably express H2B-CFP and cytoplasmicmCherry tags in A549 human lung adenocarcinoma cells. A CD-tagging approach (Sigal et al., 2006) was used to add an N-terminal YFP tag to endogenous XRCC5.
|
| 455 |
+
|
| 456 |
+
Cells were maintained in RPMI1640 media containing $10 \%$ FBS, $2 \ \mathrm { m M }$ glutamine, 50 units/ml penicillin, and $5 0 ~ \mu \mathrm { g / m l }$ streptomycin (all from Life Technologies, Inc.), at $3 7 ^ { \circ } C$ $C , 5 \% \mathrm { C O ^ { 2 } }$ and $100 \%$ humidity. 24h prior to drug addition, cells were seeded onto 384-well plate at a density of 1200 cells/well. Following compound addition, cells were incubated at $3 7 ^ { \circ } C$ for 48 hours. Images were then acquired using a GE InCell Analyzer 2000. One image was acquired per well using a $1 0 \mathrm { x }$ objective lens with $2 \mathbf { x } 2$ binning.
|
| 457 |
+
|
| 458 |
+
Image processing Uneven illumination was corrected as described in (Stoeger et al., 2015). Background noise was removed using the ImageJ RollingBall plugin (Schneider et al., 2012). Images were segmented, object features extracted and biological activity determined as previously described (Kang et al., 2016). A visual quality control was implemented to remove images with obvious anomalies (e.g. presence of a hair or out-of-focus image) and images with only apoptotic cells. YFP-XRCC5 channel images were smoothed using a median filter of size 2.
|
| 459 |
+
|
| 460 |
+
# C.3 ENGLAND DOMAIN
|
| 461 |
+
|
| 462 |
+
This dataset was published by Caie et al. (2010) and retrieved from (Ljosa et al., 2012). It contains 879 biologically active images of MCF7 breast adenocarcinoma cells, in 15 classes on 55 96-well plates, in 3 channels: Alexa Fluor 488 (Tubulin), Alexa Fluor 568 (Actin) and DAPI (nuclei). Classes with fewer than 15 images and absent from the other datasets ("Calcium regulation", "Cholesterol", "Epithelial", "MEK", "mTOR") were not used, which leaves 10 classes: ’Actin’, ’Aurora’, ’DNA’, ’ER’, ’Eg5 inhibitor’, ’HDAC’, ’Kinase’, ’MT’, ’Proteasome’, ’Protein synthesis’.
|
| 463 |
+
|
| 464 |
+
Image processing As the images were acquired using a 20X objective, they were stitched using ImageJ plugin (Preibisch et al., 2009) and down-scaled 2 times. Cells thus appear the same size as in the other domains. Images were segmented, object features extracted and biological activity obtained as previously described (Kang et al., 2016). A visual quality control was implemented to remove images with obvious anomalies and images with only apoptotic cells. Images with too few cells were also removed: an Otsu filter (Otsu, 1979) was used to estimate the percentage of pixels containing nuclei in each image, and images with less than $1 \%$ nuclear pixels were removed. Tubulin channel images were smoothed using a median filter of size 2.
|
| 465 |
+
|
| 466 |
+
# C.4 COMMON IMAGE PRE-PROCESSING
|
| 467 |
+
|
| 468 |
+
Images which were not significantly distinct from negative controls were identified as previously (Kang et al., 2016) and excluded from our analysis. Previous work on the England dataset further focused on images which "clearly [have] one of 12 different primary mechanims of action" (Ljosa et al., 2012). We chose not to do so, since it results in a simpler problem $90 \%$ accuracy easy to reach) with much less room for improvement.
|
| 469 |
+
|
| 470 |
+
Images from all domains were down-scaled 4 times and flattened to form RGB images. Images were normalized by subtracting the intensity values from negative controls (DMSO) of the same plate in each channel. England, Texas and California share images for cell nucleus and cytoplasm, but their third channel differs: Texas and California shows the protein XRCC5, whereas England shows the Actin protein. Therefore, the experiments which combine Texas and England, and California and England used only the first two channels, feeding an empty third channel into the network. Similarly, profiles contain 443 features which are related to the first two channels, and 202 features which are related to the third channel. Only the former were used in experiments which involve the England dataset.
|
| 471 |
+
|
| 472 |
+
C.5 SEMI-SUPERVISED MDL EXPERIMENTS
|
| 473 |
+
|
| 474 |
+
<table><tr><td>Shift</td><td>Dom.2,labeled classes</td><td>Domain 2,unlabeled classes</td></tr><tr><td>E-C</td><td>HDAC, Proteasome,Actin,Aurora</td><td>DNA,MT, ER</td></tr><tr><td>C-T</td><td>DNA,HDAC,MT,ER,Aurora,mTOR,PLK</td><td>Actin,Proteasome,Hsp90</td></tr><tr><td>T-E</td><td>DNA,MT,Proteasome,Actin,ER</td><td>Aurora, HDAC,Actin</td></tr><tr><td>C-T-E</td><td>DNA,MT, Proteasome,Actin, ER</td><td>Aurora,HDAC,Actin</td></tr></table>
|
| 475 |
+
|
| 476 |
+
Table 3: Class content for the CELL experiments in table 2. In all cases, the first domain contains the same classes as domain 2, though with labeled examples from all classes. These classes were picked as those with best classification accuracy in an unsupervised setting; results are similar when picking the classes with worst classification accuracy. 10 labeled images per class were used for training.
|
| 477 |
+
|
| 478 |
+
# D EXPERIMENTAL SETTINGS
|
| 479 |
+
|
| 480 |
+
# D.1 ARCHITECTURE
|
| 481 |
+
|
| 482 |
+
As in (Ganin et al., 2016; Tzeng et al., 2014), a bottleneck fully connected layer is added after the last dense layer of VGG-16. Learning rates on weights (resp. biases) from "from scratch" layers is ten (resp, twenty) times that on parameters of fine-tuned layers. Instance normalization is used on DIGITS, whereas global normalization is used on OFFICE and CELL.
|
| 483 |
+
|
| 484 |
+
Table 4: Architectures. In the case when considering only two domains, $i = 1$ and the last activation of domain discriminators is a sigmoid. When considering three domains, $i = 3$ and the activation is a softmax. Knowledge discriminator architecture is identical to that of domain discriminators without the gradient reversal layer.
|
| 485 |
+
|
| 486 |
+
<table><tr><td>OFFICE and CELL</td><td>DIGITS</td></tr><tr><td colspan="2">Feature extractor</td></tr><tr><td>VGG-16, layers Conv1 to FC7</td><td>5x5 conv. 32; ReLU; 2x2 max pool, 2x2 stride</td></tr><tr><td>Fully connected 256</td><td>5x5 conv. 48; ReLU; 2x2 max pool, 2x2 stride</td></tr><tr><td colspan="2">Classifier</td></tr><tr><td>Output of feature extractor</td><td>Output of feature extractor</td></tr><tr><td></td><td>Fully connected 10o; ReLU Fully connected 10o; ReLU</td></tr><tr><td>Fully connected L; Softmax</td><td>Fully connected L; Softmax</td></tr><tr><td colspan="2">Domain discriminator</td></tr><tr><td>Output of feature extractor Gradient reversal layer Fully connected 1,024; ReLU; Dropout (0.5)</td><td>Output of feature extractor Gradient reversal layer</td></tr></table>
|
| 487 |
+
|
| 488 |
+
D.2 HYPER-PARAMETER SEARCH
|
| 489 |
+
|
| 490 |
+
<table><tr><td>Parameter</td><td>DIGITS and Signs</td><td>CELL</td></tr><tr><td>Learning rate (lr)</td><td>10-3,10-4</td><td>10-4 (+ 10-5 for 3-dom.)</td></tr><tr><td>Individual lr</td><td>NA</td><td>True,False</td></tr><tr><td>Lr schedule 入</td><td></td><td>Exponentially decreasing, constant 0.1,0.8</td></tr><tr><td>入schedule</td><td></td><td>Exponentially increasing,constant</td></tr><tr><td></td><td></td><td></td></tr><tr><td>s</td><td></td><td>0.1,0.8</td></tr></table>
|
| 491 |
+
|
| 492 |
+
Table 5: Range of hyper-parameters which were evaluated in cross-validation experiments. Exponentially decreasing schedule, exponentially increasing schedule, indiv. lr (learning rates from layers which were trained from scratch are multiplied by 10), as in (Ganin et al., 2016).
|
| 493 |
+
|
| 494 |
+
# E ADDITIONAL RESULTS
|
| 495 |
+
|
| 496 |
+
# E.1 3-DOMAIN RESULTS ON OFFICE
|
| 497 |
+
|
| 498 |
+
Table 6: Classification results on target test set in the semi-supervised DA setting (average and stdev on 5 seeds or folds)
|
| 499 |
+
|
| 500 |
+
<table><tr><td>Sources Target</td><td>D,W Amazon</td><td>A,W DSLR</td><td>A,D Webcam</td></tr><tr><td>Baseline DANN FT MADA MULANN</td><td>41.7 (1.0) 57.5 (1.6) 37.5 (6.8) 54.5 (3.8)</td><td>90.9 (1.3) 92.3 (1.8) Not conv. 92.1 (2.6)</td><td>89.4 (1.5) 91.2 (0.7) 88.3 (0.7) 92.0 (1.0)</td></tr></table>
|
| 501 |
+
|
| 502 |
+

|
| 503 |
+
Figure 3: Visualization of class features on Webcam (red) $>$ Amazon (blue). Dimmer colors indicate classes for which labeled examples are available in both domains.
|
| 504 |
+
|
| 505 |
+
# E.2 TSNE VISUALIZATION
|
| 506 |
+
|
| 507 |
+
We use tSNE (van der Maaten & Hinton, 2008) to visualize the common feature space in the example of Webcam Amazon. Fig. 3 shows that classes are overall better separated with MULANN. In particular, when using MULANN, unlabeled examples (blue) are both more grouped and closer to labeled points from the other domain.
|
| 508 |
+
|
| 509 |
+
# E.3 SEMI-SUPERVISED MDL ON THE BIO DATASET
|
| 510 |
+
|
| 511 |
+
Table 5: CELL average test classification results on all domain (average and stdev on 5 folds). P stands for "profiles", "lab." for labeled and "unlab." for unlabeled. Baselines are obtained by training MULANN with $\lambda = 0$ (NN) and $\mathrm { L D A + k { \mathrm { - } } N N }$ (P) on both domains. Results were obtained in the non-fully transductive setting, without hyper-parameter optimization.
|
| 512 |
+
|
| 513 |
+
<table><tr><td>Shift</td><td>Image set # classes</td><td></td><td>sBaseline NN DANN</td><td></td><td>MADA</td><td>MULANN</td><td>|Baseline P</td><td>P+Coral</td></tr><tr><td rowspan="3">E-C</td><td>E</td><td>7</td><td>74.1 (5.4)</td><td>71.6 (5.8)</td><td>63.6 (6.1)</td><td>72.7 (4.0)</td><td>78.1 (8.0)</td><td>66.4 (2.4)</td></tr><tr><td>C lab.</td><td>4</td><td>98.3 (0.6)</td><td>96.1 (1.5)</td><td>92.3 (5.2)</td><td>89.1 (6.4)</td><td>98.2 (2.4)</td><td>94.1 (2.3)</td></tr><tr><td>C unlab.</td><td>3</td><td>0.4 (0.7)</td><td>34.8 (20.7)</td><td>14.5 (7.4)</td><td>25.7 (12.3)</td><td>21.5 (8.4)</td><td>36.8 (3.7)</td></tr><tr><td rowspan="3">C-T</td><td>C</td><td>10</td><td>91.4 (1.8)</td><td>87.0 (2.2)</td><td>87.9 (3.9)</td><td>89.3 (1.8)</td><td>96.1 (1.1)</td><td>93.3 (1.8)</td></tr><tr><td>Tlab.</td><td>7</td><td>93.7 (1.3)</td><td>91.0 (4.4)</td><td>86.7 (7.5)</td><td>89.2 (1.2)</td><td>96.2 (2.4)</td><td>92.8 (3.2)</td></tr><tr><td>Tunlab.</td><td>3</td><td>24.4 (10.0)</td><td>61.4 (7.7)</td><td>56.2 (14.0)</td><td>77.7 (4.0)</td><td>59.6 (11.3)</td><td>87.6 (8.2)</td></tr><tr><td rowspan="3">T-E</td><td>T</td><td>7</td><td>95.2 (2.2)</td><td>90.3 (5.4)</td><td>93.7 (3.0)</td><td>88.2 (6.4)</td><td>94.2 (6.3)</td><td>92.6 (4.0)</td></tr><tr><td>E lab.</td><td>4</td><td>75.2 (9.7)</td><td>61.9 (8.5)</td><td>71.0 (12.7)</td><td>72.8 (14.2)</td><td>81.1 (8.8)</td><td>61.2 (4.0)</td></tr><tr><td>Eunlab.</td><td>3</td><td>5.7 (6.6)</td><td>31.4 (17.5)</td><td>26.0 (19.4)</td><td>51.3 (13.5)</td><td>16.1 (9.5)</td><td>25.7 (12.6)</td></tr><tr><td rowspan="4">C-T-E T</td><td>C</td><td>7</td><td>94.7 (2.0)</td><td>91.7 (1.4)</td><td>82.7 (3.8)</td><td>93.9 (1.7)</td><td>94.1 (2.0)</td><td>89.4 (2.2)</td></tr><tr><td></td><td>7</td><td>94.8 (2.1)</td><td>93.7 (4.7)</td><td>86.5 (4.2)</td><td>94.9 (2.1)</td><td>97.8 (0.5)</td><td>89.6 (8.0)</td></tr><tr><td>E lab.</td><td>4</td><td>74.1 (9.8)</td><td>67.7 (12.8)</td><td>48.2 (11.7)</td><td>66.6 (9.0)</td><td>74.7 (10.5)</td><td>55.6(7.5)</td></tr><tr><td>E unlab.</td><td>3</td><td>10.7 (9.7)</td><td>48.6 (21.9)</td><td>22.6 (11.3)</td><td>69.3 (21.1)</td><td>36.3 (6.6)</td><td>52.5 (22.5)</td></tr></table>
|
| 514 |
+
|
| 515 |
+
E.4 IMPACT OF $p - p ^ { \star }$ ON A DOMAIN WITHOUT UNLABELED DATAPOINTS
|
| 516 |
+
|
| 517 |
+
# E.5 ASYMMETRY RESULTS ON CELL
|
| 518 |
+
|
| 519 |
+

|
| 520 |
+
Figure 4: Impact of parameter $p$ in comparison with $p ^ { \star }$ on $\mathbf { M N I S T } \mathbf { M N I S T - M }$ . $p = 0$ corresponds to DANN (see text for details): no data flowed through the KUD module. We can see that different values of $( p , p ^ { \star } )$ do not influence the accuracy on a domain which did not have any unlabaled datapoints from extra classes (MNIST in this case).
|
| 521 |
+
|
| 522 |
+

|
| 523 |
+
Figure 5: Impact of asymmetry in class content between domains on CELL $\mathrm { T } \mathrm { E } ,$ ) for DANN, MADA and MULANN.
|
md/train/SylzhkBtDB/SylzhkBtDB.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/r1nTpv9eg/r1nTpv9eg.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING TO PERFORM PHYSICS EXPERIMENTS VIA DEEP REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Misha Denil1 Pulkit Agrawal2 Tejas D Kulkarni1 Tom Erez1 Peter Battaglia1 Nando de Freitas1,3 1DeepMind 2 University of California Berkeley 3Canadian Institute for Advanced Research {mdenil,tkulkarni,etom,peterbattaglia,nandodefreitas}@google.com pulkitag@berkeley.edu
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
When encountering novel objects, humans are able to infer a wide range of physical properties such as mass, friction and deformability by interacting with them in a goal driven way. This process of active interaction is in the same spirit as a scientist performing experiments to discover hidden facts. Recent advances in artificial intelligence have yielded machines that can achieve superhuman performance in Go, Atari, natural language processing, and complex control problems; however, it is not clear that these systems can rival the scientific intuition of even a young child. In this work we introduce a basic set of tasks that require agents to estimate properties such as mass and cohesion of objects in an interactive simulated environment where they can manipulate the objects and observe the consequences. We found that deep reinforcement learning methods can learn to perform the experiments necessary to discover such hidden properties. By systematically manipulating the problem difficulty and the cost incurred by the agent for performing experiments, we found that agents learn different strategies that balance the cost of gathering information against the cost of making mistakes in different situations. We also compare our learned experimentation policies to randomized baselines and show that the learned policies lead to better predictions.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Our work is inspired by empirical findings and theories in psychology indicating that infant learning and thinking is similar to that of adult scientists (Gopnik, 2012). One important view in developmental science is that babies are endowed with a small number of separable systems of core knowledge for reasoning about objects, actions, number, space, and possibly social interactions (Spelke & Kinzler, 2007). The object core system covering aspects such as cohesion, continuity, and contact, enables babies and other animals to solve object related tasks such as reasoning about oclusion and predicting how objects behave.
|
| 12 |
+
|
| 13 |
+
Core knowledge research has motivated the development of methods that endow agents with physics priors and perception modules so as to infer intrinsic physical properties rapidly from data (Battaglia et al., 2013; Wu et al., 2015; 2016; Stewart & Ermon, 2016). For instance, using physics engines and mental simulation, it becomes possible to infer quantities such as mass from visual input (Hamrick et al., 2016; Wu et al., 2015).
|
| 14 |
+
|
| 15 |
+
In early stages of life, infants spend a lot of time interacting with objects in a seemingly random manner (Smith & Gasser, 2005). They interact with objects in multiple ways, including throwing, pushing, pulling, breaking, and biting. It is quite possible that this process of actively engaging with objects and watching the consequences of their actions helps infants understand different physical properties of the object which cannot be observed directly using their sensory systems. It seems infants run a series of “physical” experiments to enhance their knowledge about the world (Gopnik, 2012). The act of performing an experiment is useful both for quickly adapting an agent’s policy to a new environment and for understanding object properties in a holistic manner. Despite impressive advances in artificial intelligence that have led to superhuman performance in Go, Atari and natural language processing, it is still unclear if these systems behind these advances can rival the scientific intuition of even a small child.
|
| 16 |
+
|
| 17 |
+
While we draw inspiration from child development, it must be emphasized that our purpose is not to provide an account of learning and thinking in humans, but rather to explore how similar types of understanding might be learned by artificial agents in a grounded way. To this end we show that we can build agents that can learn to experiment so as to learn representations that are informative about physical properties of objects, using deep reinforcement learning. The act of conducting an experiment involves the agent having a belief about the world, which it then updates by observing the consequences of actions it performs.
|
| 18 |
+
|
| 19 |
+
We investigate the ability of agents to learn to perform experiments to infer object properties through two environments—Which is Heavier and Towers. In the Which is Heavier environment, the agent is able to apply forces to blocks and it must infer which of the blocks is the heaviest. In the Towers environment the agent’s task is to infer how many rigid bodies a tower is composed of by knocking it down. Unlike Wu et al. (2015), we assume that the agent has no prior knowledge about physical properties of objects, or the laws of physics, and hence must interact with the objects in order to learn to answer questions about these properties.
|
| 20 |
+
|
| 21 |
+
Our results indicate that in the case Which is Heavier environment our agents learn experimentation strategies that are similar to those we would expect from an algorithm designed with knowledge of the underlying structure of the environment. In the Towers environment we show that our agents learn a closed loop policy that can adapt to a varying time scale. In both environments we show that when using the learned interaction policies agents are more accurate and often take less time to produce correct answers than when following randomized interaction policies.
|
| 22 |
+
|
| 23 |
+
# 2 WHAT IS THIS PAPER ABOUT?
|
| 24 |
+
|
| 25 |
+
This is an unusual paper in that it does not present a new model or propose a new algorithm. There is a reinforcement learning task at the core of each of our experiments, but the algorithm and models we use to solve it are not new, and many other existing approaches should be expected to perform equally well if they were to be substituted in the same setting.
|
| 26 |
+
|
| 27 |
+
This paper is a step towards agents that understand objects and intuitive reasoning in physical worlds. Our best AI agents currently fail on simple control tasks and simple games, such as Montezuma’s Revenge, because when they look at a screen that has a ladder, a key and a skull they don’t immediately know that keys open doors, that skulls are probably hazardous and best avoided, that ladders allow us to defy gravity, etc. The understanding of physics, relations and objects enables children to solve seemingly simple problems that our best existing AI agents do not come close to begin to solve.
|
| 28 |
+
|
| 29 |
+
Endowing our agents with knowledge of objects would help enormously with planning, reasoning and exploration, and yet, doing so is far from trivial. What is an object? It turns out this question does not have a straightforward answer, and this paper is based around the idea that staring at a thing is not enough to understand what it is.
|
| 30 |
+
|
| 31 |
+
Children understand their world by engaging with it. Poking something to find that it is soft, tasting it to discover it is delicious, or hitting it to see if it falls down. Much of the knowledge people have of the world is the result of interaction. Vision or open loop perception alone is not enough.
|
| 32 |
+
|
| 33 |
+
This paper introduces tasks where we can evaluate the ability of agents to learn about these “hidden” properties of objects. This requires environments where the tasks depend on these properties (otherwise the agents have no incentive to learn about them) and also that we have a way to probe for this understanding in agents that complete the tasks.
|
| 34 |
+
|
| 35 |
+
Previous approaches to this problem have relied on either explicit knowledge of the underlying structure of the environment (e.g. hard-wired physical laws) or on exploiting correlations between material appearance and physical properties (see Section 7 for much more detail). One of the contributions of this paper is to show that our agents can still learn about properties of objects, even when the connection between material appearance and physical properties is broken. This setting allows us to show that our agents are not merely learning that blocks are heavy; they are learning how to check if blocks are heavy.
|
| 36 |
+
|
| 37 |
+
None of the previous approaches give a complete account of how agents could come to understand the physical properties of the world around them. Specifying a model manually is difficult to scale, generalize and to ground in perception. Making predictions from only visual properties will fail to distinguish between objects that look similar, and it will certainly be unable to distinguish between a sack full of rocks and a sack full of tennis balls.
|
| 38 |
+
|
| 39 |
+
# 3 ANSWERING QUESTIONS THROUGH INTERACTION
|
| 40 |
+
|
| 41 |
+
We pose the problem of experimentation as that of answering questions about non-visual properties of objects present in the environment. We design environments that ask questions about these properties by providing rewards when the agent is able to infer them correctly, and we train agents to answer these questions using reinforcement learning.
|
| 42 |
+
|
| 43 |
+
We design environments that follow a three phase structure:
|
| 44 |
+
|
| 45 |
+
Interaction Initially there is an exploration phase, where the agent is free to interact with the environment and gather information.
|
| 46 |
+
|
| 47 |
+
Labeling The interaction phase ends when the agent produces a labeling action through which it communicates its answer to the implicit question posed by the environment.
|
| 48 |
+
|
| 49 |
+
Reward When the agent produces as labeling action, the environment responds with a reward, positive for a correct answer and negative for incorrect, and the episode terminates. The episode terminates automatically with a negative reward if the agent does not produce a labeling action before a maximum time limit is reached.
|
| 50 |
+
|
| 51 |
+
Crucially, the transition between interaction and labeling does not happen at a fixed time, but is initiated by the agent. This is achieved by providing the agent with the ability to produce either an interaction action or a labeling action at every time step. This allows the agent to decide when enough information has been gathered, and forces it to balance the trade-off between answering now given its current knowledge, or delaying its answer to gather more information.
|
| 52 |
+
|
| 53 |
+
The optimal trade-off between information gathering and risk of answering incorrectly depends on two factors. The first factor is the difficulty of the question and the second is the cost of information. The difficulty is environment specific and is addressed later when we describe the environments. The cost of information can be generically controlled by varying the discount factor during learning. A small discount factor places less emphasis on future rewards and encourages the agent to answer as quickly as possible. On the other hand, a large discount factor encourages the agent to spend more time gathering information in order to increase the likelihood of choosing the correct answer.
|
| 54 |
+
|
| 55 |
+
Our use of “questions” and “answers” differs from how these terms are used elsewhere in the literature. Sutton et al. (2011) talk about a value function as a question, and the agent provides an answer in the form of an approximation of the value. The answer incorporates the agent’s knowledge, and the match between the actual value and the agent’s approximation grounds what it means for this knowledge to be accurate.
|
| 56 |
+
|
| 57 |
+
In our usage the environment (or episode) itself is the question, and answers come in the form of labeling actions. In each episode there is a correct answer whose semantics is grounded in the sign of the reward function, and the accuracy of an agents knowledge is assessed by the frequency with which it is able to choose the correct answer.
|
| 58 |
+
|
| 59 |
+
Using reward (rather than value) to ground our semantics means that we have a straightforward way to ask questions that do not depend on the agent’s behavior. For example, we can easily ask the question “Which block is heaviest?” without making the question contingent on a particular information acquisition strategy.
|
| 60 |
+
|
| 61 |
+
# 4 AGENT ARCHITECTURE AND TRAINING
|
| 62 |
+
|
| 63 |
+
We use the same basic agent architecture and training procedure for all of our experiments, making only minimal modifications in order to adapt the agents to different observation spaces and actuators. For all experiments we train recurrent agents using an LSTM with 100 hidden units. When working from features we feed the observations into the LSTM directly. When training from pixels we first scale the observations to $8 4 \mathrm { x } 8 4$ pixels and feed them through a three convolution layers, each followed by a ReLU non-linearity. The three layers have 32, 64, 64 square filters with sizes 8, 4, 3, which are applied at strides of 4, 2, 1 respectively. We train the agents using Asynchronous Advantage Actor Critic (Mnih et al., 2016), but ensure that the unroll length is always greater than the timeout length so the agent network is unrolled over the entirety of each episode.
|
| 64 |
+
|
| 65 |
+

|
| 66 |
+
Figure 1: Left: Diagram of the Which is Heavier environment. Blocks are always arranged in a line, but mass of the different blocks changes from episode to episode. Right: Mass gap distributions for different settings of $\beta$ used in the experiments.
|
| 67 |
+
|
| 68 |
+
# 5 WHICH IS HEAVIER
|
| 69 |
+
|
| 70 |
+
The Which is Heavier environment is designed to ask a question about the relative masses of different objects in a scene. We assign masses to objects in a way that is uncorrelated with their appearance in order to ensure that the task is not solvable without interaction.
|
| 71 |
+
|
| 72 |
+
# 5.1 ENVIRONMENT
|
| 73 |
+
|
| 74 |
+
The environment is diagrammed in the left panel of Figure 1. It consists of four blocks, which are constrained to only move vertically. The blocks are always the same size, but vary in mass between episodes. The agent’s strength (i.e. magnitude of force it can apply) remains constant between episodes.
|
| 75 |
+
|
| 76 |
+
The question to answer in this environment is which of the four blocks is the heaviest. Since the mass of each block is randomly assigned in each episode, the agent must poke the blocks and observe how they respond in order to make this determination. Assigning masses randomly ensures it is not possible to solve this task from vision (or features) alone, since the appearance and identity of each block imparts no information about its mass in the current episode. The only way to obtain information about the masses of the blocks is to interact with them and watch how they respond.
|
| 77 |
+
|
| 78 |
+
The Which is Heavier environment is designed to encode a latent bandit problem through a “physical” lens. Each block corresponds to an arm of the bandit, and the reward obtained by pulling each arm is proportional to the mass of the block. Identifying the heaviest block can then be seen as a best arm identification problem (Audibert & Bubeck, 2010). Best arm identification is a well studied problem in experimental design, and understanding of how an optimal solution to the latent bandit should behave is used to guide our analysis of the agents we train on this task.
|
| 79 |
+
|
| 80 |
+
It is important to emphasize that we cannot simply apply standard bandit algorithms here, because we impose a much higher level of prior ignorance on our algorithms than that setting allows. Bandit algorithms assume that rewards are observed directly, whereas our agents observe mass through its role in dynamics (and in the case of learning from pixels, through the lens of vision as well). To maintain a bandit setting one could imagine parameterizing this transformation from reward to observation, and perhaps even learning the mapping as well; however, doing so requires explicitly acknowledging the mapping in the design of the learning algorithm, which we avoid doing. Moreover, acknowledging this mapping in any way requires the a-priori recognition of the existence of the latent bandit structure. From the perspective of our learning algorithm the mere existence of such a structure also lies beyond the veil of ignorance.
|
| 81 |
+
|
| 82 |
+
Controlling the distribution of masses allows us to control the difficulty of this task. In particular, by controlling the size of the mass gap between the two heaviest blocks we can make the task more or less difficult. We generate masses in the range $[ 0 , 1 ]$ and scale them to an appropriate range for the agent’s strength.
|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
Figure 2: Learning curves for a typical agent trained on the Which is Heavier environment at varying difficulty settings. The y-axes show the probability of the agent producing the correct answer before the episode times out. Each plot shows the top $50 \%$ of agents started from 10 random seeds with identical hyperparameter settings. The light lines show learning curves from individual agents, and the dark lines show the median performance across the displayed runs for each difficulty. Left: Agents trained from features. Right: Agents trained from pixels.
|
| 86 |
+
|
| 87 |
+
We use the following scheme for controlling the difficulty of the Which is Heavier environment. First we select one of the blocks uniformly at random to be the “heavy” block and designate the remaining three as “light” blocks. We sample the mass of the heavy block from $\mathrm { B e t a } ( \beta , 1 )$ and the mass of the light blocks from $\mathrm { B e t a } ( 1 , \beta )$ . The single parameter $\beta$ effectively controls the distribution of mass gaps (and thus controls the difficulty), with large values of $\beta$ leading to easier problems. Figure 1 shows the distribution of mass gaps for three values of $\beta$ that we use in our experiments.
|
| 88 |
+
|
| 89 |
+
We distinguish between problem level and instance level difficulty for this domain. Instance level difficulty refers to the size of the mass gap in a single episode. If the mass gap is small it is harder to determine which block is heaviest, and we say that one episode is more difficult than another by comparing their mass gaps. Problem level difficulty refers to the shape of the generating distribution of mass gaps (e.g. as shown in the right panel of Figure 1). A distribution that puts more mass on configurations that have a small mass gap will tend to generate more episodes that are difficult at the instance level, and we say that one distribution is more difficult than another if it is more likely to generate instances with small mass gaps. We control the problem level difficulty through $\beta$ , but we incorporate both problem and instance level difficulty in our analysis.
|
| 90 |
+
|
| 91 |
+
We set the episode length limit to 100 steps in this environment, which is sufficient time to be much longer than a typical episode by a successfully trained agent.
|
| 92 |
+
|
| 93 |
+
# 5.2 ACTUATORS
|
| 94 |
+
|
| 95 |
+
The obvious choice for actuation in physical domains is some kind of arm or hand based manipulator. However, controlling an arm or hand is quite challenging on its own, requiring a fair amount of dexterity on the part of the agent. The manipulation problem, while very interesting in its own right, is orthogonal to our goals in this work. Therefore we avoid the problem of learning dexterous manipulation by providing the agent with a much simpler form of actuation.
|
| 96 |
+
|
| 97 |
+
We call the actuation strategy for this environment direct actuation, which allows the agent to affect forces on the different blocks directly. At every time step the agent can output one out of eight possible actions. The first four actions result in an application of a vertical force of fixed magnitude to center of mass of each of the four blocks respectively. The remaining actions are labeling actions and correspond to agent’s selection of which is the heaviest block.
|
| 98 |
+
|
| 99 |
+
# 5.3 EXPERIMENTS
|
| 100 |
+
|
| 101 |
+
Our first experiment is a sanity check to show that we can train agents successfully on the Which is Heavier environment using both features and pixels. This experiment is designed simply to show that our task is solvable, and to illustrate that by changing the problem difficulty we can make the task very hard.
|
| 102 |
+
|
| 103 |
+
We present two additional experiments showing how varying difficulty leads to differentiated behavior both at the problem level and at the instance level. In both cases knowledge of the latent bandit problem allows us to make predictions about how an experimenting agent should behave, and our experiments are designed to show that qualitatively correct behavior is obtained by our agents in spite of their a-priori ignorance of the underlying bandit problem.
|
| 104 |
+
|
| 105 |
+
We show that as we increase the problem difficulty the learned policies transition from guessing immediately when a heavy block is found to strongly preferring to poke all blocks before making a decision. This corresponds to the observation that if it is unlikely for more than one arm to give high reward then any high reward arm is likely to be best.
|
| 106 |
+
|
| 107 |
+
We also observe that our agents can adapt their behavior to the difficulty of individual problem instances. We show that a single agent will tend to spend longer gathering information when the particular problem instance is more difficult. This corresponds to the observation that when the two best arms have similar reward then more information is required to accurately distinguish them.
|
| 108 |
+
|
| 109 |
+
Finally, we conduct an experiment comparing our learned information gathering policies to a randomized baseline method. This experiment shows that agents more reliably produce the correct label by following their learned interaction policies than by observing the environment being driven by random actions.
|
| 110 |
+
|
| 111 |
+
Success in learning For this experiment we trained several agents at three different difficulties corresponding to $\bar { \beta \in \{ 3 , 5 , 1 0 \} }$ . For each problem difficulty we trained agents on both feature observations, which includes the $z$ coordinate of each of the four blocks; and also using raw pixels, providing $8 4 \times 8 4$ pixel RGB rendering of the scene to the agent. Representative learning curves for each condition are shown in Figure 2. The curves are smoothed over time and show a running estimate of the probability of success, rather than showing the reward directly.
|
| 112 |
+
|
| 113 |
+
The agents do not reach perfect performance on this task, with more difficult problems plateauing at progressively lower performance. This can be explained by looking at the distributions of instance level difficulties generated by different settings of $\beta$ , which is shown in the right panel of Figure 1. For higher difficulties (lower values of $\beta$ ) there is a substantial probability of generating problem instances where the mass gap is near 0, which makes distinguishing between the two heaviest blocks very difficult.
|
| 114 |
+
|
| 115 |
+
Population strategy differentiation For this experiment we trained agents at three different difficulties corresponding to $\beta \in \{ 3 , 5 , 1 0 \}$ all using a discount factor of $\gamma = 0 . 9 5$ which corresponds a relatively high cost of gathering information. We trained three agents for each difficulty and show results aggregated across the different replicas.
|
| 116 |
+
|
| 117 |
+
After training, each agent was run for 10,000 steps under the same conditions they were exposed to during training. We record the number and length of episodes executed during the testing period as well as the outcome of each episode. Episodes are terminated by timeout after 100 steps, but the vast majority of episodes are terminated in $< 3 0$ steps by the agent producing a label. Since episodes vary in length not all agents complete the same number of episodes during testing.
|
| 118 |
+
|
| 119 |
+
The left plot in Figure 3 shows histograms of the episode lengths broken down by task difficulty. The dashed vertical line indicates an episode length of four interaction steps, which is the minimum number of actions required for the agents to interact with every block. At a task difficulty of $\beta = 1 0$ the agents appear to learn simply to search for a single heavy block (which can be found with an average of two interactions). However, at a task difficulty of $\beta = 3$ we see a strong bias away from terminating the episode before taking at least four exploratory actions.
|
| 120 |
+
|
| 121 |
+
Individual strategy differentiation For this experiment we trained agents using the same three task difficulties as in the previous experiment, but with an increased discount factor of $\gamma = 0 . 9 9$ .
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: Left: Histograms of episode lengths for different task difficulty $( \beta )$ settings. There is a transition from $\beta = 1 0$ where the agents answer eagerly as soon as they find a heavy block to $\beta = 3$ where the agents are more conservative about answering before they have acted enough to poke all the blocks at least once. Right: Episode lengths as a function of the normalized mass gap. Units on the $\mathbf { X }$ -axes are scaled to the range of possible masses, and the y-axis shows the number of steps before the agent takes a labeling action. The black dots show individual episodes, and the red line shows a linear trend fit by OLS and error bars show a histogram estimate of standard deviations. Each plot shows the testing episodes of a single trained agent.
|
| 125 |
+
|
| 126 |
+
This decreases the cost of exploration and encourages the agents to gather more information before producing a label, leading to longer episodes.
|
| 127 |
+
|
| 128 |
+
After training, each agent was run for 100,000 steps under the same conditions they were exposed to during training. We record the length of each episode, as well as the mass gap between the two heaviest blocks in each episode. In the same way that we use the distribution of mass gaps as a measure of task difficulty, we can use the mass gap in a single episode as a measure of the difficulty of that specific problem instance. We again exclude from analysis the very small proportion of episodes that terminate by timeout.
|
| 129 |
+
|
| 130 |
+
The right plots in Figure 3 show the relationship between the mass gap and episode length across the testing runs of two different agents. From these plots we can see how a single agent has learned to adapt its behavior based on the difficulty of a single problem instance. Although the variance is high, there is a clear correlation between the mass gap and the length of the episodes. This behavior reflects what we would expect from a solution to the latent bandit problem; more information is required to identify the best arm when the second best arm is nearly as good.
|
| 131 |
+
|
| 132 |
+
Randomized interaction For this experiment we trained several agents using both feature and pixel observations at the same three task difficulties with a discount of $\gamma = 0 . 9 5$ . In total we trained six sets of agents for this experiment.
|
| 133 |
+
|
| 134 |
+
After training, each agent was run for 10,000 steps under the same conditions used during training. We record the outcome of each episode, as well as the number of steps taken by each agent before it chooses a label. For each agent we repeat the experiment using both the agent’s learned interaction policy as well as a randomized interaction policy.
|
| 135 |
+
|
| 136 |
+
The randomized interaction policy is obtained as follows: At each step the agent chooses a candidate action using its learned policy. If the candidate action is a labeling action then it is passed to the environment unchanged (and the episode terminates). However, if the candidate action is an interaction action then we replace the agent action with a new interaction action chosen uniformly at random from the available action set. When following the randomized interaction policy the agent has no control over the information gathering process, but still controls when each episode ends, and what label is chosen.
|
| 137 |
+
|
| 138 |
+
Figure 4 compares the learned interaction policies to the randomized interaction baselines. The results show that the effect on episode length is small, with no consistent bias towards longer or shorter episodes across difficulties and observation types. However, the learned interaction policies produce more accurate labels across all permutations.
|
| 139 |
+
|
| 140 |
+

|
| 141 |
+
Figure 4: Comparison between agents in the Which is Heavier environment following their learned interaction policies vs the randomized interaction policy baseline. The $\mathbf { X }$ -axes show DifficultyObservation combinations (e.g. 10-F is difficulty 10 with feature observations and 3-P is difficulty 3 with pixel observations) Left: Episode lengths when gathering information using the different interaction policies. Right: Probability of choosing the correct label under different conditions (episodes terminating in timeout have been excluded). The dashed line shows chance performance.
|
| 142 |
+
|
| 143 |
+
# 6 TOWERS
|
| 144 |
+
|
| 145 |
+
The Towers environment is designed to ask agents to count the number of cohesive rigid bodies in a scene. The environment is designed so that in its initial configuration it is not possible to determine the number of rigid bodies from vision or features alone.
|
| 146 |
+
|
| 147 |
+
# 6.1 ENVIRONMENT
|
| 148 |
+
|
| 149 |
+
The environment is diagrammed in the left panel of Figure 5. It consists of a tower of five blocks which can move freely in three dimensions. The initial block tower is always in the same configuration but in each episode we bolt together different subsets of the blocks to form larger rigid bodies as shown in the figure.
|
| 150 |
+
|
| 151 |
+
The question to answer in this environment is how many rigid bodies are formed from the primitive blocks. Since which blocks are bound together is randomly assigned in each episode, and binding forces are invisible, the agent must poke the tower and observe how it falls down in order to determine how many rigid bodies it is composed of. We parameterize the environment in such a way that the distribution over the number of separate blocks in the tower is uniform. This ensures that there is no single action strategy that achieves high reward.
|
| 152 |
+
|
| 153 |
+
# 6.2 ACTUATORS
|
| 154 |
+
|
| 155 |
+
In the Towers environment, we used two actuators: direct actuation, which is similar to the Which is Heavier environment; and the fist actuator, described below. In case of the direct actuation, the agent can output one out of 25 actions. At every time step, the agent can apply a force of fixed magnitude in either of $+ \mathbf { X }$ , -x, $+ \mathsf { y }$ or -y direction to one out of the five blocks. If two blocks are glued together, both blocks move under the effect of force. We use towers of five blocks, which results in 20 different possible actions. The remaining actions are labeling actions that are used by the agent to indicate the number of distinct blocks in the tower.
|
| 156 |
+
|
| 157 |
+
The fist is a large spherical object that the agent can actuate by setting velocities in a 2D horizontal plane. Unlike direct actuation, the agent cannot apply any direct forces to the objects that constitute the tower, but only manipulate them by pushing or hitting them with the fist. At every time step agent can output one of nine actions. The first four actions corresponds to setting the velocity of the fist to a constant amount in $\left( + \mathbf { { x } } , \mathbf { { - x } } , \mathbf { { + y } } , \mathbf { { - y } } \right)$ directions respectively. The remaining actions are labeling actions, that are used by the agent to indicate the number of distinct blocks in the tower.
|
| 158 |
+
|
| 159 |
+
In order to investigate if the agent learns a strategy of stopping after a fixed number of time steps or whether it integrates sensory information in a non-trivial manner we used a notion of “control time step”. The idea of control time step is similar to that of action repeats and if the physics simulation time step is 0.025s and control time step is 0.1s, it means that the same action is repeated 4 times. For the direct actuators we use an episode timeout of 26 steps and for both actuator types.
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 5: Top: Example trajectory of a block tower being knocked down using the fist actuator. Left: Diagram of the hidden structure of the Towers environment. The tower on the left is composed of five blocks, but could decompose into rigid objects in any several ways that can only be distinguished by interacting with the tower. Right: Behavior of a single trained agent using fist actuators when varying the control time step. The $\mathbf { X }$ -axis shows different control time step lengths (the training condition 0.1). The blue line shows probability of the agent correctly identifying the number of blocks. The red line shows the median episode length (in seconds) with error bars showing $9 5 \%$ confidence intervals computed over 50 episodes. The shaded region shows $+ / - 1$ control time step around the median.
|
| 163 |
+
|
| 164 |
+
# 6.3 EXPERIMENTS
|
| 165 |
+
|
| 166 |
+
Our first experiment is again intended to show that we can train agents in this environment. We show simply that the task is solvable by our agents using both types of actuation.
|
| 167 |
+
|
| 168 |
+
The second experiment shows that the agents learn to wait for an observation where they can identify the number of rigid bodies before producing an answer. This is designed to show that the agents find a closed loop strategy for counting the number of rigid bodies. An alternative hypothesis would be that agents learn to wait for (approximately) the same number of steps each time and then take their best guess.
|
| 169 |
+
|
| 170 |
+
Our third experiment compares the learned policy to a randomized interaction policy and shows that agents are able to determine the correct number of blocks in the tower more quickly and more reliably when using their learned policy to gather information.
|
| 171 |
+
|
| 172 |
+
Success in learning For this experiment we trained several agents on the Towers environment using different pairings of actuators and perception. The features observations include the 3d position of each primitive block, and when training using raw pixels we provide an $8 4 \times 8 4$ pixel RGB rendering of the scene as the agent observation. Figure 6 shows learning curves for each combination of actuator and observation type.
|
| 173 |
+
|
| 174 |
+
In all cases we obtain agents that solve the task nearly perfectly, although when training from pixels we find that the range of hyperparameters which train successfully is narrower than when training from features. Interestingly, the fist actuators lead to the fastest learning, in spite of the fact that the agent must manipulate the blocks indirectly through the fist. One possible explanation is that the fist can affect multiple blocks in one action step, whereas in the direct actuation only one block can be affected per time step.
|
| 175 |
+
|
| 176 |
+
Waiting for information For this experiment we trained an agent with pixel observations and the fist actuator on the towers task with an control time step of 0.1 seconds and examine its behavior at test time with a smaller delay between actions. Reducing the control time step means that from the agent perspective time has been slowed down. Moving the fist a fixed amount of distance takes longer, as does waiting for the block tower to collapse once it has been hit.
|
| 177 |
+
|
| 178 |
+
After training the agent was run for 10000 steps for a range of different control time steps. We record the outcome of each episode, as well as the number of steps taken by the agent before it chooses a label. None of the test episodes terminate by timeout, so we include all of them in the analysis.
|
| 179 |
+
|
| 180 |
+
The plot in Figure 5 shows the probability of answering correctly, as well as the median length of each episode measured in seconds. In terms of absolute performance we see a small drop compared to the training setting, where the agent is essentially perfect, but the agent performance remains good even for substantially smaller control timesteps than were used during training.
|
| 181 |
+
|
| 182 |
+

|
| 183 |
+
Figure 6: Learning curves for agents trained on the Towers environment under different conditions. The y-axes show the probability of the agent producing the correct answer before the episode times out. The different plots show different pairings of observations and actuators as indicated in the plot titles. Each plot shows the top $50 \%$ of runs from 10 random seeds with identical hyper-parameter settings. The black lines show learning curves from individual agents, and the red lines show the median performance of the displayed runs.
|
| 184 |
+
|
| 185 |
+
We also observe that the episodes with different time steps take approximate the same amount of real time across the majority of the tested range. This corresponds to a large change in episode length as measured by number of agent actions, since with an control time step of 0.01 the agent must execute $1 0 \mathrm { x }$ as many actions to cover the same amount of real time as compared to the control time step used during training. From this we can infer that the agent has learned to wait for an informative observation before producing a label, as opposed to a simpler degenerate strategy of waiting a fixed amount of steps before answering.
|
| 186 |
+
|
| 187 |
+
Randomized interaction For this experiment we trained several agents for each combination of actuator and observation type, and examine their behavior when observing an environment driven by a random interaction policy. The randomized interaction policy is identical to the randomized baseline used in the Which is Heavier environment.
|
| 188 |
+
|
| 189 |
+
After training, each agent was run for 10,000 steps. We record the outcome of each episode, as well as the number of steps taken by the agent before it chooses a label. For each agent we repeat the experiment using both the agent’s learned interaction policy as well as the randomized interaction policy.
|
| 190 |
+
|
| 191 |
+
Figure 7 compares the learned interaction policies to the randomized interaction baselines. The results show that the agents tend to produce labels more quickly when following their learned interaction policies, and also that the labels they produce in this way are much more accurate.
|
| 192 |
+
|
| 193 |
+
# 7 RELATED WORK
|
| 194 |
+
|
| 195 |
+
Deep learning techniques in conjunction with vast labeled datasets have yielded powerful models for image classification (Krizhevsky et al., 2012; He et al., 2016) and speech recognition (Hinton et al., 2012). In recent years, as we have approached human level performance on these tasks, there has been a strong interest in the computer vision field in moving beyond semantic classification, to tasks that require a deeper and more nuanced understanding of the world.
|
| 196 |
+
|
| 197 |
+
Inspired by developmental studies (Smith & Gasser, 2005), some recent works have focused on learning representations by predicting physical embodiment quantities such as ego-motion (Agrawal et al., 2015; Jayaraman & Grauman, 2015), instead of symbolic labels. Extending the realm of things-to-be-predicted to include quantities beyond class labels, such as viewer centric parameters (Doersch et al., 2015) or the poses of humans within a scene (Delaitre et al., 2012; Fouhey et al., 2014), has been shown to improve the quality of feature learning and scene understanding. Researchers have looked at cross modal learning, for example synthesizing sounds from visual images (Owens et al., 2015), using summary statistics of audio to learn features for object recognition (Owens et al., 2016) or image colorization (Zhang et al., 2016).
|
| 198 |
+
|
| 199 |
+
Inverting the prediction tower, another line of work has focused on learning about the visual world by synthesizing, rather than analyzing, images. Major cornerstones of recent work in this area include the Variational Autoencoders of Kingma & Welling (2014), the Generative Adversarial Networks of (Goodfellow et al., 2014), and more recently autoregressive models have been very successful (van den Oord et al., 2016).
|
| 200 |
+
|
| 201 |
+

|
| 202 |
+
Figure 7: Comparison between agents in the Towers environment following their learned interaction policies vs the randomized interaction policy baseline. The $\mathbf { X }$ -axes show different ObservationActuator combinations (e.g. D-F is Direct-Features and F-P is Fist-Pixels). Left: Episode lengths when gathering information using the different interaction policies. Right: Probability of choosing the correct label under different conditions (episodes terminating in timeout have been excluded). The dashed line shows chance performance.
|
| 203 |
+
|
| 204 |
+
Building on models of single image synthesis there have been many works on predicting the evolution of video frames over time (Ranzato et al., 2014; Srivastava et al., 2015; van den Oord et al., 2016). Xue et al. (2016) have approached this problem by designing a variational autoencoder architecture that uses the latent stochastic units of the VAE to make choices about the direction of motion of objects, and generates future frames conditioned on these choices.
|
| 205 |
+
|
| 206 |
+
A different form of uncertainty in video prediction can arise from the effect of actions taken by an agent. In environments with deterministic dynamics (where the possibility of “known unknowns” can, in principle, be eliminated), very accurate action-conditional predictions of future frames can be made (Oh et al., 2015). Introducing actions into the prediction process amounts to learning a latent forward dynamics model, which can be exploited to plan actions to achieve novel goals (Watter et al., 2015; Assael et al., 2015; Fragkiadaki et al., 2016). In these works, frame synthesis plays the role of a regularizer, preventing collapse of the feature space where the dynamics model lives.
|
| 207 |
+
|
| 208 |
+
Agrawal et al. (2016) break the dependency between frame synthesis and dynamics learning by replacing frame synthesis with an inverse dynamics model. The forward model plays the same role as in the earlier works, but here feature space collapse is prevented by ensuring that the model can decode actions from pairs of time-adjacent images. Several works, including Agrawal et al. (2016) and Assael et al. (2015) mentioned above but also Pinto et al. (2016); Pinto & Gupta (2016); Levine et al. (2016), have gone further in coupling feature learning and dynamics. The learned dynamics models can be used for control not only after learning but also during the learning process in order to collect data in a more targeted way, which has been shown to improve the speed and quality of learning in robot manipulation tasks.
|
| 209 |
+
|
| 210 |
+
A key challenge of learning from dynamics is collecting the appropriate data. An ingenious solution to this is to import real world data into a physics engine and simulate the application of forces in order to generate ground truth data. This is the approach taken by Mottaghi et al. (2016), who generate an “interactable” data set of scenes, which they use to generate a static data set of image and force pairs, along with the ground truth trajectory of a target object in response to the application of the indicated force.
|
| 211 |
+
|
| 212 |
+
When the purpose is learning an intuitive understanding of dynamics it is possible to do interesting work with entirely synthetic data (Fragkiadaki et al., 2016; Lerer et al., 2016). Lerer et al. (2016) show that convolutional networks can learn to make judgments about the stability of synthetic block towers based on a single image of the tower. They also show that their model trained on synthetic data is able to generalize to make accurate judgments about photographs of similar block towers built in the real world.
|
| 213 |
+
|
| 214 |
+
Making intuitive judgments about block towers has been extensively studied in the psychophysics literature. There is substantial evidence connecting the behavior of human judgments to inference over an explicit latent physics model (Hegarty, 2004; Hamrick et al., 2011; Battaglia et al., 2013). Humans can infer mass by watching movies of complex rigid body dynamics (Hamrick et al., 2016).
|
| 215 |
+
|
| 216 |
+
A major component of the above line of work is analysis by synthesis, in which understanding of a physical process is obtained by learning to invert it. Observations are assumed to be generated from an explicitly parameterized generative model of the true physical process, and provide constraints to an inference process run over the parameters of this model. The analysis by synthesis approach has been extremely influential due to its power to explain human judgments and generalization patterns in a variety of situations (Lake et al., 2015).
|
| 217 |
+
|
| 218 |
+
Galileo (Wu et al., 2015) is a particularly relevant instance of tying together analysis by synthesis and deep learning for understanding dynamics. This system first infers the physical parameters (mass and friction coefficient) of a variety of blocks by watching videos of them sliding down slopes and colliding with other blocks. This stage of the system uses an off-the-shelf object tracker to ground inference over the parameters of a physical simulator, and the inference is achieved by matching simulated and observed block trajectories. The inferred physical parameters are used to train a deep network to predict the physical parameters from the initial frame of video. At test time the system is evaluated by using the deep network to infer physical parameters of new blocks, which can be fed into the physics engine and used to answer questions about behaviors not observed at training time.
|
| 219 |
+
|
| 220 |
+
Physics 101 (Wu et al., 2016) is an extension of Galileo that more fully embraces deep learning. Instead of using a first pass of analysis by synthesis to infer physical parameters based on observations, a deep network is trained to regress the output of an object tracker directly, and the relevant physical laws are encoded directly into the architecture of the model. The authors show that they can use latent intrinsic physical properties inferred in this way to make novel predictions. The approach of encoding physical models as architecture constraints has also been proposed by Stewart & Ermon (2016).
|
| 221 |
+
|
| 222 |
+
Many of the works discussed thus far, including Galileo and Physics 101, are restricted to passive sensing. Pinto et al. (2016); Pinto & Gupta (2016); Agrawal et al. (2016); Levine et al. (2016) are exceptions to this because they learn their models using a sequential greedy data collection bootstrapping strategy. Active sensing, it appears, is an important aspect of visual object learning in toddlers as argued by Bambach et al. (2016), providing motivation for the approach presented here.
|
| 223 |
+
|
| 224 |
+
In computer vision, it is well known that recognition performance can be improved by moving so as to acquire new views of an object or scene. Jayaraman & Grauman (2016), for example, apply deep reinforcement learning to construct an agent that chooses how to acquire new views of an object so as to classify it into a semantic category, and their related work section surveys many other efforts in active vision.
|
| 225 |
+
|
| 226 |
+
While Jayaraman & Grauman (2016) and others share deep reinforcement learning and active sensing in common with our work, their goal is to learn a policy that can be applied to images to make decisions based on vision. In contrast, the goal in this paper is to study how agents learn to experiment continually so as to learn representations to answer questions about intrinsic properties of objects. In particular, our focus is on tasks that can only be solved by interaction and not by vision alone.
|
| 227 |
+
|
| 228 |
+
# 8 CONCLUSION AND FUTURE DIRECTIONS
|
| 229 |
+
|
| 230 |
+
Despite recent advances in artificial intelligence, machines still lack a common sense understanding of our physical world. There has been impressive progress in recognizing objects, segmenting object boundaries and even describing visual scenes with natural language. However, these tasks are not enough for machines to infer physical properties of objects such as mass, friction or deformability.
|
| 231 |
+
|
| 232 |
+
We introduce a deep reinforcement learning agent that actively interacts with physical objects to infer their hidden properties. Our approach is inspired by findings from the developmental psychology literature indicating that infants spend a lot of their early time experimenting with objects through random exploration (Smith & Gasser, 2005; Gopnik, 2012; Spelke & Kinzler, 2007). By letting our agents conduct physical experiments in an interactive simulated environment, they learn to manipulate objects and observe the consequences to infer hidden object properties. We demonstrate the efficacy of our approach on two important physical understanding tasks—inferring mass and counting the number of objects under strong visual ambiguities. Our empirical findings suggest that our agents learn different strategies for these tasks that balance the cost of gathering information against the cost of making mistakes in different situations.
|
| 233 |
+
|
| 234 |
+
Scientists and children are able not only to probe the environment to discover things about it, but they can also leverage their findings to answer new questions. In this paper we have shown that agents can be trained to gather knowledge to answer questions about hidden properties, but we have not addressed the larger issue of theory building, or transfer of this information. Given agents that can make judgments about mass and numerosity, how can they be enticed to leverage this knowledge to solve new tasks?
|
| 235 |
+
|
| 236 |
+
Another important aspect of understanding through interaction is that that the shape of the interactions influences behavior. We touched on this in the Towers environment where we looked at two different actuation styles, but there is much more to be done here. Thinking along these lines leads naturally to exploring tool use. We showed that agents can make judgments about object mass by hitting them, but could we train an agent to make similar judgments using a scale?
|
| 237 |
+
|
| 238 |
+
Finally, we have made no attempt in this work to optimize data efficiency, but learning physical properties from fewer samples is an important direction to pursue.
|
| 239 |
+
|
| 240 |
+
# ACKNOWLEDGMENTS
|
| 241 |
+
|
| 242 |
+
We would like to thank Matt Hoffman for several enlightening discussions about bandits. We would also like to thank the ICLR reviewers, whose helpful feedback allowed us to greatly improve the paper.
|
| 243 |
+
|
| 244 |
+
# REFERENCES
|
| 245 |
+
|
| 246 |
+
Pulkit Agrawal, Joao Carreira, and Jitendra Malik. Learning to see by moving. In ˜ IEEE International Conference on Computer Vision, pp. 37–45, 2015.
|
| 247 |
+
Pulkit Agrawal, Ashvin Nair, Pieter Abbeel, and Jitendra Malik. Learning to poke by poking: Experiential learning of intuitive physics. In Neural Information Processing Systems, 2016.
|
| 248 |
+
John-Alexander M Assael, Niklas Wahlstrom, Thomas B Sch ¨ on, and Marc Peter Deisenroth. Data- ¨ efficient learning of feedback policies from image pixels using deep dynamical models. arXiv preprint arXiv:1510.02173, 2015.
|
| 249 |
+
Jean-Yves Audibert and Sebastien Bubeck. Best arm identification in multi-armed bandits. In ´ Conference on Learning Theory, pp. 13–p, 2010.
|
| 250 |
+
Sven Bambach, David J Crandall, Linda B Smith, and Chen Yu. Active viewing in toddlers facilitates visual object learning: An egocentric vision approach. CogSci, 2016.
|
| 251 |
+
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.
|
| 252 |
+
Vincent Delaitre, David F Fouhey, Ivan Laptev, Josef Sivic, Abhinav Gupta, and Alexei A Efros. Scene semantics from long-term observation of people. In European Conference on Computer Vision, pp. 284–298. Springer, 2012.
|
| 253 |
+
Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1422–1430, 2015.
|
| 254 |
+
David F Fouhey, Vincent Delaitre, Abhinav Gupta, Alexei A Efros, Ivan Laptev, and Josef Sivic. People watching: Human actions as a cue for single view geometry. International Journal of Computer Vision, 110 (3):259–274, 2014.
|
| 255 |
+
Katerina Fragkiadaki, Pulkit Agrawal, Sergey Levine, and Jitendra Malik. Learning visual predictive models of physics for playing billiards. ICLR, 2016.
|
| 256 |
+
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.
|
| 257 |
+
Alison Gopnik. Scientific thinking in young children: Theoretical advances, empirical research, and policy implications. Science, 337(6102):1623–1627, 2012.
|
| 258 |
+
Jessica Hamrick, Peter Battaglia, and Joshua B Tenenbaum. Internal physics models guide probabilistic judgments about object dynamics. In Proceedings of the 33rd annual conference of the cognitive science society, pp. 1545–1550. Cognitive Science Society Austin, TX, 2011.
|
| 259 |
+
Jessica B Hamrick, Peter W Battaglia, Thomas L Griffiths, and Joshua B Tenenbaum. Inferring mass in complex scenes by mental simulation. Cognition, 157:61–76, 2016.
|
| 260 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition, 2016.
|
| 261 |
+
Mary Hegarty. Mechanical reasoning by mental simulation. Trends in cognitive sciences, 8(6):280–5, 2004.
|
| 262 |
+
Geoffrey E. Hinton, Li Deng, Dong Yu, George E. Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N. Sainath, and Brian Kingsbury. 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.
|
| 263 |
+
Dinesh Jayaraman and Kristen Grauman. Learning image representations tied to ego-motion. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1413–1421, 2015.
|
| 264 |
+
Dinesh Jayaraman and Kristen Grauman. Look-ahead before you leap: End-to-end active recognition by forecasting the effect of motion. In European Conference on Computer Vision, pp. 489–505, 2016.
|
| 265 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In International Conference on Learning Representations, 2014.
|
| 266 |
+
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.
|
| 267 |
+
Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015.
|
| 268 |
+
Adam Lerer, Sam Gross, and Rob Fergus. Learning physical intuition of block towers by example. In International Conference on Machine Learning, pp. 430–438, 2016.
|
| 269 |
+
Sergey Levine, Peter Pastor, Alex Krizhevsky, and Deirdre Quillen. Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection. arXiv preprint arXiv:1603.02199, 2016.
|
| 270 |
+
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016.
|
| 271 |
+
Roozbeh Mottaghi, Mohammad Rastegari, Abhinav Gupta, and Ali Farhadi. “what happens if. . . ” learning to predict the effect of forces in images. In European Conference on Computer Vision, pp. 269–285, 2016.
|
| 272 |
+
Junhyuk Oh, Xiaoxiao Guo, Honglak Lee, Richard Lewis, and Satinder Singh. Action-conditional video prediction using deep networks in Atari games. In Neural Information Processing Systems, pp. 2863–2871, 2015.
|
| 273 |
+
Andrew Owens, Phillip Isola, Josh McDermott, Antonio Torralba, Edward H Adelson, and William T Freeman. Visually indicated sounds. arXiv preprint arXiv:1512.08512, 2015.
|
| 274 |
+
Andrew Owens, Jiajun Wu, Josh H McDermott, William T Freeman, and Antonio Torralba. Ambient sound provides supervision for visual learning. In European Conference on Computer Vision, pp. 801–816. Springer, 2016.
|
| 275 |
+
Lerrel Pinto and Abhinav Gupta. Supersizing self-supervision: Learning to grasp from 50k tries and 700 robot hours. In IEEE International Conference on Robotics and Automation, pp. 3406–3413, 2016.
|
| 276 |
+
Lerrel Pinto, Dhiraj Gandhi, Yuanfeng Han, Yong-Lae Park, and Abhinav Gupta. The curious robot: Learning visual representations via physical interactions. In European Conference on Computer Vision, pp. 3–18, 2016.
|
| 277 |
+
MarcAurelio Ranzato, Arthur Szlam, Joan Bruna, Michael Mathieu, Ronan Collobert, and Sumit Chopra. Video (language) modeling: a baseline for generative models of natural videos. arXiv preprint arXiv:1412.6604, 2014.
|
| 278 |
+
Linda Smith and Michael Gasser. The development of embodied cognition: Six lessons from babies. Artificial life, 11(1-2):13–29, 2005.
|
| 279 |
+
Elizabeth S Spelke and Katherine D Kinzler. Core knowledge. Developmental science, 10(1):89–96, 2007.
|
| 280 |
+
Nitish Srivastava, Elman Mansimov, and Ruslan Salakhutdinov. Unsupervised learning of video representations using lstms. CoRR, abs/1502.04681, 2, 2015.
|
| 281 |
+
Russell Stewart and Stefano Ermon. Label-free supervision of neural networks with physics and domain knowledge. arXiv preprint arXiv:1609.05566, 2016.
|
| 282 |
+
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.
|
| 283 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016.
|
| 284 |
+
Manuel Watter, Jost Springenberg, Joschka Boedecker, and Martin Riedmiller. Embed to control: A locally linear latent dynamics model for control from raw images. In Advances in Neural Information Processing Systems, pp. 2746–2754, 2015.
|
| 285 |
+
Jiajun Wu, Ilker Yildirim, Joseph J Lim, Bill Freeman, and Josh Tenenbaum. Galileo: Perceiving physical object properties by integrating a physics engine with deep learning. In Neural Information Processing Systems. 2015.
|
| 286 |
+
Jiajun Wu, Joseph J. Lim, Hongyi Zhang, Joshua B. Tenenbaum, and William T. Freeman. Physics 101: Learning physical object properties from unlabeled videos. In British Machine Vision Conference, 2016.
|
| 287 |
+
Tianfan Xue, Jiajun Wu, Katherine L. Bouman, and William T. Freeman. Visual dynamics: Probabilistic future frame synthesis via cross convolutional networks. arXiv preprint arXiv 1607.02586, 2016.
|
| 288 |
+
Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. arXiv preprint arXiv:1603.08511, 2016.
|
md/train/rJehVyrKwH/rJehVyrKwH.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AND THE BIT GOES DOWN: REVISITING THE QUANTIZATION OF NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Pierre Stock1,2, Armand Joulin1, Remi Gribonval ´ 2, Benjamin Graham1, Herve J ´ egou ´ 1 1Facebook AI Research, 2Univ Rennes, Inria, CNRS, IRISA
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In this paper, we address the problem of reducing the memory footprint of convolutional network architectures. We introduce a vector quantization method that aims at preserving the quality of the reconstruction of the network outputs rather than its weights. The principle of our approach is that it minimizes the loss reconstruction error for in-domain inputs. Our method only requires a set of unlabelled data at quantization time and allows for efficient inference on CPU by using bytealigned codebooks to store the compressed weights. We validate our approach by quantizing a high performing ResNet-50 model to a memory size of $5 \mathrm { M B }$ $( 2 0 \times$ compression factor) while preserving a top-1 accuracy of $7 6 . \dot { 1 } \%$ on ImageNet object classification and by compressing a Mask R-CNN with a $2 6 \times$ factor.1
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
There is a growing need for compressing the best convolutional networks (or ConvNets) to support embedded devices for applications like robotics and virtual/augmented reality. Indeed, the performance of ConvNets on image classification has steadily improved since the introduction of AlexNet (Krizhevsky et al., 2012). This progress has been fueled by deeper and richer architectures such as the ResNets (He et al., 2015) and their variants ResNeXts (Xie et al., 2017) or DenseNets (Huang et al., 2017). Those models particularly benefit from the recent progress made with weak supervision (Mahajan et al., 2018; Yalniz et al., 2019; Berthelot et al., 2019). Compression of ConvNets has been an active research topic in the recent years, leading to networks with a $7 1 \%$ top-1 accuracy on ImageNet object classification that fit in 1 MB (Wang et al., 2018b).
|
| 12 |
+
|
| 13 |
+
In this work, we propose a compression method particularly adapted to ResNet-like architectures. Our approach takes advantage of the high correlation in the convolutions by the use of a structured quantization algorithm, Product Quantization (PQ) (Jegou et al., 2011). More precisely, we exploit ´ the spatial redundancy of information inherent to standard convolution filters (Denton et al., 2014). Besides reducing the memory footprint, we also produce compressed networks allowing efficient inference on CPU by using byte-aligned indexes, as opposed to entropy decoders (Han et al., 2016).
|
| 14 |
+
|
| 15 |
+
Our approach departs from traditional scalar quantizers (Han et al., 2016) and vector quantizers (Gong et al., 2014; Carreira-Perpin˜an & Idelbayev, 2017) by focusing on the accuracy of the ´ activations rather than the weights. This is achieved by leveraging a weighted $k$ -means technique. To our knowledge this strategy (see Section 3) is novel in this context. The closest work we are aware of is the one by Choi et al. (2016), but the authors use a different objective (their weighted term is derived from second-order information) along with a different quantization technique (scalar quantization). Our method targets a better in-domain reconstruction, as depicted by Figure 1.
|
| 16 |
+
|
| 17 |
+
Finally, we compress the network sequentially to account for the dependency of our method to the activations at each layer. To prevent the accumulation of errors across layers, we guide this compression with the activations of the uncompressed network on unlabelled data: training by distillation (Hinton et al., 2014) allows for both an efficient layer-by-layer compression procedure and a global fine-tuning of the codewords. Thus, we only need a set of unlabelled images to adjust the codewords. As opposed to recent works by Mishra & Marr (2017) or Lopes et al. (2017), our distillation scheme is sequential and the underlying compression method is different (PQ vs. scalar).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Illustration of our method. We approximate a binary classifier $\varphi$ that labels images as dogs or cats by quantizing its weights. Standard method: quantizing $\varphi$ with the standard objective function (1) promotes a classifier $\widehat { \varphi } _ { \mathrm { s t a n d a r d } }$ that tries to approximate $\varphi$ over the entire input space and can thus perform badly for in-domain inputs. Our method: quantizing $\varphi$ with our objective function (2) promotes a classifier $\widehat { \varphi } _ { \mathrm { a c } }$ ctivations that performs well for in-domain inputs. Images lying in bthe hatched area of the input space are correctly classified by $\varphi$ activations but incorrectly by $\varphi$ standard.
|
| 21 |
+
|
| 22 |
+
We show that applying our approach to the semi-supervised ResNet-50 of Yalniz et al. (Yalniz et al., 2019) leads to a $5 \mathrm { M B }$ memory footprint and a $7 6 . 1 \%$ top-1 accuracy on ImageNet object classification (hence $2 0 \times$ compression vs. the original model). Moreover, our approach generalizes to other tasks such as image detection. As shown in Section 4.3, we compress a Mask R-CNN (He et al., 2017) with a size budget around 6 MB ( $2 6 \times$ compression factor) while maintaining a competitive performance.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORK
|
| 25 |
+
|
| 26 |
+
There is a large body of literature on network compression. We review the works closest to ours and refer the reader to two recent surveys (Guo, 2018; Cheng et al., 2017) for a comprehensive overview.
|
| 27 |
+
|
| 28 |
+
Low-precision training. Since early works like those of Courbariaux et al. (2015), researchers have developed various approaches to train networks with low precision weights. Those approaches include training with binary or ternary weights (Shayer et al., 2017; Zhu et al., 2016; Li & Liu, 2016; Rastegari et al., 2016; McDonnell, 2018), learning a combination of binary bases (Lin et al., 2017) and quantizing the activations (Zhou et al., 2016; 2017; Mishra et al., 2017). Some of these methods assume the possibility to employ specialized hardware that speed up inference and improve power efficiency by replacing most arithmetic operations with bit-wise operations. However, the back-propagation has to be adapted to the case where the weights are discrete.
|
| 29 |
+
|
| 30 |
+
Quantization. Vector Quantization (VQ) and Product Quantization (PQ) have been extensively studied in the context of nearest-neighbor search (Jegou et al., 2011; Ge et al., 2014; Norouzi & Fleet, 2013). The idea is to decompose the original high-dimensional space into a cartesian product of subspaces that are quantized separately with a joint codebook. To our knowledge, Gong et al. (2014) were the first to introduce these stronger quantizers for neural network quantization, followed by Carreira-Perpin˜an & Idelbayev (2017). As we will see in the remainder of this paper, employing this ´ discretization off-the-shelf does not optimize the right objective function, and leads to a catastrophic drift of performance for deep networks.
|
| 31 |
+
|
| 32 |
+
Pruning. Network pruning amounts to removing connections according to an importance criteria (typically the magnitude of the weight associated with this connection) until the desired model size/accuracy tradeoff is reached (LeCun et al., 1990). A natural extension of this work is to prune structural components of the network, for instance by enforcing channel-level (Liu et al., 2017) or filter-level (Luo et al., 2017) sparsity. However, these methods alternate between pruning and re-training steps and thus typically require a long training time.
|
| 33 |
+
|
| 34 |
+
Dedicated architectures. Architectures such as SqueezeNet (Iandola et al., 2016), NASNet (Zoph et al., 2017), ShuffleNet (Zhang et al., 2017; Ma et al., 2018), MobileNets (Sandler et al., 2018) and EfficientNets (Tan & Le, 2019) are designed to be memory efficient. As they typically rely on a combination of depth-wise and point-wise convolutional filters, sometimes along with channel shuffling, they are less prone than ResNets to structured quantization techniques such as PQ. These architectures are either designed by hand or using the framework of architecture search (Howard et al., 2019). For instance, the respective model size and test top-1 accuracy of ImageNet of a MobileNet are $1 3 . 4 \mathrm { M B }$ for $7 1 . 9 \%$ , to be compared with a vanilla ResNet-50 with size $9 7 . 5 \mathrm { M B }$ for a top-1 of $7 6 . 2 \%$ . Moreover, larger models such as ResNets can benefit from large-scale weakly- or semi-supervised learning to reach better performance (Mahajan et al., 2018; Yalniz et al., 2019).
|
| 35 |
+
|
| 36 |
+
Combining some of the mentioned approaches yields high compression factors as demonstrated by Han et al. with Deep Compression (DC) (Han et al., 2016) or more recently by Tung & Mori (Tung & Mori, 2018). Moreover and from a practical point of view, the process of compressing networks depends on the type of hardware on which the networks will run. Recent work directly quantizes to optimize energy-efficiency and latency time on a specific hardware (Wang et al., 2018a). Finally, the memory overhead of storing the full activations is negligible compared to the storage of the weights for two reasons. First, in realistic real-time inference setups, the batch size is almost always equal to one. Second, a forward pass only requires to store the activations of the current layer –which are often smaller than the size of the input– and not the whole activations of the network.
|
| 37 |
+
|
| 38 |
+
# 3 OUR APPROACH
|
| 39 |
+
|
| 40 |
+
In this section, we describe our strategy for network compression and we show how to extend our approach to quantize a modern ConvNet architecture. The specificity of our approach is that it aims at a small reconstruction error for the outputs of the layer rather than the layer weights themselves. We first describe how we quantize a single fully connected and convolutional layer. Then we describe how we quantize a full pre-trained network and finetune it.
|
| 41 |
+
|
| 42 |
+
# 3.1 QUANTIZATION OF A FULLY-CONNECTED LAYER
|
| 43 |
+
|
| 44 |
+
We consider a fully-connected layer with weights $\mathbf { W } \in \mathbf { R } ^ { C _ { \mathrm { i n } } \times C _ { \mathrm { o u t } } }$ and, without loss of generality, we omit the bias since it does not impact reconstruction error.
|
| 45 |
+
|
| 46 |
+
Product Quantization (PQ). Applying the PQ algorithm to the columns of W consists in evenly splitting each column into $m$ contiguous subvectors and learning a codebook on the resulting $m C _ { \mathrm { o u t } }$ subvectors. Then, a column of $\mathbf { W }$ is quantized by mapping each of its subvector to its nearest codeword in the codebook. For simplicity, we assume that $C _ { \mathrm { i n } }$ is a multiple of $m$ , i.e., that all the subvectors have the same dimension $d = C _ { \mathrm { i n } } / m$ .
|
| 47 |
+
|
| 48 |
+
More formally, the codebook $\mathcal { C } = \{ \mathbf { c } _ { 1 } , \ldots , \mathbf { c } _ { k } \}$ contains $k$ codewords of dimension $d$ . Any column ${ \bf w } _ { j }$ of $\mathbf { W }$ is mapped to its quantized version $\mathbf q ( \mathbf w _ { j } ) = ( \pmb { \mathrm { c } } _ { i _ { 1 } } , \dots , \pmb { \mathrm { c } } _ { i _ { m } } )$ where $i _ { 1 }$ denotes the index of the codeword assigned to the first subvector of $\mathbf { w } _ { j }$ , and so forth. The codebook is then learned by minimizing the following objective function:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\| \mathbf { W } - \widehat { \mathbf { W } } \| _ { 2 } ^ { 2 } = \sum _ { j } \| \mathbf { w } _ { j } - \mathbf { q } ( \mathbf { w } _ { j } ) \| _ { 2 } ^ { 2 } ,
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\widehat { \bf W }$ denotes the quantized weights. This objective can be efficiently minimized with $k$ -means. When $m$ is set to 1, PQ is equivalent to vector quantization (VQ) and when $m$ is equal to $C _ { \mathrm { i n } }$ , it is the scalar $k$ -means algorithm. The main benefit of PQ is its expressivity: each column ${ \bf w } _ { j }$ is mapped to a vector in the product ${ \mathcal { C } } = { \mathcal { C } } \times \cdots \times { \mathcal { C } }$ , thus PQ generates an implicit codebook of size $k ^ { m }$ .
|
| 55 |
+
|
| 56 |
+
Our algorithm. PQ quantizes the weight matrix of the fully-connected layer. However, in practice, we are interested in preserving the output of the layer, not its weights. This is illustrated in the case of a non-linear classifier in Figure 1: preserving the weights a layer does not necessarily guarantee preserving its output. In other words, the Frobenius approximation of the weights of a layer is not guaranteed to be the best approximation of the output over some arbitrary domain (in particular for $i n$ -domain inputs). We thus propose an alternative to PQ that directly minimizes the reconstruction error on the output activations obtained by applying the layer to in-domain inputs. More precisely, given a batch of $B$ input activations $\mathbf { x } \in \mathbf { R } ^ { \tilde { B } \times \tilde { C } _ { \mathrm { i n } } }$ , we are interested in learning a codebook $\mathcal { C }$ that minimizes the difference between the output activations and their reconstructions:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\| \mathbf { y } - \widehat { \mathbf { y } } \| _ { 2 } ^ { 2 } = \sum _ { j } \| \mathbf { x } ( \mathbf { w } _ { j } - \mathbf { q } ( \mathbf { w } _ { j } ) ) \| _ { 2 } ^ { 2 } ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $\mathbf { y } = \mathbf { x } \mathbf { W }$ is the output and ${ \widehat { \mathbf { y } } } = { \mathbf { x } } { \widehat { \mathbf { W } } }$ its reconstruction. Our objective is a re-weighting of bthe objective in Equation (1). We can thus learn our codebook with a weighted $k$ -means algorithm. First, we unroll $\mathbf { x }$ of size $B \times C _ { \mathrm { i n } }$ into $\widetilde { \mathbf { x } }$ of size $( B \times m ) \times d$ i.e. we split each row of $\mathbf { x }$ into $m$ subvectors of size $d$ eand stack these subvectors. Next, we adapt the EM algorithm as follows.
|
| 63 |
+
|
| 64 |
+
(1) $\mathbf { E }$ -step (cluster assignment). Recall that every column ${ \bf w } _ { j }$ is divided into $m$ subvectors of dimension $d$ . Each subvector $\mathbf { v }$ is assigned to the codeword $\mathbf { c } _ { j }$ such that
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathbf { c } _ { j } = \underset { \mathbf { c } \in \mathcal { C } } { \operatorname { a r g m i n } } \ : \| \widetilde { \mathbf { x } } ( \mathbf { c } - \mathbf { v } ) \| _ { 2 } ^ { 2 } .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
This step is performed by exhaustive exploration. Our implementation relies on broadcasting to be computationally efficient.
|
| 71 |
+
|
| 72 |
+
(2) M-step (codeword update). Let us consider a codeword $\mathbf { c } \in { \mathcal { C } }$ . We denote $( \mathbf { v } _ { p } ) _ { p \in I _ { \mathbf { c } } }$ the subvectors that are currently assigned to $\mathbf { c }$ . Then, we update $\mathbf c \gets \mathbf c ^ { \star }$ , where
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\mathbf { c } ^ { \star } = \underset { \mathbf { c } \in \mathbf { R } ^ { d } } { \mathrm { a r g m i n } } \sum _ { p \in I _ { \mathbf { c } } } \| \widetilde { \mathbf { x } } ( \mathbf { c } - \mathbf { v } _ { p } ) \| _ { 2 } ^ { 2 } .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
This step explicitly computes the solution of the least-squares problem2. Our implementation performs the computation of the pseudo-inverse of $\widetilde { \mathbf { x } }$ before alternating between the eExpectation and Minimization steps as it does not depend on the learned codebook $\mathcal { C }$ .
|
| 79 |
+
|
| 80 |
+
We initialize the codebook $\mathcal { C }$ by uniformly sampling $k$ vectors among those we wish to quantize. After performing the E-step, some clusters may be empty. To resolve this issue, we iteratively perform the following additional steps for each empty cluster of index $i$ . (1) Find codeword $\mathbf { c _ { 0 } }$ corresponding to the most populated cluster ; (2) define new codewords ${ \bf c } _ { 0 } ^ { \prime } = { \bf c } _ { 0 } + { \bf e }$ and ${ \bf c } _ { i } ^ { \prime } = { \bf c } _ { 0 } - { \bf e }$ , where $\mathbf { e } \sim \mathcal { N } ( \mathbf { 0 } , \varepsilon \mathbf { I } )$ and (3) perform again the E-step. We proceed to the M-step after all the empty clusters are resolved. We set $\varepsilon = 1 \mathrm { e } { - 8 }$ and we observe that its generally takes less than 1 or $2 \mathrm { E } { \mathrm { - } } \mathbf { M }$ iterations to resolve all the empty clusters. Note that the quality of the resulting compression is sensitive to the choice of $\mathbf { x }$ .
|
| 81 |
+
|
| 82 |
+
# 3.2 CONVOLUTIONAL LAYERS
|
| 83 |
+
|
| 84 |
+
Despite being presented in the case of a fully-connected layer, our approach works on any set of vectors. As a consequence, our apporoach can be applied to a convolutional layer if we split the associated 4D weight matrix into a set of vectors. There are many ways to split a 4D matrix in a set of vectors and we are aiming for one that maximizes the correlation between the vectors since vector quantization based methods work the best when the vectors are highly correlated.
|
| 85 |
+
|
| 86 |
+
Given a convolutional layer, we have $C _ { \mathrm { { o u t } } }$ filters of size $K \times K \times C _ { \mathrm { i n } }$ , leading to an overall 4D weight matrix $\mathbf { W } \in \mathbf { R } ^ { C _ { \mathrm { o u t } } ^ { \bullet } \times C _ { \mathrm { i n } } \times K \times K }$ . The dimensions along the output and input coordinate have no particular reason to be correlated. On the other hand, the spatial dimensions related to the filter size are by nature very correlated: nearby patches or pixels likely share information. As depicted in Figure 2, we thus reshape the weight matrix in a way that lead to spatially coherent quantization. More precisely, we quantize W spatially into subvectors of size $d = K \times K$ using the following procedure. We first reshape $\mathbf { W }$ into a 2D matrix of size $( C _ { \mathrm { i n } } \times K \times K ) \times C _ { \mathrm { o u t } }$ . Column $j$ of the reshaped matrix $\mathbf { W } _ { \mathrm { r } }$ corresponds to the $j ^ { \mathrm { t h } }$ filter of $\mathbf { W }$ and is divided into $C _ { \mathrm { i n } }$ subvectors of size $K \times K$ . Similarly, we reshape the input activations $\mathbf { x }$ accordingly to $\mathbf { x } _ { \mathrm { r } }$ so that reshaping back the matrix $\mathbf { x } _ { \mathrm { r } } \mathbf { W } _ { \mathrm { r } }$ yields the same result as $\mathbf { x } * \mathbf { W }$ . In other words, we adopt a dual approach to the one using bi-level Toeplitz matrices to represent the weights. Then, we apply our method exposed in Section 3.1 to quantize each column of $\mathbf { W } _ { \mathrm { r } }$ into $m = C _ { \mathrm { i n } }$ subvectors of size $d = K \times K$ with $k$ codewords, using $\mathbf { x } _ { \mathrm { r } }$ as input activations in (2). As a natural extension, we also quantize with larger subvectors, for example subvectors of size $d = 2 \times K \times K$ , see Section 4 for details.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 2: We quantize $C _ { \mathrm { o u t } }$ filters of size $C _ { \mathrm { i n } } \times K \times K$ using a subvector size of $d = K \times K$ . In other words, we spatially quantize the convolutional filters to take advantage of the redundancy of information in the network. Similar colors denote subvectors assigned to the same codewords.
|
| 90 |
+
|
| 91 |
+
In our implementation, we adapt the reshaping of $\mathbf { W }$ and $\mathbf { x }$ to various types of convolutions. We account for the padding, the stride, the number of groups (for depthwise convolutions and in particular for pointwise convolutions) and the kernel size. We refer the reader to the code for more details.
|
| 92 |
+
|
| 93 |
+
# 3.3 NETWORK QUANTIZATION
|
| 94 |
+
|
| 95 |
+
In this section, we describe our approach for quantizing a neural network. We quantize the network sequentially starting from the lowest layer to the highest layer. We guide the compression of the student network by the non-compressed teacher network, as detailled below.
|
| 96 |
+
|
| 97 |
+
Learning the codebook. We recover the current input activations of the layer, i.e. the input activations obtained by forwarding a batch of images through the quantized lower layers, and we quantize the current layer using those activations. Experimentally, we observed a drift in both the reconstruction and classification errors when using the activations of the non-compressed network rather than the current activations.
|
| 98 |
+
|
| 99 |
+
Finetuning the codebook. We finetune the codewords by distillation (Hinton et al., 2014) using the non-compressed network as the teacher network and the compressed network (up to the current layer) as the student network. Denoting $y _ { \mathrm { t } }$ (resp. $y _ { \mathrm { s , \vec { \imath } } }$ ) the output probabilities of the teacher (resp. student) network, the loss we optimize is the Kullback-Leibler divergence $\begin{array} { r } { \mathcal { L } = \operatorname { K L } ( \mathbf { y } _ { \mathrm { s } } , \mathbf { y } _ { \mathrm { t } } ) } \end{array}$ . Finetuning on codewords is done by averaging the gradients of each subvector assigned to a given codeword. More formally, after the quantization step, we fix the assignments once for all. Then, denoting $( \mathbf { b } _ { p } ) _ { p \in I _ { \mathbf { c } } }$ the subvectors that are assigned to codeword c, we perform the SGD update with a learning rate $\eta$
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\mathbf { c } \gets \mathbf { c } - \eta \frac { 1 } { | I _ { \mathbf { c } } | } \sum _ { p \in I _ { \mathbf { c } } } \frac { \partial \mathcal { L } } { \partial \mathbf { b } _ { p } } .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Experimentally, we find the approach to perform better than finetuning on the target of the images as demonstrated in Table 3. Moreover, this approach does not require any labelled data.
|
| 106 |
+
|
| 107 |
+
# 3.4 GLOBAL FINETUNING
|
| 108 |
+
|
| 109 |
+
In a final step, we globally finetune the codebooks of all the layers to reduce any residual drifts and we update the running statistics of the BatchNorm layers: We empirically find it beneficial to finetune all the centroids after the whole network is quantized. The finetuning procedure is exactly the same as described in Section 3.3, except that we additionally switch the BatchNorms to the training mode, meaning that the learnt coefficients are still fixed but that the batch statistics (running mean and variance) are still being updated with the standard moving average procedure.
|
| 110 |
+
|
| 111 |
+
We perform the global finetuning using the standard ImageNet training set for 9 epochs with an initial learning rate of 0.01, a weight decay of $1 0 ^ { - 4 }$ and a momentum of 0.9. The learning rate is decayed by a factor 10 every 3 epochs. As demonstrated in the ablation study in Table 3, finetuning on the true labels performs worse than finetuning by distillation. A possible explanation is that the supervision signal coming from the teacher network is richer than the one-hot vector used as a traditional learning signal in supervised learning (Hinton et al., 2014).
|
| 112 |
+
|
| 113 |
+
# 4 EXPERIMENTS
|
| 114 |
+
|
| 115 |
+
# 4.1 EXPERIMENTAL SETUP
|
| 116 |
+
|
| 117 |
+
We quantize vanilla ResNet-18 and ResNet-50 architectures pretrained on the ImageNet dataset (Deng et al., 2009). Unless explicit mention of the contrary, the pretrained models are taken from the PyTorch model ${ \mathrm { z o o } } ^ { 3 }$ . We run our method on a 16 GB Volta V100 GPU. Quantizing a ResNet50 with our method (including all finetuning steps) takes about one day on 1 GPU. We detail our experimental setup below. Our code and the compressed models are open-sourced.
|
| 118 |
+
|
| 119 |
+
Compression regimes. We explore a large block sizes (resp.small block sizes) compression regime by setting the subvector size of regular $3 \times 3$ convolutions to $d = 9$ (resp. $d \ = \ 1 8$ ) and the subvector size of pointwise convolutions to $d \ = \ 4$ (resp. $d \ = \ 8$ ). For ResNet-18, the block size of pointwise convolutions is always equal to 4. The number of codewords or centroids is set to $k \in \{ 2 5 6 , 5 1 2 , 1 0 2 4 , 2 0 4 8 \}$ for each compression regime. Note that we clamp the number of centroids to $\operatorname* { m i n } ( k , C _ { \mathrm { o u t } } \times m / 4 )$ for stability. For instance, the first layer of the first stage of the ResNet-50 has size $6 4 \times 6 4 \times 1 \times 1$ , thus we always use $k = 1 2 8$ centroids with a block size $d = 8$ . For a given number of centroids $k$ , small blocks lead to a lower compression ratio than large blocks.
|
| 120 |
+
|
| 121 |
+
Sampling the input activations. Before quantizing each layer, we randomly sample a batch of 1024 training images to obtain the input activations of the current layer and reshape it as described in Section 3.2. Then, before each iteration $_ \mathrm { E + M }$ step) of our method, we randomly sample 10, 000 rows from those reshaped input activations.
|
| 122 |
+
|
| 123 |
+
Hyperparameters. We quantize each layer while performing 100 steps of our method (sufficient for convergence in practice). We finetune the centroids of each layer on the standard ImageNet training set during 2,500 iterations with a batch size of 128 (resp 64) for the ResNet-18 (resp.ResNet50) with a learning rate of 0.01, a weight decay of $1 0 ^ { - 4 }$ and a momentum of 0.9. For accuracy and memory reasons, the classifier is always quantized with a block size $d = 4$ and $k = 2 0 4 8$ (resp. $k = 1 0 2 4 ,$ centroids for the ResNet-18 (resp., ResNet-50). Moreover, the first convolutional layer of size $7 \times 7$ is not quantized, as it represents less than $0 . 1 \%$ (resp., $0 . 0 5 \%$ ) of the weights of a ResNet-18 (resp.ResNet-50).
|
| 124 |
+
|
| 125 |
+
Metrics. We focus on the tradeoff between accuracy and memory. The accuracy is the top-1 error on the standard validation set of ImageNet. The memory footprint is calculated as the indexing cost (number of bits per weight) plus the overhead of storing the centroids in float16. As an example, quantizing a layer of size $1 2 8 \times 1 2 8 \times 3 \times 3$ with $k = 2 5 6$ centroids (1 byte per subvector) and a block size of $d = 9$ leads to an indexing cost of $1 6 \mathrm { k B }$ for $m = 1 6 , 3 8 4$ blocks plus the cost of storing the centroids of $4 . 5 \mathrm { k B }$ .
|
| 126 |
+
|
| 127 |
+
# 4.2 IMAGE CLASSIFICATION RESULTS
|
| 128 |
+
|
| 129 |
+
We report below the results of our method applied to various ResNet models. First, we compare our method with the state of the art on the standard ResNet-18 and ResNet-50 architecture. Next, we show the potential of our approach on a competitive ResNet-50. Finally, an ablation study validates the pertinence of our method.
|
| 130 |
+
|
| 131 |
+
Vanilla ResNet-18 and ResNet-50. We evaluate our method on the ImageNet benchmark for ResNet-18 and ResNet-50 architectures and compare our results to the following methods: Trained Ternary Quantization (TTQ) (Zhu et al., 2016), LR-Net (Shayer et al., 2017), ABC-Net (Lin et al., 2017), Binary Weight Network (XNOR-Net or BWN) (Rastegari et al., 2016), Deep Compression (DC) (Han et al., 2016) and Hardware-Aware Automated Quantization (HAQ) (Wang et al., 2018a). We report the accuracies and compression factors in the original papers and/or in the two surveys (Guo, 2018; Cheng et al., 2017) for a given architecture when the result is available. We do not compare our method to DoReFa-Net (Zhou et al., 2016) and WRPN (Mishra et al., 2017) as those approaches also use low-precision activations and hence get lower accuracies, e.g., $5 1 . 2 \%$ top-1 accuracy for a XNOR-Net with ResNet-18. The results are presented in Figure 4.2. For better readability, some results for our method are also displayed in Table 1. We report the average accuracy and standard deviation over 3 runs. Our method significantly outperforms state of the art papers for various operating points. For instance, for a ResNet-18, our method with large blocks and $k = 5 1 2$ centroids reaches a larger accuracy than ABC-Net ( $M \ : = \ : 2$ ) with a compression ratio that is $2 \mathbf { x }$ larger. Similarly, on the ResNet-50, our compressed model with $k = 2 5 6$ centroids in the large blocks setup yields a comparable accuracy to DC (2 bits) with a compression ratio that is $2 \mathbf { x }$ larger.
|
| 132 |
+
|
| 133 |
+

|
| 134 |
+
Figure 3: Compression results for ResNet-18 and ResNet-50 architectures. We explore two compression regimes as defined in Section 4.1: small block sizes (block sizes of $d { = } 4$ and 9) and large block sizes (block sizes $d { = } 8$ and 18). The results of our method for $k = 2 5 6$ centroids are of practical interest as they correspond to a byte-compatible compression scheme.
|
| 135 |
+
|
| 136 |
+
Table 1: Results for vanilla ResNet-18 and ResNet-50 architectures for $k = 2 5 6$ centroids.
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Model (original top-1)</td><td>Compression</td><td>Size ratio</td><td>Model size</td><td>Top-1 (%)</td></tr><tr><td>ResNet-18 (69.76%)</td><td>Small blocks Large blocks</td><td>29x 43x</td><td>1.54 MB 1.03 MB</td><td>65.81 ±0.04 61.10 ±0.03</td></tr><tr><td>ResNet-50 (76.15%)</td><td>Small blocks Large blocks</td><td>19x 31x</td><td>5.09 MB 3.19 MB</td><td>73.79 ±0.05 68.21 ±0.04</td></tr></table>
|
| 139 |
+
|
| 140 |
+
The work by Tung & Mori (Tung & Mori, 2018) is likely the only one that remains competitive with ours with a $6 . 8 ~ \mathrm { M B }$ network after compression, with a technique that prunes the network and therefore implicitly changes the architecture. The authors report the delta accuracy for which we have no direct comparable top-1 accuracy, but their method is arguably complementary to ours.
|
| 141 |
+
|
| 142 |
+
Semi-supervised ResNet-50. Recent works (Mahajan et al., 2018; Yalniz et al., 2019) have demonstrated the possibility to leverage a large collection of unlabelled images to improve the performance of a given architecture. In particular, Yalniz et al. (Yalniz et al., 2019) use the publicly available YFCC-100M dataset (Thomee et al., 2015) to train a ResNet-50 that reaches $7 9 . 1 \%$ top-1 accuracy on the standard validation set of ImageNet. In the following, we use this particular model and refer to it as semi-supervised ResNet-50. In the low compression regime (block sizes of 4 and 9), with $k = 2 5 6$ centroids (practical for implementation), our compressed semi-supervised ResNet-50 reaches $7 6 . 1 2 \%$ top-1 accuracy. In other words, the model compressed to 5 MB attains the performance of a vanilla, non-compressed ResNet50 (vs.97.5MB for the non-compressed ResNet-50).
|
| 143 |
+
|
| 144 |
+
Comparison for a given size budget. To ensure a fair comparison, we compare our method for a given model size budget against the reference methods in Table 2. It should be noted that our method can further benefit from advances in semi-supervised learning to boosts the performance of the non-compressed and hence of the compressed network.
|
| 145 |
+
|
| 146 |
+
Ablation study. We perform an ablation study on the vanilla ResNet-18 to study the respective effects of quantizing using the activations and finetuning by distillation (here, finetuning refers both to the per-layer finetuning and to the global finetuning after the quantization described in Section 3). We refer to our method as Act $^ +$ Distill. First, we still finetune by distillation but change the quantization: instead of quantizing using our method (see Equation (2)), we quantizing using the standard PQ algorithm and do not take the activations into account, see Equation (1). We refer to this method as No act $^ +$ Distill. Second, we quantize using our method but perform a standard finetuning using the image labels (Act $^ +$ Labels). The results are displayed in Table 3. Our approach consistently yields significantly better results. As a side note, quantizing all the layers of a ResNet-18 with the standard PQ algorithm and without any finetuning leads to top-1 accuracies below $2 5 \%$ for all operating points, which illustrates the drift in accuracy occurring when compressing deep networks with standard methods (as opposed to our method).
|
| 147 |
+
|
| 148 |
+
Table 2: Best test top-1 accuracy on ImageNet for a given size budget (no architecture constraint).
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Size budget</td><td>Best previous published method</td><td>Ours</td></tr><tr><td>~1MB</td><td>70.90% (HAQ (Wang et al., 2018a), MobileNet v2)</td><td>64.01% (vanilla ResNet-18)</td></tr><tr><td>~5MB</td><td>71.74% (HAQ (Wang et al.,2018a), MobileNet v1)</td><td>76.12% (semi-sup.ResNet-50)</td></tr><tr><td>~10 MB</td><td>75.30% (HAQ (Wang et al.,2018a), ResNet-50)</td><td>77.85% (semi-sup.ResNet-50)</td></tr></table>
|
| 151 |
+
|
| 152 |
+
Table 3: Ablation study on ResNet-18 (test top-1 accuracy on ImageNet).
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Compression</td><td>Centroids k</td><td>No act + Distill</td><td>Act+Labels</td><td>Act + Distill (ours)</td></tr><tr><td rowspan="4">Small blocks</td><td>256</td><td>64.76</td><td>65.55</td><td>65.81</td></tr><tr><td>512</td><td>66.31</td><td>66.82</td><td>67.15</td></tr><tr><td>1024</td><td>67.28</td><td>67.53</td><td>67.87</td></tr><tr><td>2048</td><td>67.88</td><td>67.99</td><td>68.26</td></tr><tr><td rowspan="4">Large blocks</td><td>256</td><td>60.46</td><td>61.01</td><td>61.18</td></tr><tr><td>512</td><td>63.21</td><td>63.67</td><td>63.99</td></tr><tr><td>1024</td><td>64.74</td><td>65.48</td><td>65.72</td></tr><tr><td>2048</td><td>65.94</td><td>66.21</td><td>66.50</td></tr></table>
|
| 155 |
+
|
| 156 |
+
# 4.3 IMAGE DETECTION RESULTS
|
| 157 |
+
|
| 158 |
+
To demonstrate the generality of our method, we compress the Mask R-CNN architecture used for image detection in many real-life applications (He et al., 2017). We compress the backbone (ResNet50 FPN) in the small blocks compression regime and refer the reader to the open-sourced compressed model for the block sizes used in the various heads of the network. We use $k = 2 5 6$ centroids for every layer. We perform the fine-tuning (layer-wise and global) using distributed training on 8 V100 GPUs. Results are displayed in Table 4. We argue that this provides an interesting point of comparison for future work aiming at compressing such architectures for various applications.
|
| 159 |
+
|
| 160 |
+
# 5 CONCLUSION
|
| 161 |
+
|
| 162 |
+
We presented a quantization method based on Product Quantization that gives state of the art results on ResNet architectures and that generalizes to other architectures such as Mask R-CNN. Our compression scheme does not require labeled data and the resulting models are byte-aligned, allowing for efficient inference on CPU. Further research directions include testing our method on a wider variety of architectures. In particular, our method can be readily adapted to simultaneously compress and transfer ResNets trained on ImageNet to other domains. Finally, we plan to take the non-linearity into account to improve our reconstruction error.
|
| 163 |
+
|
| 164 |
+
Table 4: Compression results for Mask R-CNN (backbone ResNet-50 FPN) for $k = 2 5 6$ centroids (compression factor $2 6 \times$ ).
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Model</td><td>Size</td><td>Box AP</td><td>Mask AP</td></tr><tr><td>Non-compressed</td><td>170 MB</td><td>37.9</td><td>34.6</td></tr><tr><td>Compressed</td><td>6.51 MB</td><td>33.9</td><td>30.8</td></tr></table>
|
| 167 |
+
|
| 168 |
+
REFERENCES
|
| 169 |
+
David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. arXiv preprint arXiv:1905.02249, 2019.
|
| 170 |
+
Miguel A. Carreira-Perpi ´ n˜an and Yerlan Idelbayev. Model compression as constrained optimization, ´ with application to neural nets. part ii: quantization, 2017.
|
| 171 |
+
Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. A survey of model compression and acceleration for deep neural networks. CoRR, 2017.
|
| 172 |
+
Yoojin Choi, Mostafa El-Khamy, and Jungwon Lee. Towards the limit of network quantization. CoRR, 2016.
|
| 173 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. CoRR, 2015.
|
| 174 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In Conference on Computer Vision and Pattern Recognition, 2009.
|
| 175 |
+
Emily L Denton, Wojciech Zaremba, Joan Bruna, Yann LeCun, and Rob Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In Advances in Neural Information Processing Systems 27. 2014.
|
| 176 |
+
Tiezheng Ge, Kaiming He, Qifa Ke, and Jian Sun. Optimized product quantization. IEEE Trans. Pattern Anal. Mach. Intell., 2014.
|
| 177 |
+
Yunchao Gong, Liu Liu, Ming Yang, and Lubomir Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014.
|
| 178 |
+
Yunhui Guo. A survey on methods and theories of quantized neural networks. CoRR, 2018.
|
| 179 |
+
Song Han, Huizi Mao, and William J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. International Conference on Learning Representations, 2016.
|
| 180 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, 2015.
|
| 181 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. International Conference on Computer Vision (ICCV), 2017.
|
| 182 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. NIPS Deep Learning Workshop, 2014.
|
| 183 |
+
Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, Quoc V. Le, and Hartwig Adam. Searching for mobilenetv3. arXiv e-prints, 2019.
|
| 184 |
+
Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. Conference on Computer Vision and Pattern Recognition, 2017.
|
| 185 |
+
Forrest Iandola, Song Han, Matthew W. Moskewicz, Khalid Ashraf, William Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with $5 0 \mathrm { x }$ fewer parameters and $\mathrm { i 0 . 5 m b }$ model size. CoRR, 2016.
|
| 186 |
+
Herve Jegou, Matthijs Douze, and Cordelia Schmid. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011.
|
| 187 |
+
Herve J ´ egou, Matthijs Douze, and Cordelia Schmid. Product Quantization for Nearest Neighbor ´ Search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011.
|
| 188 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems. 2012.
|
| 189 |
+
|
| 190 |
+
Yann LeCun, John S. Denker, and Sara A. Solla. Optimal brain damage. In Advances in Neural Information Processing Systems, 1990.
|
| 191 |
+
|
| 192 |
+
Fengfu Li and Bin Liu. Ternary weight networks. CoRR, 2016.
|
| 193 |
+
|
| 194 |
+
Xiaofan Lin, Cong Zhao, and Wei Pan. Towards accurate binary convolutional neural network. CoRR, 2017.
|
| 195 |
+
|
| 196 |
+
Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient convolutional networks through network slimming. International Conference on Computer Vision, 2017.
|
| 197 |
+
|
| 198 |
+
Raphael Gontijo Lopes, Stefano Fenu, and Thad Starner. Data-free knowledge distillation for deep neural networks, 2017.
|
| 199 |
+
|
| 200 |
+
Jian-Hao Luo, Jianxin Wu, and Weiyao Lin. Thinet: A filter level pruning method for deep neural network compression. CoRR, 2017.
|
| 201 |
+
|
| 202 |
+
Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet V2: practical guidelines for efficient CNN architecture design. CoRR, 2018.
|
| 203 |
+
|
| 204 |
+
Dhruv Mahajan, Ross B. Girshick, Vignesh Ramanathan, Kaiming He, Manohar Paluri, Yixuan Li, Ashwin Bharambe, and Laurens van der Maaten. Exploring the limits of weakly supervised pretraining. CoRR, 2018.
|
| 205 |
+
|
| 206 |
+
Mark D. McDonnell. Training wide residual networks for deployment using a single bit for each weight, 2018.
|
| 207 |
+
|
| 208 |
+
Asit K. Mishra and Debbie Marr. Apprentice: Using knowledge distillation techniques to improve low-precision network accuracy. CoRR, 2017.
|
| 209 |
+
|
| 210 |
+
Asit K. Mishra, Eriko Nurvitadhi, Jeffrey J. Cook, and Debbie Marr. WRPN: wide reduced-precision networks. CoRR, 2017.
|
| 211 |
+
|
| 212 |
+
Mohammad Norouzi and David J Fleet. Cartesian k-means. In Conference on Computer Vision and Pattern Recognition, 2013.
|
| 213 |
+
|
| 214 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, 2016.
|
| 215 |
+
|
| 216 |
+
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, 2018.
|
| 217 |
+
|
| 218 |
+
Oran Shayer, Dan Levi, and Ethan Fetaya. Learning discrete weights using the local reparameterization trick. CoRR, 2017.
|
| 219 |
+
|
| 220 |
+
Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks, 2019.
|
| 221 |
+
|
| 222 |
+
Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. The new data and new challenges in multimedia research. CoRR, 2015.
|
| 223 |
+
|
| 224 |
+
Frederick Tung and Greg Mori. Deep neural network compression by in-parallel pruningquantization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018.
|
| 225 |
+
|
| 226 |
+
Kuan Wang, Zhijian Liu, Yujun Lin andx Ji Lin, and Song Han. HAQ: hardware-aware automated quantization. CoRR, 2018a.
|
| 227 |
+
|
| 228 |
+
Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. Haq: hardware-aware automated quantization. arXiv preprint arXiv:1811.08886, 2018b.
|
| 229 |
+
|
| 230 |
+
Saining Xie, Ross Girshick, Piotr Dollar, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Conference on Computer Vision and Pattern Recognition, 2017.
|
| 231 |
+
|
| 232 |
+
I. Zeki Yalniz, Herve J ´ egou, Kan Chen, Manohar Paluri, and Dhruv Mahajan. Billion-scale semi- ´ supervised learning for image classification. arXiv e-prints, 2019.
|
| 233 |
+
|
| 234 |
+
Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. CoRR, 2017.
|
| 235 |
+
|
| 236 |
+
Aojun Zhou, Anbang Yao, Yiwen Guo, Lin Xu, and Yurong Chen. Incremental network quantization: Towards lossless cnns with low-precision weights. CoRR, 2017.
|
| 237 |
+
|
| 238 |
+
Shuchang Zhou, Zekun Ni, Xinyu Zhou, He Wen, Yuxin Wu, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. CoRR, 2016.
|
| 239 |
+
|
| 240 |
+
Chenzhuo Zhu, Song Han, Huizi Mao, and William J. Dally. Trained ternary quantization. CoRR, 2016.
|
| 241 |
+
|
| 242 |
+
Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V. Le. Learning transferable architectures for scalable image recognition. CoRR, 2017.
|
md/train/rJg6ssC5Y7/rJg6ssC5Y7.md
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DEEPOBS: A DEEP LEARNING OPTIMIZER BENCHMARK SUITE
|
| 2 |
+
|
| 3 |
+
Frank Schneider, Lukas Balles & Philipp Hennig
|
| 4 |
+
|
| 5 |
+
University of Tubingen and Max Planck Institute for Intelligent Systems ¨ Tubingen, Germany ¨ {frank.schneider,lukas.balles, ph}@tue.mpg.de
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
There is significant past and ongoing research on optimization methods for deep learning. Yet, perhaps surprisingly, there is no generally agreed-upon protocol for the quantitative and reproducible evaluation of such optimizers. We suggest routines and benchmarks for stochastic optimization, with special focus on the unique aspects of deep learning, such as stochasticity, tunability and generalization. As the primary contribution, we present DEEPOBS, a Python package of deep learning optimization benchmarks. The package addresses key challenges in the quantitative assessment of stochastic optimizers, and automates most steps of benchmarking. The library includes a wide and extensible set of ready-to-use realistic optimization problems, such as training Residual Networks for image classification on IMAGENET or character-level language prediction models, as well as popular classics like MNIST and CIFAR-10. The package also provides realistic baseline results for the most popular optimizers on these test problems, ensuring a fair comparison to the competition when benchmarking new optimizers, and without having to run costly experiments. It comes with output back-ends that directly produce LATEX code for inclusion in academic publications. It supports TENSORFLOW and is available open source.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
As deep learning has become mainstream, research on aspects like architectures (Graves et al., 2014; He et al., 2016; Szegedy et al., 2017; Vaswani et al., 2017; Sabour et al., 2017) and hardware (Ovtcharov et al., 2015; Chen et al., 2016; Reagen et al., 2016; Jouppi, 2016) has exploded, and helped professionalize the field. In comparison, the optimization routines used to train deep nets have arguable changed only little. Comparably simple first-order methods like SGD (Robbins & Monro, 1951), its momentum variants (MOMENTUM) (Polyak, 1964; Nesterov, 1983) and ADAM (Kingma & Ba, 2015) remain standards (Goodfellow et al., 2016; Karpathy, 2017). The low practical relevance of more advanced optimization methods is not for lack of research, though. There is a host of papers proposing new ideas for acceleration of first-order methods (Duchi et al., 2011; Tieleman & Hinton, 2012; Zeiler, 2012; Dozat, 2016; Bello et al., 2017; Loshchilov & Hutter, 2017; Reddi et al., 2018), incorporation of second-order information (Martens, 2010; Martens & Grosse, 2015; Botev et al., 2017; Zhang et al., 2017; Chen et al., 2018), and automating optimization (Schaul et al., 2013b; Mahsereci & Hennig, 2017; Rolinek & Martius, 2018), to name just a few. One problem is that these methods are algorithmically involved and difficult to reproduce by practitioners. If they are not provided in packages for popular frameworks like TENSORFLOW, PYTORCH etc., they get little traction. Another problem, which we hope to address here, is that new optimization routines are often not convincingly compared to simpler alternatives in research papers, so practitioners are left wondering which of the many new choices is the best (and which ones even really work in the first place).
|
| 14 |
+
|
| 15 |
+
Designing an empirical protocol for deep learning optimizers is not straightforward, and the corresponding experiments can be time-consuming. This is partly due to the idiosyncrasies of the domain:
|
| 16 |
+
|
| 17 |
+
• Generalization: While the optimization algorithm (should) only ever see the training-set, the practitioner cares about performance of the trained model on the test set. Worse, in some important application domains, the optimizer’s loss function is not the objective we ultimately care about. For instance in image classification, the real interest may be in the percentage of correctly labeled images, the accuracy. Since this 0-1 loss is infeasible in practice (Marcotte & Savard, 1992), a surrogate loss function is used instead. So which score should actually be presented in a comparison of optimizers? Train loss, because that is what the optimizer actually works on; test loss, because an over-fitting optimizer is useless, or test accuracy, because that’s what the human user cares about?
|
| 18 |
+
|
| 19 |
+
• Stochasticity: Sub-sampling (batching) the data-set to compute estimates of the loss function and its gradient introduces stochasticity. Thus, when an optimizer is run only once on a given problem, its performance may be misleading due to random fluctuations. The same stochasticity also causes many optimization algorithms to have one or several tuning parameters (learning rates, etc.). How should an optimizer with two free parameter be compared in a fair way with one that has only one, or even no free parameters?
|
| 20 |
+
|
| 21 |
+
• Realistic Settings, Fair Competition: There is a widely-held belief that popular standards like MNIST and CIFAR-10 are too simplistic to serve as a realistic place-holder for a contemporary combination of large-scale data set and architecture. While this worry is not unfounded, researchers, ourselves included, have sometimes found it hard to satisfy the demands of reviewers for ever new data sets and architectures. Finding and preparing such data sets and building a reasonable architecture for them is time-consuming for researchers who want to focus on their novel algorithm. Even when this is done, one then has to not just run one’s own algorithm, but also various competing baselines, like SGD, MOMENTUM, ADAM, etc. This step does not just cost time, it also poses a risk of bias, as the competition invariably receives less care than one’s own method. Reviewers and readers can never be quite sure that an author has not tried a bit too much to make their own method look good, either by choosing a convenient training problem, or by neglecting to tune the competition.
|
| 22 |
+
|
| 23 |
+
To address these problems, we propose an extensible, open-source benchmark specifically for optimization methods on deep learning architectures. We make the following three contributions:
|
| 24 |
+
|
| 25 |
+
• A protocol for benchmarking stochastic optimizers. Section 2 discusses and recommends best practices for the evaluation of deep learning optimizers. We define three key performance indicators: final performance, speed, and tunability, and suggest means of measuring all three in practice. We provide evidence that it is necessary to show the results of multiple runs in order to get a realistic assessment. Finally, we strongly recommend reporting both loss and accuracy, for both training and test set, when demonstrating a new optimizer as there is no obvious way those four learning curves are connected in general.
|
| 26 |
+
|
| 27 |
+
DEEPOBS1, a deep learning optimizer benchmark suite. We have distilled the above ideas into an open-source python package, written in TENSORFLOW (Abadi et al., 2015), which automates most of the steps presented in section 2. The package currently provides over twenty off-the-shelf test problems across four application domains, including image classification and natural language processing, and this collection can be extended and adapted as the field makes progress. The test problems range in complexity from stochastic two dimensional functions to contemporary deep neural networks capable of delivering near state-of-the-art results on data sets such as IMAGENET. The package is easy to install in python, using the pip toolchain. It automatically downloads data sets, sets up models, and provides a back-end to automatically produce $\mathrm { I A T _ { E } X }$ code that can directly be included in academic publications. This automation does not just save time, it also helps researchers to create reproducible, comparable, and interpretable results.
|
| 28 |
+
|
| 29 |
+
• Benchmark of popular optimizers From the collection of test problems, two sets, of four simple (“small”) and four more demanding (“large”) problems, respectively, are selected as a core set of benchmarks. Researchers can design their algorithm in rapid iterations on the simpler set, then test on the more demanding set. We argue that this protocol saves time, while also reducing the risk of over-fitting in the algorithm design loop. The package also provides realistic baselines results for the most popular optimizers on those test problems.
|
| 30 |
+
|
| 31 |
+
In Section 4 we report on the performance of SGD, SGD with momentum (MOMENTUM) and ADAM on the small and large benchmarks (this also demonstrates the output of the benchmark). For each optimizer we perform an exhaustive but realistic hyperparameter search. The best performing results are provided with DEEPOBS and can be used as a fair performance metric for new optimizers without the need to compute these baselines again. We invite the authors of other algorithms to add their own method to the benchmark (via a git pull-request). We hope that the benchmark will offer a common platform, allowing researchers to publicise their algorithms, giving practitioners a clear view on the state of the art, and helping the field to more rapidly make progress.
|
| 32 |
+
|
| 33 |
+
# 1.1 RELATED WORKS
|
| 34 |
+
|
| 35 |
+
To our knowledge, there is currently no commonly accepted benchmark for optimization algorithms that is well adapted to the deep learning setting. This impression is corroborated by a more or less random sample of recent research papers on deep learning optimization (Duchi et al., 2011; Zeiler, 2012; Kingma & Ba, 2015; Martens & Grosse, 2015; Dozat, 2016; Bello et al., 2017; Loshchilov & Hutter, 2017; Reddi et al., 2018), whose empirical sections follow no joint standard (beyond a popularity of the MNIST data set). There are a number of existing benchmarks for deep learning as such. However, they do not focus on the optimizer. Instead, they are either framework or hardwarespecific, or cover deep learning as a holistic process, wrapping together architecture, hardware and training procedure, The following are among most popular ones:
|
| 36 |
+
|
| 37 |
+
DAWNBench The task in this challenge is to train a model for IMAGENET, CIFAR-10 or SQUAD (Rajpurkar et al., 2018) as quickly as possible to a specified validation accuracy, tuning the entire tool-chain from architecture to hardware and optimizer (Coleman et al., 2017).
|
| 38 |
+
|
| 39 |
+
MLPerf is another holistic benchmark similar to DAWNBench. It has two different rule sets; only the ‘open’ set allows a choice of optimization algorithm (MLPerf, 2018).
|
| 40 |
+
|
| 41 |
+
Deep Learning Frameworks (Comparison) compares runtimes of different high-level frameworks (Microsoft Machine Learning, 2018).
|
| 42 |
+
|
| 43 |
+
DLBS is a benchmark focused on the performance of deep learning models on various hardware systems with various software (Hewlett Packard Enterprise, 2017).
|
| 44 |
+
|
| 45 |
+
DeepBench tests the speed of hardware for the low-level operations of deep learning, like matrix products and convolutions (Baidu Research, 2016).
|
| 46 |
+
|
| 47 |
+
Fathom is another hardware-centric benchmark, which among other things assesses how computational resources are spent (Adolf et al., 2016).
|
| 48 |
+
|
| 49 |
+
TBD focuses on the performance of three deep learning frameworks (Zhu et al., 2018).
|
| 50 |
+
|
| 51 |
+
None of these benchmarks are good test beds for optimization research. Schaul et al. (2013a) defined unit tests for stochastic optimization. In contrast to the present work, they focus on small-scale problems like quadratic bowls and cliffs. In the context of deep learning, these problems provide unit tests, but do not give a realistic impression of an algorithm’s performance in practice.
|
| 52 |
+
|
| 53 |
+
# 2 BENCHMARKING DEEP LEARNING OPTIMIZERS
|
| 54 |
+
|
| 55 |
+
This section expands the discussion from section 1 of design desiderata for a good benchmark protocol, and proposes ways to nevertheless arrive at an informative, fair, and reproducible benchmark.
|
| 56 |
+
|
| 57 |
+
# 2.1 STOCHASTICITY
|
| 58 |
+
|
| 59 |
+
The optimizer’s performance in a concrete training run is noisy, due to the random sampling of mini-batches and initial parameters. There is an easy remedy, which nevertheless is not universally adhered to: Optimizers should be run on the same problem repeatedly with different random seeds, and all relevant quantities should be reported as mean and standard deviation of these samples. This allows judging the statistical significance of small performance differences between optimizers, and exposes the “variability” of performance of an optimizer on any given problem. The obvious reason why researchers are reluctant to follow this standard is that it requires substantial computational effort. DEEPOBS alleviates this issue in two ways: It provides functionality to conveniently run multiple runs of the same setting with different seeds. More importantly, it provides stored baselines of popular optimizers, freeing computational resources to collect statistics rather than baselines.
|
| 60 |
+
|
| 61 |
+
# 2.2 CHOICE OF PERFORMANCE METRIC
|
| 62 |
+
|
| 63 |
+
Training a machine learning system is more than a pure optimization problem. The optimizers’ immediate objective is training loss, but the users’ interest is in generalization performance, as estimated on a held-out test set. It has been observed repeatedly that in deep learning, different optimizers of similar training-set performance can have surprisingly different generalization (e.g. Wilson et al. (2017)). Moreover, the loss function is regularly just a surrogate for the metric the user is ultimately interested in. In classification problems, for example, we are interested in classification accuracy, but this is infeasible to optimize directly. Thus, there are up to four relevant metrics to consider: training loss, test loss, training accuracy and test accuracy. We strongly recommend reporting all four of these to give a comprehensive assessment of a deep learning optimizer. For hyperparameter tuning, we use test accuracy or, if that is not available, test loss, as the criteria. We also use them as the performance metrics in Table 2.
|
| 64 |
+
|
| 65 |
+
For empirical plots, many authors compute train loss (or accuracy) only on mini-batches of data, since these are computed during training anyway. But these mini-batch quantities are subject to significant noise. To get a decent estimate of the training-set performance, whenever we evaluate on the test set, we also evaluate on a larger chunk of training data, which we call a train eval set. In addition to providing a more accurate estimate, this allows us to “switch” the architecture to evaluation mode (e.g. dropout is not used during evaluation).
|
| 66 |
+
|
| 67 |
+
# 2.3 MEASURING SPEED
|
| 68 |
+
|
| 69 |
+
Relevant in practice is not only the quality of a solution, but also the time required to reach it. A fast optimizer that finds a decent albeit imperfect solution using a fraction of other methods’ resources can be very relevant in practice. Unfortunately, since learning curves have no parametric form, there is no uniquely correct way to define “time to convergence”. In DEEPOBS, we take a pragmatic approach and measure the time it takes to reach an “acceptable” convergence performance, which is individually defined for each test problem from the baselines SGD, MOMENTUM and ADAM each with their best hyperparameter setting.
|
| 70 |
+
|
| 71 |
+
Arguably the most relevant measure of speed would be the wall-clock time to reach this convergence performance. However, wall-clock runtime has well-known drawbacks, such as dependency on hardware or weak reproducibility. So many authors report performance against gradient evaluations, since these often dominate the total computational costs. However, thiscan hide large per-iteration overhead. We recommend first measuring wall-clock time of both the new competitor and SGD on one of the small test problems for a few iterations, and computing their ratio. This computation, which can be done automatically using DEEPOBS, can be done sequentially on the same hardware. One can then report performance against the products of iterations and per-iteration cost relative to SGD.
|
| 72 |
+
|
| 73 |
+
For many first-order optimization methods, such as SGD, MOMENTUM or ADAM, the choice of hyperparameters does not affect the runtime of the algorithm. However, more evolved optimization methods, e.g. ones that dynamically estimate the Hessian, the hyperparameters can influence the runtime significantly. In those cases, it is suggested to repeat the runtime estimate for different hyperparameters.
|
| 74 |
+
|
| 75 |
+
# 2.4 HYPERPARAMETER TUNING
|
| 76 |
+
|
| 77 |
+
Almost all deep learning optimizers expose tunable hyperparameters, e.g., step sizes or averaging constants. The ease of tuning these hyperparameters is a relevant characteristic of an optimization method. How does one “fairly” compare optimizers with tunable hyperparameters?
|
| 78 |
+
|
| 79 |
+
A full analysis of the effects of an optimizer’s hyperparameters on its performance and speed is tedious, especially since they often interact. Even a simpler sensitivity analysis requires a large number of optimization runs, which are infeasible for most users. Such analyses also do not take into account if hyperparameters have default values that work for almost all optimization problems and therefore require no tuning in general. Instead we recommend that authors find and report the bestperforming hyperparameters for each test problem. Since DEEPOBS covers multiple test problems, the spread of these best choices gives a good impression of the required tuning. Additionally, we suggest reporting the relative performance of the hyperparameter settings used during this tuning process (Figure 3 shows an example). Doing so yields a characterization of tunability without additional computations.
|
| 80 |
+
|
| 81 |
+
For the baselines presented in this paper, we chose a simple log-grid search to tune the learning rate. While this is certainly not an optimal tuning method, and more sophisticated methods exists (e.g. (Bergstra & Bengio, 2012), (Snoek et al., 2012)), it is nevertheless used often in practice and reveals interesting properties about the optimizers and their tunability. Other tuning methods can be used with DEEPOBS however, this would require recomputing the baselines as well.
|
| 82 |
+
|
| 83 |
+
DEEPOBS supports authors in adhering to good scientific practice by removing various moral hazards. The baseline results for popular optimizers (whose hyperparameters have been tuned by us or, in the future, the very authors of the competing methods) avoid “starving” the competition of attention. When using different hyperparameter tuning methods, it is necessary to allocate the same computational budget for all methods in particular when comparing optimization methods of varying number of hyperparameters.
|
| 84 |
+
|
| 85 |
+
The fixed set of test problems provided by the benchmark makes it impossible to (knowingly or subconsciously) cherry-pick problems tuned to a new method. And finally, the fact that the benchmark spreads over multiple such problem sets constitutes a mild but natural barrier to “overfit” the optimizer method to established data sets and architectures (like MNIST).
|
| 86 |
+
|
| 87 |
+
# 3 BENCHMARK SUITE OVERVIEW
|
| 88 |
+
|
| 89 |
+
DEEPOBS provides the full stack required for rapid, reliable, and reproducible benchmarking of deep learning optimizers. At the lowest level, a data loading (§3.1) module automatically loads and preprocesses data sets downloaded from the net. These are combined with a list of models $( \ S 3 . 2 )$ to define test problems. At the core of the library, runners (§3.3) take care of the actual training, and log a multitude of statistics, e.g., training loss or test accuracy. Baselines $( \ S 3 . 4 )$ are provided for a collection of competitors. They currently include the popular choices SGD (raw, and with MOMENTUM) and ADAM, but we invite authors of other methods to contribute their own. The visualization (§3.6) script maps the results to LATEX output.
|
| 90 |
+
|
| 91 |
+
Future releases of DEEPOBS will include a version number that follows the pattern MAJOR.MINOR.PATCH, where MAJOR versions will differ in the selection of the benchmark sets, MINOR versions signify changes that could affect the results. PATCHES will not affect the benchmark results. All results obtained with the same MAJOR.MINOR version of DEEPOBS will be directly comparable, all results with the same MAJOR version will compare results on the same problems.
|
| 92 |
+
|
| 93 |
+
We now give a brief overview of the functionality; the full documentation can be found online.2
|
| 94 |
+
|
| 95 |
+

|
| 96 |
+
Figure 1: Illustration of the different steps implemented in the DEEPOBS package and their outputs. The color of each block highlights the way a user mostly interacts with this part. Blocks in $\bigcirc$ signify classes, those in $\bullet$ are used via command line scripts. . signals data packaged with DEEPOBS and
|
| 97 |
+
|
| 98 |
+
$\textcircled { \scriptsize { 1 } }$ denotes parts provided through template scripts.
|
| 99 |
+
|
| 100 |
+
# 3.1 DATA LOADING
|
| 101 |
+
|
| 102 |
+
DEEPOBS can automatically download and pre-process all necessary data sets.3 Excluding IMAGENET, the downloaded data sets require less than one GB of disk space.
|
| 103 |
+
|
| 104 |
+
The DEEPOBS data loading module then performs all necessary processing of the data sets to return inputs and outputs for the deep learning model (e.g. images and labels for image classification). This processing includes splitting, shuffling, batching and data augmentation. The data loading module can also be used to build new deep learning models that are not (yet) part of DEEPOBS.
|
| 105 |
+
|
| 106 |
+
# 3.2 MODELS
|
| 107 |
+
|
| 108 |
+
Together, data set and model define a loss function and thus an optimization problem. Table 1 provides an overview of the data sets and models included in DEEPOBS. We selected problems for diversity of task as well as the difficulty of the optimization problem itself. The list includes popular image classification models on data sets like MNIST, CIFAR-10 or IMAGENET, but also models for natural language processing and generative models. Additionally, three two-dimensional problems and an ill-conditioned quadratic problem are included. These simple tests can be used as illustrative toy problems to highlight properties of an algorithm and perform sanity-checks. Over time, we plan to expand this list when hardware and research progress renders small problems out of date, and introduces new research directions and more challenging problems.
|
| 109 |
+
|
| 110 |
+
Table 1: Overview of the test problems included in DEEPOBS with their properties showing if the test problem includes convolutional layers $( C o n \nu )$ , recurrent neural network cells (RNN), dropout layers $( D r o p )$ , batch normalization layers $( B N )$ or weight decay $( W D )$ . The first column highlights the machine learning task that the model performs, i.e. image classification $\bigcirc$ , generative model $\bullet$ , natural language processing $\textcircled { \scriptsize { 1 } }$ or problems where the loss function is given explicitly $\bigcirc$ . Test problems marked in and are part of the small and large benchmark set, respectively.
|
| 111 |
+
|
| 112 |
+
<table><tr><td></td><td>Data set</td><td>Model</td><td>Description</td><td>Conv</td><td>RNN</td><td>DropBNWD</td><td></td><td></td></tr><tr><td>.</td><td></td><td>Noisy Beale</td><td>Noisyversion of the Beale function</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>.</td><td>2D</td><td>Noisy Branin</td><td>Noisy version of the Branin function (Branin,1972)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>.</td><td></td><td>Noisy Rosenbrock</td><td>Noisy version of the Rosenbrock function (Rosenbrock,1960)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>.</td><td>Quadratic</td><td>Deep</td><td>100-dimensional ill-conditioned noisy quadratic(Chaudhari etal.,2017)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>Log.Regr.</td><td>Logistic regression</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>MNIST</td><td>MLP</td><td>Four layer fully-connected network</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>(Lecun et al., 1998)</td><td>2c2d</td><td>Two conv.and two fully-connected layers</td><td>√</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>VAE</td><td>Variational Autoencoder</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>FASHION</td><td>Log.Regr.</td><td>Logistic regression</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>MNIST</td><td>MLP</td><td>Four layer fully-connected network</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>(Xiao et al., 2017)</td><td>2c2d</td><td>Two conv. and two fully-connected layers</td><td>√</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>VAE</td><td>Variational Autoencoder</td><td></td><td></td><td>√</td><td></td><td></td></tr><tr><td></td><td>CIFAR-10</td><td>3c3d</td><td>Threeconv.and three fully-connected layers</td><td>√</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>(Krizhevsky & Hinton, 2009)</td><td>VGG 16</td><td>Adapted version of VGG16 (Simonyan& Zisserman,2014)</td><td></td><td></td><td>√</td><td></td><td></td></tr><tr><td></td><td></td><td>VGG 19</td><td>Adapted version of VGG 19</td><td>√</td><td></td><td></td><td></td><td>√</td></tr><tr><td></td><td></td><td>3c3d</td><td>Threeconv.and three fully-connectedlayers</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>CIFAR-100</td><td>VGG 16</td><td>Adapted version of VGG 16</td><td>√</td><td></td><td></td><td></td><td>√</td></tr><tr><td></td><td>(Krizhevsky & Hinton,2009)</td><td>VGG 19</td><td>Adapted version of VGG19</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>All-CNN-C</td><td>The all convolutional net from Springenberg et al.(2015)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td>WideResNet-40-4</td><td>Wide Residual Network (Zagoruyko & Komodakis,2016)</td><td>√</td><td></td><td></td><td></td><td>√</td></tr><tr><td></td><td>SVHN</td><td>3c3d</td><td>Threeconv.and three fully-connected layers</td><td>√</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>(Netzer et al., 2011)</td><td>Wide ResNet-16-4</td><td>WideResidual Network</td><td>√</td><td></td><td></td><td>√</td><td>√</td></tr><tr><td></td><td>IMAGENET</td><td>VGG 16</td><td>VGG16</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>(Deng et al., 2009)</td><td>VGG 19</td><td>VGG19</td><td></td><td></td><td>√</td><td></td><td></td></tr><tr><td></td><td></td><td>Inception-v3</td><td>Inception-v3 network as described by Szegedy et al.(2016)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Tolstoi</td><td>CharRNN</td><td>Recurrent Neural Network for character-level language modeling</td><td></td><td>√</td><td>√</td><td></td><td></td></tr></table>
|
| 113 |
+
|
| 114 |
+
# 3.3 RUNNERS
|
| 115 |
+
|
| 116 |
+
The runners of the DEEPOBS package handle training and the logging of statistics measuring the optimizers performance. For optimizers following the standard TensorFlow optimizer API it is enough to provide the runners with a list of the optimizer’s hyperparameters. We provide a template for this, as well as an example of including a more sophisticated optimizer that can’t be described as a subclass of the TensorFlow optimizer API.
|
| 117 |
+
|
| 118 |
+
# 3.4 BASELINES
|
| 119 |
+
|
| 120 |
+
DEEPOBS also provides realistic baselines results for, currently, the three most popular optimizers in deep learning, SGD, MOMENTUM, and ADAM. These allow comparing a newly developed algorithm to the competition without computational overhead, and without risk of conscious or unconscious bias against the competition. Section 4 describes how these baselines were constructed and discusses their performance.
|
| 121 |
+
|
| 122 |
+
Baselines for further optimizers will be added when authors provide the optimizer’s code, assuming the method perform competitively. Currently, baselines are available for all test problems in the small and large benchmark set; we plan to provide baselines for the full set of models in the near future.
|
| 123 |
+
|
| 124 |
+
# 3.5 ESTIMATE RUNTIME
|
| 125 |
+
|
| 126 |
+
DEEPOBS provides an option to quickly estimate the runtime overhead of a new optimization method compared to SGD. It measures the ratio of wall-clock time between the new optimizer and SGD. By default this ratio is measured on five runs each, for three epochs, on a fully connected network on MNIST. However, this can be adapted to a setting which fairly evaluates the new optimizer, as some optimizers might have a high initial cost that amortizes over many epochs.
|
| 127 |
+
|
| 128 |
+
# 3.6 VISUALIZATIONS
|
| 129 |
+
|
| 130 |
+
The DEEPOBS visualization module reduces the overhead for the preparation of results, and simultaneously standardizes the presentation, making it possible to include a comparably large amount of information in limited space. The module produces .tex files with pgfplots-code for all learning curves for the proposed optimizer as well as the most relevant baselines (section 4 includes an example of this output).
|
| 131 |
+
|
| 132 |
+
# 4 INSIGHTS FROM THE BASELINES
|
| 133 |
+
|
| 134 |
+
For the baseline results provided with DEEPOBS, we evaluate three popular deep learning optimizers (SGD, MOMENTUM and ADAM) on the eight test problems that are part of the small (problems P1 to P4) and large (problems P5 to P8) benchmark set (cf. Table 1 or the appendix). The experiments were done with version 1.1.0 of DEEPOBS. All experiments used 0.99 for the MOMENTUM parameter and default parameters for ADAM ( $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ , $\epsilon = 1 0 ^ { - 8 }$ ). The learning rate $\alpha$ was tuned for each optimizer and test problem individually, by evaluating on a logarithmic grid from $\alpha _ { \mathrm { m i n } } = 1 0 ^ { - 5 }$ to $\alpha _ { \mathrm { m a x } } = 1 0 ^ { 2 }$ with 36 samples. Once the best learning rate has been determined, we run those settings ten times with different random seeds. While we are using a log grid search, researchers are free to use any other hyperparameter tuning method, however this would require re-running the baselines as well.
|
| 135 |
+
|
| 136 |
+
Figure 2 shows the learning curves of the eight problems in the small and large benchmark set. Table 2 summarizes the results from both benchmark sets. We focus on three main observations, which corroborate widely-held beliefs and support the case for an extensive and standardized benchmark.
|
| 137 |
+
|
| 138 |
+
There is no optimal optimizer for all test problems. While ADAM compares favorably on most test problems, in some cases the other optimizers are considerably better. This is most notable on CIFAR-100, where MOMENTUM is significantly better then the other two.
|
| 139 |
+
|
| 140 |
+
The connection between the four learning metrics is non-trivial. Looking at P6 and P7 we note that the optimizers rank differently on train vs. test loss. However, there is no optimizerthat universally generalizes better than the others; the generalization performance is evidently problem-dependent. The same holds for the generalization from loss to accuracy (e.g. P3 or P6).
|
| 141 |
+
|
| 142 |
+
ADAM is somewhat easier to tune. Between the eight test problems, the optimal learning rate for each optimizer varies significantly. Figure 3 shows the final performance against learning rate for each of the eight test problems. There is no significant difference between the three optimizers in terms of their learning rate sensitivity. However, in most cases, the order of magnitude of the optimal learning rate for ADAM is in the order of $1 0 ^ { - 4 }$ and $1 0 ^ { - 3 }$ (with the exception of P1), while for SGD and MOMENTUM this spread is slightly larger.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 2: Learning curves for all eight test problems showing the performance of SGD, MOMENTUM, and ADAM produced with DEEPOBS.
|
| 146 |
+
|
| 147 |
+

|
| 148 |
+
Figure 3: Relative performance against learning rate for each test problem and optimizer. Top row shows test problems P1 to P4, bottom row the test problems P5 to P8. The optimizers are represented in the same color as in Figure 2, where $\bullet$ represents SGD, $\bigcirc$ represents MOMENTUM, and $\bullet$ the ADAM optimizer.
|
| 149 |
+
|
| 150 |
+
# 5 CONCLUSION
|
| 151 |
+
|
| 152 |
+
Deep learning continues to pose a challenging domain for optimization algorithms. Aspects like stochasticity and generalization make it challenging to benchmark optimization algorithms against each other. We have discussed best practices for experimental protocols, and presented the DEEPOBS package, which provide an open-source implementation of these standards. We hope that DEEPOBS can help researchers working on optimization for deep learning to build better algorithms, by simultaneously making the empirical evaluation simpler, yet also more reproducible and fair. By providing a common ground for methods to be compared on, we aim to speed up the development of deep-learning optimizers, and aid practitioners in their decision for an algorithm.
|
| 153 |
+
|
| 154 |
+
Table 2: DEEPOBS benchmark for the baseline optimizers, showing the performance, speed and tuneability measures for SGD, MOMENTUM and ADAM on all eight test problems. The performance is measured using the test accuracy in percent (when available, otherwise the test loss) and the speed using the number of iterations to reach the convergence performance. All numbers are averaged over ten runs with the same hyperparameter settings. The tuneability row indicates the best performing set of hyperparameters per test problem.
|
| 155 |
+
|
| 156 |
+
<table><tr><td rowspan=1 colspan=4>Test Problem SGD Momentum Adam</td></tr><tr><td></td><td rowspan=1 colspan=1>87.40</td><td rowspan=1 colspan=1>87.05</td><td rowspan=1 colspan=1>87.11</td></tr><tr><td></td><td rowspan=1 colspan=1> 51.1</td><td rowspan=1 colspan=1>70.5</td><td rowspan=1 colspan=1>39.9</td></tr><tr><td></td><td></td><td rowspan=1 colspan=1>α: 2.51e-03</td><td rowspan=1 colspan=1>αx: 3.98e-02</td></tr><tr><td></td><td></td><td rowspan=1 colspan=1>μ:0.99</td><td rowspan=1 colspan=1>β1:0.9</td></tr><tr><td></td><td></td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>β2:0.999</td></tr><tr><td></td><td></td><td></td><td rowspan=1 colspan=1>:1e-08</td></tr><tr><td></td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td><td rowspan=1 colspan=1>1.0</td></tr><tr><td></td><td rowspan=1 colspan=1>α: 3.98e-03</td><td rowspan=1 colspan=1>α: 2.51e-05</td><td rowspan=1 colspan=1>αr: 1.58e-04</td></tr><tr><td></td><td></td><td rowspan=1 colspan=1>μ:0.99</td><td rowspan=1 colspan=1>β1:0.9</td></tr><tr><td></td><td></td><td></td><td rowspan=1 colspan=1>β2:0.999</td></tr><tr><td></td><td></td><td></td><td rowspan=1 colspan=1>:1e-08</td></tr><tr><td></td><td rowspan=1 colspan=1>92.27 %40.6</td><td rowspan=1 colspan=1>92.14 %59.1</td><td rowspan=1 colspan=1>92.34 %40.1</td></tr><tr><td></td><td rowspan=1 colspan=1>α: 1.58e-01</td><td rowspan=1 colspan=1>α: 2.51e-03</td><td rowspan=1 colspan=1>α: 2.51e-04</td></tr><tr><td></td><td></td><td></td><td rowspan=1 colspan=1>β2:0.999</td></tr><tr><td></td><td></td><td></td><td rowspan=1 colspan=1>:1e-08</td></tr><tr><td></td><td rowspan=2 colspan=1>83.71 %42.5</td><td></td><td rowspan=1 colspan=1>84.75 %</td></tr><tr><td></td><td rowspan=1 colspan=1>40.7</td><td rowspan=1 colspan=1>36.0</td></tr><tr><td></td><td rowspan=1 colspan=1>α: 6.31e-02</td><td rowspan=1 colspan=1>α: 3.98e-04</td><td rowspan=1 colspan=1>αr: 3.98e-04</td></tr><tr><td></td><td></td><td rowspan=1 colspan=1>μ:0.99</td><td rowspan=1 colspan=1>β1:0.9</td></tr><tr><td></td><td></td><td rowspan=2 colspan=1></td><td></td></tr><tr><td></td><td></td><td rowspan=1 colspan=1>e:1e-08</td></tr></table>
|
| 157 |
+
|
| 158 |
+
<table><tr><td colspan="2">Test Problem</td><td>SGD</td><td>Momentum</td><td>Adam</td></tr><tr><td rowspan="2">P5 F-MNIST VAE</td><td>Performance Speed</td><td>23.80 1.0</td><td>59.23 1.0</td><td>23.07 1.0</td></tr><tr><td>Tuneability</td><td>Q: 3.98e-03</td><td>α: 1.00e-05 μ:0.99</td><td>Q: 1.58e-04 β1:0.9 β:0.999</td></tr><tr><td rowspan="2">P6 CIFAR-100 All CNN C</td><td>Performance Speed</td><td>57.06 % 128.7</td><td>60.33 % 72.8</td><td>:1e-08 56.15 % 152.6</td></tr><tr><td>Tuneability</td><td>α: 1.58e-01</td><td>α: 3.98e-03 μ:0.99</td><td>α: 1.00e-03 β1:0.9 β2: 0.999 :1e-08</td></tr><tr><td rowspan="2">P7 SVHN Wide ResNet</td><td>Performance Speed</td><td>95.37 % 28.3</td><td>95.53 % 10.8</td><td>95.25 % 12.1</td></tr><tr><td>Tuneability</td><td>α: 2.51e-02</td><td>Q: 6.31e-04 μ:0.99</td><td>α: 1.58e-04 β1:0.9 :0.999</td></tr><tr><td rowspan="2">P8 TOLSTOI Char RNN</td><td>Performance Speed</td><td>62.07 % 47.7</td><td>61.30 % 88.0</td><td>:1e-08 61.23 % 62.8</td></tr><tr><td>Tuneability</td><td>α: 1.58e+00</td><td>α: 3.98e-02 μ:0.99</td><td>α: 2.51e-03 β1:0.9 :0.999 e: 1e-08</td></tr></table>
|
| 159 |
+
|
| 160 |
+
# ACKNOWLEDGMENTS
|
| 161 |
+
|
| 162 |
+
The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Frank Schneider and Lukas Balles. Lukas Balles and Philipp Hennig gratefully acknowledge support by the ERC action StG 757275 / PANAMA.
|
| 163 |
+
|
| 164 |
+
# REFERENCES
|
| 165 |
+
|
| 166 |
+
Mart´ın Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mane, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, ´ Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viegas, Oriol Vinyals, Pete Warden, Martin Wattenberg, ´ Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL https://www.tensorflow.org/.
|
| 167 |
+
|
| 168 |
+
Robert Adolf, Saketh Rama, Brandon Reagen, Gu-Yeon Wei, and David Brooks. Fathom: Reference workloads for modern deep learning methods. In IEEE International Symposium on Workload Characterization (IISWC), 2016.
|
| 169 |
+
|
| 170 |
+
Baidu Research. DeepBench. online, 2016. URL https://github.com/baidu-research/ DeepBench.
|
| 171 |
+
|
| 172 |
+
Irwan Bello, Barret Zoph, Vijay Vasudevan, and Quoc V. Le. Neural optimizer search with reinforcement learning. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017.
|
| 173 |
+
|
| 174 |
+
James Bergstra and Yoshua Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13(Feb):281–305, 2012.
|
| 175 |
+
|
| 176 |
+
Aleksandar Botev, Hippolyt Ritter, and David Barber. Practical Gauss-Newton optimisation for deep learning. In Proceedings of the 34th International Conference on Machine Learning (ICML), 2017.
|
| 177 |
+
|
| 178 |
+
Franklin H Branin. Widely convergent method for finding multiple solutions of simultaneous nonlinear equations. IBM Journal of Research and Development, 16(5):504–522, 1972.
|
| 179 |
+
|
| 180 |
+
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. The International Conference on Learning Representations (ICLR), 2017.
|
| 181 |
+
|
| 182 |
+
Sheng-Wei Chen, Chun-Nan Chou, and Edward Chang. BDA-PCH: Block-diagonal approximation of positive-curvature Hessian for training neural networks. arXiv preprint arXiv:1802.06502, 2018.
|
| 183 |
+
|
| 184 |
+
Yu-Hsin Chen, Tushar Krishna, Joel S Emer, and Vivienne Sze. Eyeriss: An energy-efficient reconfigurable accelerator for deep convolutional neural networks. International Solid-Sate Circuits Conference, ISSCC, 52(1):127–138, 2016.
|
| 185 |
+
|
| 186 |
+
Cody Coleman, Deepak Narayanan, Daniel Kang, Tian Zhao, Jian Zhang, Luigi Nardi, Peter Bailis, Kunle Olukotun, Chris Re, and Matei Zaharia. DAWNBench: An end-to-end deep learning ´ benchmark and competition. NIPS ML Systems Workshop, 2017.
|
| 187 |
+
|
| 188 |
+
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 (CVPR), 2009.
|
| 189 |
+
|
| 190 |
+
Timothy Dozat. Incorporating Nesterov Momentum into Adam. ICLR workshop paper, 2016.
|
| 191 |
+
|
| 192 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research, 12:2121–2159, 2011.
|
| 193 |
+
|
| 194 |
+
Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016.
|
| 195 |
+
|
| 196 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural Turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 197 |
+
|
| 198 |
+
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 (CVPR), 2016.
|
| 199 |
+
|
| 200 |
+
Hewlett Packard Enterprise. Deep learning benchmarking suite (DLBS). Online, 2017. URL https://hewlettpackard.github.io/dlcookbook-dlbs/.
|
| 201 |
+
|
| 202 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Comput., 9(8):1735– 1780, 1997.
|
| 203 |
+
|
| 204 |
+
Norm Jouppi. Google supercharges machine learning tasks with TPU custom chip, 2016. URL https://cloudplatform.googleblog.com/2016/05/ Google-supercharges-machine-learning-tasks-with-custom-chip. html. Accessed 24. Sep. 2018.
|
| 205 |
+
|
| 206 |
+
Andrej Karpathy. A peek at trends in machine learning, April 2017. URL https://medium.com/ @karpathy/a-peek-at-trends-in-machine-learning-ab8a1085a106. Accessed 24. Sep. 2018.
|
| 207 |
+
|
| 208 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. Proceedings of 3rd International Conference on Learning Representations (ICLR), 2015.
|
| 209 |
+
|
| 210 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. Proceedings of the International Conference on Learning Representations (ICLR), 2014.
|
| 211 |
+
|
| 212 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 213 |
+
|
| 214 |
+
Yann Lecun, Leon Bottou, Y Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86:2278 – 2324, 12 1998. doi: 10.1109/5.726791.
|
| 215 |
+
|
| 216 |
+
Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in Adam. arXiv preprint arXiv:1711.05101, 2017.
|
| 217 |
+
|
| 218 |
+
Maren Mahsereci and Philipp Hennig. Probabilistic line searches for stochastic optimization. Journal of Machine Learning Research, 18(119):1–59, 2017.
|
| 219 |
+
|
| 220 |
+
Patrice Marcotte and Gilles Savard. Novel approaches to the discrimination problem. Zeitschrift fur¨ Operations Research, 36(6):517–545, 1992.
|
| 221 |
+
|
| 222 |
+
James Martens. Deep learning via Hessian-free optimization. In Proceedings of the 27th International Conference on International Conference on Machine Learning (ICML), 2010.
|
| 223 |
+
|
| 224 |
+
James Martens and Roger Grosse. Optimizing neural networks with Kronecker-factored approximate curvature. In Proceedings of the 32nd International Conference on International Conference on Machine Learning (ICML), 2015.
|
| 225 |
+
|
| 226 |
+
Microsoft Machine Learning. Comparing deep learning frameworks: A rosetta stone approach, 2018. URL https://blogs.technet.microsoft.com/machinelearning/2018/03/ 14/comparing-deep-learning-frameworks-a-rosetta-stone-approach/.
|
| 227 |
+
|
| 228 |
+
MLPerf, 2018. URL https://mlperf.org/.
|
| 229 |
+
|
| 230 |
+
Yurii Nesterov. A method of solving a convex programming problem with convergence rate $\mathcal { O } ( 1 / k ^ { 2 } )$ , 1983. URL http://www.core.ucl.ac.be/{˜}nesterov/Research/ Papers/DAN83.pdf.
|
| 231 |
+
|
| 232 |
+
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, 2011.
|
| 233 |
+
|
| 234 |
+
Kalin Ovtcharov, Olatunji Ruwase, Joo-Young Kim, Jeremy Fowers, Karin Strauss, and Eric Chung. Accelerating deep convolutional neural networks using specialized hardware, February 2015.
|
| 235 |
+
|
| 236 |
+
Boris T. Polyak. Some methods of speeding up the convergence of iteration methods. USSR Computational Mathematics and Mathematical Physics, 4(5):1–17, 1964.
|
| 237 |
+
|
| 238 |
+
Pranav Rajpurkar, Robin Jia, and Percy Liang. Know what you don’t know: Unanswerable questions for SQuAD. arXiv preprint arXiv:1806.03822, 2018.
|
| 239 |
+
|
| 240 |
+
Brandon Reagen, Paul Whatmough, Robert Adolf, Saketh Rama, Hyunkwang Lee, Sae Kyu Lee, Jose Miguel Hern ´ andez-Lobato, Gu-Yeon Wei, and David Brooks. Minerva: Enabling low-power, ´ highly-accurate deep neural network accelerators. In Proceedings of the 43rd International Symposium on Computer Architecture, ISCA, pp. 267–278. IEEE Press, 2016.
|
| 241 |
+
|
| 242 |
+
Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. On the convergence of Adam and beyond. In International Conference on Learning Representations (ICLR), 2018.
|
| 243 |
+
|
| 244 |
+
Herbert Robbins and Sutton Monro. A Stochastic Approximation Method. The Annals of Mathematical Statistics, 22(3):400–407, 1951.
|
| 245 |
+
|
| 246 |
+
Michal Rolinek and Georg Martius. L4: Practical loss-based stepsize adaptation for deep learning. arXiv preprint arXiv:1802.05074, 2018.
|
| 247 |
+
|
| 248 |
+
Howard H. Rosenbrock. An automatic method for finding the greatest or least value of a function. The Computer Journal, 3(3):175–184, 1960.
|
| 249 |
+
|
| 250 |
+
Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. Dynamic routing between capsules. In Advances in Neural Information Processing Systems (NIPS), pp. 3856–3866, 2017.
|
| 251 |
+
|
| 252 |
+
Tom Schaul, Ioannis Antonoglou, and David Silver. Unit tests for stochastic optimization. arXiv preprint arXiv:1312.6055, 2013a.
|
| 253 |
+
|
| 254 |
+
Tom Schaul, Sixin Zhang, and Yann LeCun. No more pesky learning rates. In Proceedings of the 30th International Conference on Machine Learning (ICML), 2013b.
|
| 255 |
+
|
| 256 |
+
K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, 2014.
|
| 257 |
+
|
| 258 |
+
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.
|
| 259 |
+
|
| 260 |
+
Jost T. Springenberg, Alexey Dosovitskiy, Thomas Brox, and Martin Riedmiller. Striving for simplicity: The all convolutional net. In ICLR (workshop track), 2015.
|
| 261 |
+
|
| 262 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition (CVPR), pp. 2818–2826, 2016.
|
| 263 |
+
|
| 264 |
+
Christian Szegedy, Sergey Ioffe, Vincent Vanhoucke, and Alexander A Alemi. Inception-v4, InceptionResNet and the impact of residual connections on learning. In AAAI, volume 4, pp. 12, 2017.
|
| 265 |
+
|
| 266 |
+
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26–31, 2012.
|
| 267 |
+
|
| 268 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS), pp. 5998–6008, 2017.
|
| 269 |
+
|
| 270 |
+
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in Neural Information Processing Systems, pp. 4148–4158, 2017.
|
| 271 |
+
|
| 272 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
|
| 273 |
+
|
| 274 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
|
| 275 |
+
|
| 276 |
+
Matthew D. Zeiler. ADADELTA: An adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
|
| 277 |
+
|
| 278 |
+
Huishuai Zhang, Caiming Xiong, James Bradbury, and Richard Socher. Block-diagonal Hessian-free optimization for training neural networks. arXiv preprint arXiv:1712.07296, 2017.
|
| 279 |
+
|
| 280 |
+
Hongyu Zhu, Mohamed Akrout, Bojian Zheng, Andrew Pelegris, Amar Phanishayee, Bianca Schroeder, and Gennady Pekhimenko. TBD: Benchmarking and analyzing deep neural network training. arXiv preprint arXiv:1803.06905, 2018.
|
| 281 |
+
|
| 282 |
+
# A EXPERIMENTAL SETUP
|
| 283 |
+
|
| 284 |
+
We describe the in total eight test problems that are part of the small and the large benchmark set.
|
| 285 |
+
|
| 286 |
+
P1 Quadratic Deep: A 100 dimensional stochastic quadratic loss function. $9 0 \%$ of the eigenvalues are drawn from [0, 1], and $1 0 \%$ from [30, 60] creating an ill-conditioned problem with a structured eigenspectrum similar to the one reported by Chaudhari et al. (2017). We train with a batch size of 128 for 100 epochs.
|
| 287 |
+
|
| 288 |
+
P2 MNIST — VAE: A variational autoencoder (Kingma & Welling, 2014) with three convolutional and three deconvolutional layers with dropout layers and a latent space of size 8 on the MNIST data set. Trained with a batch size of 64 for 50 epochs.
|
| 289 |
+
|
| 290 |
+
P3 FASHION-MNIST — CNN: A vanilla convolutional network with two convolutional and two fully connected layers for image classification on the FASHION-MNIST data set. Trained with a batch size of 128 for 100 epochs.
|
| 291 |
+
|
| 292 |
+
P4 CIFAR-10 — CNN: A slightly larger convolutional network with three convolutional and three fully connected layers on CIFAR-10. Trained with a batch size of 128 for 100 epochs.
|
| 293 |
+
|
| 294 |
+
P5 FASHION-MNIST — VAE: A variational autoencoder with three convolutional and three deconvolutional layers with dropout layers and a latent space of size 8 on the FASHIONMNIST data set. Trained for 100 epochs with a batch size of 64.
|
| 295 |
+
|
| 296 |
+
P6 CIFAR-100 — All-CNN-C: The all convolutional network All-CNN-C from Springenberg et al. (2015) for image classification on the CIFAR-100 data set. Trained with a batch size of 256 for 350 epochs.
|
| 297 |
+
|
| 298 |
+
P7 STREET VIEW HOUSE NUMBERS — Wide ResNet-16-4: The wide residual network WRN-16-4 architecture of Zagoruyko & Komodakis (2016) on the STREET VIEW HOUSE NUMBERS data set for image classification. Trained with a batch size of 128 for 160 epochs.
|
| 299 |
+
|
| 300 |
+
P8 TOLSTOI — CharRNN: A two-layer LSTM (Hochreiter & Schmidhuber, 1997) with 128 units per LSTM cell for character-level language modeling on TOLSTOI’s WAR AND PEACE. Trained with a sequence length of 50 and batch size of 50 for 200 epochs.
|
md/train/rkeJRhNYDH/rkeJRhNYDH.md
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# TABFACT: A LARGE-SCALE DATASET FOR TABLEBASED FACT VERIFICATION
|
| 2 |
+
|
| 3 |
+
Wenhu Chen, Hongmin Wang, Jianshu Chen, Yunkai Zhang, Hong Wang, Shiyang Li, Xiyou Zhou, William Yang Wang
|
| 4 |
+
|
| 5 |
+
University of California, Santa Barbara, CA, USA
|
| 6 |
+
Tencent AI Lab, Bellevue, WA, USA
|
| 7 |
+
{wenhuchen,hongmin wang,yunkai zhang,hongwang600,william}@ucsb.edu
|
| 8 |
+
{shiyangli,xiyou}@cs.ucsb.edu jianshuchen@tencent.com
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
The problem of verifying whether a textual hypothesis holds based on the given evidence, also known as fact verification, plays an important role in the study of natural language understanding and semantic representation. However, existing studies are mainly restricted to dealing with unstructured evidence (e.g., natural language sentences and documents, news, etc), while verification under structured evidence, such as tables, graphs, and databases, remains under-explored. This paper specifically aims to study the fact verification given semi-structured data as evidence. To this end, we construct a large-scale dataset called TabFact with 16k Wikipedia tables as the evidence for $1 1 8 \mathrm { k }$ human-annotated natural language statements, which are labeled as either ENTAILED or REFUTED. TabFact is challenging since it involves both soft linguistic reasoning and hard symbolic reasoning. To address these reasoning challenges, we design two different models: Table-BERT and Latent Program Algorithm (LPA). Table-BERT leverages the state-of-the-art pre-trained language model to encode the linearized tables and statements into continuous vectors for verification. LPA parses statements into programs and executes them against the tables to obtain the returned binary value for verification. Both methods achieve similar accuracy but still lag far behind human performance. We also perform a comprehensive analysis to demonstrate great future opportunities. The data and code of the dataset are provided in https://github.com/wenhuchen/Table-Fact-Checking.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
Verifying whether a textual hypothesis is entailed or refuted by the given evidence is a fundamental problem in natural language understanding (Katz & Fodor, 1963; Van Benthem et al., 2008). It can benefit many downstream applications like misinformation detection, fake news detection, etc. Recently, the first-ever end-to-end fact-checking system has been designed and proposed in Hassan et al. (2017). The verification problem has been extensively studied under different natural language tasks such as recognizing textual entailment (RTE) (Dagan et al., 2005), natural language inference (NLI) (Bowman et al., 2015), claim verification (Popat et al., 2017; Hanselowski et al., 2018; Thorne et al., 2018) and multimodal language reasoning (NLVR/NLVR2) (Suhr et al., 2017; 2019). RTE and NLI view a premise sentence as the evidence, claim verification views passage collection like Wikipedia1 as the evidence, NLVR/NLVR2 views images as the evidence. These problems have been previously addressed using a variety of techniques including logic rules, knowledge bases, and neural networks. Recently large-scale pre-trained language models (Devlin et al., 2019; Peters et al., 2018; Yang et al., 2019; Liu et al., 2019) have surged to dominate the other algorithms to approach human performance on several textual entailment tasks (Wang et al., 2018; 2019).
|
| 17 |
+
|
| 18 |
+
However, existing studies are restricted to dealing with unstructured text as the evidence, which would not generalize to the cases where the evidence has a highly structured format. Since such structured evidence (graphs, tables, or databases) are also ubiquitous in real-world applications like database systems, dialog systems, commercial management systems, social networks, etc, we argue that the fact verification under structured evidence forms is an equivalently important yet underexplored problem. Therefore, in this paper, we are specifically interested in studying fact verification with semi-structured Wikipedia tables (Bhagavatula et al., 2013)2 as evidence owing to its structured and ubiquitous nature (Jauhar et al., 2016; Zhong et al., 2017; Pasupat & Liang, 2015). To this end, we introduce a large-scale dataset called TABFACT, which consists of 118K manually annotated statements with regard to 16K Wikipedia tables, their relations are classified as ENTAILED and REFUTED3. The entailed and refuted statements are both annotated by human workers. With some examples in Figure 1, we can clearly observe that unlike the previous verification related problems, TABFACT combines two different forms of reasoning in the statements, (i) Linguistic Reasoning: the verification requires semantic-level understanding. For example, “John J. Mcfall failed to be re-elected though being unopposed.” requires understanding over the phrase “lost renomination ...” in the table to correctly classify the entailment relation. Unlike the existing QA datasets (Zhong et al., 2017; Pasupat & Liang, 2015), where the linguistic reasoning is dominated by paraphrasing, TABFACT requires more linguistic inference or common sense. (ii) Symbolic Reasoning: the verification requires symbolic execution on the table structure. For example, the phrase “There are three Democrats incumbents” requires both condition operation (where condition) and arithmetic operation (count). Unlike question answering, a statement could contain compound facts, all of these facts need to be verified to predict the verdict. For example, the ”There are ...” in Figure 1 requires verifying three QA pairs (total coun $\scriptstyle { \mathrm { t } } = 5$ , democratic coun ${ \boldsymbol { \cdot } } = 2$ , republic coun $^ { - 3 }$ ). The two forms of reasoning are interleaved across the statements making it challenging for existing models.
|
| 19 |
+
|
| 20 |
+
United States House of Representatives Elections, 1972
|
| 21 |
+
|
| 22 |
+
<table><tr><td>District</td><td>Incumbent</td><td>Party</td><td>Result</td><td colspan="2"></td><td>Candidates</td></tr><tr><td>California 3</td><td>JohnE.Moss</td><td>democratic</td><td>re-elected</td><td colspan="2"></td><td>John E.Moss (d) 69.9% John Rakus (r)30.1%</td></tr><tr><td>California 5</td><td>Phillip Burton</td><td>democratic</td><td>re-elected</td><td colspan="2"></td><td>Phillip Burton (d) 81.8% Edlo E.Powell(r)18.2%</td></tr><tr><td>California 8</td><td>George Paul Miller</td><td>democratic</td><td></td><td colspan="2">lost renomination democratic hold</td><td>Pete Stark (d) 52.9% Lew M.Warden,Jr. (r)47.1%</td></tr><tr><td colspan="2">California 14</td><td>Jerome R.Waldie</td><td>republican</td><td colspan="2">re-elected</td><td>Jerome R.Waldie (d) 77.6%Floyd E.Sims (r) 22.4%</td></tr><tr><td colspan="2">California 15</td><td>John J. Mcfall</td><td>republican</td><td colspan="2">re-elected</td><td>John J.Mcfal (d) unopposed</td></tr><tr><td colspan="5">Entailed Statement</td><td colspan="2">Refuted Statement</td></tr><tr><td colspan="5">John E.Moss and Phillip Burton are both re-elected in the 1. house of representative election. John J. Mcfallis unopposed during the re-election.</td><td colspan="2">1. John E.Moss and George Paul Miller are both re-electedin the house of representative election.</td></tr><tr><td colspan="5">2. 3.</td><td colspan="2">2. John J. Mcfallfailed to be re-elected though being unopposed.</td></tr><tr><td colspan="5">There are three different incumbents from democratic.</td><td colspan="2">3. There are five candidates in total, two of them are democrats and three of them are republicans.</td></tr></table>
|
| 23 |
+
|
| 24 |
+
In this paper, we particularly propose two approaches to deal with such mixed-reasoning challenge: (i) Table-BERT, this model views the verification task completely as an NLI problem by linearizing a table as a premise sentence $p$ , and applies state-of-the-art language understanding pre-trained model to encode both the table and statements $h$ into distributed representation for classification. This model excels at linguistic reasoning like paraphrasing and inference but lacks symbolic reasoning skills. (ii) Latent Program Algorithm, this model applies lexical matching to find linked entities and triggers to filter pre-defined APIs (e.g. argmax, argmin, count, etc). We adopt bread-first-search with memorization to construct the potential program candidates, a discriminator is further utilized to select the most “consistent” latent programs. This model excels at the symbolic reasoning aspects by executing database queries, which also provides better interpretability by laying out the decision rationale. We perform extensive experiments to investigate their performances: the best-achieved accuracy of both models are reasonable, but far below human performance. Thus, we believe that the proposed table-based fact verification task can serve as an important new benchmark towards the goal of building powerful AI that can reason over both soft linguistic form and hard symbolic forms. To facilitate future research, we released all the data, code with the intermediate results.
|
| 25 |
+
|
| 26 |
+
# 2 TABLE FACT VERIFICATION DATASET
|
| 27 |
+
|
| 28 |
+
First, we follow the previous Table-based Q&A datasets (Pasupat & Liang, 2015; Zhong et al., 2017) to extract web tables (Bhagavatula et al., 2013) with captions from WikiTables4. Here we filter out overly complicated and huge tables (e.g. multirows, multicolumns, latex symbol) and obtain 18K relatively clean tables with less than 50 rows and 10 columns.
|
| 29 |
+
|
| 30 |
+
For crowd-sourcing jobs, we follow the human subject research protocols5 to pay Amazon Mechanical Turk6 workers from the native English-speaking countries “US, GB, NZ, CA, AU” with approval rates higher than $9 5 \%$ and more than 500 accepted HITs. Following WikiTableQuestion (Pasupat & Liang, 2015), we provide the annotators with the corresponding table captions to help them better understand the background. To ensure the annotation quality, we develop a pipeline of “positive two-channel annotation” “negative statement rewriting” “verification”, as described below.
|
| 31 |
+
|
| 32 |
+
2.1 POSITIVE TWO-CHANNEL COLLECTION & NEGATIVE REWRITING STRATEGY
|
| 33 |
+
|
| 34 |
+
To harvest statements of different difficulty levels, we design a two-channel collection process:
|
| 35 |
+
|
| 36 |
+
Low-Reward Simple Channel: the workers are paid 0.45 USD for annotating one Human Intelligent Task (HIT) that requires writing five statements. The workers are encouraged to produce plain statements meeting the requirements: (i) corresponding to a single row/record in the table with unary fact without involving compound logical inference. (ii) mention the cell values without dramatic modification or paraphrasing. The average annotation time of a HIT is $4 . 2 \mathrm { m i n }$ .
|
| 37 |
+
|
| 38 |
+
High-Reward Complex Channel: the workers are paid 0.75 USD for annotating a HIT (five statements). They are guided to produce more sophisticated statements to meet the requirements: (i) involving multiple rows in the tables with higher-order semantics like argmax, argmin, count, difference, average, summarize, etc. (ii) rephrase the table records to involve more semantic understanding. The average annotation time of a HIT is $6 . 8 \mathrm { { m i n } }$ . The data obtained from the complex channel are harder in terms of both linguistic and symbolic reasoning, the goal of the two-channel split is to help us understand the proposed models can reach under different levels of difficulty.
|
| 39 |
+
|
| 40 |
+
As suggested in (Zellers et al., 2018), there might be annotation artifacts and conditional stylistic patterns such as length and word-preference biases, which can allow shallow models (e.g. bag-ofwords) to obtain artificially high performance. Therefore, we design a negative rewriting strategy to minimize such linguistic cues or patterns. Instead of letting the annotators write negative statements from scratch, we let them rewrite the collected entailed statements. During the annotation, the workers are explicitly guided to modify the words, phrases or sentence structures but retain the sentence style/length to prevent artificial cues. We disallow naive negations by adding “not, never, etc” to revert the statement polarity in case of obvious linguistic patterns.
|
| 41 |
+
|
| 42 |
+
# 2.2 QUALITY CONTROL
|
| 43 |
+
|
| 44 |
+
To control the quality of the annotation process, we review a randomly sampled statement from each HIT to decide whether the whole annotation job should be rejected during the annotation process. Specifically, a HIT must satisfy the following criteria to be accepted: (i) the statements should contain neither typos nor grammatical errors. (ii) the statements do not contain vague claims like might, few, etc. (iii) the claims should be explicitly supported or contradicted by the table without requiring the additional knowledge, no middle ground is permitted. After the data collection, we re-distribute all the annotated samples to further filter erroneous statements, the workers are paid 0.05 USD per statement to decide whether the statement should be rejected. The criteria we apply are similar: no ambiguity, no typos, explicitly supported or contradictory. Through the post-filtering process, roughly $18 \%$ entailed and $27 \%$ refuted instances are further abandoned due to poor quality.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Proportion of different Higher-order Operations
|
| 48 |
+
|
| 49 |
+
Figure 2: Proportion of different higher-order operations from the simple/complex channels.
|
| 50 |
+
|
| 51 |
+
<table><tr><td>Channel</td><td>#Sentence</td><td>#Table</td><td>Len(Ent)</td><td>Len(Ref)</td><td>Split</td><td>#Sentence</td><td>Table</td><td>Row</td><td>Col</td></tr><tr><td>Simple</td><td>50,244</td><td>9,189</td><td>13.2</td><td>13.1</td><td>Train</td><td>92,283</td><td>13,182</td><td>14.1</td><td>5.5</td></tr><tr><td>Complex</td><td>68,031</td><td>7,392</td><td>14.2</td><td>14.2</td><td>Val</td><td>12,792</td><td>1,696</td><td>14.0</td><td>5.4</td></tr><tr><td>Total</td><td>118,275</td><td>16,573</td><td>13.8</td><td>13.8</td><td>Test</td><td>12,779</td><td>1,695</td><td>14.2</td><td>5.4</td></tr></table>
|
| 52 |
+
|
| 53 |
+
Table 1: Basic statistics of the data collected from the simple/complex channel and the division of Train/Val/Test Split in the dataset, where “Len” denotes the averaged sentence length.
|
| 54 |
+
|
| 55 |
+
# 2.3 DATASET STATISTICS
|
| 56 |
+
|
| 57 |
+
Inter-Annotator Agreement: After the data collection pipeline, we merged the instances from two different channels to obtain a diverse yet clean dataset for table-based fact verification. We sample 1000 annotated (table, statement) pairs and re-distribute each to 5 individual workers to re-label them as either ENTAILED or REFUTED. We follow the previous works (Thorne et al., 2018; Bowman et al., 2015) to adopt the Fleiss Kappa (Fleiss, 1971) as an indicator, where Fleiss $\begin{array} { r } { \kappa = { \frac { \bar { p _ { c } } - \bar { p _ { e } } } { 1 - \bar { p _ { e } } } } } \end{array}$ p¯c−p¯e is computed from from the observed agreement $\bar { p _ { c } }$ and the agreement by chance $\bar { p _ { e } }$ . We obtain a Fleiss $\kappa = 0 . 7 5$ , which indicates strong inter-annotator agreement and good-quality.
|
| 58 |
+
|
| 59 |
+
Dataset Statistics: As shown in Table 1, the amount of data harvested via the complex channel slightly outnumbers the simple channel, the averaged length of both the positive and negative samples are indistinguishable. More specifically, to analyze to which extent the higher-order operations are included in two channels, we group the common higher-order operations into 8 different categories. As shown in Figure 2, we sample 200 sentences from two different channels to visualize their distribution. We can see that the complex channel overwhelms the simple channel in terms of the higher-order logic, among which, count and superlatives are the most frequent. We split the whole data roughly with 8:1:1 into train, validation7, and test splits and shows their statistics in Table 1. Each table with an average of 14 rows and 5-6 columns corresponds to 2-20 different statements, while each cell has an average of 2.1 words. In the training split, the positive instances slightly outnumber the negative instances, while the validation and test split both have rather balanced distributions over positive and negative instances.
|
| 60 |
+
|
| 61 |
+
# 3 MODELS
|
| 62 |
+
|
| 63 |
+
With the collected dataset, we now formally define the table-based fact verification task: the dataset is comprised of triple instances $( \mathbf { T } , S , L )$ consisting of a table $\mathbf { T }$ , a natural language statement $S = s _ { 1 } , \cdots , s _ { n }$ and a verification label $\dot { L } \in \{ 0 , 1 \}$ . The table $\mathbf { T } = \{ T _ { i , j } | i \leq \bar { R _ { T } } , \bar { j } \leq C _ { T } \}$ has $R _ { T }$ rows and $C _ { T }$ columns with the $T _ { i j }$ being the content in the $( i , j )$ -th cell. $T _ { i j }$ could be a word, a number, a phrase, or even a natural language sentence. The statement S describes a fact to be verified against the content in the table $\mathbf { T }$ . If it is entailed by $\mathbf { T }$ , then $L = 1$ , otherwise the label $L = 0$ . Figure 1 shows some entailed and refuted examples. During training, the model and the learning algorithm are presented with $K$ instances like $( \boldsymbol { \hat { \mathbf { T } } } , \boldsymbol { S } , \boldsymbol { L } ) _ { k = 1 } ^ { K }$ from the training split. In the testing stage, the model is presented with $( \mathbf { T } , S ) _ { k = 1 } ^ { K ^ { \prime } }$ and supposed to predict the label as $\hat { L }$ . We measure the performance by the prediction accuracy $\begin{array} { r } { A c c = \frac { 1 } { K ^ { \prime } } \sum _ { 1 } ^ { K ^ { \prime } } \mathbb { I } ( \hat { L } _ { k } = L _ { k } ) } \end{array}$ on the test set. Before building the model, we first perform entity linking to detect all the entities in the statements. Briefly, we first lemmatize the words and search for the longest sub-string matching pairs between statements and table cells/captions, where the matched phrases are denoted as the linked entities. To focus on statement verification against the table, we do not feed the caption to the model and simply mask the phrases in the statements which link to the caption with placeholders. The details of the entity linker are listed in the Appendix. We describe our two proposed models as follows.
|
| 64 |
+
|
| 65 |
+
# 3.1 LATENT PROGRAM ALGORITHM (LPA)
|
| 66 |
+
|
| 67 |
+
In this approach, we formulate the table fact verification as a program synthesis problem, where the latent program algorithm is not given in TABFACT. Thus, it can be seen as a weakly supervised learning problem as discussed in Liang et al. (2017); Lao et al. (2011). Under such a setting, we propose to break down the verification into two stages: (i) latent program search, (ii) discriminator ranking. In the first program synthesis step, we aim to parse the statement into programs to represent its semantics. We define the plausible API set to include roughly 50 different functions like min, max, count, average, filter, and and realize their interpreter with Python-Pandas. Each API is defined to take arguments of specific types (number, string, bool, and view (e.g sub-table)) to output specifictype variables. During the program execution, we store the generated intermediate variables to different-typed caches $\mathcal { N } , \mathcal { R } , B , \mathcal { V }$ (Num, Str, Bool, View). At each execution step, the program can fetch the intermediate variable from the caches to achieve semantic compositionality. In order to shrink the search space, we follow NSM (Liang et al., 2017) to use trigger words to prune the API set and accelerate the search speed. The definitions of all API, trigger words can be found in the Appendix. The comprehensive the latent program search procedure is summarized in Algorithm 1, and the searching procedure is illustrated in Figure 3.
|
| 68 |
+
|
| 69 |
+
Algorithm 1 Latent Program Search with Comments
|
| 70 |
+
|
| 71 |
+
<table><tr><td rowspan=1 colspan=1>20:</td></tr><tr><td rowspan=1 colspan=1>21:</td></tr></table>
|
| 72 |
+
|
| 73 |
+
After we collected all the potential program candidates $\mathcal { P } = \{ ( P _ { 1 } , A _ { 1 } ) , \cdots , ( P _ { n } , A _ { n } ) \}$ for a given statement $S$ (where $( P _ { i } , A _ { i } )$ refers to $i$ -th candidate), we need to learn a discriminator to identify the “appropriate” traces from the set from many erroneous and spurious traces. Since we do not have the ground truth label about such discriminator, we use a weakly supervised training algorithm by viewing all the label-consistent programs as positive instances $\{ \bar { P _ { i } } | ( P _ { i } , A _ { i } ) ; A _ { i } \stackrel { . } { = } L \}$ and the label-inconsistent program as negative instances $\{ P _ { i } | ( P _ { i } , A _ { i } ) ; A _ { i } \ \stackrel { . } { \neq } \ \dot { L } \}$ to minimize the cross-entropy of discriminator $p _ { \theta } ( S , P )$ with the weakly supervised label. Specifically, we build our discriminator with a Transformer-based two-way encoder (Vaswani et al., 2017), where the statement encoder encodes the input statement $S$ as a vector $E n c ^ { S } ( S ) \ \in \ \mathbb { R } ^ { n \times D }$ with dimension $D$ , while the program encoder encodes the program $P ~ = ~ p _ { 1 } , \cdot \cdot \cdot , p _ { m }$ as another vector $E n c ^ { P } ( { \cal P } ) \in \mathbb { R } ^ { m \times \hat { D } }$ , we concatenate these two vectors and feed it into a linear projection layer to compute $p _ { \theta } ( S , P ) = \sigma ( v _ { p } ^ { T } [ E n c ^ { S } ( S ) ; E n c ^ { P } ( P ) ] )$ as the relevance between S and $P$ with weight $v _ { p } \in \mathbb { R } ^ { D }$ . At test time, we use the discriminator $p _ { \theta }$ to assign confidence $p _ { \theta } ( S , P )$ to each candidate $\bar { P } \in \mathcal { P }$ , and then either aggregate the prediction from all hypothesis with the confidence weights or rank the highest-confident hypothesis and use their outputs as the prediction.
|
| 74 |
+
|
| 75 |
+

|
| 76 |
+
Figure 3: The program synthesis procedure for the table in Figure 1. We link the entity (e.g. democratic, republican), and then composite functions on the fly to return the values from the table.
|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
Figure 4: The diagram of Table-BERT with horizontal scan, two different linearizations are depicted.
|
| 80 |
+
|
| 81 |
+
# 3.2 TABLE-BERT
|
| 82 |
+
|
| 83 |
+
In this approach, we view the table verification problem as a two-sequence binary classification problem like NLI or MPRC (Wang et al., 2018) by linearizing a table $\mathbf { T }$ into a sequence and treating the statement as another sequence. Since the linearized table can be extremely long surpassing the limit of sequence models like LSTM, Transformers, etc. We propose to shrink the sequence by only retaining the columns containing entities linked to the statement to alleviate such a memory issue. In order to encode such sub-table as a sequence, we propose two different linearization methods, as is depicted in Figure 4. (i) Concatenation: we simply concatenate the table cells with [SEP] tokens in between and restart position counter at the cell boundaries; the column name is fed as another type embedding to the input layer. Such design retains the table information in its machine format. (ii) Template: we adopt simple natural language templates to transform a table into a “somewhat natural” sentence. Taking the horizontal scan as an example, we linearize a table as “row one’s game is 51; the date is February; ..., the score is 3.4 (ot). row 2 is ...”. The isolated cells are connected with punctuations and copula verbs in a language-like format.
|
| 84 |
+
|
| 85 |
+
After obtaining the linearized sub-table $\tilde { \mathbf { T } }$ , we concatenate it with the natural language statement S and prefix a [CLS] token to the sentence to obtain the sequence-level representation ${ \cal H } = f _ { B E R T } ( [ { \bf \tilde { T } } , S ] )$ , with $H \in \mathbb { R } ^ { 7 6 8 }$ from pre-trained BERT (Devlin et al., 2019). The representation is further fed into multi-layer perceptron $f _ { M L P }$ to obtain the entailment probability $p _ { \theta } ( \tilde { \mathbf { T } } , S ) = \sigma ( f _ { M L P } ( H ) )$ , where $\sigma$ is the sigmoid function. We finetune the model $\theta$ (including the parameters of BERT and MLP) to minimize the binary cross entropy $\mathcal { L } ( p _ { \theta } ( \mathbf { \tilde { T } } , S ) , L )$ on the training set. At test time, we use the trained BERT model to compute the matching probability between the (table, statement) pair, and classify it as ENTAILED statement when $p _ { \theta } ( \tilde { \mathbf { T } } , S )$ is greater than 0.5.
|
| 86 |
+
|
| 87 |
+
# 4 EXPERIMENTS
|
| 88 |
+
|
| 89 |
+
In this section, we aim to evaluate the proposed methods on TABFACT. Besides the standard validation and test sets, we also split the test set into a simple and a complex partition based on the channel from which they were collected. This facilitates analyzing how well the model performs under different levels of difficulty. Additionally, we also hold out a small test set with 2K samples for human evaluation, where we distribute each (table, statement) pair to 5 different workers to approximate human judgments based on their majority voting, the results are reported in Table 2.
|
| 90 |
+
|
| 91 |
+
<table><tr><td>Model</td><td>Val</td><td>Test</td><td>Test (simple)</td><td>Test (complex)</td><td>Small Test</td></tr><tr><td>BERTclassifier w/o Table</td><td>50.9</td><td>50.5</td><td>51.0</td><td>50.1</td><td>50.4</td></tr><tr><td>Table-BERT-Horizontal-F+T-Concatenate</td><td>50.7</td><td>50.4</td><td>50.8</td><td>50.0</td><td>50.3</td></tr><tr><td>Table-BERT-Vertical-F+T-Template</td><td>56.7</td><td>56.2</td><td>59.8</td><td>55.0</td><td>56.2</td></tr><tr><td>Table-BERT-Vertical-T+F-Template</td><td>56.7</td><td>57.0</td><td>60.6</td><td>54.3</td><td>55.5</td></tr><tr><td>Table-BERT-Horizontal-F+T-Template</td><td>66.0</td><td>65.1</td><td>79.0</td><td>58.1</td><td>67.9</td></tr><tr><td>Table-BERT-Horizontal-T+F-Template</td><td>66.1</td><td>65.1</td><td>79.1</td><td>58.2</td><td>68.1</td></tr><tr><td>NSM w/RL (Binary Reward)</td><td>54.1</td><td>54.1</td><td>55.4</td><td>53.1</td><td>55.8</td></tr><tr><td>NSM w/LPA-guided ML + RL</td><td>63.2</td><td>63.5</td><td>77.4</td><td>56.1</td><td>66.9</td></tr><tr><td>LPA-Voting w/o Discriminator</td><td>57.7</td><td>58.2</td><td>68.5</td><td>53.2</td><td>61.5</td></tr><tr><td>LPA-Weighted-Voting</td><td>62.5</td><td>63.1</td><td>74.6</td><td>57.3</td><td>66.8</td></tr><tr><td>LPA-Ranking w/Discriminator</td><td>65.2</td><td>65.0</td><td>78.4</td><td>58.5</td><td>68.6</td></tr><tr><td>LPA-Ranking w/ Discriminator (Caption)</td><td>65.1</td><td>65.3</td><td>78.7</td><td>58.5</td><td>68.9</td></tr><tr><td>Human Performance</td><td>-</td><td>-</td><td>1</td><td>-</td><td>92.1</td></tr></table>
|
| 92 |
+
|
| 93 |
+
Table 2: The results of different models, the numbers are in percentage. $\mathrm { T } { \mathrm { + F } }$ means table followed by fact, while $\mathrm { F } { + } \mathrm { T }$ means fact followed by table. NSM is modified from Liang et al. (2017).
|
| 94 |
+
|
| 95 |
+
NSM We follow Liang et al. (2017) to modify their approach to fit the setting of TABFACT. Specifically, we adopt an LSTM as an encoder and another LSTM with copy mechanism as a decoder to synthesize the program. However, without any ground truth annotation for the intermediate programs, directly training with reinforcement learning is difficult as the binary reward is underspecified, which is listed in Table 2 as ”NSM w/ RL”. Further, we use LPA as a teacher to search the top programs for the NSM to bootstrap and then use reinforcement learning to finetune the model, which achieves reasonable performance on our dataset listed as ”NSM w/ $\mathbf { M L } + \mathbf { R L } ^ { \prime }$ .
|
| 96 |
+
|
| 97 |
+
Table-BERT We build Table-BERT based on the open-source implementation of BERT8 using the pre-trained model with 12-layer, 768-hidden, 12-heads, and 110M parameters trained in 104 languages. We use the standard BERT tokenizer to break the words in both statements and tables into subwords and join the two sequences with a [SEP] token in between. The representation corresponding to [CLS] is fed into an MLP layer to predict the verification label. We finetune the model on a single TITAN X GPU with a mini-batch size of 6. The best performance is reached after about 3 hours of training (around 10K steps). We implement and compare the following variants of the Table-BERT model including (i) Concatenation vs. Template: whether to use natural language templates during linearization. (ii) Horizontal vs. Vertical: scan direction in linearization.
|
| 98 |
+
|
| 99 |
+
LPA We run the latent program search in a distributed fashion on three 64-core machines to generate the latent programs. The search terminates once the buffer has more than 50 traces or the path length is larger than 7. The average search time for each statement is about 2.5s. For the discriminator model, we design two transformer-based encoders (3 layers, 128-dimension hidden embedding, and 4 heads at each layer) to encode the programs and statements, respectively. The variants of LPA models considered include (i) Voting: assign each program with equal weight and vote without the learned discriminator. (ii) Weighted-Voting: compute a weighted-sum to aggregate the predictions of all latent programs with the discriminator confidence as the weights. (iii) Ranking: rank all the hypotheses by the discriminator confidence and use the top-rated hypothesis as the output. (Caption) means feeding the caption as a sequence of words to the discriminator during ranking.
|
| 100 |
+
|
| 101 |
+
Preliminary Evaluation In order to test whether our negative rewriting strategy eliminates the artifacts or shallow cues, we also fine-tune a pre-trained BERT (Devlin et al., 2019) to classify the statement $S$ without feeding in table information. The result is reported as “BERT classifier w/o
|
| 102 |
+
|
| 103 |
+
Table” in Table 2, which is approximately the majority guess and reflects the effectiveness of the rewriting strategy. Before presenting the experiment results, we first perform a preliminary study to evaluate how well the entity linking system, program search, and the statement-program discriminator perform. Since we do not have the ground truth labels for these models, we randomly sample 100 samples from the dev set to perform the human study. For the entity linking, we evaluate its accuracy as the number of correctly linked sentences / total sentences. For the latent program search, we evaluate whether the “true” programs are included in the candidate set $\mathcal { P }$ as recall score.
|
| 104 |
+
|
| 105 |
+
Results We report the performance of different methods as well as human performance in Table 2. First of all, we observe that the naive serialized model fails to learn anything effective (same as the Majority Guess). It reveals the importance of template when using the pre-trained BERT (Devlin et al., 2019) model: the “natural” connection words between individual cells is able to unleash the power of the large pre-trained language model and enable it to perform reasoning on the structured table form. Such behavior is understandable given the fact that BERT is pre-trained on purely natural language corpora. In addition, we also observe that the horizontal scan excels in the vertical scan because it better captures the convention of human expression. Among different LPA methods, we found that LPA-Ranking performs the best since it can better suppress the spurious programs than the voting-based algorithm. Overall, the LPA model is on par with Table-BERT on both simple and test split without any pre-training on external corpus, which reflects the effectiveness of LPA to leverage symbolic operations in the verification process.
|
| 106 |
+
|
| 107 |
+
Through our human evaluation, we found that only $58 \%$ of sentences have been correctly linked without missing-link or over-link, while the systematic search has a recall of $51 \%$ under the cases where the sentence is correctly linked. With that being said, the chance for LPA method to cover the correct program (rationale) is roughly under $30 \%$ . After the discriminator’s re-ranking step, the probability of selecting these particular oracle program is even much lower. However, we still observe a final overall accuracy of $65 \%$ , which indicates that the spurious problem is quite severe in LPA, where the correct label is predicted based on the wrong reason.
|
| 108 |
+
|
| 109 |
+
Through our human evaluation, we also observe that Table-BERT exhibits poor consistency as it can misclassify simple cases but correctly-classify hard cases. These two major weaknesses are yet to be solved in future studies. In contrast, LPA behaves much more consistently and provides a clear latent rationale for its decision. But, such a pipeline system requires laborious handcrafting of API operations and is also very sensitive to the entity linking accuracy. Both methods have pros and cons; how to combine them still remains an open question.
|
| 110 |
+
|
| 111 |
+
Program Annotation To further promote the development of different models in our dataset, we collect roughly 1400 human-annotated programs paired with the original statements. These statements include the most popular logical operations like superlative, counting, comparison, unique, etc. We provide these annotations in Github9, which can either be used to bootstrap the semantic parsers or provide the rationale for NLI models.
|
| 112 |
+
|
| 113 |
+
# 5 RELATED WORK
|
| 114 |
+
|
| 115 |
+
Natural Language Inference & Reasoning: Modeling reasoning and inference in human language is a fundamental and challenging problem towards true natural language understanding. There has been extensive research on RTE in the early years (Dagan et al., 2005) and more recently shifted to NLI (Bowman et al., 2015; Williams et al., 2017). NLI seeks to determine whether a natural language hypothesis $h$ can be inferred from a natural language premise $p$ . With the surge of deep learning, there have been many powerful algorithms like the Decomposed Model (Parikh et al., 2016), Enhanced-LSTM (Chen et al., 2017) and BERT (Devlin et al., 2019). Besides the textual evidence, NLVR (Suhr et al., 2017) and NLVR2 (Suhr et al., 2019) have been proposed to use images as the evidence for statement verification on multi-modal setting. Our proposed fact verification task is closely related to these inference tasks, where our semi-structured table can be seen as a collection of “premises” exhibited in a semi-structured format. Our proposed problem hence could be viewed as the generalization of NLI under the semi-structured domain.
|
| 116 |
+
|
| 117 |
+
Table Question Answering: Another line of research closely related to our task is the table-based question answering, such as MCQ (Jauhar et al., 2016), WikiTableQuestion (Pasupat & Liang, 2015), Spider (Yu et al., 2018), Sequential Q&A (Iyyer et al., 2017), and WikiSQL (Zhong et al., 2017), for which approaches have been extended to handle large-scale tables from Wikipedia (Bhagavatula et al., 2013). However, in these Q&A tasks, the question types typically provide strong signals needed for identifying the type of answers, while TABFACT does not provide such specificity. The uniqueness of TABFACT lies in two folds: 1) a given fact is regarded as a false claim as long as any part of the statement contains misinformation. Due to the conjunctive nature of verification, a fact needs to be broken down into several sub-clauses or (Q, A) pairs to separate evaluate their correctness. Such a compositional nature of the verification problem makes it more challenging than a standard QA setting. On one hand, the model needs to recognize the multiple QA pairs and their relationship. On the other hand, the multiple sub-clauses make the semantic form longer and logic inference harder than the standard QA setting. 2) some facts cannot even be handled using semantic forms, as they are driven by linguistic inference or common sense. In order to verify these statements, more inference techniques have to be leveraged to enable robust verification. We visualize the above two characteristics of TABFACT in Figure 5.
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 5: The two uniqueness of Table-based fact verification against standard QA problems.
|
| 121 |
+
|
| 122 |
+
Program Synthesis & Semantic Parsing: There have also been great interests in using program synthesis or logic forms to solve different natural language processing problems like question answering (Liang et al., 2013; Berant et al., 2013; Berant & Liang, 2014), visual navigation (Artzi et al., 2014; Artzi & Zettlemoyer, 2013), code generation (Yin & Neubig, 2017; Dong & Lapata, 2016), SQL synthesis (Yu et al., 2018), etc. The traditional semantic parsing papers (Artzi et al., 2014; Artzi & Zettlemoyer, 2013; Zettlemoyer & Collins, 2005; Liang et al., 2013; Berant et al., 2013) greatly rely on rules, lexicon to parse natural language sentences into different forms like lambda calculus, DCS, etc. More recently, researchers strive to propose neural models to directly perform end-to-end formal reasoning like Theory Prover (Riedel et al., 2017; Rocktaschel & Riedel, ¨ 2017), Neural Turing Machine (Graves et al., 2014), Neural Programmer (Neelakantan et al., 2016; 2017) and Neural-Symbolic Machines (Liang et al., 2017; 2018; Agarwal et al., 2019). The proposed TABFACT serves as a great benchmark to evaluate the reasoning ability of different neural reasoning models. Specifically, TABFACT poses the following challenges: 1) spurious programs (i.e., wrong programs with the true returned answers): since the program output is only a binary label, which can cause serious spurious problems and misguide the reinforcement learning with the under-specified binary rewards. 2) decomposition: the model needs to decompose the statement into sub-clauses and verify the sub-clauses one by one, which normally requires the longer logic inference chains to infer the statement verdict. 3) linguistic reasoning like inference and paraphrasing.
|
| 123 |
+
|
| 124 |
+
Fact Checking The problem of verifying claims and hypotheses on the web has drawn significant attention recently due to its high social influence. Different fact-checking pioneering studies have been performed including LIAR (Wang, 2017), PolitiFact (Vlachos & Riedel, 2014), FEVER (Thorne et al., 2018) and AggChecker (Jo et al., 2019), etc. The former three studies are mainly based on textual evidence on social media or Wikipedia, while AggChecker is closest to ours in using relational databases as the evidence. Compared to AggChecker, our paper proposes a much larger dataset to benchmark the progress in this direction.
|
| 125 |
+
|
| 126 |
+
# 6 CONCLUSION
|
| 127 |
+
|
| 128 |
+
This paper investigates a very important yet previously under-explored research problem: semistructured fact verification. We construct a large-scale dataset and proposed two methods, TableBERT and LPA, based on the state-of-the-art pre-trained natural language inference model and program synthesis. In the future, we plan to push forward this research direction by inspiring more sophisticated architectures that can perform both linguistic and symbolic reasoning.
|
| 129 |
+
|
| 130 |
+
# REFERENCES
|
| 131 |
+
|
| 132 |
+
Rishabh Agarwal, Chen Liang, Dale Schuurmans, and Mohammad Norouzi. Learning to generalize from sparse and underspecified rewards. International Conference of Machine Learning, 2019.
|
| 133 |
+
|
| 134 |
+
Yoav Artzi and Luke Zettlemoyer. Weakly supervised learning of semantic parsers for mapping instructions to actions. Transactions of the Association for Computational Linguistics, 1:49–62, 2013.
|
| 135 |
+
|
| 136 |
+
Yoav Artzi, Dipanjan Das, and Slav Petrov. Learning compact lexicons for ccg semantic parsing. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1273–1283, 2014.
|
| 137 |
+
|
| 138 |
+
Jonathan Berant and Percy Liang. Semantic parsing via paraphrasing. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1415–1425, 2014.
|
| 139 |
+
|
| 140 |
+
Jonathan Berant, Andrew Chou, Roy Frostig, and Percy Liang. Semantic parsing on freebase from question-answer pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pp. 1533–1544, 2013.
|
| 141 |
+
|
| 142 |
+
Chandra Sekhar Bhagavatula, Thanapon Noraset, and Doug Downey. Methods for exploring and mining tables on wikipedia. In Proceedings of the ACM SIGKDD Workshop on Interactive Data Exploration and Analytics, pp. 18–26. ACM, 2013.
|
| 143 |
+
|
| 144 |
+
Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 632–642, 2015.
|
| 145 |
+
|
| 146 |
+
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, 2017.
|
| 147 |
+
|
| 148 |
+
Ido Dagan, Oren Glickman, and Bernardo Magnini. The pascal recognising textual entailment challenge. In Machine Learning Challenges Workshop, pp. 177–190. Springer, 2005.
|
| 149 |
+
|
| 150 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. Proceedings of NAACL-HLT, 2019.
|
| 151 |
+
|
| 152 |
+
Li Dong and Mirella Lapata. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 33–43, 2016.
|
| 153 |
+
|
| 154 |
+
Joseph L Fleiss. Measuring nominal scale agreement among many raters. Psychological bulletin, 76(5):378, 1971.
|
| 155 |
+
|
| 156 |
+
Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
|
| 157 |
+
|
| 158 |
+
Andreas Hanselowski, Hao Zhang, Zile Li, Daniil Sorokin, Benjamin Schiller, Claudia Schulz, and Iryna Gurevych. Ukp-athene: Multi-sentence textual entailment for claim verification. arXiv preprint arXiv:1809.01479, 2018.
|
| 159 |
+
|
| 160 |
+
Naeemul Hassan, Gensheng Zhang, Fatma Arslan, Josue Caraballo, Damian Jimenez, Siddhant Gawsane, Shohedul Hasan, Minumol Joseph, Aaditya Kulkarni, Anil Kumar Nayak, et al. Claimbuster: the first-ever end-to-end fact-checking system. Proceedings of the VLDB Endowment, 10 (12):1945–1948, 2017.
|
| 161 |
+
|
| 162 |
+
Mohit Iyyer, Wen-tau Yih, and Ming-Wei Chang. Search-based neural structured learning for sequential question answering. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 1821–1831, 2017.
|
| 163 |
+
|
| 164 |
+
Sujay Kumar Jauhar, Peter Turney, and Eduard Hovy. Tables as semi-structured knowledge for question answering. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 474–483, 2016.
|
| 165 |
+
|
| 166 |
+
Saehan Jo, Immanuel Trummer, Weicheng Yu, Xuezhi Wang, Cong Yu, Daniel Liu, and Niyati Mehta. Aggchecker: A fact-checking system for text summaries of relational data sets. Proceedings of the VLDB Endowment, 12(12), 2019.
|
| 167 |
+
|
| 168 |
+
Jerrold J Katz and Jerry A Fodor. The structure of a semantic theory. language, 39(2):170–210, 1963.
|
| 169 |
+
|
| 170 |
+
Ni Lao, Tom Mitchell, and William W Cohen. Random walk inference and learning in a large scale knowledge base. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, pp. 529–539. Association for Computational Linguistics, 2011.
|
| 171 |
+
|
| 172 |
+
Chen Liang, Jonathan Berant, Quoc Le, Kenneth D Forbus, and Ni Lao. Neural symbolic machines: Learning semantic parsers on freebase with weak supervision. International Conference of Machine Learning, 2017.
|
| 173 |
+
|
| 174 |
+
Chen Liang, Mohammad Norouzi, Jonathan Berant, Quoc V Le, and Ni Lao. Memory augmented policy optimization for program synthesis and semantic parsing. In Advances in Neural Information Processing Systems, pp. 9994–10006, 2018.
|
| 175 |
+
|
| 176 |
+
Percy Liang, Michael I Jordan, and Dan Klein. Learning dependency-based compositional semantics. Computational Linguistics, 39(2):389–446, 2013.
|
| 177 |
+
|
| 178 |
+
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, 2019.
|
| 179 |
+
|
| 180 |
+
Arvind Neelakantan, Quoc V Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. International Conference on Learning Representation, 2016.
|
| 181 |
+
|
| 182 |
+
Arvind Neelakantan, Quoc V Le, Martin Abadi, Andrew McCallum, and Dario Amodei. Learning a natural language interface with neural programmer. International Conference on Learning Representation, 2017.
|
| 183 |
+
|
| 184 |
+
Ankur Parikh, Oscar Tackstr ¨ om, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention ¨ model for natural language inference. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 2249–2255, 2016.
|
| 185 |
+
|
| 186 |
+
Panupong Pasupat and Percy Liang. Compositional semantic parsing on semi-structured tables. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), volume 1, pp. 1470–1480, 2015.
|
| 187 |
+
|
| 188 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of NAACL-HLT, pp. 2227–2237, 2018.
|
| 189 |
+
|
| 190 |
+
Kashyap Popat, Subhabrata Mukherjee, Jannik Strotgen, and Gerhard Weikum. Where the truth lies: ¨ Explaining the credibility of emerging claims on the web and social media. In Proceedings of the 26th International Conference on World Wide Web Companion, pp. 1003–1012. International World Wide Web Conferences Steering Committee, 2017.
|
| 191 |
+
|
| 192 |
+
Sebastian Riedel, Matko Bosnjak, and Tim Rocktaschel. Programming with a differentiable forth ¨ interpreter. ICML, 2017.
|
| 193 |
+
|
| 194 |
+
Tim Rocktaschel and Sebastian Riedel. End-to-end differentiable proving. In ¨ Advances in Neural Information Processing Systems, pp. 3788–3800, 2017.
|
| 195 |
+
|
| 196 |
+
Alane Suhr, Mike Lewis, James Yeh, and Yoav Artzi. A corpus of natural language for visual reasoning. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 217–223, 2017.
|
| 197 |
+
|
| 198 |
+
Alane Suhr, Stephanie Zhou, Ally Zhang, Iris Zhang, Huajun Bai, and Yoav Artzi. A corpus for reasoning about natural language grounded in photographs. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2019.
|
| 199 |
+
|
| 200 |
+
James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. Fever: a largescale dataset for fact extraction and verification. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), volume 1, pp. 809–819, 2018.
|
| 201 |
+
|
| 202 |
+
Johan Van Benthem et al. A brief history of natural logic. LondonCollege Publications9781904987444, 2008.
|
| 203 |
+
|
| 204 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 205 |
+
|
| 206 |
+
Andreas Vlachos and Sebastian Riedel. Fact checking: Task definition and dataset construction. In Proceedings of the ACL 2014 Workshop on Language Technologies and Computational Social Science, pp. 18–22, 2014.
|
| 207 |
+
|
| 208 |
+
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. EMNLP 2018, pp. 353, 2018.
|
| 209 |
+
|
| 210 |
+
Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. arXiv preprint arXiv:1905.00537, 2019.
|
| 211 |
+
|
| 212 |
+
William Yang Wang. liar, liar pants on fire: A new benchmark dataset for fake news detection. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 422–426, 2017.
|
| 213 |
+
|
| 214 |
+
Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426, 2017.
|
| 215 |
+
|
| 216 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems, 2019.
|
| 217 |
+
|
| 218 |
+
Pengcheng Yin and Graham Neubig. A syntactic neural model for general-purpose code generation. arXiv preprint arXiv:1704.01696, 2017.
|
| 219 |
+
|
| 220 |
+
Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, et al. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3911–3921, 2018.
|
| 221 |
+
|
| 222 |
+
Rowan Zellers, Yonatan Bisk, Roy Schwartz, and Yejin Choi. Swag: A large-scale adversarial dataset for grounded commonsense inference. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 93–104, 2018.
|
| 223 |
+
|
| 224 |
+
Luke S Zettlemoyer and Michael Collins. Learning to map sentences to logical form: structured classification with probabilistic categorial grammars. In Proceedings of the Twenty-First Conference on Uncertainty in Artificial Intelligence, pp. 658–666. AUAI Press, 2005.
|
| 225 |
+
|
| 226 |
+
Victor Zhong, Caiming Xiong, and Richard Socher. Seq2sql: Generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103, 2017.
|
| 227 |
+
|
| 228 |
+
# A APPENDIX
|
| 229 |
+
|
| 230 |
+
# A.1 FUNCTION DESCRIPTION
|
| 231 |
+
|
| 232 |
+
We list the detailed function description in Figure 6. We also visualize the functionality of the most
|
| 233 |
+
|
| 234 |
+
<table><tr><td rowspan=1 colspan=1>Name</td><td rowspan=1 colspan=1>Arguments</td><td rowspan=1 colspan=1>Output</td><td rowspan=1 colspan=1>Comment</td></tr><tr><td rowspan=1 colspan=1>Count</td><td rowspan=1 colspan=1>View</td><td rowspan=1 colspan=1>Number</td><td rowspan=1 colspan=1>Return the number of rows in the View</td></tr><tr><td rowspan=1 colspan=1>within</td><td rowspan=1 colspan=1>View, Header String, CellString/Number</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Return whether the cellstring/number exists under the Header Column of the givenview</td></tr><tr><td rowspan=1 colspan=1>Without</td><td rowspan=1 colspan=1>View, Header String, CellString/Number</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Return whether the cellstring/number does not exist under the Header Column of thegiven view</td></tr><tr><td rowspan=1 colspan=1>None</td><td rowspan=1 colspan=1>String</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Whether the string represents None,like“None","No,"-","No information provided"</td></tr><tr><td rowspan=1 colspan=1>Before/After</td><td rowspan=1 colspan=1>Row, Row</td><td rowspan=1 colspan=1>Row</td><td rowspan=1 colspan=1>Returns whether rowlis before/after row2</td></tr><tr><td rowspan=1 colspan=1>First/Second/Third/Fourth</td><td rowspan=1 colspan=1>View,Row</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Returns whether the row is in the first/second/third position of the view</td></tr><tr><td rowspan=1 colspan=1>Average/Sum/Max/Min</td><td rowspan=1 colspan=1>View, Header String</td><td rowspan=1 colspan=1>Number</td><td rowspan=1 colspan=1>Returns the average/summation/max/min value under the Header Column of the givenview</td></tr><tr><td rowspan=1 colspan=1>Argmin/Argmax</td><td rowspan=1 colspan=1>View, Header String</td><td rowspan=1 colspan=1>Row</td><td rowspan=1 colspan=1>Returns the row with the maximum/minimum value under the Header Column of thegiven view</td></tr><tr><td rowspan=1 colspan=1>Hop</td><td rowspan=1 colspan=1>Row, Header String</td><td rowspan=1 colspan=1>Number/String</td><td rowspan=1 colspan=1>Returns the cell value under the Header Column of the given row</td></tr><tr><td rowspan=1 colspan=1>Diff/Add</td><td rowspan=1 colspan=1>Number, Number</td><td rowspan=1 colspan=1>Number</td><td rowspan=1 colspan=1>Perform arithmetic operations on two numbers</td></tr><tr><td rowspan=1 colspan=1>Greater/Less</td><td rowspan=1 colspan=1>Number, Number</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Returns whether the first number is greater/less than the second number</td></tr><tr><td rowspan=1 colspan=1>Equal/Unequal</td><td rowspan=1 colspan=1>String, String/Number, Number</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Compare two numbers or strings to see whether they are the same</td></tr><tr><td rowspan=1 colspan=1>Filter_eq/Filter_greater/Filter_less/Filter_greater_or_equal/Filter_less_or_equal</td><td rowspan=1 colspan=1>View, Header String,Number</td><td rowspan=1 colspan=1>View</td><td rowspan=1 colspan=1>Returns the subview of the given with the cellvalues under the Header columngreater/less/eq/..against the given number</td></tr><tr><td rowspan=1 colspan=1>All_eq/All.greater/All_less/AllgreaterorequaI/All_less_or_equal</td><td rowspan=1 colspan=1>View, Header String,Number</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Returns the whether all of the cell values under the Header column aregreater/less/eq/.. against the given number</td></tr><tr><td rowspan=1 colspan=1>And/Or</td><td rowspan=1 colspan=1>Bool,Bol</td><td rowspan=1 colspan=1>Bool</td><td rowspan=1 colspan=1>Returns the Boolean operation results of two inputs</td></tr></table>
|
| 235 |
+
|
| 236 |
+
typical functions and their input/output examples in Figure 7.
|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
Figure 6: The function definition used in TabFact.
|
| 240 |
+
Figure 7: The visualization of different functions.
|
| 241 |
+
|
| 242 |
+
We list all the trigger words for different functions in Figure 8
|
| 243 |
+
Figure 8: The trigger words used to shrink the search space.
|
| 244 |
+
|
| 245 |
+
<table><tr><td rowspan=1 colspan=1>Trigger</td><td rowspan=1 colspan=1>Function</td></tr><tr><td rowspan=1 colspan=1>'average'</td><td rowspan=1 colspan=1>average</td></tr><tr><td rowspan=1 colspan=1>'difference','gap','than','separate'</td><td rowspan=1 colspan=1>diff</td></tr><tr><td rowspan=1 colspan=1>'sum','summation','combine','combined','total','add','all','thereare'</td><td rowspan=1 colspan=1>ddd, sum</td></tr><tr><td rowspan=1 colspan=1>'not','no','never',"didn't","won't","wasn't","isn't,"haven't","weren't","won't",'neither','none','unable,'fail','different','outside','unable','fail'</td><td rowspan=1 colspan=1>not_eq, not_within,Filter_not_eq,none</td></tr><tr><td rowspan=1 colspan=1>'not','no','none'</td><td rowspan=1 colspan=1>none</td></tr><tr><td rowspan=1 colspan=1>'first','top','atest','most'</td><td rowspan=1 colspan=1>first</td></tr><tr><td rowspan=1 colspan=1>"last','bottom','latest','most'</td><td rowspan=1 colspan=1>last</td></tr><tr><td rowspan=1 colspan=1>'RBR','JJR','more','than','above','after'</td><td rowspan=1 colspan=1>filter_greater, greater</td></tr><tr><td rowspan=1 colspan=1>'RBR','JJR','less','than','below','under'</td><td rowspan=1 colspan=1>filter_less, less</td></tr><tr><td rowspan=1 colspan=1>'all','every','each'</td><td rowspan=1 colspan=1>all_eq,all_less,all_greater,</td></tr><tr><td rowspan=1 colspan=1>['all','every','each'],['not','no','never',"didn't","won't","wasn't"]</td><td rowspan=1 colspan=1>all_not_eq</td></tr><tr><td rowspan=1 colspan=1>'at most','than'</td><td rowspan=1 colspan=1>all_less_eq,all_greater_eq</td></tr><tr><td rowspan=1 colspan=1>'RBR','RBS','JJR','JJS'</td><td rowspan=1 colspan=1>max, min</td></tr><tr><td rowspan=1 colspan=1>'JR','JJS','RBR','RBS','to','fst</td><td rowspan=1 colspan=1>argmax,argmin</td></tr><tr><td rowspan=1 colspan=1>'within','one','of,'among'</td><td rowspan=1 colspan=1>within</td></tr><tr><td rowspan=1 colspan=1>'follow','following','followed','after','before','above','precede'</td><td rowspan=1 colspan=1>before</td></tr><tr><td rowspan=1 colspan=1>'follow','following','followed','after','before','above','precede'</td><td rowspan=1 colspan=1>after</td></tr><tr><td rowspan=1 colspan=1>'most'</td><td rowspan=1 colspan=1>most_freq</td></tr><tr><td rowspan=1 colspan=1>ordinal</td><td rowspan=1 colspan=1>First,second,third,fourth</td></tr></table>
|
| 246 |
+
|
| 247 |
+
# B HIGHER-ORDER OPERATIONS
|
| 248 |
+
|
| 249 |
+
1. Aggregation: the aggregation operation refers to sentences like “the averaged age of all ....”, “the total amount of scores obtained in ...”, etc.
|
| 250 |
+
2. Negation: the negation operation refers to sentences like “xxx did not get the best score”, “xxx has never obtained a score higher than 5”.
|
| 251 |
+
3. Superlative: the superlative operation refers to sentences like “xxx achieves the highest score in”, “xxx is the lowest player in the team”.
|
| 252 |
+
4. Comparative: the comparative operation refers to sentences like “xxx has a higher score than yyy”.
|
| 253 |
+
5. Ordinal: the ordinal operation refers to sentences like “the first country to achieve xxx is xxx”, “xxx is the second oldest person in the country”.
|
| 254 |
+
6. Unique: the unique operation refers to sentences like “there are 5 different nations in the tournament, ”, “there are no two different players from U.S”
|
| 255 |
+
7. All: the for all operation refers to sentences like “all of the trains are departing in the morning”, “none of the people are older than 25.”
|
| 256 |
+
8. None: the sentences which do not involve higher-order operations like “xxx achieves 2 points in xxx game”, “xxx player is from xxx country”.
|
| 257 |
+
|
| 258 |
+
# C ERROR ANALYSIS
|
| 259 |
+
|
| 260 |
+
Before we quantitatively demonstrate the error analysis of the two methods, we first theoretically analyze the bottlenecks of the two methods as follows:
|
| 261 |
+
|
| 262 |
+
Symbolic We first provide a case in which the symbolic execution can not deal with theoretically in Figure 9. The failure cases of symbolic are either due to the entity link problem or function coverage problem. For example, in the given statement below, there is no explicit mention of ”7-5, 6-4” cell. Therefore, the entity linking model fails to link to this cell content. Furthermore, even though we can successfully link to this string, there is no defined function to parse ”7-5, 6-5” as ”won two games” because it requires linguistic/mathematical inference to understand the implication from the string. Such cases are the weakness of symbolic reasoning models.
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
|
| 266 |
+

|
| 267 |
+
Figure 9: The error case of symbolic reasoning model
|
| 268 |
+
|
| 269 |
+
BERT In contrast, Table-BERT model seems to have no coverage problem as long as it can feed the whole table content. However, due to the template linearization, the table is unfolded into a long sequence as depicted in Figure 10. The useful information, ”clay” are separated in a very long span of unrelated words. How to grasp such a long dependency and memorize the history information poses a great challenge to the Table-BERT model.
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
Figure 10: The error case of BERT NLI model
|
| 273 |
+
|
| 274 |
+
Statistics Here we pick 200 samples from the validation set which only involve single semantic and divide them into different categories. We denote the above-mentioned cases as ”linguistic inference”, and the sentences which only describe information from one row as ”Trivial”, the rest are based on their logic operation like Aggregation, Superlative, Count, etc. We visualize the accuracy of LPA and Table-BERT in Figure 11. From which we can observe that the statements with linguistic inference are much better handled with the BERT model, while LPA achieves an accuracy barely higher than a random guess. The BERT model can deal with trivial cases well as it uses a horizontal scan order. In contrast, the LPA model outperforms BERT on higher-order logic cases, especially when the statement involves operations like Count and Superlative.
|
| 275 |
+
|
| 276 |
+

|
| 277 |
+
Error Analysis of LPA/Table-BERT
|
| 278 |
+
Figure 11: The error analysis of two different models
|
| 279 |
+
|
| 280 |
+
# D REASONING DEPTH
|
| 281 |
+
|
| 282 |
+
Given that our LPA has the breadth to cover a large semantic space. Here we also show the reasoning depth in terms of how many logic inference steps are required to tackle verify the given claims. We visualize the histogram in Figure 12 and observe that the reasoning steps are concentrated between 4 to 7. Such statistics indicate the difficulty of fact verification in our TABFACT dataset.
|
| 283 |
+
|
| 284 |
+

|
| 285 |
+
Figure 12: The histogram of reasoning steps required to verify the claims
|
| 286 |
+
|
| 287 |
+
# E WHETHER TO KEEP WIKIPEDIA CONTEXT
|
| 288 |
+
|
| 289 |
+
Before crowd-sourcing the annotation for the tables, we observed that the previous WikiTableQuestion Pasupat & Liang (2015) provides context (Wikipedia title) during annotation while the WikiSQL Zhong et al. (2017) does not. Therefore, we particularly design ablation annotation tasks to compare the annotation quality between w/ and w/o Wikipedia title as context. We demonstrate a typical example in Figure 13, where a Wiki table10 aims to describe the achievements of a tennis player named Dennis, but itself does not provide any explicit hint about “Tennis Player Dennis”. Unsurprisingly, the sentence fluency and coherence significantly drop without such information. Actually, a great portion of these Wikipedia tables requires background knowledge (like sports, celebrity, music, etc) to understand. We perform a small user study to measure the fluency of annotated statements. Specifically, we collected 50 sentences from both annotation w/ and w/o title context and randomly shuffle them as pairs, which are distributed to the 8 experts without telling them their source to compare the language fluency. It turns out that the experts ubiquitously agree that the statements with Wikipedia titles are more human-readable. Therefore, we argue that such a context is necessary for annotators to understand the background knowledge to write more fluent sentences. On the other end, we also hope to minimize the influence of the textual context in the table-based verification task, therefore, we design an annotation criterion: the Wikipedia title is provided to the workers during the annotation, but they are explicitly banned from bringing any unrelated background information other than the title into the annotation. As illustrated in Figure 13, the title only acts as a placeholder in the statements to make it sound more natural.
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
|
| 293 |
+
# F ENTITY LINKING
|
| 294 |
+
|
| 295 |
+
Here we propose to use the longest string match to find all the candidate entities in the table, when multiple candidates coexist, we select the one with the minimum edit distances. The visualization is demonstrated in Figure 14.
|
| 296 |
+
|
| 297 |
+

|
| 298 |
+
Statement: John E. Moss is a democratic who is from California 3 district
|
| 299 |
+
|
| 300 |
+

|
| 301 |
+
Figure 14: Entity Linking System.
|
| 302 |
+
|
| 303 |
+
# G THE PROGRAM CANDIDATES
|
| 304 |
+
|
| 305 |
+
Here we demonstrate some program candidates in Figure 15, and show how our proposed discriminator is designed to compute the matching probability between the statement and program. Specifically, we employ two transformer-based encoder Vaswani et al. (2017), the left one is aimed to encode the program sequence and the right one is aimed to encode the statement sequence. Their output from [CLS] position is concatenated and fed into an MLP to classify the verification label.
|
| 306 |
+
|
| 307 |
+
# H HIT INTERFACE
|
| 308 |
+
|
| 309 |
+
We provide the human intelligent task interface on AMT in the following. Very detailed instructions on what are trivial statements and what are non-trivial statements. Comprehensive examples have been given to guide the Turkers to write well-formed while logically plausible statements. In order to harvest fake statements without statistical cues, we also provide detailed instructions on how to re-write the ”fake” statements. During the annotation, we hire 8 experts to perform sanity checks on each of the HIT to make sure that the annotated dataset is clean and meets our requirements.
|
| 310 |
+
|
| 311 |
+
Survey Instructions (Click to expand)
|
| 312 |
+
|
| 313 |
+
You are given a table with its wikipedia source, your job is to compose non-trivial statements supported by the table.
|
| 314 |
+
|
| 315 |
+
- "Trivial": the sentence can be easily generated by looking only a certain row without understanding the table.
|
| 316 |
+
|
| 317 |
+
- "Non-trivial": the sentence requires reading multiple rows of the table and understanding of the table content. For example, the sentences which include summarization, comparative, negation, relational, inclusion, superlative, aggregational, rephrase or combinations of them are non-trivial. But non-trvial is not limited to these types, any statement involving understanding and reasoning is accepted.
|
| 318 |
+
|
| 319 |
+
We list two examples below to help you understand, you are encouraged to open the table wikipedia link to understand the context of the table. (Everything in the table is lower-cased, you are free to use lower or upper case in your sentence):
|
| 320 |
+
|
| 321 |
+
Table Wikipedia Link: Road_Rules_Challenge:_The_Island (https://en.wikipedia.org/wiki/Real_World/Road_Rules_Challenge:_The_Island)
|
| 322 |
+
|
| 323 |
+
<table><tr><td rowspan=1 colspan=1>player</td><td rowspan=1 colspan=1> original season</td><td rowspan=1 colspan=1>gender</td><td rowspan=1 colspan=1> eliminated</td><td rowspan=1 colspan=1> placing</td></tr><tr><td rowspan=1 colspan=1>derrick kosinski</td><td rowspan=1 colspan=1>rr : x - treme</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>winner</td><td rowspan=1 colspan=1>winner</td></tr><tr><td rowspan=1 colspan=1>evelyn smith</td><td rowspan=1 colspan=1>fresh meat</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>winner</td><td rowspan=1 colspan=1>winner</td></tr><tr><td rowspan=1 colspan=1> johnny devenanzio</td><td rowspan=1 colspan=1>rw : key west</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>winner</td><td rowspan=1 colspan=1>winner</td></tr><tr><td rowspan=1 colspan=1>kenny santucci</td><td rowspan=1 colspan=1>fresh meat</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>winner</td><td rowspan=1 colspan=1>winner</td></tr><tr><td rowspan=1 colspan=1> jenn grijalva</td><td rowspan=1 colspan=1>rw :denver</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>runner - up</td></tr><tr><td rowspan=1 colspan=1> paula meronek</td><td rowspan=1 colspan=1>rw : key west</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>runner - up</td></tr><tr><td rowspan=1 colspan=1>robin hibbard</td><td rowspan=1 colspan=1>rw : san diego</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>runner - up</td></tr><tr><td rowspan=1 colspan=1>ryan kehoe</td><td rowspan=1 colspan=1>fresh meat</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>runner - up</td></tr><tr><td rowspan=1 colspan=1>dunbar merrill</td><td rowspan=1 colspan=1>rw : sydney</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>9th place</td></tr><tr><td rowspan=1 colspan=1> johanna botta</td><td rowspan=1 colspan=1>rw : austin</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>10th place</td></tr><tr><td rowspan=1 colspan=1> kellyanne judd</td><td rowspan=1 colspan=1>rw : sydney</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>11th place</td></tr><tr><td rowspan=1 colspan=1>dan walsh</td><td rowspan=1 colspan=1>r : viewers' revenge</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 8</td><td rowspan=1 colspan=1>12th place</td></tr><tr><td rowspan=1 colspan=1>colie edison</td><td rowspan=1 colspan=1>rw :denver</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode7</td><td rowspan=1 colspan=1>13th place</td></tr><tr><td rowspan=1 colspan=1>cohutta grindstaff</td><td rowspan=1 colspan=1>rw : sydney</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 6</td><td rowspan=1 colspan=1>14th place</td></tr><tr><td rowspan=1 colspan=1>tyrie ballard</td><td rowspan=1 colspan=1>rw :denver</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 5</td><td rowspan=1 colspan=1>15th place</td></tr><tr><td rowspan=1 colspan=1>ashli robson</td><td rowspan=1 colspan=1>rw : sydney</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 4</td><td rowspan=1 colspan=1>16th place</td></tr><tr><td rowspan=1 colspan=1>rachel robinson</td><td rowspan=1 colspan=1>rr : campus crawl</td><td rowspan=1 colspan=1>female</td><td rowspan=1 colspan=1>episode 3</td><td rowspan=1 colspan=1>17th place</td></tr><tr><td rowspan=1 colspan=1>abram boise</td><td rowspan=1 colspan=1>rr : south pacific</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 2</td><td rowspan=1 colspan=1>18th place</td></tr><tr><td rowspan=1 colspan=1>dave malinosky</td><td rowspan=1 colspan=1>rw : hollywood</td><td rowspan=1 colspan=1>male</td><td rowspan=1 colspan=1>episode 2 (quit)</td><td rowspan=1 colspan=1>19th place</td></tr></table>
|
| 324 |
+
|
| 325 |
+
# Rejected ("Trivial") examples:
|
| 326 |
+
|
| 327 |
+
1. In the TV series "The Island", Derrick Kosinski is a male character. (Easy! You can simply look into first row to produce this sentence.)
|
| 328 |
+
|
| 329 |
+
2. Derrick Kosinski has the placing of winner in the TV series.
|
| 330 |
+
|
| 331 |
+
3. Kenny Santucci is from original season of "Fresh Meat".
|
| 332 |
+
|
| 333 |
+
4. Jenn Grijalva is Runner-Up of the challenge.
|
| 334 |
+
|
| 335 |
+
# Accepted ("Non-Trivial") examples:
|
| 336 |
+
|
| 337 |
+
(Superlative): In the TV series "The Island", Evelyn Smith is the highest ranked female.
|
| 338 |
+
(Comparitive): In the TV series "The Island", Jenn Grijalva appears later than Colie Edison in the series.
|
| 339 |
+
(Relational): Ashli Robson appears one episode later than Rachel Robinson in the TV series.
|
| 340 |
+
(Summarization): there are three male winners in the challenge.
|
| 341 |
+
(Rephrase): Evelyn Smith never eliminated in any episode in the TV series.
|
| 342 |
+
(Combination): Derrick Kosinski is the winner and Jenn Grijalva is Runner-Up of the challenge.
|
| 343 |
+
(Negation): jenn grijalva is not the female winning the challenge.
|
| 344 |
+
(Inclusion): Evelyn smith is one of the four winner for the challenge.
|
| 345 |
+
|
| 346 |
+
Table Wikipedia Link: AFC_Champions_League (https://en.wikipedia.org/wiki/AFC_Champions_League)
|
| 347 |
+
|
| 348 |
+
<table><tr><td rowspan=1 colspan=1>rank</td><td rowspan=1 colspan=1>member association</td><td rowspan=1 colspan=1> points</td><td rowspan=1 colspan=1> group stage</td><td rowspan=1 colspan=1> play - off</td><td rowspan=1 colspan=1> afc cup</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>saudi arabia</td><td rowspan=1 colspan=1>860.5</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>qatar</td><td rowspan=1 colspan=1>838.2</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>iran</td><td rowspan=1 colspan=1>813.5</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>uae</td><td rowspan=1 colspan=1>750.2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>uzbekistan</td><td rowspan=1 colspan=1>680.8</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>india</td><td rowspan=1 colspan=1>106.4</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>2</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>jordan</td><td rowspan=1 colspan=1>128.7</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>2</td></tr></table>
|
| 349 |
+
|
| 350 |
+
# Rejected ("Trivial") examples:
|
| 351 |
+
|
| 352 |
+
1. In the rank, it has 0 play - off.
|
| 353 |
+
2. ratar is in rank 2.
|
| 354 |
+
3. When member association is india, the points is 106.4.
|
| 355 |
+
|
| 356 |
+
# Accepted ("Non-Trivial") examples:
|
| 357 |
+
|
| 358 |
+
(Negation): iran is one of the two countries getting into the 4th stage. (Average): uae and qatar have an average of 1 play - off during the champion league.
|
| 359 |
+
|
| 360 |
+
(Algorithmic): saudi arabia achieves 22.3 more points than qatar.
|
| 361 |
+
|
| 362 |
+
(Comparison): india got lower points than jordan in the league.
|
| 363 |
+
|
| 364 |
+
(Superlative): In the Champions League, saudi arabia achieves the highest points.
|
| 365 |
+
|
| 366 |
+
(Combination): saudi arabia is the group stage 4 while iran is in group stage 3.
|
| 367 |
+
|
| 368 |
+
Tips1: We set minimum length to 9, and sentences with more complicated grammar structures are preferred.
|
| 369 |
+
Tips2: Do not limited to only one type of description like superlative or relative.
|
| 370 |
+
Tips3: Copying the records from the table is encouraged, which can help avoid typos and mis-spelling as much as possible, .
|
| 371 |
+
Tips4: Do not vague words like "maybe", "perhaps", "good", "excellent", "most", etc.
|
| 372 |
+
|
| 373 |
+
First Read the following table, then write five diverse non-trivial facts for this given table:
|
| 374 |
+
|
| 375 |
+
Table Source: athletics at the 1952 summer olympics - men 's pole vault (https://en.wikipedia.org/wiki/Athletics_at_the_1952_Summer_Olympics_%E2%80%93_Men%27s_pole_vault)
|
| 376 |
+
|
| 377 |
+
<table><tr><td rowspan=1 colspan=1>athlete</td><td rowspan=1 colspan=1>nationality</td><td rowspan=1 colspan=1>3.60</td><td rowspan=1 colspan=1>3.80</td><td rowspan=1 colspan=1>3.95</td><td rowspan=1 colspan=1>result</td></tr><tr><td rowspan=1 colspan=1>bob richards</td><td rowspan=1 colspan=1>united states</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.55 or</td></tr><tr><td rowspan=1 colspan=1>don laz</td><td rowspan=1 colspan=1>united states</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.50</td></tr><tr><td rowspan=1 colspan=1>ragnar lundberg</td><td rowspan=1 colspan=1>sweden</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.40</td></tr><tr><td rowspan=1 colspan=1>petro denysenko</td><td rowspan=1 colspan=1>soviet union</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.40</td></tr><tr><td rowspan=1 colspan=1>valto olenius</td><td rowspan=1 colspan=1>finland</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>4.30</td></tr><tr><td rowspan=1 colspan=1>bunkichi sawada</td><td rowspan=1 colspan=1>japan</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>xx0</td><td rowspan=1 colspan=1>4.20</td></tr><tr><td rowspan=1 colspan=1>volodymyr brazhnyk</td><td rowspan=1 colspan=1>soviet union</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.20</td></tr><tr><td rowspan=1 colspan=1>viktor knyazev</td><td rowspan=1 colspan=1>soviet union</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.20</td></tr><tr><td rowspan=1 colspan=1>george mattos</td><td rowspan=1 colspan=1>united states</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.20</td></tr><tr><td rowspan=1 colspan=1>erkki kataja</td><td rowspan=1 colspan=1>finland</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.10</td></tr><tr><td rowspan=1 colspan=1>tamás homonnay</td><td rowspan=1 colspan=1>sweden</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.10</td></tr><tr><td rowspan=1 colspan=1>lennart lind</td><td rowspan=1 colspan=1>hungary</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4.10</td></tr><tr><td rowspan=1 colspan=1>milan milakov</td><td rowspan=1 colspan=1>yugoslavia</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>。</td><td rowspan=1 colspan=1>x0</td><td rowspan=1 colspan=1>4.10</td></tr><tr><td rowspan=1 colspan=1>rigas efstathiadis</td><td rowspan=1 colspan=1>greece</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>3.95</td></tr><tr><td rowspan=1 colspan=1>torfy bryngeirsson</td><td rowspan=1 colspan=1>iceland</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>3.95</td></tr><tr><td rowspan=1 colspan=1>erling kaas</td><td rowspan=1 colspan=1>norway</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>xxx</td><td rowspan=1 colspan=1>3.80</td></tr><tr><td rowspan=1 colspan=1>theodosios balafas</td><td rowspan=1 colspan=1>greece</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>。</td><td rowspan=1 colspan=1>xxx</td><td rowspan=1 colspan=1>3.80</td></tr><tr><td rowspan=1 colspan=1> jukka piironen</td><td rowspan=1 colspan=1>finland</td><td rowspan=1 colspan=1>-</td><td rowspan=1 colspan=1>x0</td><td rowspan=1 colspan=1>xX</td><td rowspan=1 colspan=1>3.80</td></tr><tr><td rowspan=1 colspan=1> zeno dragomir</td><td rowspan=1 colspan=1>romania</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>x0</td><td rowspan=1 colspan=1>xX</td><td rowspan=1 colspan=1>3.80</td></tr></table>
|
| 378 |
+
|
| 379 |
+
Please write a non-trivial statement, minimum 9 words
|
| 380 |
+
|
| 381 |
+
Please write a non-trivial statement, minimum 9 words
|
| 382 |
+
|
| 383 |
+
Please write a non-trivial statement, minimum 9 words
|
| 384 |
+
|
| 385 |
+
Please write a non-trivial statement, minimum 9 words
|
| 386 |
+
|
| 387 |
+
Please write a non-trivial statement, minimum 9 words
|
| 388 |
+
|
| 389 |
+
# Survey Instructions (Click to expand)
|
| 390 |
+
|
| 391 |
+
Please first read a table to understand its content, an example is shown below, which contains the leaderboard of a competition.
|
| 392 |
+
|
| 393 |
+
<table><tr><td rowspan=1 colspan=1>Player</td><td rowspan=1 colspan=1> Original Season</td><td rowspan=1 colspan=1>Gender</td><td rowspan=1 colspan=1> Eliminated</td><td rowspan=1 colspan=1>Placing</td></tr><tr><td rowspan=1 colspan=1>Derrick Kosinski</td><td rowspan=1 colspan=1>RR: X-Treme</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Winner</td><td rowspan=1 colspan=1>Winner</td></tr><tr><td rowspan=1 colspan=1>Evelyn Smith</td><td rowspan=1 colspan=1>Fresh Meat</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Winner</td><td rowspan=1 colspan=1>Winner</td></tr><tr><td rowspan=1 colspan=1>Johnny Devenanzio</td><td rowspan=1 colspan=1>RW: Key West</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Winner</td><td rowspan=1 colspan=1>Winner</td></tr><tr><td rowspan=1 colspan=1>Kenny Santucci</td><td rowspan=1 colspan=1>Fresh Meat</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Winner</td><td rowspan=1 colspan=1>Winner</td></tr><tr><td rowspan=1 colspan=1> Jenn Grijalva</td><td rowspan=1 colspan=1>RW: Denver</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>Runner-Up</td></tr><tr><td rowspan=1 colspan=1>Paula Meronek</td><td rowspan=1 colspan=1>RW: Key West</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>Runner-Up</td></tr><tr><td rowspan=1 colspan=1>Robin Hibbard</td><td rowspan=1 colspan=1>RW: San Diego</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>Runner-Up</td></tr><tr><td rowspan=1 colspan=1>Ryan Kehoe</td><td rowspan=1 colspan=1>Fresh Meat</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>Runner-Up</td></tr><tr><td rowspan=1 colspan=1>Dunbar Merrill</td><td rowspan=1 colspan=1>RW: Sydney</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>9th Place</td></tr><tr><td rowspan=1 colspan=1>Johanna Botta</td><td rowspan=1 colspan=1>RW: Austin</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode8</td><td rowspan=1 colspan=1>10th Place</td></tr><tr><td rowspan=1 colspan=1> KellyAnne Judd</td><td rowspan=1 colspan=1>RW: Sydney</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>11th Place</td></tr><tr><td rowspan=1 colspan=1>Dan Walsh</td><td rowspan=1 colspan=1>RR: Viewers' Revenge</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 8</td><td rowspan=1 colspan=1>12th Place</td></tr><tr><td rowspan=1 colspan=1>Colie Edison</td><td rowspan=1 colspan=1>RW: Denver</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 7</td><td rowspan=1 colspan=1>13th Place</td></tr><tr><td rowspan=1 colspan=1>Cohutta Grindstaff</td><td rowspan=1 colspan=1>RW: Sydney</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 6</td><td rowspan=1 colspan=1>14th Place</td></tr><tr><td rowspan=1 colspan=1>Tyrie Ballard</td><td rowspan=1 colspan=1>RW: Denver</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 5</td><td rowspan=1 colspan=1>15th Place</td></tr><tr><td rowspan=1 colspan=1>Ashli Robson</td><td rowspan=1 colspan=1>RW: Sydney</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 4</td><td rowspan=1 colspan=1>16th Place</td></tr><tr><td rowspan=1 colspan=1>Rachel Robinson</td><td rowspan=1 colspan=1>RR: Campus Crawl</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 3</td><td rowspan=1 colspan=1>17th Place</td></tr><tr><td rowspan=1 colspan=1>Abram Boise</td><td rowspan=1 colspan=1>RR: South Pacific</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 2</td><td rowspan=1 colspan=1>18th Place</td></tr><tr><td rowspan=1 colspan=1>Dave Malinosky</td><td rowspan=1 colspan=1>RW: Hollywood</td><td rowspan=1 colspan=1>Male</td><td rowspan=1 colspan=1>Episode 2 (quit)</td><td rowspan=1 colspan=1>19th Place</td></tr><tr><td rowspan=1 colspan=1>Tonya Cooley</td><td rowspan=1 colspan=1>RW: Chicago</td><td rowspan=1 colspan=1>Female</td><td rowspan=1 colspan=1>Episode 1</td><td rowspan=1 colspan=1>20th Place</td></tr></table>
|
| 394 |
+
|
| 395 |
+
You are given a sentence to describe a fact in the table, please follow the following two cases to finish the job:
|
| 396 |
+
|
| 397 |
+
\* If the given sentence is fluent and consistent with the table, then please re-write it to make it "fake" based on the following criteria:
|
| 398 |
+
|
| 399 |
+
1. Contradictory: it should still be a fluent and coherent, but it needs be explicitly contrdictory to the facts in the table.
|
| 400 |
+
|
| 401 |
+
2. Do not simply add NOT to revert the sentence meaning.
|
| 402 |
+
|
| 403 |
+
3. Do not write neutral or non-verifiable sentences, you need to confirm it in the table.
|
| 404 |
+
|
| 405 |
+
3. The fake statement needs to be clear, explicit and natural, do not use vague or ambiguous words like "bad", "good", "many", etc.
|
| 406 |
+
|
| 407 |
+
4. try to use diverse fake types during annotatoin.
|
| 408 |
+
|
| 409 |
+
Example 1. Given statement: Ashli Robson was eliminated in episode 4.
|
| 410 |
+
Good Faking: Ashli Robson survives through episode 1 to episode 5.
|
| 411 |
+
Good Faking: Ashli Robson is not the only one eliminated in episode 4.
|
| 412 |
+
Bad Faking (Simply add not): Ashli Robson was not eliminated on episode 4. Bad Faking (Ambiguous, who is Ashli?): Ashli was not eliminated on episode 4.
|
| 413 |
+
Bad Faking (Irrelevant): Ashli was born in Mexico.
|
| 414 |
+
Bad Faking (Too subjective, what do you mean by "early"): AshlDerrick Kosinski lost the game very early.
|
| 415 |
+
Bad Faking (Not verifiable): AshlDerrick Kosinski was the most popular player. Example 2. Given statement: Tonya Cooley is in the 20th place.
|
| 416 |
+
Good Faking: Tonya Cooley is not the last in placing.
|
| 417 |
+
Good Faking: Tonya Cooley is eliminated in episode 1 but not the last in placing.
|
| 418 |
+
Bad Faking: (There is nothing larger than 20th) Tonya Cooley is after the 20th place.
|
| 419 |
+
Bad Faking: (Half Wrong/half Right) When the gneder is female, the player is Tonya Colley.
|
| 420 |
+
Bad Faking (Introduce values outside the table): Tonya Cooley is in the 43th place.
|
| 421 |
+
Bad Faking (Typo): Tonya Cooler is in the 20th palace.
|
| 422 |
+
|
| 423 |
+
\* If the given statement is erroneous (see following), please type in N/A in the input box.
|
| 424 |
+
|
| 425 |
+
1. critical grammar error like missing verbs, nouns, etc. Do not count small errors like tense, singular/plural, case errors.
|
| 426 |
+
2. serious typo, misspelling.
|
| 427 |
+
3. the described fact is contradictory to the table.
|
| 428 |
+
|
| 429 |
+
You can use the highlight button to help you find the mentions in the table, you can use either upper or lower case, not important
|
| 430 |
+
|
| 431 |
+
First Read the given tables, then rewrite the statements to make them fake:
|
| 432 |
+
|
| 433 |
+
Table Source: 2003 - 04 isu junior grand prix (https://en.wikipedia.org/wiki/2003%E2%80%9304_ISU_Junior_Grand_Prix)
|
| 434 |
+
|
| 435 |
+
<table><tr><td rowspan=1 colspan=1>rank</td><td rowspan=1 colspan=1>nation</td><td rowspan=1 colspan=1>gold</td><td rowspan=1 colspan=1>silver</td><td rowspan=1 colspan=1>bronze</td><td rowspan=1 colspan=1>total</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>russia</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>14</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>32</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>united states</td><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>22</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>canada</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>16</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1> japan</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>13</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>hungary</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>6</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>czech republic</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>4</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>ukraine</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>4</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>italy</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>4</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>sweden</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>3</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>israel</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>2</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>finland</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>france</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td></tr></table>
|
| 436 |
+
|
| 437 |
+
Hightlight Mentions, Click Me!
|
| 438 |
+
|
| 439 |
+
Given Statement: russia won the most silver medals in the grand prix
|
| 440 |
+
|
| 441 |
+
Please rewrite a sentence which is contradictory to the table
|
| 442 |
+
|
| 443 |
+
Hightlight Mentions, Click Me!
|
| 444 |
+
|
| 445 |
+
Given Statement: france and finland won the least medals in the grand prix
|
| 446 |
+
|
| 447 |
+
Please rewrite a sentence which is contradictory to the table
|
| 448 |
+
|
| 449 |
+
Hightlight Mentions, Click Me!
|
| 450 |
+
|
| 451 |
+
Given Statement: hungary and finland were the only countries that idd not win any silver medals
|
| 452 |
+
|
| 453 |
+
Please rewrite a sentence which is contradictory to the table
|
| 454 |
+
|
| 455 |
+
Hightlight Mentions, Click Me!
|
| 456 |
+
|
| 457 |
+
Given Statement: the united states won more gold medals than canada
|
| 458 |
+
|
| 459 |
+
Please rewrite a sentence which is contradictory to the table
|
| 460 |
+
|
| 461 |
+
Hightlight Mentions, Click Me!
|
| 462 |
+
|
| 463 |
+
Given Statement: canada won the most bronze medals in the grand prix
|
| 464 |
+
|
| 465 |
+
Please rewrite a sentence which is contradictory to the table
|
md/train/rkmu5b0a-/rkmu5b0a-.md
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MGAN: TRAINING GENERATIVE ADVERSARIAL NETS WITHMULTIPLE GENERATORS
|
| 2 |
+
|
| 3 |
+
Quan Hoang
|
| 4 |
+
University of Massachusetts-Amherst
|
| 5 |
+
Amherst, MA, USA
|
| 6 |
+
qhoang@umass.edu
|
| 7 |
+
Tu Dinh Nguyen, Trung Le, Dinh Phung
|
| 8 |
+
PRaDA Centre, Deakin University
|
| 9 |
+
Geelong, Australia
|
| 10 |
+
{tu.nguyen,trung.l,dinh.phung}
|
| 11 |
+
@deakin.edu.au
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
We propose in this paper a new approach to train the Generative Adversarial Nets (GANs) with a mixture of generators to overcome the mode collapsing problem. The main intuition is to employ multiple generators, instead of using a single one as in the original GAN. The idea is simple, yet proven to be extremely effective at covering diverse data modes, easily overcoming the mode collapsing problem and delivering state-of-the-art results. A minimax formulation was able to establish among a classifier, a discriminator, and a set of generators in a similar spirit with GAN. Generators create samples that are intended to come from the same distribution as the training data, whilst the discriminator determines whether samples are true data or generated by generators, and the classifier specifies which generator a sample comes from. The distinguishing feature is that internal samples are created from multiple generators, and then one of them will be randomly selected as final output similar to the mechanism of a probabilistic mixture model. We term our method Mixture Generative Adversarial Nets (MGAN). We develop theoretical analysis to prove that, at the equilibrium, the Jensen-Shannon divergence (JSD) between the mixture of generators’ distributions and the empirical data distribution is minimal, whilst the JSD among generators’ distributions is maximal, hence effectively avoiding the mode collapsing problem. By utilizing parameter sharing, our proposed model adds minimal computational cost to the standard GAN, and thus can also efficiently scale to large-scale datasets. We conduct extensive experiments on synthetic 2D data and natural image databases (CIFAR-10, STL-10 and ImageNet) to demonstrate the superior performance of our MGAN in achieving state-of-the-art Inception scores over latest baselines, generating diverse and appealing recognizable objects at different resolutions, and specializing in capturing different types of objects by the generators.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Generative Adversarial Nets (GANs) (Goodfellow et al., 2014) are a recent novel class of deep generative models that are successfully applied to a large variety of applications such as image, video generation, image inpainting, semantic segmentation, image-to-image translation, and text-to-image synthesis, to name a few (Goodfellow, 2016). From the game theory metaphor, the model consists of a discriminator and a generator playing a two-player minimax game, wherein the generator aims to generate samples that resemble those in the training data whilst the discriminator tries to distinguish between the two as narrated in (Goodfellow et al., 2014). Training GAN, however, is challenging as it can be easily trapped into the mode collapsing problem where the generator only concentrates on producing samples lying on a few modes instead of the whole data space (Goodfellow, 2016).
|
| 20 |
+
|
| 21 |
+
Many GAN variants have been recently proposed to address this problem. They can be grouped into two main categories: training either a single generator or many generators. Methods in the former include modifying the discriminator’s objective (Salimans et al., 2016; Metz et al., 2016), modifying the generator’s objective (Warde-Farley & Bengio, 2016), or employing additional discriminators to yield more useful gradient signals for the generators (Nguyen et al., 2017; Durugkar et al., 2016). The common theme in these variants is that generators are shown, at equilibrium, to be able to recover the data distribution, but convergence remains elusive in practice. Most experiments are conducted on toy datasets or on narrow-domain datasets such as LSUN (Yu et al., 2015) or CelebA (Liu et al., 2015). To our knowledge, only Warde-Farley & Bengio (2016) and Nguyen et al. (2017) perform quantitative evaluation of models trained on much more diverse datasets such as STL-10 (Coates et al., 2011) and ImageNet (Russakovsky et al., 2015).
|
| 22 |
+
|
| 23 |
+
Given current limitations in the training of single-generator GANs, some very recent attempts have been made following the multi-generator approach. Tolstikhin et al. (2017) apply boosting techniques to train a mixture of generators by sequentially training and adding new generators to the mixture. However, sequentially training many generators is computational expensive. Moreover, this approach is built on the implicit assumption that a single-generator GAN can generate very good images of some modes, so reweighing the training data and incrementally training new generators will result in a mixture that covers the whole data space. This assumption is not true in practice since current single-generator GANs trained on diverse datasets such as ImageNet tend to generate images of unrecognizable objects. Arora et al. (2017) train a mixture of generators and discriminators, and optimize the minimax game with the reward function being the weighted average reward function between any pair of generator and discriminator. This model is computationally expensive and lacks a mechanism to enforce the divergence among generators. Ghosh et al. (2017) train many generators by using a multi-class discriminator that, in addition to detecting whether a data sample is fake, predicts which generator produces the sample. The objective function in this model punishes generators for generating samples that are detected as fake but does not directly encourage generators to specialize in generating different types of data.
|
| 24 |
+
|
| 25 |
+
We propose in this paper a novel approach to train a mixture of generators. Unlike aforementioned multi-generator GANs, our proposed model simultaneously trains a set of generators with the objective that the mixture of their induced distributions would approximate the data distribution, whilst encouraging them to specialize in different data modes. The result is a novel adversarial architecture formulated as a minimax game among three parties: a classifier, a discriminator, and a set of generators. Generators create samples that are intended to come from the same distribution as the training data, whilst the discriminator determines whether samples are true data or generated by generators, and the classifier specifies which generator a sample comes from. We term our proposed model as Mixture Generative Adversarial Nets (MGAN). We provide analysis that our model is optimized towards minimizing the Jensen-Shannon Divergence (JSD) between the mixture of distributions induced by the generators and the data distribution while maximizing the JSD among generators.
|
| 26 |
+
|
| 27 |
+
Empirically, our proposed model can be trained efficiently by utilizing parameter sharing among generators, and between the classifier and the discriminator. In addition, simultaneously training many generators while enforcing JSD among generators helps each of them focus on some modes of the data space and learn better. Trained on CIFAR-10, each generator learned to specialize in generating samples from a different class such as horse, car, ship, dog, bird or airplane. Overall, the models trained on the CIFAR-10, STL-10 and ImageNet datasets successfully generated diverse, recognizable objects and achieved state-of-the-art Inception scores (Salimans et al., 2016). The model trained on the CIFAR-10 even outperformed GANs trained in a semi-supervised fashion (Salimans et al., 2016; Odena et al., 2016).
|
| 28 |
+
|
| 29 |
+
In short, our main contributions are: (i) a novel adversarial model to efficiently train a mixture of generators while enforcing the JSD among the generators; (ii) a theoretical analysis that our objective function is optimized towards minimizing the JSD between the mixture of all generators’ distributions and the real data distribution, while maximizing the JSD among generators; and (iii) a comprehensive evaluation on the performance of our method on both synthetic and real-world large-scale datasets of diverse natural scenes.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
Figure 1: MGAN’s architecture with $\mathrm { K }$ generators, a binary discriminator, a multi-class classifier.
|
| 33 |
+
|
| 34 |
+
# 2 GENERATIVE ADVERSARIAL NETS
|
| 35 |
+
|
| 36 |
+
Given the discriminator $D$ and generator $G$ , both parameterized via neural networks, training GAN can be formulated as the following minimax objective function:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\displaystyle \operatorname* { m i n } _ { G } \displaystyle \operatorname* { m a x } _ { D } \mathbb { E } _ { \mathbf { x } \sim P _ { d a t a } ( \mathbf { x } ) } \left[ \log D \left( \mathbf { x } \right) \right] + \mathbb { E } _ { \mathbf { z } \sim P _ { \mathbf { z } } } \left[ \log \left( 1 - D \left( G \left( \mathbf { z } \right) \right) \right) \right]
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $\mathbf { x }$ is drawn from data distribution $P _ { d a t a }$ , $\mathbf { z }$ is drawn from a prior distribution $P _ { \mathbf { z } }$ . The mapping $G \left( \mathbf { z } \right)$ induces a generator distribution $P _ { m o d e l }$ in data space. GAN alternatively optimizes $D$ and $G$ using stochastic gradient-based learning. As a result, the optimization order in 1 can be reversed, causing the minimax formulation to become maximin. $G$ is therefore incentivized to map every $\mathbf { z }$ to a single $\mathbf { x }$ that is most likely to be classified as true data, leading to mode collapsing problem. Another commonly asserted cause of generating less diverse samples in GAN is that, at the optimal point of $D$ , minimizing $G$ is equivalent to minimizing the JSD between the data and model distributions, which has been empirically proven to prefer to generate samples around only a few modes whilst ignoring other modes (Huszar, 2015; Theis et al., 2015). ´
|
| 43 |
+
|
| 44 |
+
# 3 PROPOSED MIXTURE GANS
|
| 45 |
+
|
| 46 |
+
We now present our main contribution of a novel approach that can effectively tackle mode collapse in GAN. Our idea is to use a mixture of many distributions rather than a single one as in the standard GAN, to approximate the data distribution, and simultaneously we enlarge the divergence of those distributions so that they cover different data modes.
|
| 47 |
+
|
| 48 |
+
To this end, an analogy to a game among $\mathrm { K }$ generators $G _ { \mathrm { 1 : K } }$ , a discriminator $D$ and a classifier $C$ can be formulated. Each generator $G _ { k }$ maps $\mathbf { z }$ to ${ \bf x } = G _ { k } \left( { \bf z } \right)$ , thus inducing a single distribution $P _ { G _ { k } }$ ; and $\mathrm { K }$ generators altogether induce a mixture over K distributions, namely $P _ { m o d e l }$ in the data space. An index $u$ is drawn from a multinomial distribution $\operatorname { M u l t } \left( \pi \right)$ where $\pi = [ \pi _ { 1 } , \pi _ { 2 } , . . . , \pi _ { \mathrm { K } } ]$ is the coefficients of the mixture; and then the sample $G _ { u } \left( \mathbf { z } \right)$ is used as the output. Here, we use a predefined $\pi$ and fix it instead of learning. The discriminator $D$ aims to distinguish between this sample and the training samples. The classifier $C$ performs multi-class classification to classify samples labeled by the indices of their corresponding generators. We term this whole process and our model the Mixture Generative Adversarial Nets (MGAN).
|
| 49 |
+
|
| 50 |
+
Fig. 1 illustrates the general architecture of our proposed MGAN, where all components are parameterized by neural networks. $G _ { k }$ (s) tie their parameters together except the input layer, whilst $C$ and $D$ share parameters except the output layer. This parameter sharing scheme enables the networks to leverage their common information such as features at low-level layers that are close to the data layer, hence helps to train model effectively. In addition, it also minimizes the number of parameters and adds minimal complexity to the standard GAN, thus the whole process is still very efficient.
|
| 51 |
+
|
| 52 |
+
More formally, $D , C$ and $G _ { \mathrm { 1 : K } }$ now play the following multi-player minimax optimization game:
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\begin{array} { l } { \displaystyle \underset { G _ { 1 : \kappa } , C } { \mathrm { m i n } } \underset { D } { \mathrm { m a x } } \mathcal { I } \left( G _ { 1 : \kappa } , C , D \right) = \mathbb { E } _ { \mathbf { x } \sim P _ { d a t a } } \left[ \log D \left( \mathbf { x } \right) \right] + \mathbb { E } _ { \mathbf { x } \sim P _ { m o d e l } } \left[ \log \left( 1 - D \left( \mathbf { x } \right) \right) \right] } \\ { \displaystyle \qquad - \beta \left\{ \sum _ { k = 1 } ^ { \mathbf { K } } \pi _ { k } \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } \left[ \log C _ { k } \left( \mathbf { x } \right) \right] \right\} } \end{array}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $C _ { k } \left( \mathbf { x } \right)$ is the probability that x is generated by $G _ { k }$ and $\beta > 0$ is the diversity hyper-parameter. The first two terms show the interaction between generators and the discriminator as in the standard GAN. The last term should be recognized as a standard softmax loss for a multi-classification setting, which aims to maximize the entropy for the classifier. This represents the interaction between generators and the classifier, which encourages each generator to produce data separable from those produced by other generators. The strength of this interaction is controlled by $\beta$ . Similar to GAN, our proposed network can be trained by alternatively updating $D$ , $C$ and $G _ { \mathrm { 1 : K } }$ . We refer to Appendix A for the pseudo-code and algorithms for parameter learning for our proposed MGAN.
|
| 59 |
+
|
| 60 |
+
# 3.1 THEORETICAL ANALYSIS
|
| 61 |
+
|
| 62 |
+
Assuming all $C , D$ and $G _ { \mathrm { 1 : K } }$ have enough capacity, we show below that at the equilibrium point of the minimax problem in Eq. (2), the JSD between the mixture induced by $G _ { \mathrm { 1 : K } }$ and the data distribution is minimal, i.e. $p _ { d a t a } = p _ { m o d e l }$ , and the JSD among $\mathrm { K }$ generators is maximal, i.e. two arbitrary generators almost never produce the same data. In what follows we present our mathematical statement and the sketch of their proofs. We refer to Appendix B for full derivations.
|
| 63 |
+
|
| 64 |
+
Proposition 1. For fixed generators $G _ { 1 }$ , $G _ { 2 }$ , ..., $G _ { \mathrm { K } }$ and their mixture weights $\pi _ { 1 } , \pi _ { 2 } , . . . , \pi _ { \mathrm { K } }$ , the optimal solution $C ^ { * } = C _ { \mathrm { 1 : K } } ^ { * }$ and $D ^ { * }$ for $\mathcal { I } \left( G _ { \mathrm { 1 : K } } , C , D \right)$ in Eq. (2) are:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
C _ { k } ^ { * } \left( \mathbf { x } \right) = \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathrm { K } } \pi _ { j } p _ { G _ { j } } \left( \mathbf { x } \right) } \mathrm { a n d } D ^ { * } \left( \mathbf { x } \right) = \frac { p _ { d a t a } \left( \mathbf { x } \right) } { p _ { d a t a } \left( \mathbf { x } \right) + p _ { m o d e l } \left( \mathbf { x } \right) }
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
Proof. It can be seen that the solution $C _ { k } ^ { * }$ is a general case of $D ^ { * }$ when $D$ classifies samples from two distributions with equal weight of $1 / 2$ . We refer the proofs for $D ^ { * }$ to Prop. 1 in (Goodfellow et al., 2014), and our proof for $C _ { k } ^ { * }$ to Appendix $\mathbf { B }$ in this manuscript. □
|
| 71 |
+
|
| 72 |
+
Based on Prop. 1, we further show that at the equilibrium point of the minimax problem in al generator which is as $G ^ { * } = [ G _ { 1 } ^ { * } , . . . , G _ { \mathrm { K } } ^ { * } ]$ induces the generated diso the true data distribution $p _ { m o d e l } ^ { * } \left( \mathbf { x } \right) =$ $\begin{array} { r } { \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } p _ { G _ { k } ^ { \ast } } \left( \mathbf { x } \right) } \end{array}$ $p _ { d a t a } \left( \mathbf { x } \right)$ taining the mixture components $p _ { G _ { k } ^ { * } } \left( \mathbf { x } \right) ( \mathbf { s } )$ as furthest as possible to avoid the mode collapse.
|
| 73 |
+
|
| 74 |
+
Theorem 2. At the equilibrium point of the minimax problem in Eq. (2), the optimal $G ^ { * } , D ^ { * }$ , and $C ^ { * }$ satisfy
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { l } { { G ^ { * } = a r g m i n \ \left( { \mathrm { 2 } } \cdot { \mathrm { J S D } } \left( P _ { d a t a } \right| \left| P _ { m o d e l } \right) - \mathrm { \boldsymbol { \beta } } \cdot { \mathrm { J S D } } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) \right) } } \\ { { \displaystyle C _ { k } ^ { * } \left( \mathbf { x } \right) = \frac { \pi _ { k } p _ { G _ { k } ^ { * } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathbf { K } } \pi _ { j } p _ { G _ { j } ^ { * } } \left( \mathbf { x } \right) } \ \mathrm { a n d } \ { D ^ { * } \left( \mathbf { x } \right) } = \frac { p _ { d a t a } \left( \mathbf { x } \right) } { p _ { d a t a } \left( \mathbf { x } \right) + p _ { m o d e l } \left( \mathbf { x } \right) } } } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Proof. Substituting $C _ { \mathrm { 1 : K } } ^ { \ast }$ and $D ^ { * }$ into Eq. (2), we reformulate the objective function for $G _ { \mathrm { 1 : K } }$ as follows:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { r l r } { { \boldsymbol { \Sigma } ( G \mathbf { 1 } \cdot \mathbf { K } ) = \mathbb { E } _ { \mathbf { x } \sim P _ { d a t a } } [ \log \frac { p _ { d a t a } ( \mathbf { x } ) } { p _ { d a t a } ( \mathbf { x } ) + p _ { m o d e l } ( \mathbf { x } ) } ] + \mathbb { E } _ { \mathbf { x } \sim P _ { m o d e l } } [ \log \frac { p _ { m o d e l } ( \mathbf { x } ) } { p _ { d a t a } ( \mathbf { x } ) + p _ { m o d e l } ( \mathbf { x } ) } ] } } \\ & { } & { \sim \beta \{ \sum _ { k = 1 } ^ { \mathbf { K } } \pi _ { k } \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } [ \log \frac { \pi _ { k } p _ { G _ { k } } ( \mathbf { x } ) } { \sum _ { j = 1 } ^ { \mathbf { K } } \pi _ { j } p _ { G _ { j } } ( \mathbf { x } ) } ] \} } \\ & { } & { = 2 \cdot \mathbf { J } \mathbb { S } ( P _ { d a t a } \| P _ { m o d e l } - \log 4 - \beta \{ \displaystyle \sum _ { k = 1 } ^ { \mathbf { K } } \pi _ { k } \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } [ \log \frac { p _ { G _ { k } } ( \mathbf { x } ) } { \sum _ { j = 1 } ^ { \mathbf { K } } \pi _ { j } p _ { G _ { j } } ( \mathbf { x } ) } ] \} - \beta \sum _ { k = 1 } ^ { \mathbf { K } } \pi _ { k } \log \pi _ { k } } \\ & { } & { = 2 \cdot \mathbf { J } \mathbb { S } \mathbb { D } ( P _ { d a t a } \| P _ { m o d e l } - \beta \cdot \mathbf { J } \mathbb { S } \mathbf { D } _ { \pi } ( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } ) - \log 4 - \beta \sum _ { k = 1 } ^ { \mathbf { K } } \pi _ { k } \log \pi _ { k } } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Since the last two terms in Eq. (4) are constant, that concludes our proof.
|
| 87 |
+
|
| 88 |
+
This theorem shows that progressing towards the equilibrium is equivalently to minimizing JSD $( P _ { d a t a } | | P _ { m o d e l } )$ while maximizing $\mathrm { J S D } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right)$ . In the next theorem, we further clarify the equilibrium point for the specific case wherein the data distribution has the form
|
| 89 |
+
|
| 90 |
+
$\begin{array} { r } { p _ { d a t a } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } q _ { k } \left( \mathbf { x } \right) } \end{array}$ herefor xture components , i.e., for almost $q _ { k } \left( \mathbf { x } \right) ( \mathbf { s } )$ arre wel, if n thethen $\mathbb { E } _ { { \bf x } \sim Q _ { k } } \left[ q _ { j } \left( { \bf x } \right) \right] = 0$ $j \ne k$ $\mathbf { x }$ $q _ { k } \left( \mathbf { x } \right) > 0$ $q _ { j } \left( \mathbf { x } \right) = 0$ , $\forall j \ne k$ .
|
| 91 |
+
|
| 92 |
+
Theorem 3. If tture components distribution has the form: are well-separated, the m $\begin{array} { r } { p _ { d a t a } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } q _ { k } \left( \mathbf { x } \right) } \end{array}$ where the mix-the optimization $q _ { k } \mathbf { \Psi } ( \mathbf { x } ) ( s )$
|
| 93 |
+
problem in Eq. (3) has the following solution:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
p _ { G _ { k } ^ { * } } \left( \mathbf { x } \right) = q _ { k } \left( \mathbf { x } \right) , \forall k = 1 , \ldots , \mathrm { K } a n d p _ { m o d e l } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } { \pi } _ { k } q _ { k } \left( \mathbf { x } \right) = p _ { d a t a } \left( \mathbf { x } \right)
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
$\begin{array} { r } { - \beta \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \log { \frac { 1 } { \pi _ { k } } } } \end{array}$ ding o, where $\mathbb { H } ( \pi )$ value of the optimization problem in Eq. (3) is is the Shannon entropy. $- \beta \mathbb { H } \left( \pmb { \pi } \right) =$
|
| 100 |
+
|
| 101 |
+
Proof. Please refer to our proof in Appendix B of this manuscript.
|
| 102 |
+
|
| 103 |
+
Thm. 3 explicitly offers the optimal solution for the specific case wherein the real data are generated from a mixture distribution whose components are well-separated. This further reveals that if the mixture components are well-separated, by setting the number of generators as the number of mixtures in data and maximizing the divergence between the generated components $p _ { G _ { k } } \left( \mathbf { x } \right) ( \mathbf { s }$ ), we can exactly recover the mixture components $q _ { k } \left( \mathbf { x } \right)$ (s) using the generated components $p _ { G _ { k } } \left( \mathbf { x } \right)$ (s), hence strongly supporting our motivation when developing MGAN. In practice, $C , D$ , and $G _ { \mathrm { 1 : K } }$ are parameterized by neural networks and are optimized in the parameter space rather than in the function space. As all generators $G _ { \mathrm { 1 : K } }$ share the same objective function, we can efficiently update their weights using the same backpropagation passes. Empirically, we set the parameter $\pi _ { k } \overset { \cdot } { = } \frac { 1 } { \mathrm { K } } , \forall k \in \mathsf { \bar { \Gamma } } \{ 1 , . . . , \mathrm { K } \}$ , which further minimizes the objective value −βH (π) = −β PKk=1 πk log π w.r.t $\pi$ in Thm. 3. To simplify the computational graph, we assume that each generator is sampled the same number of times in each minibatch. In addition, we adopt the non-saturating heuristic proposed in (Goodfellow et al., 2014) to train $G _ { \mathrm { 1 : K } }$ by maximizing $\log { \cal \bar { D } } \left( G _ { k } \left( { \bf z } \right) \right)$ instead of minimizing $\log D \left( 1 - G _ { k } \left( \mathbf { z } \right) \right)$ .
|
| 104 |
+
|
| 105 |
+
# 4 RELATED WORK
|
| 106 |
+
|
| 107 |
+
Recent attempts to address the mode collapse by modifying the discriminator include minibatch discrimination (Salimans et al., 2016), Unrolled GAN (Metz et al., 2016) and Denoising Feature Matching (DFM) (Warde-Farley & Bengio, 2016). The idea of minibatch discrimination is to allow the discriminator to detect samples that are noticeably similar to other generated samples. Although this method can generate visually appealing samples, it is computationally expensive, thus normally used in the last hidden layer of discriminator. Unrolled GAN improves the learning by unrolling computational graph to include additional optimization steps of the discriminator. It could effectively reduce the mode collapsing problem, but the unrolling step is expensive, rendering it unscalable up to large-scale datasets. DFM augments the objective function of generator with one of a Denoising AutoEncoder (DAE) that minimizes the reconstruction error of activations at the penultimate layer of the discriminator. The idea is that gradient signals from DAE can guide the generator towards producing samples whose activations are close to the manifold of real data activations. DFM is surprisingly effective at avoiding mode collapse, but the involvement of a deep DAE adds considerable computational cost to the model.
|
| 108 |
+
|
| 109 |
+
An alternative approach is to train additional discriminators. D2GAN (Nguyen et al., 2017) employs two discriminators to minimize both Kullback-Leibler (KL) and reverse KL divergences, thus placing a fair distribution across the data modes. This method can avoid the mode collapsing problem to a certain extent, but still could not outperform DFM. Another work uses many discriminators to boost the learning of generator (Durugkar et al., 2016). The authors state that this method is robust to mode collapse, but did not provide experimental results to support that claim.
|
| 110 |
+
|
| 111 |
+
Another direction is to train multiple generators. The so-called MIX $^ +$ GAN (Arora et al., 2017) is related to our model in the use of mixture but the idea is very different. Based on min-max theorem (Neumann, 1928), the MIX+GAN trains a mixture of multiple generators and discriminators with different parameters to play mixed strategies in a min-max game. The total reward of this game is computed by weighted averaging rewards over all pairs of generator and discriminator. The lack of parameter sharing renders this method computationally expensive to train. Moreover, there is no mechanism to enforce the divergence among generators as in ours.
|
| 112 |
+
|
| 113 |
+
Some attempts have been made to train a mixture of GANs in a similar spirit with boosting algorithms. Wang et al. (2016) propose an additive procedure to incrementally train new GANs on a subset of the training data that are badly modeled by previous generators. As the discriminator is expected to classify samples from this subset as real with high confidence, i.e. $D \left( \mathbf { x } \right)$ is high, the subset can be chosen to include $\mathbf { x }$ where $D \left( \mathbf { x } \right)$ is larger than a predefined threshold. Tolstikhin et al. (2017), however, show that this heuristic fails to address the mode collapsing problem. Thus they propose AdaGAN to introduce a robust reweighing scheme to prepare training data for the next GAN. AdaGAN and boosting-inspired GANs in general are based on the assumption that a singlegenerator GAN can learn to generate impressive images of some modes such as dogs or cats but fails to cover other modes such as giraffe. Therefore, removing images of dogs or cats from the training data and train a next GAN can create a better mixture. This assumption is not true in practice as current single-generator GANs trained on diverse data sets such as ImageNet (Russakovsky et al., 2015) tend to generate images of unrecognizable objects.
|
| 114 |
+
|
| 115 |
+
The most closely related to ours is MAD-GAN (Ghosh et al., 2017) which trains many generators and uses a multi-class classifier as the discriminator. In this work, two strategies are proposed to address the mode collapse: (i) augmenting generator’s objective function with a user-defined similarity based function to encourage different generators to generate diverse samples, and (ii) modifying discriminator’s objective functions to push different generators towards different identifiable modes by separating samples of each generator. Our approach is different in that, rather than modifying the discriminator, we use an additional classifier that discriminates samples produced by each generator from those by others under multi-class classification setting. This nicely results in an optimization problem that maximizes the JSD among generators, thus naturally enforcing them to generate diverse samples and effectively avoiding mode collapse.
|
| 116 |
+
|
| 117 |
+
# 5 EXPERIMENTS
|
| 118 |
+
|
| 119 |
+
In this section, we conduct experiments on both synthetic data and real-world large-scale datasets. The aim of using synthetic data is to visualize, examine and evaluate the learning behaviors of our proposed MGAN, whilst using real-world datasets to quantitatively demonstrate its efficacy and scalability of addressing the mode collapse in a much larger and wider data space. For fair comparison, we use experimental settings that are identical to previous work, and hence we quote the results from the latest state-of-the-art GAN-based models to compare with ours.
|
| 120 |
+
|
| 121 |
+
We use TensorFlow (Abadi et al., 2016) to implement our model, and the source code is available at: https://github.com/qhoangdl/MGAN. For all experiments, we use: (i) shared parameters among generators in all layers except for the weights from the input to the first hidden layer; (ii) shared parameters between discriminator and classifier in all layers except for the weights from the penultimate layer to the output; (iii) Adam optimizer (Kingma & Ba, 2014) with learning rate of 0.0002 and the first-order momentum of 0.5; (iv) minibatch size of 64 samples for training discriminators; (v) ReLU activations (Nair & Hinton, 2010) for generators; (vi) Leaky ReLU (Maas et al., 2013) with slope of 0.2 for discriminator and classifier; and (vii) weights randomly initialized from Gaussian distribution $\mathcal { N } ( 0 , 0 . 0 2 I )$ and zero biases. We refer to Appendix C for detailed model architectures and additional experimental results.
|
| 122 |
+
|
| 123 |
+
# 5.1 SYNTHETIC DATA
|
| 124 |
+
|
| 125 |
+
In the first experiment, following (Nguyen et al., 2017) we reuse the experimental design proposed in (Metz et al., 2016) to investigate how well our MGAN can explore and capture multiple data modes. The training data is sampled from a 2D mixture of 8 isotropic Gaussian distributions with a covariance matrix of $0 . 0 2 I$ and means arranged in a circle of zero centroid and radius of 2.0. Our purpose of using such small variance is to create low density regions and separate the modes.
|
| 126 |
+
|
| 127 |
+
We employ 8 generators, each with a simple architecture of an input layer with 256 noise units drawn from isotropic multivariate Gaussian distribution $\mathcal { N } ( 0 , \pmb { I } )$ , and two fully connected hidden layers with $1 2 8 { \mathrm { ~ R e L U } }$ units each. For the discriminator and classifier, one hidden layer with 128 ReLU units is used. The diversity hyperparameter $\beta$ is set to 0.125.
|
| 128 |
+
|
| 129 |
+

|
| 130 |
+
from the true mixture of 8 Gaussians are red.
|
| 131 |
+
Figure 2: The comparison of our MGAN and GAN’s variants on 2D synthetic dataset.
|
| 132 |
+
|
| 133 |
+
Fig. 2c shows the evolution of 512 samples generated by our model and baselines through time. It can be seen that the regular GAN generates data collapsing into a single mode hovering around the valid modes of data distribution, thus reflecting the mode collapse in GAN as expected. At the same time, UnrolledGAN (Metz et al., 2016), D2GAN (Nguyen et al., 2017) and our MGAN distribute data around all 8 mixture components, and hence demonstrating the abilities to successfully learn multimodal data in this case. Our proposed model, however, converges much faster than the other two since it successfully explores and neatly covers all modes at the early step 15K, whilst two baselines produce samples cycling around till the last steps. At the end, our MGAN captures data modes more precisely than UnrolledGAN and D2GAN since, in each mode, the UnrolledGAN generates data that concentrate only on several points around the mode’s centroid, thus seems to produce fewer samples than ours whose samples fairly spread out the entire mode, but not exceed the boundary whilst the D2GAN still generates many points scattered between two adjacent modes.
|
| 134 |
+
|
| 135 |
+
Next we further quantitatively compare the quality of generated data. Since we know the true distribution $P _ { d a t a }$ in this case, we employ two measures, namely Wasserstein distance and symmetric Kullback-Leibler (KL) divergence, which is the average of KL and reverse KL. These measures compute the distance between the normalized histograms of 10,000 points generated from the model to true $P _ { d a t a }$ . Figs. 2a and 2b again clearly demonstrate the superiority of our approach over GAN, UnrolledGAN and D2GAN w.r.t both distances (lower is better); notably the Wasserstein distances from ours and D2GAN’s to the true distribution almost reduce to zero, and at the same time, our symmetric KL metric is significantly better than that of D2GAN. These figures also show the stability of our MGAN (black curves) and D2GAN (red curves) during training as they are much less fluctuating compared with GAN (green curves) and UnrolledGAN (blue curves).
|
| 136 |
+
|
| 137 |
+
Lastly, we perform experiments with different numbers of generators. The MGAN models with 2, 3, 4 and 10 generators all successfully explore 8 modes but the models with more generators generate fewer points scattered between adjacent modes. We also examine the behavior of the diversity coefficient $\beta$ by training the 4-generator model with different values of $\beta$ . Without the JSD force $\beta = 0$ ), generated samples cluster around one mode. When $\beta = 0 . 2 5$ , the JSD force is weak and generated data cluster near 4 different modes. When $\beta = 0 . 7 5$ or 1.0, the JSD force is too strong and causes the generators to collapse, generating 4 increasingly tight clusters. When $\beta = 0 . 5$ , generators successfully cover all of the 8 modes. Please refer to Appendix C.1 for experimental details.
|
| 138 |
+
|
| 139 |
+
# 5.2 REAL-WORLD DATASETS
|
| 140 |
+
|
| 141 |
+
Next we train our proposed method on real-world databases from natural scenes to investigate its performance and scalability on much more challenging large-scale image data.
|
| 142 |
+
|
| 143 |
+
Datasets. We use 3 widely-adopted datasets: CIFAR-10 (Krizhevsky & Hinton, 2009), STL-10 (Coates et al., 2011) and ImageNet (Russakovsky et al., 2015). CIFAR-10 contains $5 0 , 0 0 0 \ 3 2 \times 3 2$ training images of 10 classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, and truck. STL-10, subsampled from ImageNet, is a more diverse dataset than CIFAR-10, containing about $1 0 0 , 0 0 0 9 6 \times 9 6$ images. ImageNet (2012 release) presents the largest and most diverse consisting of over 1.2 million images from 1,000 classes. In order to facilitate fair comparison with the baselines in (Warde-Farley & Bengio, 2016; Nguyen et al., 2017), we follow the procedure of (Krizhevsky et al., 2012) to resize the STL-10 and ImageNet images down to $4 8 \times 4 8$ and $3 2 \times 3 2$ , respectively.
|
| 144 |
+
|
| 145 |
+
Evaluation protocols. For quantitative evaluation, we adopt the Inception score proposed in (Salimans et al., 2016), which computes exp $\left( \mathbb { E } _ { \mathbf { x } } \left[ K L \left( p \left( y | \mathbf { x } \right) \| p \left( y \right) \right) \right] \right)$ where $p \left( y | \mathbf { x } \right)$ is the conditional label distribution for the image $\mathbf { x }$ estimated by the reference Inception model (Szegedy et al., 2015). This metric rewards good and varied samples and is found to be well-correlated with human judgment (Salimans et al., 2016). We use the code provided in (Salimans et al., 2016) to compute the Inception scores for 10 partitions of 50,000 randomly generated samples. For qualitative demonstration of image quality obtained by our proposed model, we show samples generated by the mixture as well as samples produced by each generator. Samples are randomly drawn rather than cherry-picked.
|
| 146 |
+
|
| 147 |
+
Model architectures. Our generator and discriminator architectures closely follow the DCGAN’s design (Radford et al., 2015). The only difference is we apply batch normalization (Ioffe & Szegedy, 2015) to all layers in the networks except for the output layer. Regarding the classifier, we empirically find that our proposed MGAN achieves the best performance (i.e., fast convergence rate and high inception score) when the classifier shares parameters of all layers with the discriminator except for the output layer. The reason is that this parameter sharing scheme would allow the classifier and discriminator to leverage their common features and representations learned at every layer, thus helps to improve and speed up the training progress. When the parameters are not tied, the model learns slowly and eventually yields lower performance.
|
| 148 |
+
|
| 149 |
+
During training we observe that the percentage of active neurons chronically declined (see Appendix C.2). One possible cause is that the batch normalization center (offset) is gradually shifted to the negative range, thus deactivating up to $45 \%$ of ReLU units of the generator networks. Our ad-hoc solution for this problem is to fix the offset at zero for all layers in the generator networks. The rationale is that for each feature map, the ReLU gates will open for about $50 \%$ highest inputs in a minibatch across all locations and generators, and close for the rest.
|
| 150 |
+
|
| 151 |
+
We also experiment with other activation functions of generator networks. First we use Leaky ReLU and obtain similar results with using ReLU. Then we use MaxOut units (Goodfellow et al., 2013) and achieves good Inception scores but generates unrecognizable samples. Finally, we try SeLU (Klambauer et al., 2017) but fail to train our model.
|
| 152 |
+
|
| 153 |
+
Hyperparameters. Three key hyperparameters of our model are: number of generators K, coefficient $\beta$ controlling the diversity and the minibatch size. We use a minibatch size of $[ ^ { 1 2 8 } / \mathrm { K } ]$ for each generator, so that the total number of samples for training all generators is about 128. We train models with 4 generators and 10 generators corresponding with minibatch sizes of 32 and 12 each, and find that models with 10 generators performs better. For ImageNet, we try an additional setting with 32 generators and a minibatch size of 4 for each. The batch of 4 samples is too small for updating sufficient statistics of a batch-norm layer, thus we drop batch-norm in the input layer of each generator. This 32-generator model, however, does not obtain considerably better results than the 10-generator one. Therefore in what follows we only report the results of models with 10 generators. For the diversity coefficient $\beta$ , we observe no significant difference in Inception scores when varying the value of $\beta$ but the quality of generated images declines when $\beta$ is too low or too high. Generated samples by each generator vary more when $\beta$ is low, and vary less but become less realistic when $\beta$ is high. We find a reasonable range for $\beta$ to be (0.01, 1.0), and finally set to 0.01 for CIFAR-10, 0.1 for ImageNet and 1.0 for STL-10.
|
| 154 |
+
|
| 155 |
+
Inception results. We now report the Inception scores obtained by our MGAN and baselines in Tab. 1. It is worthy to note that only models trained in a completely unsupervised manner without label information are included for fair comparison; and DCGAN’s and D2GAN’s results on STL10 are available only for the models trained on $3 2 \times 3 2$ resolution. Overall, our proposed model outperforms the baselines by large margins and achieves state-of-the-art performance on all datasets. Moreover, we would highlight that our MGAN obtains a score of 8.33 on CIFAR-10 that is even better than those of models trained with labels such as 8.09 of Improved GAN (Salimans et al., 2016) and 8.25 of AC-GAN (Odena et al., 2016). In addition, we train our model on the original $9 6 \times 9 6$ resolution of STL-10 and achieve a score of $9 . 7 9 { \pm } 0 . 0 8$ . This suggests the MGAN can be successfully trained on higher resolution images and achieve the higher Inception score.
|
| 156 |
+
|
| 157 |
+
Table 1: Inception scores on different datasets. All models are trained in an unsupervised manner. “–” denotes unavailable result.
|
| 158 |
+
|
| 159 |
+
<table><tr><td>Model</td><td>CIFAR-10</td><td>STL-10</td><td>ImageNet</td></tr><tr><td>Real data</td><td>11.24±0.16</td><td>26.08±0.2625.78±0.47</td><td></td></tr><tr><td> WGAN (Arjovsky et al., 2017)</td><td>3.82±0.06</td><td></td><td></td></tr><tr><td>MIX+WGAN (Arora et al., 2017)</td><td>4.04±0.07</td><td></td><td></td></tr><tr><td>Improved-GAN (Salimans et al., 2016)</td><td>4.36±0.04</td><td></td><td></td></tr><tr><td>ALI (Dumoulin et al., 2016)</td><td>5.34±0.05</td><td></td><td></td></tr><tr><td> BEGAN (Berthelot et al., 2017)</td><td>5.62</td><td></td><td></td></tr><tr><td>MAGAN (Wang et al., 2017)</td><td>5.67</td><td></td><td></td></tr><tr><td>GMAN (Durugkar et al., 2016)</td><td>6.00±0.19</td><td></td><td></td></tr><tr><td>DCGAN (Radford et al., 2015)</td><td>6.40±0.05</td><td>7.54</td><td>7.89</td></tr><tr><td> DFM (Warde-Farley & Bengio, 2016)</td><td>7.72±0.13</td><td>8.51±0.13</td><td>9.18±0.13</td></tr><tr><td> D2GAN (Nguyen et al., 2017)</td><td>7.15±0.07</td><td>7.98</td><td>8.25</td></tr><tr><td>MGAN</td><td>8.33±0.10</td><td>9.22±0.11</td><td>9.32±0.10</td></tr></table>
|
| 160 |
+
|
| 161 |
+
Frechet Inception Distance results. ´ One disadvantage of the Inception score is that it does not compare the statistics of real world samples and those of synthetic examples. Therefore, we further evaluate MGAN using the Frechet Inception Distance ´ (FID) proposed in (Heusel et al., 2017). Let $p$ and $q$ be the distributions of the representations obtained by projecting real and synthetic samples to the last hidden layer in Inception model (Szegedy et al., 2015). Assuming that $p$ and $q$ are both multivariate Gaussian distributions, FID measures the Frechet distance ´ (Dowson & Landau, 1982), which is also the 2-Wasserstein distance, between the two distributions. Tab. 2 compares the FIDs obtained by MGAN with baselines collected in (Heusel et al., 2017). It is noteworthy that lower FID is better, and that WGAN-GP and WGAN-GP $^ +$ TTUR uses the ResNet architecture while MGAN employs the DCGAN architecture. In terms of FID, MGAN is roughly $28 \%$ better than DCGAN and DCGAN $^ +$ TTUR, $9 \%$ better than WGAN-GP and $8 \%$ weaker than WGAN-GP $^ +$ TTUR. This result further proves that MGAN helps address the mode collapsing problem.
|
| 162 |
+
|
| 163 |
+
Table 2: FIDs (lower is better) on CIFAR-10.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Model</td><td>FID</td></tr><tr><td>DCGAN (Radford et al., 2015) DCGAN + TTUR (Heusel et al., 2017)</td><td>37.7 36.9</td></tr><tr><td>WGAN-GP (Gulrajani et al., 2017) WGAN-GP + TTUR (Heusel et al., 2017)</td><td>29.3 24.8</td></tr><tr><td>MGAN</td><td>26.7</td></tr></table>
|
| 166 |
+
|
| 167 |
+
Image generation. Next we present samples randomly generated by our proposed model trained on the 3 datasets for qualitative assessment. Fig. 3a shows CIFAR-10 $3 2 \times 3 2$ images containing a wide range of objects in such as airplanes, cars, trucks, ships, birds, horses or dogs. Similarly, STL$1 0 \ 4 8 \times 4 8$ generated images in Fig. 3b include cars, ships, airplanes and many types of animals, but with wider range of different themes such as sky, underwater, mountain and forest. Images generated for ImageNet $3 2 \times 3 2$ are diverse with some recognizable objects such as lady, old man, birds, human eye, living room, hat, slippers, to name a few. Fig. 4a shows several cherry-picked STL-10 $9 6 \times 9 6$ images, which demonstrate that the MGAN is capable of generating visually appealing images with complicated details. However, many samples are still incomplete and unrealistic as shown in Fig. 4b, leaving plenty of room for improvement.
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
Figure 3: Images generated by our proposed MGAN trained on natural image datasets. Due to the space limit, please refer to the appendix for larger plots.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 4: Images generated by our MGAN trained on the original $9 6 \times 9 6$ STL10 dataset.
|
| 174 |
+
|
| 175 |
+
Finally, we investigate samples generated by each generator as well as the evolution of these samples through numbers of training epochs. Fig. 5 shows images generated by each of the 10 generators in our MGAN trained on CIFAR-10 at epoch 20, 50, and 250 of training. Samples in each row correspond to a different generator. Generators start to specialize in generating different types of objects as early as epoch 20 and become more and more consistent: generator 2 and 3 in flying objects (birds and airplanes), generator 4 in full pictures of cats and dogs, generator 5 in portraits of cats and dogs, generator 8 in ships, generator 9 in car and trucks, and generator 10 in horses. Generator 6 seems to generate images of frog or animals in a bush. Generator 7, however, collapses in epoch 250. One possible explanation for this behavior is that images of different object classes tend to have different themes. Lastly, Wang et al. (2016) noticed one of the causes for non-convergence in GANs is that the generators and discriminators constantly vary; the generators at two consecutive epochs of training generate significantly different images. This experiment demonstrates the effect of the JSD force in preventing generators from moving around the data space.
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 5: Images generated by our MGAN trained on CIFAR10 at different epochs. Samples in each row from the top to the bottom correspond to a different generator.
|
| 179 |
+
|
| 180 |
+
# 6 CONCLUSION
|
| 181 |
+
|
| 182 |
+
We have presented a novel adversarial model to address the mode collapse in GANs. Our idea is to approximate data distribution using a mixture of multiple distributions wherein each distribution captures a subset of data modes separately from those of others. To achieve this goal, we propose a minimax game of one discriminator, one classifier and many generators to formulate an optimization problem that minimizes the JSD between $P _ { d a t a }$ and $P _ { m o d e l }$ , i.e., a mixture of distributions induced by the generators, whilst maximizes JSD among such generator distributions. This helps our model generate diverse images to better cover data modes, thus effectively avoids mode collapse. We term our proposed model Mixture Generative Adversarial Network (MGAN).
|
| 183 |
+
|
| 184 |
+
The MGAN can be efficiently trained by sharing parameters between its discriminator and classifier, and among its generators, thus our model is scalable to be evaluated on real-world largescale datasets. Comprehensive experiments on synthetic 2D data, CIFAR-10, STL-10 and ImageNet databases demonstrate the following capabilities of our model: (i) achieving state-of-the-art Inception scores; (ii) generating diverse and appealing recognizable objects at different resolutions; and (iv) specializing in capturing different types of objects by the generators.
|
| 185 |
+
|
| 186 |
+
Acknowledgments. This work was partially supported by the Australian Research Council (ARC) DP160109394 and AOARD (FA2386-16-1-4138)
|
| 187 |
+
|
| 188 |
+
# REFERENCES
|
| 189 |
+
|
| 190 |
+
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. 5
|
| 191 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017. 1
|
| 192 |
+
Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization and equilibrium in generative adversarial nets (gans). arXiv preprint arXiv:1703.00573, 2017. 1, 4, 1
|
| 193 |
+
David Berthelot, Tom Schumm, and Luke Metz. Began: Boundary equilibrium generative adversarial networks. arXiv preprint arXiv:1703.10717, 2017. 1
|
| 194 |
+
Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 215–223, 2011. 1, 5.2
|
| 195 |
+
DC Dowson and BV Landau. The frechet distance between multivariate normal distributions. ´ Journal of multivariate analysis, 12(3):450–455, 1982. 5.2
|
| 196 |
+
|
| 197 |
+
Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. 1
|
| 198 |
+
|
| 199 |
+
Ishan Durugkar, Ian Gemp, and Sridhar Mahadevan. Generative multi-adversarial networks. arXiv preprint arXiv:1611.01673, 2016. 1, 4, 1
|
| 200 |
+
|
| 201 |
+
Arnab Ghosh, Viveka Kulharia, Vinay Namboodiri, Philip HS Torr, and Puneet K Dokania. Multiagent diverse generative adversarial networks. arXiv preprint arXiv:1704.02906, 2017. 1, 4
|
| 202 |
+
|
| 203 |
+
Ian Goodfellow. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016. 1, B
|
| 204 |
+
|
| 205 |
+
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. 1, 3.1, 3.1, B
|
| 206 |
+
|
| 207 |
+
Ian J Goodfellow, David Warde-Farley, Mehdi Mirza, Aaron Courville, and Yoshua Bengio. Maxout networks. arXiv preprint arXiv:1302.4389, 2013. 5.2
|
| 208 |
+
|
| 209 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5769–5779, 2017. 2
|
| 210 |
+
|
| 211 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, pp. 6629–6640, 2017. 5.2, 2
|
| 212 |
+
|
| 213 |
+
Ferenc Huszar. How (not) to train your generative model: Scheduled sampling, likelihood, adver-´ sary? arXiv preprint arXiv:1511.05101, 2015. 2
|
| 214 |
+
|
| 215 |
+
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. 5.2
|
| 216 |
+
|
| 217 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 5
|
| 218 |
+
|
| 219 |
+
Gunter Klambauer, Thomas Unterthiner, Andreas Mayr, and Sepp Hochreiter. Self-normalizing ¨ neural networks. arXiv preprint arXiv:1706.02515, 2017. 5.2
|
| 220 |
+
|
| 221 |
+
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. 5.2
|
| 222 |
+
|
| 223 |
+
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. 5.2
|
| 224 |
+
|
| 225 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision, pp. 3730–3738, 2015. 1
|
| 226 |
+
|
| 227 |
+
Andrew L Maas, Awni Y Hannun, and Andrew Y Ng. Rectifier nonlinearities improve neural network acoustic models. In Proc. ICML, volume 30, 2013. 5
|
| 228 |
+
|
| 229 |
+
Luke Metz, Ben Poole, David Pfau, and Jascha Sohl-Dickstein. Unrolled generative adversarial networks. arXiv preprint arXiv:1611.02163, 2016. 1, 4, 5.1
|
| 230 |
+
|
| 231 |
+
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th international conference on machine learning (ICML-10), pp. 807–814, 2010. 5
|
| 232 |
+
|
| 233 |
+
J v Neumann. Zur theorie der gesellschaftsspiele. Mathematische annalen, 100(1):295–320, 1928. 4
|
| 234 |
+
|
| 235 |
+
Tu Dinh Nguyen, Trung Le, Hung Vu, and Dinh Phung. Dual discriminator generative adversarial nets. In Advances in Neural Information Processing Systems 29 (NIPS), pp. accepted, 2017. 1, 4, 5.1, 5.2, 1
|
| 236 |
+
|
| 237 |
+
Augustus Odena, Christopher Olah, and Jonathon Shlens. Conditional image synthesis with auxiliary classifier gans. arXiv preprint arXiv:1610.09585, 2016. 1, 5.2
|
| 238 |
+
|
| 239 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. 5.2, 1, 2
|
| 240 |
+
|
| 241 |
+
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. 1, 4, 5.2
|
| 242 |
+
|
| 243 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pp. 2234–2242, 2016. 1, 4, 5.2, 5.2, 1
|
| 244 |
+
|
| 245 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015. 5.2, 5.2
|
| 246 |
+
|
| 247 |
+
Lucas Theis, Aaron van den Oord, and Matthias Bethge. A note on the evaluation of generative ¨ models. arXiv preprint arXiv:1511.01844, 2015. 2
|
| 248 |
+
|
| 249 |
+
Ilya Tolstikhin, Sylvain Gelly, Olivier Bousquet, Carl-Johann Simon-Gabriel, and Bernhard Scholkopf. Adagan: Boosting generative models. ¨ arXiv preprint arXiv:1701.02386, 2017. 1, 4
|
| 250 |
+
|
| 251 |
+
Ruohan Wang, Antoine Cully, Hyung Jin Chang, and Yiannis Demiris. Magan: Margin adaptation for generative adversarial networks. arXiv preprint arXiv:1704.03817, 2017. 1
|
| 252 |
+
|
| 253 |
+
Yaxing Wang, Lichao Zhang, and Joost van de Weijer. Ensembles of generative adversarial networks. arXiv preprint arXiv:1612.00991, 2016. 4, 5.2
|
| 254 |
+
|
| 255 |
+
David Warde-Farley and Yoshua Bengio. Improving generative adversarial networks with denoising feature matching. 2016. 1, 4, 5.2, 1
|
| 256 |
+
|
| 257 |
+
Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015. 1
|
| 258 |
+
|
| 259 |
+
# A APPENDIX: FRAMEWORK
|
| 260 |
+
|
| 261 |
+
In our proposed method, generators ${ \cal G } _ { 1 } , { \cal G } _ { 2 } , \ldots { \cal G } _ { \mathrm { K } }$ are deep convolutional neural networks parameterized by $\theta _ { G }$ . These networks share parameters in all layers except for the input layers. The input layer for generator $G _ { k }$ is parameterized by the mapping $f _ { \theta _ { G } , k } \left( \mathbf { z } \right)$ that maps the sampled noise $\mathbf { z }$ to the first hidden layer activation $\mathbf { h }$ . The shared layers are parameterized by the mapping $g _ { \pmb { \theta } _ { G } }$ $\mathbf { \tau } ( \mathbf { h } )$ that maps the first hidden layer to the generated data. The pseudo-code of sampling from the mixture is described in Alg. 1. Classifier $C$ and classifier $D$ are also deep convolutional neural networks that are both parameterized by $\pmb { \theta } _ { C D }$ . They share parameters in all layers except for the last layer. The pseudo-code of alternatively learning $\theta _ { G }$ and $\pmb { \theta } _ { C D }$ using stochastic gradient descend is described in Alg. 2.
|
| 262 |
+
|
| 263 |
+
# Algorithm 1 Sampling from MGAN’s mixture of generators.
|
| 264 |
+
|
| 265 |
+
1: Sample noise $\mathbf { z }$ from the prior $P _ { \mathbf { z } }$ .
|
| 266 |
+
2: Sample a generator index $u$ from $\mathbf { M u l t } \left( \pi _ { 1 } , \pi _ { 2 } , . . . , \pi _ { \mathrm { K } } \right)$ with predefined mixing probability $\pi =$
|
| 267 |
+
$( \pi _ { 1 } , \pi _ { 2 } , . . . , \pi _ { \mathrm { K } } )$ .
|
| 268 |
+
3: $\mathbf { h } = f _ { \pmb { \theta } _ { G } , u } \left( \mathbf { z } \right)$
|
| 269 |
+
4: $\mathbf { x } = g _ { \pmb { \theta } _ { G } }$ (h)
|
| 270 |
+
5: Return generated data $\mathbf { x }$ and the index $u$ .
|
| 271 |
+
|
| 272 |
+
# Algorithm 2 Alternative training of MGAN using stochastic gradient descent.
|
| 273 |
+
|
| 274 |
+
1: for number of training iterations do
|
| 275 |
+
2: Sample a minibatch of M data points $\big ( \mathbf { x } ^ { ( 1 ) } , \mathbf { x } ^ { ( 2 ) } , . . . , \mathbf { x } ^ { ( \mathrm { M } ) } \big )$ from the data distribution $P _ { d a t a }$ .
|
| 276 |
+
3: Sample a minibatch of $_ \mathrm { N }$ generated data points $\left( { \bf { x } ^ { \prime } } ^ { ( 1 ) } , { \bf { x } ^ { \prime } } ^ { ( 2 ) } , . . . , { \bf { x } ^ { \prime } } ^ { ( \mathrm { N } ) } \right)$ and $_ \mathrm { N }$ indices
|
| 277 |
+
$( u _ { 1 } , u _ { 2 } , . . . , u _ { \mathrm { N } } )$ from the current mixture.
|
| 278 |
+
4: $\begin{array} { r } { \mathcal { L } _ { C } = - \frac { 1 } { \mathrm { N } } \sum _ { n = 1 } ^ { \mathrm { N } } \log C _ { u _ { n } } \left( { \mathbf { x } ^ { \prime } } ^ { ( n ) } \right) } \end{array}$
|
| 279 |
+
5: $\begin{array} { r } { \mathcal { L } _ { D } = - \frac { 1 } { \mathrm { M } } \sum _ { m = 1 } ^ { \mathrm { M } } \log D \left( \mathbf { x } ^ { ( m ) } \right) - \frac { 1 } { \mathrm { N } } \sum _ { n = 1 } ^ { \mathrm { N } } \log \left[ 1 - D \left( \mathbf { x } ^ { \prime ( n ) } \right) \right] } \end{array}$
|
| 280 |
+
6: Update classifier $C$ and discriminator $D ^ { \mathit { \Phi } ^ { - } }$ by descending along their gradient:
|
| 281 |
+
7: CD Sample a minibatch of $\bar { \nabla _ { \pmb { \theta } _ { C D } } } \left( \mathcal { L } _ { C } + \mathcal { L } _ { D } \right)$ . $_ \mathrm { N }$ generated data points $\left( { \bf { x } ^ { \prime } } ^ { ( 1 ) } , { \bf { x } ^ { \prime } } ^ { ( 2 ) } , . . . , { \bf { x } ^ { \prime } } ^ { ( \mathrm { N } ) } \right)$ and $_ \mathrm { N }$ indices
|
| 282 |
+
$( u _ { 1 } , u _ { 2 } , . . . , u _ { \mathrm { N } } )$
|
| 283 |
+
8: $\begin{array} { r } { \mathcal { L } _ { G } = - \frac { 1 } { \mathrm { N } } \sum _ { n = 1 } ^ { \mathrm { N } } \log D \left( \mathbf { x ^ { \prime } } ^ { ( n ) } \right) - \frac { \beta } { \mathrm { N } } \sum _ { n = 1 } ^ { \mathrm { N } } \log C _ { u _ { n } } \left( \mathbf { x ^ { \prime } } ^ { ( n ) } \right) } \end{array}$
|
| 284 |
+
|
| 285 |
+
9: Update the mixture of generators $G$ by ascending along its gradient: $\nabla _ { \pmb { \theta } _ { G } } \mathcal { L } _ { \mathcal { G } }$
|
| 286 |
+
|
| 287 |
+
10: end for
|
| 288 |
+
|
| 289 |
+
# B APPENDIX: PROOFS FOR SECTION 3.1
|
| 290 |
+
|
| 291 |
+
Proposition 1 (Prop. 1 restated). For fixed generators $G _ { 1 }$ , $G _ { 2 }$ , ..., $G _ { \mathrm { K } }$ and mixture weights $\pi _ { 1 } , \pi _ { 2 } , . . . , \pi _ { \mathrm { K } }$ , the optimal classifier $C ^ { * } = C _ { \mathrm { 1 : K } } ^ { * }$ and discriminator $D ^ { * }$ for $\mathcal { I } \left( G , C , D \right)$ are:
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\begin{array} { l } { { { \displaystyle C _ { k } ^ { * } \left( { \bf x } \right) = \frac { \pi _ { k } p _ { G _ { k } } \left( { \bf x } \right) } { \sum _ { j = 1 } ^ { K } \pi _ { j } p _ { G _ { j } } \left( { \bf x } \right) } } \ ~ } } \\ { { { \displaystyle D ^ { * } \left( { \bf x } \right) = \frac { p _ { d a t a } \left( { \bf x } \right) } { p _ { d a t a } \left( { \bf x } \right) + p _ { m o d e l } \left( { \bf x } \right) } } } } \end{array}
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
Proof. The optimal $D ^ { * }$ was proved in Prop. 1 in (Goodfellow, 2016). This section shows a similar proof for the optimal $C ^ { * }$ . Assuming that $C ^ { * }$ can be optimized in the functional space, we can calculate the functional derivatives of $\mathcal { I } \left( G , C , D \right)$ with respect to each $C _ { k } \left( \mathbf { x } \right)$ for $k \in \{ 2 , . . . , \mathrm { K } \}$ and set them equal to zero:
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\begin{array} { c } { \displaystyle \frac { \delta \mathcal { I } } { \delta C _ { k } \left( \mathbf { x } \right) } = - \beta \frac { \delta } { \delta C _ { k } \left( \mathbf { x } \right) } \int \left( \pi _ { 1 } p _ { G _ { 1 } } \left( \mathbf { x } \right) \log \left( 1 - \displaystyle \sum _ { k = 2 } ^ { \mathrm { K } } C _ { k } \left( \mathbf { x } \right) \right) + \displaystyle \sum _ { k = 2 } ^ { \mathrm { K } } \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) \log C _ { k } \left( \mathbf { x } \right) \right) \mathrm { d } x } \\ { \displaystyle = - \beta \left( \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { C _ { k } \left( \mathbf { x } \right) } - \frac { \pi _ { 1 } p _ { G _ { 1 } } \left( \mathbf { x } \right) } { C _ { 1 } \left( \mathbf { x } \right) } \right) } \end{array} \medskip
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
Setting δJ (G,C,D) to 0 for k ∈ {2, ..., K}, we get:
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\frac { \pi _ { 1 } p _ { G _ { 1 } } \left( \mathbf { x } \right) } { C _ { 1 } ^ { * } \left( \mathbf { x } \right) } = \frac { \pi _ { 2 } p _ { G _ { 2 } } \left( \mathbf { x } \right) } { C _ { 2 } ^ { * } \left( \mathbf { x } \right) } = . . . = \frac { \pi _ { K } p _ { G _ { K } } \left( \mathbf { x } \right) } { C _ { \mathrm { K } } ^ { * } \left( \mathbf { x } \right) }
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
$\begin{array} { r } { C _ { k } ^ { * } \left( \mathbf { x } \right) = \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathrm { K } } \pi _ { j } p _ { G _ { j } } \left( \mathbf { x } \right) } } \end{array}$ results from Eq. (6) due to the fact that $\begin{array} { r } { \sum _ { k = 1 } ^ { \mathrm { K } } C _ { k } ^ { * } \left( \mathbf { x } \right) = 1 } \end{array}$
|
| 310 |
+
|
| 311 |
+
Reformulation of $\mathcal { L } \left( G _ { \mathrm { 1 : K } } \right)$ . Replacing the optimal $C ^ { * }$ and $D ^ { * }$ into Eq. (2), we can reformulate the objective function for the generator as follows:
|
| 312 |
+
|
| 313 |
+
$$
|
| 314 |
+
\begin{array}{c} \begin{array} { l } { \displaystyle \mathcal { L } \left( G _ { 1 : \mathrm { K } } \right) = \mathcal { I } \left( G , C ^ { * } , D ^ { * } \right) } \\ { \displaystyle = \mathbb { E } _ { \mathbf { x } \sim P _ { d a t a } } \left[ \log \frac { p _ { d a t a } \left( \mathbf { x } \right) } { p _ { d a t a } \left( \mathbf { x } \right) + p _ { m o d e l } \left( \mathbf { x } \right) } \right] + \mathbb { E } _ { \mathbf { x } \sim P _ { m o d e l } } \left[ \log \frac { p _ { m o d e l } \left( \mathbf { x } \right) } { p _ { d a t a } \left( \mathbf { x } \right) + p _ { m o d e l } \left( \mathbf { x } \right) } \right] } \\ { \displaystyle ~ - \beta \left\{ \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } \left[ \log \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathrm { K } } \pi _ { j } p _ { G _ { j } } \left( \mathbf { x } \right) } \right] \right\} } \end{array} \end{array}
|
| 315 |
+
$$
|
| 316 |
+
|
| 317 |
+
The sum of the first two terms in Eq. (7) was shown in (Goodfellow et al., 2014) to be $2 \cdot$ JSD $( P _ { d a t a } | | P _ { m o d e l } ) - \log 4$ . The last term $\beta \{ * \}$ of Eq. (7) is related to the JSD for the $\mathrm { K }$ distributions:
|
| 318 |
+
|
| 319 |
+
$$
|
| 320 |
+
\begin{array} { l } { { \displaystyle { \Psi } = \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \mathbb E _ { \mathbf x \sim P _ { G _ { k } } } \left[ \log \frac { \pi _ { k } p _ { G _ { k } } ( \mathbf x ) } { \sum _ { j = 1 } ^ { \mathbf K } \pi _ { j } p _ { G _ { k } } ( \mathbf x ) } \right] } } \\ { { \displaystyle = \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \mathbb E _ { \mathbf x \sim P _ { G _ { k } } } \left[ \log p _ { G _ { k } } ( \mathbf x ) \right] - \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \mathbb E _ { \mathbf x \sim P _ { G _ { k } } } \left[ \log \sum _ { j = 1 } ^ { \mathbf K } \pi _ { j } p _ { G _ { j } } ( \mathbf x ) \right] + \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \log \pi _ { k } } } \\ { { \displaystyle = - \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \mathbb H \left( p _ { G _ { k } } \right) + \mathbb H \left( \sum _ { j = 1 } ^ { \mathbf K } \pi _ { j } p _ { G _ { j } } ( \mathbf x ) \right) + \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \log \pi _ { k } } } \\ { { \displaystyle = \mathbb J \mathbb S \mathbf D _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) + \sum _ { k = 1 } ^ { \mathbf K } \pi _ { k } \log \pi _ { k } } } \end{array}
|
| 321 |
+
$$
|
| 322 |
+
|
| 323 |
+
where $\mathbb { H } \left( P \right)$ is the Shannon entropy for distribution $P$ . Thus, $\mathcal { L } \left( G _ { \mathrm { 1 : K } } \right)$ can be rewritten as:
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
\mathcal { L } \left( G _ { 1 : \mathrm { K } } \right) = - \log 4 + 2 \cdot \mathrm { J } \mathrm { S D } \left( P _ { d a t a } \| P _ { m o d e l } \right) - \beta \cdot \mathrm { J } \mathrm { S D } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) - \beta \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \log \pi _ { k }
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
Theorem 3 (Thm. 3 restated). If the data distribution has the form: $\begin{array} { r } { p _ { d a t a } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { K } { \pi _ { k } q _ { k } \left( \mathbf { x } \right) } } \end{array}$ where the mixture components $q _ { k } \mathbf { \Psi } ( \mathbf { x } ) ( s )$ are well-separated, the minimax problem in Eq. (2) or the optimization problem in Eq. (3) has the following solution:
|
| 330 |
+
|
| 331 |
+
$$
|
| 332 |
+
p _ { G _ { k } ^ { * } } \left( \mathbf { x } \right) = q _ { k } \left( \mathbf { x } \right) , \forall k = 1 , \ldots , \mathrm { K } a n d p _ { m o d e l } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } q _ { k } \left( \mathbf { x } \right) = p _ { d a t a } \left( \mathbf { x } \right)
|
| 333 |
+
$$
|
| 334 |
+
|
| 335 |
+
, and the corresponding objective value of the optimization problem in Eq. (3) is $- \beta \mathbb { H } \left( \pmb { \pi } \right) =$ $\begin{array} { r } { - \beta \sum _ { k = 1 } ^ { K } \pi _ { k } \log { \frac { 1 } { \pi _ { k } } } } \end{array}$ .
|
| 336 |
+
|
| 337 |
+
Proof. We first recap the optimization problem for finding the optimal $G ^ { * }$ :
|
| 338 |
+
|
| 339 |
+
$$
|
| 340 |
+
\operatorname* { m i n } _ { G } \left( 2 \cdot \mathbf { J } \mathbf { S } \mathbf { D } \left( P _ { d a t a } \| P _ { m o d e l } \right) - \beta \cdot \mathbf { J } \mathbf { S } \mathbf { D } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) \right)
|
| 341 |
+
$$
|
| 342 |
+
|
| 343 |
+
The JSD in Eq. (8) is given by:
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\mathbf { J } \mathrm { S D } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } \left[ \log \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathrm { K } } \pi _ { j } p _ { G _ { j } } \left( \mathbf { x } \right) } \right] - \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \log \pi _ { k }
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
The $i$ -th expectation in Eq. (9) can be derived as follows:
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } \left[ \log \frac { \pi _ { k } p _ { G _ { k } } \left( \mathbf { x } \right) } { \sum _ { j = 1 } ^ { \mathrm { K } } \pi _ { j } p _ { G _ { j } } \left( \mathbf { x } \right) } \right] \leq \mathbb { E } _ { \mathbf { x } \sim P _ { G _ { k } } } \left[ \log 1 \right] \leq 0
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
and the equality occurs if $\begin{array} { r } { \frac { \pi _ { k } p _ { G _ { k } } ( \mathbf { x } ) } { \sum _ { j = 1 } ^ { K } \pi _ { j } p _ { G _ { j } } ( \mathbf { x } ) } = 1 } \end{array}$ almost everywhere or equivalently for almost every $\mathbf { x }$ except for those in a zero measure set, we have:
|
| 356 |
+
|
| 357 |
+
$$
|
| 358 |
+
p _ { G _ { k } } \left( \mathbf { x } \right) > 0 \Longrightarrow p _ { G _ { j } } \left( \mathbf { x } \right) = 0 , \forall j \neq k
|
| 359 |
+
$$
|
| 360 |
+
|
| 361 |
+
Therefore, we obtain the following inequality:
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
\mathrm { J S D } _ { \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) \leq - \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \log \pi _ { k } = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } \log \frac { 1 } { \pi _ { k } } = \mathbb { H } \left( \pi \right)
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
and the equality occurs if for almost every $\mathbf { x }$ except for those in a zero measure set, we have:
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
\forall k : p _ { G _ { k } } \left( \mathbf { x } \right) > 0 \Longrightarrow p _ { G _ { j } } \left( \mathbf { x } \right) = 0 , \forall j \neq k
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
It follows that
|
| 374 |
+
|
| 375 |
+
$2 \cdot \mathrm { J } \mathrm { S D } \left( P _ { d a t a } \Vert P _ { m o d e l } \right) - \beta \cdot \mathrm { J } \mathrm { S D } _ { \pmb \pi } \left( P _ { G _ { 1 } } , P _ { G _ { 2 } } , . . . , P _ { G _ { \mathrm { K } } } \right) \geq 0 - \beta \mathbb { H } \left( \pmb \pi \right) = - \beta \mathbb { H } \left( \pmb \pi \right)$ and we peak the minimum if $p _ { G _ { k } } = q _ { k }$ , $\forall k$ since this solution satisfies both
|
| 376 |
+
|
| 377 |
+
$$
|
| 378 |
+
p _ { m o d e l } \left( \mathbf { x } \right) = \sum _ { k = 1 } ^ { \mathrm { K } } \pi _ { k } q _ { k } \left( \mathbf { x } \right) = p _ { d a t a } \left( \mathbf { x } \right)
|
| 379 |
+
$$
|
| 380 |
+
|
| 381 |
+
and the conditions depicted in Eq. (10). That concludes our proof.
|
| 382 |
+
|
| 383 |
+
# C APPENDIX: ADDITIONAL EXPERIMENTS
|
| 384 |
+
|
| 385 |
+
# C.1 SYNTHETIC 2D GAUSSIAN DATA
|
| 386 |
+
|
| 387 |
+
The true data is sampled from a 2D mixture of 8 Gaussian distributions with a covariance matrix $0 . 0 2 I$ and means arranged in a circle of zero centroid and radius 2.0. We use a simple architecture of 8 generators with two fully connected hidden layers and a classifier and a discriminator with one shared hidden layer. All hidden layers contain the same number of 128 ReLU units. The input layer of generators contains 256 noise units sampled from isotropic multivariate Gaussian distribution $\mathcal { N } \left( 0 , \pmb { I } \right)$ . We do not use batch normalization in any layer. We refer to Tab. 3 for more specifications of the network and hyperparameters. “Shared” is short for parameter sharing among generators or between the classifier and the discriminator. Feature maps of $8 / 1$ in the last layer for $C$ and $D$ means that two separate fully connected layers are applied to the penultimate layer, one for $C$ that outputs 8 logits and another for $D$ that outputs 1 logit.
|
| 388 |
+
|
| 389 |
+
Table 3: Network architecture and hyperparameters for 2D Gaussian data.
|
| 390 |
+
|
| 391 |
+
<table><tr><td>Operation</td><td>Feature maps</td><td>Nonlinearity</td><td>Shared?</td></tr><tr><td>G(z) : z ~ N (0,I)</td><td>256</td><td></td><td></td></tr><tr><td>Fully connected</td><td>128</td><td>ReLU</td><td>×</td></tr><tr><td>Fully connected</td><td>128</td><td>ReLU</td><td>√</td></tr><tr><td>Fully connected</td><td>2</td><td>Linear</td><td>√</td></tr><tr><td>C(x),D(x)</td><td>2</td><td></td><td></td></tr><tr><td>Fully connected</td><td>128</td><td>Leaky ReLU</td><td>√</td></tr><tr><td>Fully connected</td><td>8/1</td><td>Softmax/Sigmoid</td><td>×</td></tr><tr><td>Number of generators</td><td>8</td><td></td><td></td></tr><tr><td>Batch size for real data</td><td>512</td><td></td><td></td></tr><tr><td>Batch size for each generator</td><td>128</td><td></td><td></td></tr><tr><td>Number of iterations</td><td>25,000</td><td></td><td></td></tr><tr><td>Leaky ReLU slope</td><td>0.2</td><td></td><td></td></tr><tr><td>Learning rate</td><td>0.0002</td><td></td><td></td></tr><tr><td>Regularization constants</td><td>β= 0.125</td><td></td><td></td></tr><tr><td>Optimizer</td><td>Adam(β1 = 0.5,β2 = 0.999)</td><td></td><td></td></tr><tr><td>Weight,bias initialization</td><td>N(μ=0,σ=0.021),0</td><td></td><td></td></tr></table>
|
| 392 |
+
|
| 393 |
+
The effect of the number of generators on generated samples. Fig. 6 shows samples produced by MGANs with different numbers of generators trained on synthetic data for 25,000 epochs. The model with 1 generator behaves similarly to the standard GAN as expected. The models with 2, 3 and 4 generators all successfully cover 8 modes, but the ones with more generators draw fewer points scattered between adjacent modes. Finally, the model with 10 generators also covers 8 modes wherein 2 generators share one mode and one generator hovering around another mode.
|
| 394 |
+
|
| 395 |
+

|
| 396 |
+
Figure 6: Samples generated by MGAN models trained on synthetic data with 2, 3, 4 and 10 generators. Data samples from the 8 Gaussians are in red, and generated data by each generator are in a different color.
|
| 397 |
+
|
| 398 |
+
The effect of $\beta$ on generated samples. To examine the behavior of the diversity coefficient $\beta$ , Fig. 7 compares samples produced by our MGAN with 4 generators after 25,000 epochs of training with different values of $\beta$ . Without the JSD force $\beta = 0$ ), generated samples cluster around one mode. When $\beta = 0 . 2 5$ , generated data clusters near 4 different modes. When $\beta = 0 . 7 5$ or 1.0, the JSD force is too strong and causes the generators to collapse, generating 4 increasingly tight clusters. When $\beta = 0 . 5$ , generators successfully cover all of the 8 modes.
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 7: Samples generated by MGAN models trained on synthetic data with different values of diversity coefficient $\beta$ . Generated data are in blue and data samples from the 8 Gaussians are in red.
|
| 402 |
+
|
| 403 |
+
# C.2 REAL-WORLD DATASETS
|
| 404 |
+
|
| 405 |
+
Fixing batch normalization center. During training we observe that the percentage of active neurons, which we define as ReLU units with positive activation for at least $10 \%$ of samples in the minibatch, chronically declined. Fig. 8a shows the percentage of active neurons in generators trained on CIFAR-10 declined consistently to $55 \%$ in layer 2 and $60 \%$ in layer 3. Therefore, the quality of generated images, after reaching the peak level, started declining. One possible cause is that the batch normalization center (offset) is gradually shifted to the negative range as shown in the histogram in Fig. 8b. We also observe the same problem in DCGAN. Our ad-hoc solution for this problem, i.e., we fix the offset at zero for all layers in the generator networks. The rationale is that for each feature map, the ReLU gates will open for about $50 \%$ highest inputs in a minibatch across all locations and generators, and close for the rest. Therefore, batch normalization can keep ReLU units alive even when most of their inputs are otherwise negative, and introduces a form of competition that encourages generators to “specialize” in different features. This measure significantly improves performance but does not totally solve the dying ReLUs problem. We find that late in the training, the input to generators’ ReLU units became more and more right-skewed, causing the ReLU gates to open less and less often.
|
| 406 |
+
|
| 407 |
+
Parameter sharing. We conduct experiment on CIFAR-10 without parameter sharing among generators. Surprisingly, 4 generators, each with 128 feature maps in the penultimate layer, fail to learn even when beta is set to 0.0. When the number of feature maps in the penultimate layer of each generator is set to 32, the model achieved an Inception Score of 7.42. Therefore, we hypothesize that added benefit of our parameter sharing scheme is to balance the capacity of generators and that of the discriminator/classifier.
|
| 408 |
+
|
| 409 |
+

|
| 410 |
+
|
| 411 |
+
(a) $\%$ of active neurons in layer 2 and 3.
|
| 412 |
+
|
| 413 |
+

|
| 414 |
+
(b) Histogram of batch normalization centers in layer 2 (left) and 3 (right).
|
| 415 |
+
Figure 8: Observation of activate neuron rates and batch normalization centers in MGAN’s generators trained on CIFAR-10.
|
| 416 |
+
|
| 417 |
+
Experiment settings. For the experiments on three large-scale natural scene datasets (CIFAR10, STL-10, ImageNet), we closely followed the network architecture and training procedure of DCGAN. The specifications of our models trained on CIFAR-10, STL-10 $4 8 \times 4 8$ , STL-10 $9 6 \times 9 6$ and ImageNet datasets are described in Tabs. (4, 5, 6, 7), respectively. “BN” is short for batch normalization and “BN center” is short for whether to learn batch normalization’s center or set it at zero. “Shared” is short for parameter sharing among generators or between the classifier and the discriminator. Feature maps of 10/1 in the last layer for $C$ and $D$ means that two separate fully connected layers are applied to the penultimate layer, one for $C$ that outputs 10 logits and another for $D$ that outputs 1 logit. Finally, Figs. (9, 10, 11, 12, 13) respectively are the enlarged version of Figs. (3a, 3b, 3c, 4a, 4b) in the main manuscript.
|
| 418 |
+
|
| 419 |
+
Table 4: Network architecture and hyperparameters for the CIFAR-10 dataset.
|
| 420 |
+
|
| 421 |
+
<table><tr><td>Operation</td><td>Kernel</td><td>Strides</td><td>Feature maps</td><td>BN?</td><td>BN center?</td><td>Nonlinearity</td><td>Shared?</td></tr><tr><td>G(z) : z~ Uniform[-1,1]</td><td></td><td></td><td>100</td><td></td><td></td><td></td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>4×4×512</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>256</td><td>?</td><td>×</td><td>ReLU</td><td>X</td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>√</td><td>×</td><td>ReLU</td><td>√</td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>3</td><td>×</td><td>×</td><td>Tanh</td><td>√</td></tr><tr><td>C(x),D(x)</td><td></td><td></td><td>32×32×3</td><td></td><td></td><td></td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>V</td><td>√</td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td></td><td>Leaky ReLU</td><td>V</td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>512</td><td>√</td><td>√</td><td>LeakyReLU</td><td>√</td></tr><tr><td>Fully connected</td><td></td><td></td><td>10/1</td><td>×</td><td>×</td><td>Softmax/Sigmoid</td><td>×</td></tr><tr><td>Number of generators</td><td>10</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for real data</td><td>64</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for each generator</td><td>12</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Number of iterations</td><td>250</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Leaky ReLU slope</td><td>0.2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Learning rate</td><td>0.0002</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Regularization constants</td><td>β=0.01</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Optimizer</td><td></td><td>Adam(β=0.5,β2=0.999)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Weight,bias initialization</td><td></td><td>N(μ=0,σ=0.01),0</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 422 |
+
|
| 423 |
+
Table 5: Network architecture and hyperparameters for the STL-10 $4 8 \times 4 8$ dataset.
|
| 424 |
+
|
| 425 |
+
<table><tr><td>Operation</td><td>Kernel</td><td>Strides</td><td>Feature maps</td><td>BN?</td><td>BN center?</td><td>Nonlinearity</td><td>Shared?</td></tr><tr><td>G(z) : z~ Uniform[-1,1]</td><td></td><td></td><td>100</td><td></td><td></td><td></td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>4×4×1024</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>512</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>√√√√</td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>3</td><td>×</td><td>×</td><td>Tanh</td><td>×>>>></td></tr><tr><td>C(x),D(x)</td><td></td><td></td><td>48×48×3</td><td></td><td></td><td></td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>√√V√</td><td></td><td>Leaky ReLU</td><td>>>>></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td></td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>512</td><td></td><td></td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>1024</td><td></td><td>>>>></td><td>Leaky ReLU</td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>10/1</td><td>×</td><td>×</td><td>Softmax/Sigmoid</td><td>×</td></tr><tr><td>Number of generators</td><td>10</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for real data</td><td>64</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for each generator</td><td>12</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Number of iterations</td><td>250</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Leaky ReLU slope</td><td>0.2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Learning rate</td><td>0.0002</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Regularization constants</td><td>β= 1.0</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Optimizer</td><td></td><td>Adam(β=0.5,β=0.999)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Weight,bias initialization</td><td></td><td>N(μ=0,σ=0.01),0</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 426 |
+
|
| 427 |
+
Table 6: Network architecture and hyperparameters for the $\mathrm { S T L 9 6 } { \times } 9 6$ dataset.
|
| 428 |
+
|
| 429 |
+
<table><tr><td>Operation</td><td>Kernel</td><td>Strides</td><td>Feature maps</td><td>BN?</td><td>BN center?</td><td>Nonlinearity</td><td>Shared?</td></tr><tr><td>G(z):z~Uniform[-1,1]</td><td colspan="5">100</td><td></td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>4×4×2046</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>1024</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>512</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>√√√√√</td><td>×</td><td>ReLU</td><td>×>>>></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>3</td><td>×</td><td>×</td><td>Tanh</td><td>√</td></tr><tr><td>C(x),D(x)</td><td colspan="5">32×32×3</td><td></td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>128</td><td></td><td></td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td></td><td>LeakyReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>512</td><td></td><td></td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>1024</td><td></td><td>√>>√√</td><td>Leaky ReLU</td><td>>>>>V</td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>2048</td><td>√√√√√</td><td></td><td>Leaky ReLU</td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>10/1</td><td>×</td><td>×</td><td>Softmax/Sigmoid</td><td></td></tr><tr><td>Number of generators</td><td>10</td><td></td><td></td><td></td><td></td><td></td><td>×</td></tr><tr><td>Batch size for real data</td><td>64</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for each generator</td><td>12</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Number of iterations</td><td>250</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Leaky ReLU slope</td><td>0.2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Learning rate</td><td>0.0002</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Regularization constants</td><td>β= 1.0</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Optimizer</td><td></td><td>Adam(β=0.5,β2=0.999)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Weight,bias initialization</td><td></td><td>N(μ=0,σ=0.01),0</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 430 |
+
|
| 431 |
+
Table 7: Network architecture and hyperparameters for the ImageNet dataset.
|
| 432 |
+
|
| 433 |
+
<table><tr><td>Operation</td><td>Kernel</td><td>Strides</td><td>Feature maps</td><td>BN?</td><td>BN center?</td><td>Nonlinearity</td><td>Shared?</td></tr><tr><td>G(z):z~Uniform[-1,1]</td><td></td><td></td><td>100</td><td></td><td></td><td></td><td></td></tr><tr><td>Fully connected</td><td></td><td></td><td>4×4×512</td><td></td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>256</td><td>?</td><td>×</td><td>ReLU</td><td>×</td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>L</td><td>×</td><td>ReLU</td><td></td></tr><tr><td>Transposed convolution</td><td>5×5</td><td>2×2</td><td>3</td><td>×</td><td>×</td><td>Tanh</td><td>√</td></tr><tr><td>C(x),D(x)</td><td></td><td></td><td>32×32×3</td><td></td><td></td><td></td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>128</td><td>?</td><td>V</td><td>Leaky ReLU</td><td></td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>256</td><td></td><td></td><td>LeakyReLU</td><td>V</td></tr><tr><td>Convolution</td><td>5×5</td><td>2×2</td><td>512</td><td>√</td><td>√</td><td>Leaky ReLU</td><td>√</td></tr><tr><td>Fully connected</td><td></td><td></td><td>10/1</td><td>×</td><td>×</td><td>Softmax/Sigmoid</td><td>×</td></tr><tr><td>Number of generators</td><td>10</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for real data</td><td>64</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Batch size for each generator</td><td>12</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Number of iterations</td><td>50</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Leaky ReLU slope</td><td>0.2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Learning rate</td><td>0.0002</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Regularization constants</td><td>β=0.1</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Optimizer</td><td></td><td>Adam(β=0.5,β=0.999)</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Weight,bias initialization</td><td></td><td>N(μ=0,σ=0.01),0</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 434 |
+
|
| 435 |
+

|
| 436 |
+
Figure 9: Images generated by MGAN trained on the CIFAR-10 dataset.
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 10: Images generated by MGAN trained on the rescaled $4 8 \times 4 8$ STL-10 dataset.
|
| 440 |
+
|
| 441 |
+

|
| 442 |
+
Figure 11: Images generated by MGAN trained on the rescaled $3 2 \times 3 2$ ImageNet dataset.
|
| 443 |
+
|
| 444 |
+

|
| 445 |
+
Figure 12: Cherry-picked samples generated by MGAN trained on the $9 6 \times 9 6$ STL-10 dataset.
|
| 446 |
+
|
| 447 |
+

|
| 448 |
+
Figure 13: Incomplete, unrealistic samples generated by MGAN trained on the $9 6 \times 9 6$ STL-10 dataset.
|
md/train/rygMWT4twS/rygMWT4twS.md
ADDED
|
@@ -0,0 +1,728 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# STOCHASTIC GRADIENT DESCENT WITH BIASED BUT CONSISTENT GRADIENT ESTIMATORS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Stochastic gradient descent (SGD), which dates back to the 1950s, is one of the most popular and effective approaches for performing stochastic optimization. Research on SGD resurged recently in machine learning for optimizing convex loss functions and training nonconvex deep neural networks. The theory assumes that one can easily compute an unbiased gradient estimator, which is usually the case due to the sample average nature of empirical risk minimization. There exist, however, many scenarios (e.g., graphs) where an unbiased estimator may be as expensive to compute as the full gradient because training examples are interconnected. Recently, Chen et al. (2018) proposed using a consistent gradient estimator as an economic alternative. Encouraged by empirical success, we show, in a general setting, that consistent estimators result in the same convergence behavior as do unbiased ones. Our analysis covers strongly convex, convex, and nonconvex objectives. We verify the results with illustrative experiments on synthetic and real-world data. This work opens several new research directions, including the development of more efficient SGD updates with consistent estimators and the design of efficient training algorithms for large-scale graphs.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Consider the standard setting of supervised learning. There exists a joint probability distribution $P ( x , y )$ of data $x$ and associated label $y$ and the task is to train a predictive model, parameterized by $w$ , that minimizes the expected loss $\ell$ between the prediction and the ground truth $y$ . Let us organize the random variables as $\xi ~ = ~ ( x , y )$ and use the notation $\ell ( w ; \xi )$ for the loss. If $\xi _ { i } ~ = ~ ( \bar { x } _ { i } , y _ { i } )$ , $i = 1 , \ldots , n$ , are iid training examples drawn from $P$ , then the objective function is either one of the following well-known forms:
|
| 12 |
+
|
| 13 |
+
$$
|
| 14 |
+
\operatorname { e x p e c t e d } \operatorname { r i s k } f ( w ) = \operatorname { E } [ \ell ( w ; \xi ) ] ; \quad { \mathrm { e m p i r i c a l ~ r i s k } } f ( w ) = { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } \ell ( w ; \xi _ { i } ) .
|
| 15 |
+
$$
|
| 16 |
+
|
| 17 |
+
Stochastic gradient descent (SGD), which dates back to the seminal work of Robbins $\&$ Monro (1951), has become the de-facto optimization method for solving these problems in machine learning. In SGD, the model parameter is updated until convergence with the rule1
|
| 18 |
+
|
| 19 |
+
$$
|
| 20 |
+
w _ { k + 1 } = w _ { k } - \gamma _ { k } g _ { k } , \quad k = 1 , 2 , \ldots ,
|
| 21 |
+
$$
|
| 22 |
+
|
| 23 |
+
where $\gamma _ { k }$ is a step size and $g _ { k }$ is an unbiased estimator of the gradient $\nabla f ( w _ { k } )$ . Compared with the full gradient (as is used in deterministic gradient descent), an unbiased estimator involves only one or a few training examples $\xi _ { i }$ and is usually much more efficient to compute.
|
| 24 |
+
|
| 25 |
+
# 1.1 LIMITATION OF UNBIASED GRADIENT AND REMEDY: CONSISTENT GRADIENT
|
| 26 |
+
|
| 27 |
+
This scenario, however, does not cover all learning settings. A representative example that leads to costly computation of the unbiased gradient estimator $\nabla \ell ( w , \xi _ { i } )$ is graph nodes. Informally speaking, a graph node $\xi _ { i }$ needs to aggregate information from its neighbors. If information is aggregated across neighborhoods, $\xi _ { i }$ must request information from its neighbors recursively, which results in inquiring a large portion of the graph. In this case, the sample loss $\ell$ for $\xi _ { i }$ involves not only $\xi _ { i }$ , but also all training examples within its multihop neighborhood. The worst case scenario is that computing $\nabla \ell ( w , \xi _ { i } )$ costs $O ( n )$ (e.g., for a complete graph or small-world graph), as opposed to $O ( 1 )$ in the usual learning setting because only the single example $\xi _ { i }$ is involved.
|
| 28 |
+
|
| 29 |
+
In a recent work, Chen et al. (2018) proposed a consistent gradient estimator as an economic alternative to an unbiased one for training graph convolutional neural networks, offering substantial evidence of empirical success. A summary of the derivation is presented in Section 2. The subject of this paper is to provide a thorough analysis of the convergence behavior of SGD when $g _ { k }$ in (2) is a consistent estimator of $\nabla f ( w _ { k } )$ . We show that using this estimator results in the same convergence behavior as does using unbiased ones.
|
| 30 |
+
|
| 31 |
+
Definition 1. An estimator $g ^ { N }$ of $h$ , where $N$ denotes the sample size, is consistent if $g ^ { N }$ converges to $h$ in probability: $\mathrm { p l i m } _ { N \to \infty } g ^ { N } = h$ . That is, for any $\epsilon > 0$ , $\begin{array} { r } { \operatorname* { l i m } _ { N \to \infty } \operatorname* { P r } ( \| g ^ { N } - h \| > \epsilon ) = 0 } \end{array}$ .
|
| 32 |
+
|
| 33 |
+
# 1.2 DISTINCTIONS BETWEEN UNBIASEDNESS AND CONSISTENCY
|
| 34 |
+
|
| 35 |
+
It is important to note that unbiased and consistent estimators are not subsuming concepts (one does not imply the other), even in the limit. This distinction renders the departure of our convergence results, in the form of probabilistic bounds on the error, from the usual SGD results that bound instead the expectation of the error.
|
| 36 |
+
|
| 37 |
+
In what follows, we present examples to illustrate the distinctions between unbiasedness and consistency. To this end, we introduce asymptotic unbiasedness, which captures the idea that the bias of an estimator may vanish in the limit.
|
| 38 |
+
|
| 39 |
+
Definition 2. An estimator $g ^ { N }$ of $h$ , where $N$ denotes the sample size, is asymptotically unbiased if $\operatorname { E } [ g ^ { N } ] \to h$ .
|
| 40 |
+
|
| 41 |
+
An estimator can be (asymptotically) unbiased but inconsistent. Consider estimating the mean $h = \mu$ of the normal distribution $N ( \mu , \sigma ^ { 2 } )$ by using $N$ independent samples $X _ { 1 } , \ldots , X _ { N }$ . The estimator $g ^ { N } = X _ { 1 }$ (i.e., always use $X _ { 1 }$ regardless of the sample size $N$ ) is clearly unbiased because $\operatorname { E } [ X _ { 1 } ] = { \overset { \vartriangle } { \mu } }$ ; but it is inconsistent because the distribution of $X _ { 1 }$ does not concentrate around $\mu$ . Moreover, the estimator is trivially asymptotically unbiased.
|
| 42 |
+
|
| 43 |
+
An estimator can be consistent but biased. Consider estimating the variance $h = \sigma ^ { 2 }$ of the $N ( \mu , \sigma ^ { 2 } )$ $N$ endent sam, has mean htforward i $X _ { 1 } , \ldots , X _ { N }$ . The estimnd variance Chebyshev $g ^ { N } =$ $\textstyle \sum _ { i = 1 } ^ { N } ( X _ { i } - { \overline { { X } } } ) ^ { 2 } / N$ $\begin{array} { r } { \overline { { X } } = \sum _ { i = 1 } ^ { N } X _ { i } / N } \end{array}$ $\sigma ^ { 2 } ( N - 1 ) / N$ $2 \sigma ^ { 4 } ( N -$ $1 ) / N ^ { 2 }$
|
| 44 |
+
by noting that the mean approaches $\bar { \sigma } ^ { 2 }$ and the variance approaches zero. However, the estimator admits a nonzero bias $\sigma ^ { 2 } / \dot { N }$ for any finite $N$ .
|
| 45 |
+
|
| 46 |
+
An estimator can be consistent but biased even asymptotically. In the preceding example, the bias $\sigma ^ { 2 } / N$ approaches zero and hence the estimator is asymptotically unbiased. Other examples exist for the estimator to be biased even asymptotically. Consider estimating the quantity $h = 0$ with an estimator $g ^ { N }$ that takes the value 0 with probability $( N - 1 ) / N$ and the value $N$ with probability $1 / N$ . Then, the probability that $g ^ { N }$ departs from zero approaches zero and hence it is consistent. However, $\mathrm { E } [ g ^ { N } ] = 1$ and thus the bias does not vanish as $N$ increases.
|
| 47 |
+
|
| 48 |
+
# 1.3 CONTRIBUTIONS OF THIS WORK
|
| 49 |
+
|
| 50 |
+
To the best of our knowledge, this is the first work that studies the convergence behavior of SGD with consistent gradient estimators, which result from a real-world graph learning scenario that will be elaborated in the next section. With the emergence of graph deep learning models (Bruna et al., 2014; Defferrard et al., 2016; Li et al., 2016; Kipf & Welling, 2017; Hamilton et al., 2017; Gilmer et al., 2017; Velickovi ˘ c et al., 2018), the scalability bottleneck caused by the expensive computation ´ of the sample gradient becomes a pressing challenge for training (as well as inference) with large graphs. We believe that this work underpins the theoretical foundation of the efficient training of a series of graph neural networks. The theory reassures practitioners of doubts on the convergence of their optimization solvers.
|
| 51 |
+
|
| 52 |
+
Encouragingly, consistent estimators result in a similar convergence behavior as do unbiased ones. The results obtained here, including the proof strategy, offer convenience for further in-depth analysis under the same problem setting. This work opens the opportunity of improving the analysis, in a manner similar to the proliferation of SGD work, from the angles of relaxing assumptions, refining convergence rates, and designing acceleration techniques.
|
| 53 |
+
|
| 54 |
+
We again emphasize that unbiasedness and consistency are two separate concepts; neither subsumes the other. One may trace that we intend to write the error bounds for consistent gradient estimators in a manner similar to the expectation bounds in standard SGD results. Such a resemblance (e.g., in convergence rates) consolidates the foundation of stochastic optimization built so far.
|
| 55 |
+
|
| 56 |
+
# 2 MOTIVATING APPLICATION: REPRESENTATION LEARNING OF GRAPH NODES
|
| 57 |
+
|
| 58 |
+
For a motivating application, consider the graph convolutional network model, GCN (Kipf & Welling, 2017), that learns embedding representations of graph nodes. The $l$ -th layer of the network is compactly written as
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
H ^ { ( l + 1 ) } = \sigma ( \widehat { A } H ^ { ( l ) } W ^ { ( l ) } ) ,
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\widehat { A }$ is a normalization of the graph adjacency matrix, $W ^ { ( l ) }$ is a parameter matrix, and $\sigma$ is a nonlinear activation function. The matrix $\bar { \boldsymbol { H } } ^ { ( l ) }$ contains for each row the embedding of a graph node input to the $l$ -th layer, and similarly for the output matrix $H ^ { ( l + 1 ) }$ . With $L$ layers, the network transforms an initial feature input matrix $H ^ { ( 0 ) }$ to the output embedding matrix $H ^ { ( L ) }$ . For a node $v$ , the embedding $H ^ { ( L ) } ( v , : )$ may be fed into a classifier for prediction.
|
| 65 |
+
|
| 66 |
+
Clearly, in order to compute the gradient of the loss for $v$ , one needs the corresponding row of $H ^ { ( L ) }$ , the rows of $H ^ { ( L - 1 ) }$ corresponding to the neighbors of $v$ , and further recursive neighbors across each layer, all the way down to $\mathbf { \bar { \boldsymbol { H } } } ^ { ( 0 ) }$ . The computational cost of the unbiased gradient estimator is rather high. In the worst case, all rows of $H ^ { ( 0 ) }$ are involved.
|
| 67 |
+
|
| 68 |
+
To resolve the inefficiency, Chen et al. (2018) proposed an alternative gradient estimator that is biased but consistent. The simple and effective idea is to sample a constant number of nodes in each layer to restrict the size of the multihop neighborhood. For notational clarity, the approach may be easier to explain for a network with a single layer; theoretical results for more layers straightforwardly follow that of Theorem 1 below, through induction.
|
| 69 |
+
|
| 70 |
+
The approach generalizes the setting from a finite graph to an infinite graph, such that the matrix expression (3) becomes an integral transform. In particular, the input feature vector $H ^ { ( 0 ) } ( u , : )$ for a node $u$ is generalized to a feature function $X ( u )$ , and the output embedding vector $H ^ { ( 1 ) } ( v , : )$ for a node $v$ is generalized to an embedding function $Z ( v )$ , where the random variables $u$ and $v$ in two sides of the layer reside in different probability spaces, with probability measures $P ( u )$ and $P ( v )$ , respectively. Furthermore, the matrix $\widehat { A }$ is generalized into a bivariate kernel $\widehat { A } ( v , u )$ and the loss $\ell$ is written as a function of the output $Z ( v )$ . Then, (1) and (3) become
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
f = \mathrm { E } _ { v \sim P ( v ) } [ \ell ( Z ( v ) ) ] \quad \mathrm { w i t h } \quad Z ( v ) = \sigma \left( \int \widehat { A } ( v , u ) X ( u ) W d P ( u ) \right) .
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
Such a functional generalization facilitates sampling on all network layers for defining a gradient estimator. In particular, defining $\begin{array} { r } { B ( v ) = \int \widehat { A } ( v , u ) \bar { X } ( u ) d P ( u ) } \end{array}$ , simple calculation reveals that the gradient with respect to the parameter matrix $W$ is
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
G : = \nabla f = \int q ( B ( v ) ) d P ( v ) , \quad { \mathrm { w h e r e } } \quad q ( B ) = B ^ { T } \nabla h ( B W ) \quad { \mathrm { a n d } } \quad h = \ell \circ \sigma .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
Then, one may use $t$ iid samples of $u$ in the input and $s$ iid samples of $v$ in the output to define an estimator of $G$ :
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
G _ { s t } : = \frac { 1 } { s } \sum _ { i = 1 } ^ { s } q ( B _ { t } ( v _ { i } ) ) , \quad v _ { i } \sim P ( v ) , \quad \mathrm { w i t h } \quad B _ { t } ( v ) : = \frac { 1 } { t } \sum _ { j = 1 } ^ { t } \widehat { A } ( v , u _ { j } ) X ( u _ { j } ) , \quad u _ { j } \sim P ( u ) .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
The gradient estimator $G _ { s t }$ so defined is consistent; see a proof in the supplementary material.
|
| 89 |
+
|
| 90 |
+
Theorem 1. If $q$ is continuous and $f$ is finite, then $\mathrm { p l i m } _ { s , t \infty } G _ { s t } = G$ .
|
| 91 |
+
|
| 92 |
+
# 3 SETTING AND NOTATIONS
|
| 93 |
+
|
| 94 |
+
We now settle the notations for SGD. We are interested in the (constrained) optimization problem
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\operatorname* { m i n } _ { w \in S } f ( w ) ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where the feasible region $S$ is convex. This setting includes the unconstrained case $S = \mathbb { R } ^ { d }$ . We assume that the objective function $f : \mathbb { R } ^ { d } \mathbb { R }$ is subdifferentiable; and use $\partial f ( w )$ to denote the subdifferential at $w$ . When it is necessary to refer to an element of this set, we use the notation $h$ . If $f$ is differentiable, then clearly, $\partial f ( w ) \dot { = } \{ \nabla f ( w ) \}$ .
|
| 101 |
+
|
| 102 |
+
The standard update rule for SGD is $w _ { k + 1 } = \Pi _ { S } ( w _ { k } - \gamma _ { k } g _ { k } )$ , where $g _ { k }$ is the negative search direction at step $k$ , $\gamma _ { k }$ is the step size, and $\Pi _ { S }$ is the projection onto the feasible region: $\Pi _ { S } ( w ) : =$ $\mathrm { a r g m i n } _ { u \in S } \| u - u \|$ . For unconstrained problems, the projection is clearly omitted: $w _ { k + 1 } = w _ { k } -$ $\gamma _ { k } g _ { k }$ .
|
| 103 |
+
|
| 104 |
+
Denote by $w ^ { * }$ the global minimum. We assume that $w ^ { * }$ is an interior point of $S$ , so that the subdifferential of $f$ at $w ^ { * }$ contains zero. For differentiable $f$ , this assumption simply means that $\nabla f ( w ^ { * } ) = 0$
|
| 105 |
+
|
| 106 |
+
Typical convergence results are concerned with how fast the iterate $w _ { k }$ approaches $w ^ { * }$ , or the function value $f ( w _ { k } )$ approaches $f ( w ^ { * } )$ . Sometimes, the analysis is made convenient through a convexity assumption on $f$ , such that the average of historical function values $f ( w _ { i } ) , i = 1 , \dots , k$ , is lowered bounded by $f ( \overline { { w } } _ { k } )$ , with $\overline { { w } } _ { k }$ being the cumulative moving average $\begin{array} { r } { \overline { { \boldsymbol { w } } } _ { k } = \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \boldsymbol { w } _ { i } } \end{array}$ .
|
| 107 |
+
|
| 108 |
+
The following definitions are frequently referenced.
|
| 109 |
+
|
| 110 |
+
Definition 3. We say that $f$ is $l$ -strongly convex (with $l > 0$ ) if for all $w , u \in \mathbb { R } ^ { d }$ and $h _ { u } \in \partial f ( u )$
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
f ( w ) - f ( u ) \geq \langle h _ { u } , w - u \rangle + \frac { l } { 2 } \| w - u \| ^ { 2 } .
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
Definition 4. We say that $f$ is $L$ -smooth (with $L > 0$ ) if it is differentiable and for all $w , u \in \mathbb { R } ^ { d }$
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\| \nabla f ( w ) - \nabla f ( u ) \| \leq L \| w - u \| .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
# 4 CONVERGENCE RESULTS
|
| 123 |
+
|
| 124 |
+
Recall that an estimator $g ^ { N }$ of $h$ is consistent if for any $\epsilon > 0$ ,
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\operatorname* { l i m } _ { N \to \infty } \operatorname* { P r } ( \| g ^ { N } - h \| > \epsilon ) = 0 .
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
In our setting, $h$ corresponds to an element of the subdifferential at step $k$ ; i.e., $h _ { k } \in \partial f ( w _ { k } )$ , $g ^ { N }$ corresponds to the negative search direction $g _ { k }$ , and $N$ corresponds to the sample size $N _ { k }$ . That $g _ { k } ^ { N _ { k } }$ converges to $h _ { k }$ in probability does not imply that $g _ { k } ^ { N _ { k } }$ is unbiased. Hence, a natural question asks what convergence guarantees exist when using $g _ { k } ^ { N _ { k } }$ as the gradient estimator. This section answers that question.
|
| 131 |
+
|
| 132 |
+
First, note that the sample size $N _ { k }$ is associated with not only gNkk , but also the new iterate wNkk+1.
|
| 133 |
+
We omit the superscript $N _ { k }$ in these vectors to improve readability.
|
| 134 |
+
|
| 135 |
+
Similar to the analysis of standard SGD, which is built on the premise of the unbiasedness of $g _ { k }$ and the boundedness of the gradient, in the following subsection we elaborate the parallel assumptions in this work. They are stated only once and will not be repeated in the theorems that follow, to avoid verbosity.
|
| 136 |
+
|
| 137 |
+
# 4.1 ASSUMPTIONS
|
| 138 |
+
|
| 139 |
+
The convergence (5) of the estimator does not characterize how fast it approaches the truth. One common assumption is that the probability in (5) decreases exponentially with respect to the sample size. That is, we assume that there exists a step-dependent constant $C _ { k } \ > \ 0$ and a nonnegative function $\tau ( \delta )$ on the positive axis such that
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
\operatorname* { P r } \Big ( \| g _ { k } - h _ { k } \| \ge \delta \| h _ { k } \| \Big | g _ { 1 } , \dots , g _ { k - 1 } \Big ) \le C _ { k } e ^ { - N _ { k } \tau ( \delta ) }
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
for all $k > 1$ and $\delta > 0$ . A similar assumption is adopted by Homem-de-Mello (2008) that studied stochastic optimization through sample average approximation. In this case, the exponential tail occurs when the individual moment generating functions exist, a simple application of the Chernoff bound. For the motivating application GCN, the tail is indeed exponential as evidenced by Figure 3.
|
| 146 |
+
|
| 147 |
+
Note the conditioning on the history $g _ { 1 } , \ldots , g _ { k - 1 }$ in (6). The reason is that $h _ { k }$ (i.e., the gradient $\nabla f ( w _ { k } )$ if $f$ is differentiable) is by itself a random variable dependent on history. In fact, a more rigorous notation for the history should be filtration, but we omit the introduction of unnecessary additional definitions here, as using the notion $g _ { 1 } , \ldots , g _ { k - 1 }$ is sufficiently clear.
|
| 148 |
+
|
| 149 |
+
Assumption 1. The gradient estimator $g _ { k }$ is consistent and obeys (6).
|
| 150 |
+
|
| 151 |
+
The use of a tail bound assumption, such as (6), is to reverse-engineer the required sample size given the desired probability that some event happens. In this particular case, consider the setting where $T$ SGD updates are run. For any $\delta \in ( 0 , 1 )$ , define the event
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
E _ { \delta } = \Big \{ \| g _ { 1 } - h _ { 1 } \| \leq \delta \| h _ { 1 } \| \mathrm { ~ a n d ~ } \| g _ { 2 } - h _ { 2 } \| \leq \delta \| h _ { 2 } \| \mathrm { ~ a n d ~ } . . . \mathrm { ~ a n d ~ } \| g _ { T } - h _ { T } \| \leq \delta \| h _ { T } \| \Big \} .
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
Given (6) and any $\epsilon \in ( 0 , 1 )$ , one easily calculates that if the sample sizes satisfy
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
N _ { k } \ge \tau ( \delta ) ^ { - 1 } \log ( T C _ { k } / \epsilon ) ,
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
for all $k$ , then,
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
\operatorname* { P r } ( E _ { \delta } ) \geq \prod _ { k = 1 } ^ { T } ( 1 - C _ { k } e ^ { - N _ { k } \tau ( \delta ) } ) \geq \prod _ { k = 1 } ^ { T } ( 1 - \epsilon / T ) \geq 1 - \epsilon .
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
Hence, all results in this section are established under the event $E _ { \delta }$ that occurs with probability at least $1 - \epsilon$ , a sufficient condition of which is (7).
|
| 170 |
+
|
| 171 |
+
The sole purpose of the tail bound assumption (6) is to establish the relation between the required sample sizes (as a function of $\delta$ and $\epsilon$ ) and the event $E _ { \delta }$ , on which convergence results in this work are based. One may replace the assumption by using other tail bounds as appropriate. It is out of the scope of this work to quantify the rate of convergence of the gradient estimator for a particular use case. For GCN, the exponential tail that agrees with (6) is illustrated in Section 5.4.
|
| 172 |
+
|
| 173 |
+
Additionally, parallel to the bounded-gradient condition for standard SGD analysis, we impose the following assumption.
|
| 174 |
+
|
| 175 |
+
Assumption 2. There exists a finite $G > 0$ such that $\| h \| \leq G$ for all $h \in \partial f ( w )$ and $w \in S$
|
| 176 |
+
|
| 177 |
+
# 4.2 RESULTS
|
| 178 |
+
|
| 179 |
+
Let us begin with the strongly convex case. For standard SGD with unbiased gradient estimators, ample results exist that indicate $O ( 1 / T )$ convergence2 for the expected error, where $T$ is the number of updates; see, e.g., (2.9)–(2.10) of Nemirovski et al. (2009) and Section 3.1 of Lacoste-Julien et al. (2012). We derive similar results for consistent gradient estimators, as stated in the following Theorem 2. Different from the unbiased case, it is the error, rather than the expected error, to be bounded. The tradeoff is the introduction of the relative gradient estimator error $\delta$ , which relates to the sample sizes as in (7) for guaranteeing satisfaction of the bound with high probability.
|
| 180 |
+
|
| 181 |
+
Theorem 2. Let $f$ be $l$ -strongly convex with $l \le G / \| w _ { 1 } - w ^ { * } \|$ . Assume that $T$ updates are run, with diminishing step size $\gamma _ { k } = [ ( l - \delta ) k ] ^ { - 1 }$ for $k = 1 , 2 , \dots , T$ , where $\delta = \rho / T$ and $\rho < l$ is an arbitrary constant independent of $T$ . Then, for any such $\rho _ { ; }$ , any $\epsilon \in ( 0 , 1 )$ , and sufficiently large sample sizes satisfying (7), with probability at least $1 - \epsilon$ , we have
|
| 182 |
+
|
| 183 |
+
$$
|
| 184 |
+
\| w _ { T } - w ^ { * } \| ^ { 2 } \leq \frac { G ^ { 2 } } { T } \left[ \frac { ( 1 + \rho / T ) ^ { 2 } + \rho ( l - \rho / T ) } { ( l - \rho / T ) ^ { 2 } } \right] ,
|
| 185 |
+
$$
|
| 186 |
+
|
| 187 |
+
and
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
f ( \overline { { w } } _ { T } ) - f ( w ^ { * } ) \leq \frac { G ^ { 2 } } { 2 T } \left[ \rho + \frac { ( 1 + \rho / T ) ^ { 2 } } { l - \rho / T } ( 1 + \log T ) \right] .
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
Note the assumption on $l$ in Theorem 2. This assumption is mild since if $f$ is $l$ -strongly convex, it is also $l ^ { \prime }$ -strongly convex for all ${ \mathit { l } } ^ { \prime } < { \mathit { l } }$ . The assumption is needed in the induction proof of (8) when establishing the base case $\lVert \boldsymbol { w } _ { 1 } - \boldsymbol { w } ^ { * } \rVert$ . One may remove this assumption at the cost of a cumbersome right-hand side of (8), over which we favor a neater expression in the current form.
|
| 194 |
+
|
| 195 |
+
With an additional smoothness assumption, we may eliminate the logarithmic factor in (9) and obtain a result for the iterate $w _ { T }$ rather than the running average $\overline { { w } } _ { T }$ . The result is a straightforward consequence of (8).
|
| 196 |
+
|
| 197 |
+
Theorem 3. Under the conditions of Theorem 2, additionally let $f$ be $L$ -smooth. Then, for any $\rho$ satisfying the conditions, any $\epsilon \in ( 0 , 1 )$ , and sufficiently large sample sizes satisfying (7), with probability at least $1 - \epsilon$ , we have
|
| 198 |
+
|
| 199 |
+
$$
|
| 200 |
+
f ( w _ { T } ) - f ( w ^ { * } ) \leq \frac { L G ^ { 2 } } { 2 T } \left[ \frac { ( 1 + \rho / T ) ^ { 2 } + \rho ( l - \rho / T ) } { ( l - \rho / T ) ^ { 2 } } \right] .
|
| 201 |
+
$$
|
| 202 |
+
|
| 203 |
+
In addition to $O ( 1 / T )$ convergence, it is also possible to establish linear convergence (however) to a non-vanishing right-hand side, as the following result indicates. To obtain such a result, we use a constant step size. Bottou et al. (2016) show a similar result for the function value with an additional smoothness assumption in a different setting; we give one for the iterate error without the smoothness assumption using consistent gradients.
|
| 204 |
+
|
| 205 |
+
Theorem 4. Under the conditions of Theorem 2, except that one sets a constant step size $\gamma _ { k } = c$ with $0 < c < ( 2 l - \delta ) ^ { - 1 }$ for all $k$ , for any $\rho$ satisfying the conditions, any $\epsilon \in ( 0 , 1 )$ , and sufficiently large sample sizes satisfying (7), with probability at least $1 - \epsilon$ , we have
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
\| w _ { T } - w ^ { * } \| ^ { 2 } \leq ( 1 - 2 c l + c \delta ) ^ { T - 1 } \| w _ { 1 } - w ^ { * } \| ^ { 2 } + \frac { \delta + c ( 1 + \delta ) ^ { 2 } } { 2 l - \delta } G ^ { 2 } .
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
Compare (11) with (8) in Theorem 2. The former indicates that in the limit, the squared iterate error is upper bounded by a positive term proportional to $G ^ { 2 }$ ; the remaining part of this upper bound decreases at a linear speed. The latter, on the other hand, indicates that the squared iterate error in fact will vanish, although it does so at a sublinear speed $O ( 1 / T )$ .
|
| 212 |
+
|
| 213 |
+
For convex (but not strongly convex) $f$ , typically $O ( 1 / \sqrt { T } )$ convergence is asserted for unbiased gradient estimators; see., e.g., Theorem 2 of Liu (2015). These results are often derived based on an additional assumption that the feasible region is compact. Such an assumption is not restrictive, because even if the problem is unconstrained, one can always confine the search to a bounded region (e.g., an Euclidean ball). Under this condition, we obtain a similar result for consistent gradient estimators.
|
| 214 |
+
|
| 215 |
+
Theorem 5. Let $f$ be convex and the feasible region $S$ have finite diameter $D \ > \ 0$ ; that is,√ $\begin{array} { r } { \operatorname* { s u p } _ { w , u \in S } \| w - u \| = D } \end{array}$ . Assume that $T$ updates are run, with diminishing step size $\gamma _ { k } = c / \sqrt { k }$ for $k = 1 , 2 , \dots , T$ and for some $c > 0$ . Let $\delta = \rho / \sqrt { T }$ where $\rho > 0$ is an arbitrary constant independent of $T$ . Then, for any such $\rho$ , any $\epsilon \in ( 0 , 1 )$ , and sufficiently large sample sizes satisfying (7), with probability at least $1 - \epsilon$ , we have
|
| 216 |
+
|
| 217 |
+
$$
|
| 218 |
+
f ( \overline { { w } } _ { T } ) - f ( w ^ { * } ) \leq \frac { 1 } { 2 \sqrt { T } } \left[ \left( \frac { 1 } { c } + \rho \right) D ^ { 2 } + G ^ { 2 } \left( \rho + c \left( 1 + \frac { \rho } { \sqrt { T } } \right) ^ { 2 } \sqrt { 1 + \frac { 1 } { T } } \right) \right] .
|
| 219 |
+
$$
|
| 220 |
+
|
| 221 |
+
One may obtain a result of the same convergence rate by using a constant step size. In the case of unbiased gradient estimators, see Theorem 14.8 of Shalev-Shwartz & Ben-David (2014). For such a result, one assumes that the step size is inversely proportional to $\sqrt { T }$ . Such choice of the step size is common and is also used in the next setting.
|
| 222 |
+
|
| 223 |
+
For the general (nonconvex) case, convergence is typically gauged with the gradient norm. One√ again obtains $O ( 1 / \sqrt { T } )$ convergence results for unbiased gradient estimators; see, e.g., Theorem 1 of Reddi et al. (2016) (which is a simplified consequence of the theory presented in Ghadimi & Lan (2013)). We derive a similar result for consistent gradient estimators.
|
| 224 |
+
|
| 225 |
+
Theorem 6. Let $f$ be $L$ -smooth and $S = \mathbb { R } ^ { d }$ . Assume that $T$ updates are run, with constant step size $\gamma _ { k } = D _ { f } / [ ( 1 + \delta ) G \sqrt { T } ] f o r k = 1 , 2 , \dots , T$ , where $D _ { f } = [ 2 ( f ( w _ { 1 } ) - f ( w ^ { * } ) ) / L ] ^ { \frac { 1 } { 2 } }$ , and $\delta \in ( 0 , 1 )$
|
| 226 |
+
|
| 227 |
+
is an arbitrary constant. Then, for any such $\delta$ , any $\epsilon \in ( 0 , 1 )$ , and sufficiently large sample sizes satisfying (7), with probability at least $1 - \epsilon$ , we have
|
| 228 |
+
|
| 229 |
+
$$
|
| 230 |
+
\operatorname* { m i n } _ { k = 1 , \dots , T } \| \nabla f ( w _ { k } ) \| ^ { 2 } \leq \frac { ( 1 + \delta ) L G D _ { f } } { ( 1 - \delta ) \sqrt { T } } .
|
| 231 |
+
$$
|
| 232 |
+
|
| 233 |
+
# 4.3 INTERPRETATION
|
| 234 |
+
|
| 235 |
+
All the results in the preceding subsection assert convergence for SGD with the use of a consistent gradient estimator. As with the use of an unbiased one, the convergence for the strongly convex case is $O ( 1 / T )$ , or linear if one tolerates a non-vanishing upper bound, and the convex and nonconvex√ cases $O ( 1 / \sqrt { T } )$ . These theoretical results, however, are based on assumptions of the sample size $N _ { k }$ and the step size $\gamma _ { k }$ that are practically challenging to verify. Hence, in a real-life machine learning setting, the sample size and the learning rate (the initial step size) are treated as hyperparameters to be tuned against a validation set.
|
| 236 |
+
|
| 237 |
+
Nevertheless, these results establish a qualitative relationship between the sample size and the optimization error. Naturally, to maintain the same failure probability $\epsilon$ , the relative gradient estimator error $\delta$ decreases inversely with the sample size $N _ { k }$ . This intuition holds true in the tail bound condition (6) with (7), when $\tau ( \delta )$ is a monomial or a positive combination of monomials with different degrees. With this assumption, the larger is $N _ { k }$ , the smaller is $\delta$ (and also $\rho$ , the auxiliary quantity defined in the theorems); hence, the smaller are the error bounds (8)–(13).
|
| 238 |
+
|
| 239 |
+
# 4.4 REMARKS
|
| 240 |
+
|
| 241 |
+
Theorem 4 presents a linear convergence result for the strongly convex case, with a non-vanishing right-hand side. In fact, it is possible to obtain a result with the same convergence rate but a vanishing right-hand side, if one is willing to additionally assume $L$ -smoothness. The following theorem departs from the set of theorems in Section 4.2 on the assumption of the sufficient sample size $N _ { k }$ and the gradient error $\delta$ .
|
| 242 |
+
|
| 243 |
+
Theorem 7. Let $f$ be $l$ -strongly convex and $L$ -smooth with $l < L$ . Assume that $T$ updates are run with constant step size $\gamma _ { k } = 1 / L$ for $k = 1 , 2 , \ldots , T$ . Let $\delta _ { k }$ , $k \geq 1$ be a sequence where $\begin{array} { r } { \operatorname* { l i m } _ { k \to \infty } \delta _ { k + 1 } / \delta _ { k } \leq \bar { 1 } } \end{array}$ . Then, for any positive $\eta < l / L , \epsilon \in ( 0 , 1 )$ , and sample sizes
|
| 244 |
+
|
| 245 |
+
$$
|
| 246 |
+
N _ { k } \ge \tau ( \delta _ { k } / \| h _ { k } \| ) ^ { - 1 } \log ( T C _ { k } / \epsilon ) \quad f o r k = 1 , 2 , \ldots , T ,
|
| 247 |
+
$$
|
| 248 |
+
|
| 249 |
+
with probability at least $1 - \epsilon$ , we have
|
| 250 |
+
|
| 251 |
+
$$
|
| 252 |
+
f ( w _ { T } ) - f ( w ^ { * } ) \leq ( 1 - l / L ) ^ { T - 1 } [ f ( w _ { 1 } ) - f ( w ^ { * } ) ] + O ( E _ { T } ) ,
|
| 253 |
+
$$
|
| 254 |
+
|
| 255 |
+
where $E _ { T } = \operatorname* { m a x } \{ \delta _ { T } ^ { 2 } , ( 1 - l / L + \eta ) ^ { T } \} .$ .
|
| 256 |
+
|
| 257 |
+
Here, $\delta _ { k }$ is the step-dependent gradient error. If it decreases to zero, then so does $E _ { T }$ . Theorem 7 is adapted from Friedlander & Schmidt (2012), who studied unbiased gradients as well as noisy gradients. We separate Theorem 7 from those in Section 4.2 only for the sake of presentation clarity. The spirit, however, remains the same. Namely, consistent estimators result in the same convergence behavior (i.e., rate) as do unbiased ones. All results require an assumption on sufficient sample size owing to the probabilistic convergence of the gradient estimator.
|
| 258 |
+
|
| 259 |
+
# 5 NUMERICAL ILLUSTRATIONS
|
| 260 |
+
|
| 261 |
+
In this section, we report several experiments to illustrate the convergence behavior of SGD by using consistent gradient estimators. We base the experiments on the training of the GCN model (Kipf & Welling, 2017) motivated earlier (cf. Section 2). The code repository will be revealed upon paper acceptance.
|
| 262 |
+
|
| 263 |
+
# 5.1 DATA SETS
|
| 264 |
+
|
| 265 |
+
We use three data sets for illustration, one synthetic and two real-world benchmarks.
|
| 266 |
+
|
| 267 |
+
The purpose of a synthetic data set is to avoid the regularity in the sampling of training/validation/test examples. The data set, called “Mixture,” is a mixture of three overlapping Gaussians. The points are randomly connected, with a higher probability for those within the same component than the ones straddling across components. See the supplementary material for details of the construction. Because of the significant overlap, a classifier trained with independent data points unlikely predicts well the component label, but a graph-based method is more likely to be successful.
|
| 268 |
+
|
| 269 |
+
Additionally, we use two benchmark data sets, Cora and Pubmed, often seen in the literature. These graphs are citation networks and the task is to predict the topics of the publications. We follow the split used in Chen et al. (2018). See the supplementary material for a summary of all data sets.
|
| 270 |
+
|
| 271 |
+
# 5.2 (STRONGLY) CONVEX CASE
|
| 272 |
+
|
| 273 |
+
The GCN model is hyperparameterized by the number of layers. Without any intermediate layer, the model can be considered a generalized linear model and thus the cross-entropy loss function is convex. Moreover, with the use of an $L _ { 2 }$ regularization, the loss becomes strongly convex. The predictive model reads $P = \mathrm { s o f t m a x } ( \widehat { A } X W ^ { ( 0 ) } )$ , where $X$ is the input feature matrix and $P$ is the output probability matrix, both row-wise. One easily sees that the only difference between this model and logistic regression $P = \operatorname { s o f t m a x } ( X W ^ { ( 0 ) } )$ is the neighborhood aggregation $\widehat { A } X$ .
|
| 274 |
+
|
| 275 |
+
Standard batched training in SGD samples a batch (denoted by the index set $I _ { 1 }$ ) from the training set and evaluates the gradient of the loss of $\operatorname { s o f t m a x } ( \widehat { A } ( I _ { 1 } , : ) \dot { X } W ^ { ( 0 ) } )$ . In the analyzed consistentgradient training, we additionally uniformly sample the input layer with another index set $I _ { 0 }$ and evaluate instead the gradient of the loss of softmax $\begin{array} { r } { \big ( \frac { n } { | I _ { 0 } | } \widehat { A } ( \bar { I } _ { 1 } , I _ { 0 } ) \dot { X } ( I _ { 0 } , { : } ) W ^ { ( 0 ) } \big ) } \end{array}$ .
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 1: Convergence history for 1-layer GCN, under different training algorithms.
|
| 279 |
+
|
| 280 |
+
Figure 1 shows the convergence curves as the iteration progresses. The plotted quantity is the overall loss on all training examples, rather than the batch loss for only the current batch. Hence, not surprisingly the curves are generally quite smooth. We compare standard SGD with the use of consistent gradient estimators, with varying sample size $\left| I _ { 0 } \right|$ . Additionally, we compare with the Adam training algorithm (Kingma & Ba, 2015), which is a stochastic optimization approach predominantly used in practice for training deep neural networks.
|
| 281 |
+
|
| 282 |
+
One sees that for all data sets, Adam converges faster than does standard SGD. Moreover, as the sample size increases, the loss curve with consistent gradients approaches that with an unbiased one (i.e., standard SGD). This phenomenon qualitatively agrees with the theoretical results; namely, larger sample size improves the error bound. Note that all curves in the same plot result from the same parameter initialization; and all SGD variants apply the same learning rate.
|
| 283 |
+
|
| 284 |
+
It is important to note that the training loss is only a surrogate measure of the model performance; and often early termination of the optimization acts as a healthy regularization against over-fitting. In our setting, a small sample size may not satisfy the assumptions of the theoretical results, but it proves to be practically useful. In Table 1 (left), we report the test accuracy attained by different training algorithms at the epoch where validation accuracy peaks. One sees that Adam and standard SGD achieves similar accuracies, and that SGD with consistent gradient sometimes surpasses these accuracies. For Cora, a sample size 400 already yields an accuracy noticeably higher than do Adam and standard SGD.
|
| 285 |
+
|
| 286 |
+
Table 1: Test accuracy (in percentage) and epoch number (inside parentheses) for different GCN architectures and training algorithms. For the same architecture, initialization is the same. The epoch number is the one when best validation accuracy occurs.
|
| 287 |
+
|
| 288 |
+
<table><tr><td></td><td colspan="3">1-layer GCN</td><td colspan="3">2-layer GCN</td></tr><tr><td></td><td>Mixture</td><td>Cora</td><td>Pubmed</td><td>Mixture</td><td>Cora</td><td>Pubmed</td></tr><tr><td>SGD (400)</td><td>78.0 (68)</td><td>85.8 (97)</td><td>86.2 (15)</td><td>86.7 (76)</td><td>87.1 (34)</td><td>87.5 (88)</td></tr><tr><td>SGD (800)</td><td>77.8 (46)</td><td>86.1 (86)</td><td>87.9 (68)</td><td>86.9 (87)</td><td>85.8 (13)</td><td>87.6 (87)</td></tr><tr><td>SGD (1600)</td><td>77.9 (87)</td><td></td><td>88.6 (35)</td><td>86.8 (94)</td><td></td><td>88.3 (85)</td></tr><tr><td>SGD (3200)</td><td></td><td></td><td>88.9 (98)</td><td>=</td><td></td><td>88.1 (88)</td></tr><tr><td>SGD unbiased</td><td>78.1 (93)</td><td>84.2 (87)</td><td>88.1(75)</td><td>86.8 (66)</td><td>87.4 (27)</td><td>87.9 (90)</td></tr><tr><td>Adam unbiased</td><td>80.0 (95)</td><td>84.9 (21)</td><td>88.4 (20)</td><td>87.6 (94)</td><td>87.0 (04)</td><td>88.0 (06)</td></tr></table>
|
| 289 |
+
|
| 290 |
+
# 5.3 NONCONVEX CASE
|
| 291 |
+
|
| 292 |
+
When GCN has intermediate layers, the loss function is generally nonconvex. A 2-layer GCN reads $P = \operatorname { s o f t m a x } ( { \widehat { A } } \cdot \operatorname { R e L U } ( { \widehat { A } } X { \dot { W } } ^ { ( 0 ) } ) \cdot W ^ { ( 1 ) } )$ , and a GCN with more layers is analogous.
|
| 293 |
+
|
| 294 |
+
We repeat the experiments in the preceding subsection. The results are reported in Figure 2 and Table 1 (right). The observation of the loss curve follows the same as that in the convex case. Namely, Adam converges faster than does unbiased SGD; and the convergence curve with a consistent gradient approaches that with an unbiased one.
|
| 295 |
+
|
| 296 |
+

|
| 297 |
+
Figure 2: Convergence history for 2-layer GCN, under different training algorithms.
|
| 298 |
+
|
| 299 |
+
On the other hand, compared with 1-layer GCN, 2-layer GCN yields substantially higher test accuracy for the data set Mixture, better accuracy for Cora, and very similar accuracy for Pubmed. Within each data set, the performances of different training algorithms are on par. In particular, a small sample size (e.g., 400) suffices for achieving results comparable to the state of the art (cf. Chen et al. (2018)).
|
| 300 |
+
|
| 301 |
+
# 5.4 PROBABILITY CONVERGENCE
|
| 302 |
+
|
| 303 |
+
The nature of a consistent estimator necessitates a characterization of the speed of probability convergence for building further results, such as the ones in this paper. The speed, however, depends on the neural network architecture and it is out of the scope of this work to quantify it for a particular use case. Nevertheless, for GCN we demonstrate empirical findings that agree with the exponential tail assumption (6). In Figure 3 (solid curves), we plot the tail probability as a function of the sample size $N$ at different levels of estimator error $\delta$ , for the initial gradient step in 1-layer GCN. For each $N$ , 10,000 random gradient estimates were simulated for estimating the probability. Because the probability is plotted in the logarithmic scale, the fact that the curves bend down indicates that the convergence may be faster than exponential.
|
| 304 |
+
|
| 305 |
+
Additionally, the case of 2-layer GCN is demonstrated by the dashed curves in Figure 3. The curves tend to be straight lines in the limit, which indicates an exponential convergence.
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
Figure 3: Failure probability versus sample size at different levels of estimator error $\delta$ . Solid: 1-layer GCN; dashed: 2-layer GCN.
|
| 309 |
+
|
| 310 |
+
# 6 CONCLUDING REMARKS
|
| 311 |
+
|
| 312 |
+
To the best of our knowledge, this is the first work that studies the convergence behavior of SGD with consistent gradient estimators, and one among few studies of first-order methods that employ biased (d’Aspremont, 2008; Schmidt et al., 2011) or noisy (Friedlander & Schmidt, 2012; Devolder et al., 2014; Ge et al., 2015) estimators. The motivation originates from learning with large graphs and the main message is that the convergence behavior is well-maintained with respect to the unbiased case. While we analyze the classic SGD update formula, this work points to several immediate extensions. One direction is the design of more efficient update formulas resembling the variance reduction technique for unbiased estimators (Johnson & Zhang, 2013; Defazio et al., 2014; Bottou et al., 2016). Another direction is the development of more computation- and memory-efficient training algorithms for neural networks for large graphs. GCN is only one member of a broad family of message passing neural networks (Gilmer et al., 2017) that suffer from the same limitation of neighborhood aggregation. Learning in these cases inevitably faces the costly computation of the sample gradient. Hence, a consistent estimator appears to be a promising alternative, whose construction is awaiting more innovative proposals.
|
| 313 |
+
|
| 314 |
+
We are grateful to an anonymous reviewer who inspired us of an interesting use case (other than GCN). Learning to rank is a machine learning application that constructs ranking models for information retrieval systems. In representative methods such as RankNet (Burges et al., 2005) and subsequent improvements (Burges et al., 2007; Burges, 2010), $s _ { i }$ is the ranking function for document $i$ and the learning amounts to minimizing the loss
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\sum _ { ( i , j ) } s _ { j } - s _ { i } + \log ( 1 + e ^ { s _ { i } - s _ { j } } ) ,
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
where the summation ranges over all pairs of documents such that $i$ is ranked higher than $j$ . The pairwise information may be organized as a graph and the loss function may be similarly generalized as a double integral analogous to (4). Because of nonlinearity, Monte Carlo sampling of each integral will result in a biased but consistent estimator. Therefore, a new training algorithm is to sample $i$ and $j$ separately (forming a consistent gradient) and apply SGD. The theory developed in this work offers guarantees of training convergence.
|
| 321 |
+
|
| 322 |
+
# REFERENCES
|
| 323 |
+
|
| 324 |
+
Leon Bottou, Frank E. Curtis, and Jorge Nocedal. Optimization methods for large-scale machine ´ learning. arXiv:1606.04838v3, 2016.
|
| 325 |
+
|
| 326 |
+
Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In ICLR, 2014.
|
| 327 |
+
|
| 328 |
+
Chris Burges, Tal Shaked, Erin Renshaw, Ari Lazier, Matt Deeds, Nicole Hamilton, and Greg Hullender. Learning to rank using gradient descent. In ICML, 2005.
|
| 329 |
+
|
| 330 |
+
Christopher J. Burges, Robert Ragno, and Quoc V. Le. Learning to rank with nonsmooth cost functions. In NIPS, 2007.
|
| 331 |
+
|
| 332 |
+
Christopher J.C. Burges. From RankNet to LambdaRank to LambdaMART: An overview. Technical Report MSR-TR-2010-82, Microsoft Research, 2010.
|
| 333 |
+
|
| 334 |
+
Jie Chen, Tengfei Ma, and Cao Xiao. FastGCN: Fast learning with graph convolutional networks via importance sampling. In ICLR, 2018.
|
| 335 |
+
|
| 336 |
+
Alexandre d’Aspremont. Smooth optimization with approximate gradient. SIAM J. Optim., 19(3): 1171–1183, 2008.
|
| 337 |
+
|
| 338 |
+
Aaron Defazio, Francis Bach, and Simon Lacoste-Julien. SAGA: A fast incremental gradient method with support for non-strongly convex composite objectives. In NIPS, 2014.
|
| 339 |
+
|
| 340 |
+
Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on ¨ graphs with fast localized spectral filtering. In NIPS, 2016.
|
| 341 |
+
|
| 342 |
+
Olivier Devolder, Franc¸ois Glineur, and Yurii Nesterov. First-order methods of smooth convex optimization with inexact oracle. Mathematical Programming, 146(1–2):37–75, 2014.
|
| 343 |
+
|
| 344 |
+
Michael P. Friedlander and Mark Schmidt. Hybrid deterministic-stochastic methods for data fitting. SIAM J. Sci. Comput., 34(3):A1380–A1405, 2012.
|
| 345 |
+
|
| 346 |
+
Rong Ge, Furong Huang, Chi Jin, and Yang Yuan. Escaping from saddle points — online stochastic gradient for tensor decomposition. In COLT, 2015.
|
| 347 |
+
|
| 348 |
+
Saeed Ghadimi and Guanghui Lan. Stochastic first- and zeroth-order methods for nonconvex stochastic programming. SIAM J. Optim., 23(4):2341–2368, 2013.
|
| 349 |
+
|
| 350 |
+
Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In ICML, 2017.
|
| 351 |
+
|
| 352 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In AISTATS, 2010.
|
| 353 |
+
|
| 354 |
+
William L. Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NIPS, 2017.
|
| 355 |
+
|
| 356 |
+
Tito Homem-de-Mello. On rates of convergence for stochastic optimization problems under nonindependent and identically distributed sampling. SIAM J. Optim., 19(2):524–551, 2008.
|
| 357 |
+
|
| 358 |
+
Rie Johnson and Tong Zhang. Accelerating stochastic gradient descent using predictive variance reduction. In NIPS, 2013.
|
| 359 |
+
|
| 360 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015.
|
| 361 |
+
|
| 362 |
+
Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
|
| 363 |
+
|
| 364 |
+
Simon Lacoste-Julien, Mark Schmidt, and Francis Bach. A simpler approach to obtaining an $O ( 1 / t )$ convergence rate for the projected stochastic subgradient method. arXiv:1212.2002v2, 2012.
|
| 365 |
+
|
| 366 |
+
Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016.
|
| 367 |
+
|
| 368 |
+
Ji Liu. CSC 576: Stochastic gradient “descent” algorithm. https://www.cs.rochester. edu/u/jliu/CSC-576/class-note-10.pdf, 2015.
|
| 369 |
+
|
| 370 |
+
A. Nemirovski, A. Juditsky, G. Lan, and A. Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM J. Optim., 19(4):1574–1609, 2009.
|
| 371 |
+
|
| 372 |
+
Sashank J. Reddi, Ahmed Hefny, Suvrit Sra, Barnabas Poczos, and Alex Smola. Stochastic variance reduction for nonconvex optimization. In ICML, 2016.
|
| 373 |
+
|
| 374 |
+
Herbert Robbins and Sutton Monro. A stochastic approximation method. Ann. Math. Statist., 22(3): 400–407, 1951.
|
| 375 |
+
|
| 376 |
+
Mark Schmidt, Nicolas L. Roux, and Francis R. Bach. Convergence rates of inexact proximalgradient methods for convex optimization. In NIPS, 2011.
|
| 377 |
+
|
| 378 |
+
Shai Shalev-Shwartz and Shai Ben-David. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014.
|
| 379 |
+
|
| 380 |
+
Petar Velickovi ˘ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \` Bengio. Graph attention networks. In ICLR, 2018.
|
| 381 |
+
|
| 382 |
+
# A PROOFS
|
| 383 |
+
|
| 384 |
+
A.1 LEMMAS
|
| 385 |
+
|
| 386 |
+
Here are a few lemmas needed for the proofs in subsequent subsections.
|
| 387 |
+
|
| 388 |
+
Lemma 8. Projection is nonexpanding, i.e.,
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
\Vert \Pi _ { S } ( w ) - \Pi _ { S } ( u ) \Vert \leq \Vert w - u \Vert , \quad \forall w , u \in \mathbb { R } ^ { d } .
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
Proof. Let $w ^ { \prime } = \Pi _ { S } ( w )$ and $u ^ { \prime } = \Pi _ { S } ( u )$ . By the convexity of $S$ , we have
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
\left. w - w ^ { \prime } , u ^ { \prime } - w ^ { \prime } \right. \leq 0 \quad \mathrm { a n d } \quad \left. u - u ^ { \prime } , w ^ { \prime } - u ^ { \prime } \right. \leq 0 .
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
Summing these two inequalities, we obtain $\langle w - u , w ^ { \prime } - u ^ { \prime } \rangle \geq \langle w ^ { \prime } - u ^ { \prime } , w ^ { \prime } - u ^ { \prime } \rangle$ . Then, by Cauchy–Schwarz,
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\| w ^ { \prime } - u ^ { \prime } \| ^ { 2 } \leq \langle w - u , w ^ { \prime } - u ^ { \prime } \rangle \leq \| w - u \| \| w ^ { \prime } - u ^ { \prime } \| ,
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
which concludes the proof.
|
| 407 |
+
|
| 408 |
+
Lemma 9. If $f$ is $l$ -strongly convex, then
|
| 409 |
+
|
| 410 |
+
$$
|
| 411 |
+
\langle h _ { u } , u - w ^ { * } \rangle \geq l \| u - w ^ { * } \| ^ { 2 } , \quad \forall u \in \mathbb { R } ^ { d } a n d h _ { u } \in \partial f ( u ) .
|
| 412 |
+
$$
|
| 413 |
+
|
| 414 |
+
Proof. Applying Definition 3 twice
|
| 415 |
+
|
| 416 |
+
$$
|
| 417 |
+
\begin{array} { l } { f ( w ^ { * } ) - f ( u ) \geq \langle h _ { u } , w ^ { * } - u \rangle + \displaystyle \frac { l } { 2 } \| w ^ { * } - u \| ^ { 2 } } \\ { f ( u ) - f ( w ^ { * } ) \geq \qquad + \displaystyle \frac { l } { 2 } \| u - w ^ { * } \| ^ { 2 } , } \end{array}
|
| 418 |
+
$$
|
| 419 |
+
|
| 420 |
+
and summing these two inequalities, we conclude the proof.
|
| 421 |
+
|
| 422 |
+
Lemma 10. For any $w \in S$ ,
|
| 423 |
+
|
| 424 |
+
$$
|
| 425 |
+
\begin{array} { r } { \| w _ { k + 1 } - w \| ^ { 2 } \leq \| w _ { k } - w \| ^ { 2 } - 2 \gamma _ { k } \langle g _ { k } , w _ { k } - w \rangle + \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } . } \end{array}
|
| 426 |
+
$$
|
| 427 |
+
|
| 428 |
+
Proof. It is straightforward to verify that
|
| 429 |
+
|
| 430 |
+
$$
|
| 431 |
+
\begin{array} { r l } & { \| w _ { k + 1 } - w \| ^ { 2 } = \| \Pi _ { S } ( { w _ { k } } - \gamma _ { k } g _ { k } ) - w \| ^ { 2 } } \\ & { \qquad \leq \| w _ { k } - \gamma _ { k } g _ { k } - w \| ^ { 2 } } \\ & { \qquad = \| w _ { k } - w \| ^ { 2 } - 2 \gamma _ { k } \langle g _ { k } , w _ { k } - w \rangle + \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } , } \end{array}
|
| 432 |
+
$$
|
| 433 |
+
|
| 434 |
+
where the inequality results from Lemma 8.
|
| 435 |
+
|
| 436 |
+
Lemma 11. $I f \| g _ { k } - h _ { k } \| \leq \delta \| h _ { k } \|$ , then
|
| 437 |
+
|
| 438 |
+
$$
|
| 439 |
+
( 1 - \delta ) \| h _ { k } \| \leq \| g _ { k } \| \leq ( 1 + \delta ) \| h _ { k } \| ,
|
| 440 |
+
$$
|
| 441 |
+
|
| 442 |
+
and
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
- \frac { \delta } { 2 } ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) \leq \langle g _ { k } - h _ { k } , w _ { k } - w ^ { * } \rangle \leq \frac { \delta } { 2 } ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) .
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Proof. For the first displayed inequality, it is straightforward to verify the upper bound
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
\begin{array} { r } { \| g _ { k } \| \leq \| h _ { k } \| + \| g _ { k } - h _ { k } \| \leq ( 1 + \delta ) \| h _ { k } \| , } \end{array}
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
and similarly the lower bound. For the second displayed inequality, Cauchy–Schwarz leads to the upper bound
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
g _ { k } - h _ { k } , w _ { k } - w ^ { * } \rangle \leq \| g _ { k } - h _ { k } \| \cdot \| w _ { k } - w ^ { * } \| \leq \delta \| h _ { k } \| \cdot \| w _ { k } - w ^ { * } \| \leq \frac { \delta } { 2 } ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) .
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
The lower bound is similarly proved.
|
| 461 |
+
|
| 462 |
+
# A.2 PROOF OF THEOREM 1
|
| 463 |
+
|
| 464 |
+
By the weak law of large numbers, $B _ { t } ( v ) B ( v )$ in probability for any $v$ , where the probability space is with respect to $u$ . Then, $q ( B _ { t } ( v ) ) q ( B ( v ) )$ in probability by the continuous mapping theorem. Applying the law of large numbers again, now for $v$ on a separate probability space different from that of $u$ , we conclude that $G _ { s t } \to G$ in probability.
|
| 465 |
+
|
| 466 |
+
# A.3 PROOF OF THEOREM 2, INEQUALITY (8)
|
| 467 |
+
|
| 468 |
+
Applying Lemma 10 with $w = w ^ { * }$ , we have
|
| 469 |
+
|
| 470 |
+
$$
|
| 471 |
+
\begin{array} { r } { \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } \langle h _ { k } , w _ { k } - w ^ { * } \rangle - 2 \gamma _ { k } \langle g _ { k } - h _ { k } , w _ { k } - w ^ { * } \rangle + \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } . } \end{array}
|
| 472 |
+
$$
|
| 473 |
+
|
| 474 |
+
Applying Lemma 9 with $u = w _ { k }$ and Lemma 11, we have
|
| 475 |
+
|
| 476 |
+
$$
|
| 477 |
+
\begin{array} { r l r } & { w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } l \| w _ { k } - w ^ { * } \| ^ { 2 } + \gamma _ { k } \delta ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } \| h _ { k } \| } & \\ & { } & { = ( 1 - 2 \gamma _ { k } l + \gamma _ { k } \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } + ( \gamma _ { k } \delta + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } . \quad \quad \quad \quad \quad ( 1 5 ) } \end{array}
|
| 478 |
+
$$
|
| 479 |
+
|
| 480 |
+
In what follows, we show by induction on $k$ that
|
| 481 |
+
|
| 482 |
+
$$
|
| 483 |
+
\Vert w _ { k } - w ^ { * } \Vert ^ { 2 } \leq \left[ \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k } + \frac { \delta } { l - \delta } \right] G ^ { 2 } .
|
| 484 |
+
$$
|
| 485 |
+
|
| 486 |
+
Then, setting $k = T$ we can conclude the proof.
|
| 487 |
+
|
| 488 |
+
First, in the base case when $k = 1$ , by assumption we have
|
| 489 |
+
|
| 490 |
+
$$
|
| 491 |
+
\| w _ { k } - w ^ { * } \| ^ { 2 } \leq \frac { G ^ { 2 } } { l ^ { 2 } } \leq \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } } G ^ { 2 } \leq \left[ \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } } + \frac { \delta } { l - \delta } \right] G ^ { 2 } .
|
| 492 |
+
$$
|
| 493 |
+
|
| 494 |
+
Then, in the induction step, taking $\gamma _ { k } = [ ( l - \delta ) k ] ^ { - 1 }$ as defined in the theorem on (15) and using the induction hypothesis, we have
|
| 495 |
+
|
| 496 |
+
$$
|
| 497 |
+
\begin{array} { r l } & { w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \displaystyle \frac { l k - \delta k - 2 l + \delta } { ( l - \delta ) k } \left[ \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k } + \frac { \delta } { l - \delta } \right] G ^ { 2 } + \left[ \frac { \delta } { ( l - \delta ) k } + \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k ^ { 2 } } \right] G ^ { 2 } } \\ & { \quad \quad \quad = \displaystyle \frac { ( l k - \delta k - 2 l + \delta ) ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 3 } k ^ { 2 } } G ^ { 2 } + \frac { ( l k - \delta k - 2 l + \delta ) \delta } { ( l - \delta ) ^ { 2 } k } G ^ { 2 } + \frac { \delta } { ( l - \delta ) k } G ^ { 2 } + \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) k } G ^ { 2 } } \\ & { \quad \quad \quad \leq \displaystyle \frac { ( k - 2 ) ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k ^ { 2 } } G ^ { 2 } + \frac { \delta ( k - 1 ) } { ( l - \delta ) k } G ^ { 2 } + \frac { \delta } { ( l - \delta ) k } G ^ { 2 } + \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k ^ { 2 } } G ^ { 2 } . } \end{array}
|
| 498 |
+
$$
|
| 499 |
+
|
| 500 |
+
For the right-hand side, combine the first and the fourth term, and the second and the third term, we obtain
|
| 501 |
+
|
| 502 |
+
$$
|
| 503 |
+
\| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \frac { ( k - 1 ) ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } k ^ { 2 } } G ^ { 2 } + \frac { \delta } { ( l - \delta ) } G ^ { 2 } \leq \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) ^ { 2 } ( k + 1 ) } G ^ { 2 } + \frac { \delta } { ( l - \delta ) } G ^ { 2 } ,
|
| 504 |
+
$$
|
| 505 |
+
|
| 506 |
+
which completes the induction step.
|
| 507 |
+
|
| 508 |
+
# A.4 PROOF OF THEOREM 2, INEQUALITY (9)
|
| 509 |
+
|
| 510 |
+
Applying Lemma 10 with $w = w ^ { * }$ , we have
|
| 511 |
+
|
| 512 |
+
$$
|
| 513 |
+
\begin{array} { r } { \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } \langle h _ { k } , w _ { k } - w ^ { * } \rangle - 2 \gamma _ { k } \langle g _ { k } - h _ { k } , w _ { k } - w ^ { * } \rangle + \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } . } \end{array}
|
| 514 |
+
$$
|
| 515 |
+
|
| 516 |
+
Applying the definition of strong convexity and Lemma 11, we have
|
| 517 |
+
|
| 518 |
+
$$
|
| 519 |
+
\begin{array} { r l } & { w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } [ f ( w _ { k } ) - f ( w ^ { * } ) ] - \gamma _ { k } l \| w _ { k } - w ^ { * } \| ^ { 2 } } \\ & { \qquad + \gamma _ { k } \delta ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } \| h _ { k } \| ^ { 2 } } \\ & { \qquad = - 2 \gamma _ { k } [ f ( w _ { k } ) - f ( w ^ { * } ) ] + ( 1 - \gamma _ { k } l + \gamma _ { k } \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } + ( \gamma _ { k } \delta + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } . } \end{array}
|
| 520 |
+
$$
|
| 521 |
+
|
| 522 |
+
Rearranging, we have
|
| 523 |
+
|
| 524 |
+
$$
|
| 525 |
+
2 [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq ( \gamma _ { k } ^ { - 1 } - l + \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } - \gamma _ { k } ^ { - 1 } \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } + ( \delta + \gamma _ { k } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } .
|
| 526 |
+
$$
|
| 527 |
+
|
| 528 |
+
Noting that the step size $\gamma _ { k } = [ ( l - \delta ) k ] ^ { - 1 }$ , we have
|
| 529 |
+
|
| 530 |
+
$$
|
| 531 |
+
\left. f ( w _ { k } ) - f ( w ^ { * } ) \right. \le ( l - \delta ) ( k - 1 ) \| w _ { k } - w ^ { * } \| ^ { 2 } - ( l - \delta ) k \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } + G ^ { 2 } \left[ \delta + \frac { ( 1 + \delta ) ^ { 2 } } { ( l - \delta ) k } \right] .
|
| 532 |
+
$$
|
| 533 |
+
|
| 534 |
+
Summing from $k = 1$ to $k = T$ and multiplying by $1 / ( 2 T )$ , we have
|
| 535 |
+
|
| 536 |
+
$$
|
| 537 |
+
\frac { 1 } { T } \sum _ { k = 1 } ^ { T } [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq - \frac { l - \delta } { 2 } \| w _ { T + 1 } - w ^ { * } \| ^ { 2 } + \frac { G ^ { 2 } } { 2 T } \left[ \delta T + \frac { ( 1 + \delta ) ^ { 2 } } { l - \delta } \sum _ { k = 1 } ^ { T } \frac { 1 } { k } \right] .
|
| 538 |
+
$$
|
| 539 |
+
|
| 540 |
+
By the convexity of have $f$ and using the bound $\textstyle \sum _ { k = 1 } ^ { T } 1 / k \leq 1 + \log T$ , and noting that $\delta = \rho / T$ , we
|
| 541 |
+
|
| 542 |
+
$$
|
| 543 |
+
f ( \overline { { w } } _ { T } ) - f ( w ^ { * } ) \leq - \frac { l - \delta } { 2 } \| w _ { T + 1 } - w ^ { * } \| ^ { 2 } + \frac { G ^ { 2 } } { 2 T } \left[ \rho + \frac { ( 1 + \rho / T ) ^ { 2 } } { l - \rho / T } ( 1 + \log T ) \right] .
|
| 544 |
+
$$
|
| 545 |
+
|
| 546 |
+
Relaxing the right-hand side through omitting the negative term, we thus conclude the proof.
|
| 547 |
+
|
| 548 |
+
# A.5 PROOF OF THEOREM 3
|
| 549 |
+
|
| 550 |
+
The $L$ -smoothness property implies a second order condition for convex functions:
|
| 551 |
+
|
| 552 |
+
$$
|
| 553 |
+
f ( w _ { k } ) - f ( w ^ { * } ) \leq \frac { L } { 2 } \| w _ { k } - w ^ { * } \| ^ { 2 } .
|
| 554 |
+
$$
|
| 555 |
+
|
| 556 |
+
Then, applying (8) with $k = T$ , we conclude the proof.
|
| 557 |
+
|
| 558 |
+
# A.6 PROOF OF THEOREM 4
|
| 559 |
+
|
| 560 |
+
We reuse (15) in the proof of inequality (8) in Theorem 2:
|
| 561 |
+
|
| 562 |
+
$$
|
| 563 |
+
\begin{array} { r } { \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq ( 1 - 2 \gamma _ { k } l + \gamma _ { k } \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } + ( \gamma _ { k } \delta + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } . } \end{array}
|
| 564 |
+
$$
|
| 565 |
+
|
| 566 |
+
Applying step size $\gamma _ { k } = c$ , we have
|
| 567 |
+
|
| 568 |
+
$$
|
| 569 |
+
\begin{array} { r } { \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq ( 1 - 2 c l + c \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } + ( c \delta + c ^ { 2 } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } . } \end{array}
|
| 570 |
+
$$
|
| 571 |
+
|
| 572 |
+
Unrolling recursion with respect to $k$ , we have
|
| 573 |
+
|
| 574 |
+
$$
|
| 575 |
+
\| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq ( 1 - 2 c l + c \delta ) ^ { k } \| w _ { 1 } - w ^ { * } \| ^ { 2 } + ( c \delta + c ^ { 2 } ( 1 + \delta ) ^ { 2 } ) \sum _ { i = 0 } ^ { k - 1 } ( 1 - 2 c l + c \delta ) ^ { i } G ^ { 2 } .
|
| 576 |
+
$$
|
| 577 |
+
|
| 578 |
+
Because $0 < 1 - 2 c l + c \delta < 1$ by assumption, we have
|
| 579 |
+
|
| 580 |
+
$$
|
| 581 |
+
\sum _ { i = 0 } ^ { k - 1 } ( 1 - 2 c l + c \delta ) ^ { i } < \frac { 1 } { 2 c l - c \delta } ,
|
| 582 |
+
$$
|
| 583 |
+
|
| 584 |
+
which concludes the proof.
|
| 585 |
+
|
| 586 |
+
# A.7 PROOF OF THEOREM 5
|
| 587 |
+
|
| 588 |
+
Applying Lemma 10 with $w = w ^ { * }$ , we have
|
| 589 |
+
|
| 590 |
+
$$
|
| 591 |
+
\begin{array} { r } { \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } \langle h _ { k } , w _ { k } - w ^ { * } \rangle - 2 \gamma _ { k } \langle g _ { k } - h _ { k } , w _ { k } - w ^ { * } \rangle + \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } . } \end{array}
|
| 592 |
+
$$
|
| 593 |
+
|
| 594 |
+
Applying a property of convex functions and Lemma 11, we have
|
| 595 |
+
|
| 596 |
+
$$
|
| 597 |
+
\begin{array} { r l } & { { + } 1 - w ^ { * } \| ^ { 2 } \leq \| w _ { k } - w ^ { * } \| ^ { 2 } - 2 \gamma _ { k } [ f ( w _ { k } ) - f ( w ^ { * } ) ] + \gamma _ { k } \delta ( \| h _ { k } \| ^ { 2 } + \| w _ { k } - w ^ { * } \| ^ { 2 } ) + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } \| h _ { k } \| } \\ & { \qquad = - 2 \gamma _ { k } [ f ( w _ { k } ) - f ( w ^ { * } ) ] + ( 1 + \gamma _ { k } \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } + ( \gamma _ { k } \delta + \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } . } \end{array}
|
| 598 |
+
$$
|
| 599 |
+
|
| 600 |
+
Rearranging, we have
|
| 601 |
+
|
| 602 |
+
$$
|
| 603 |
+
2 [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq ( \gamma _ { k } ^ { - 1 } + \delta ) \| w _ { k } - w ^ { * } \| ^ { 2 } - \gamma _ { k } ^ { - 1 } \| w _ { k + 1 } - w ^ { * } \| ^ { 2 } + ( \delta + \gamma _ { k } ( 1 + \delta ) ^ { 2 } ) G ^ { 2 } .
|
| 604 |
+
$$
|
| 605 |
+
|
| 606 |
+
Summing from $k = 1$ to $k = T$ , relaxing the negative term $- \gamma _ { T } ^ { - 1 } \Vert w _ { T + 1 } - w ^ { * } \Vert ^ { 2 }$ on the right-hand side, and multiplying by $1 / ( 2 T )$ , we have
|
| 607 |
+
|
| 608 |
+
$$
|
| 609 |
+
\begin{array} { r l } & { \displaystyle \frac { 1 } { T } \sum _ { k = 1 } ^ { T } [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq \frac { \gamma _ { 1 } ^ { - 1 } + \delta } { 2 T } \| w _ { 1 } - w ^ { * } \| ^ { 2 } } \\ & { \qquad + \displaystyle \sum _ { k = 2 } ^ { T } \frac { \gamma _ { k } ^ { - 1 } + \delta - \gamma _ { k - 1 } ^ { - 1 } } { 2 T } \| w _ { k } - w ^ { * } \| ^ { 2 } + \frac { G ^ { 2 } } { 2 T } \left[ \delta T + ( 1 + \delta ) ^ { 2 } \sum _ { k = 1 } ^ { T } \gamma _ { k } \right] . } \end{array}
|
| 610 |
+
$$
|
| 611 |
+
|
| 612 |
+
Applying $\| w _ { k } - w ^ { * } \| ^ { 2 } \leq D ^ { 2 }$ for all $k$ , we have
|
| 613 |
+
|
| 614 |
+
$$
|
| 615 |
+
\frac { 1 } { T } \sum _ { k = 1 } ^ { T } [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq \frac { ( \gamma _ { T } ^ { - 1 } + \delta T ) D ^ { 2 } } { 2 T } + \frac { G ^ { 2 } } { 2 T } \left[ \delta T + ( 1 + \delta ) ^ { 2 } \sum _ { k = 1 } ^ { T } \gamma _ { k } \right] .
|
| 616 |
+
$$
|
| 617 |
+
|
| 618 |
+
Noting that $\gamma _ { k } = c / \sqrt { k }$ and $\delta = \rho / \sqrt { T }$ , we have
|
| 619 |
+
|
| 620 |
+
$$
|
| 621 |
+
\frac { 1 } { T } \sum _ { k = 1 } ^ { T } [ f ( w _ { k } ) - f ( w ^ { * } ) ] \leq \frac { 1 } { 2 \sqrt { T } } \left( \frac { 1 } { c } + \rho \right) D ^ { 2 } + \frac { G ^ { 2 } } { 2 T } \left[ \rho \sqrt { T } + c \left( 1 + \frac { \rho } { \sqrt { T } } \right) ^ { 2 } \sum _ { k = 1 } ^ { T } \frac { 1 } { \sqrt { k } } \right] .
|
| 622 |
+
$$
|
| 623 |
+
|
| 624 |
+
By the convexity of $f$ and using the bound $\textstyle \sum _ { k = 1 } ^ { T } 1 / { \sqrt { k } } \leq { \sqrt { T + 1 } }$ , we have
|
| 625 |
+
|
| 626 |
+
$$
|
| 627 |
+
f ( \overline { { w } } _ { T } ) - f ( w ^ { * } ) \leq \frac { 1 } { 2 \sqrt { T } } \left( \frac { 1 } { c } + \rho \right) D ^ { 2 } + \frac { G ^ { 2 } } { 2 T } \left[ \rho \sqrt { T } + c \left( 1 + \frac { \rho } { \sqrt { T } } \right) ^ { 2 } \sqrt { T + 1 } \right] ,
|
| 628 |
+
$$
|
| 629 |
+
|
| 630 |
+
which concludes the proof.
|
| 631 |
+
|
| 632 |
+
# A.8 PROOF OF THEOREM 6
|
| 633 |
+
|
| 634 |
+
The $L$ -smoothness property implies that
|
| 635 |
+
|
| 636 |
+
$$
|
| 637 |
+
f ( w _ { k + 1 } ) \leq f ( w _ { k } ) + \langle \nabla f ( w _ { k } ) , w _ { k + 1 } - w _ { k } \rangle + \frac { L } { 2 } \| w _ { k + 1 } - w _ { k } \| ^ { 2 } .
|
| 638 |
+
$$
|
| 639 |
+
|
| 640 |
+
oting that $w _ { k + 1 } - w _ { k } = - \gamma _ { k } g _ { k }$ (because $S = \mathbb { R } ^ { d }$ ) and applying Lemma 11, we have
|
| 641 |
+
|
| 642 |
+
$$
|
| 643 |
+
^ { t } ( w _ { k + 1 } ) \leq f ( w _ { k } ) - \gamma _ { k } \langle h _ { k } , g _ { k } \rangle + \frac { L \gamma _ { k } ^ { 2 } \| g _ { k } \| ^ { 2 } } { 2 } \leq f ( w _ { k } ) - \gamma _ { k } ( 1 - \delta ) \| h _ { k } \| ^ { 2 } + \frac { L \gamma _ { k } ^ { 2 } ( 1 + \delta ) ^ { 2 } \| h _ { k } \| ^ { 2 } } { 2 } .
|
| 644 |
+
$$
|
| 645 |
+
|
| 646 |
+
Rearranging, we have
|
| 647 |
+
|
| 648 |
+
$$
|
| 649 |
+
\| \nabla f ( w _ { k } ) \| ^ { 2 } \le [ \gamma _ { k } ( 1 - \delta ) ] ^ { - 1 } [ f ( w _ { k } ) - f ( w _ { k + 1 } ) ] + \frac { L \gamma _ { k } ( 1 + \delta ) ^ { 2 } G ^ { 2 } } { 2 ( 1 - \delta ) } .
|
| 650 |
+
$$
|
| 651 |
+
|
| 652 |
+
Summing from $k = 1$ to $k = T$ , multiplying by $1 / T$ , and noting that $\gamma _ { k }$ is constant, we have
|
| 653 |
+
|
| 654 |
+
$$
|
| 655 |
+
\operatorname* { m i n } _ { k } \| \nabla f ( w _ { k } ) \| ^ { 2 } \leq \frac { [ \gamma _ { 1 } ( 1 - \delta ) ] ^ { - 1 } } { T } \left[ f ( w _ { 1 } ) - f ( w _ { T + 1 } ) \right] + \frac { L \gamma _ { 1 } ( 1 + \delta ) ^ { 2 } G ^ { 2 } } { 2 ( 1 - \delta ) } .
|
| 656 |
+
$$
|
| 657 |
+
|
| 658 |
+
Because $f ( w _ { T + 1 } ) \ge f ( w ^ { * } )$ and $\gamma _ { 1 } = D _ { f } / [ ( 1 + \delta ) G \sqrt { T } ]$ , we have
|
| 659 |
+
|
| 660 |
+
$$
|
| 661 |
+
\operatorname* { m i n } _ { k } \| \nabla f ( w _ { k } ) \| ^ { 2 } \leq \frac { [ \gamma _ { 1 } ( 1 - \delta ) ] ^ { - 1 } } { T } [ f ( w _ { 1 } ) - f ( w ^ { * } ) ] + \frac { L \gamma _ { 1 } ( 1 + \delta ) ^ { 2 } G ^ { 2 } } { 2 ( 1 - \delta ) } = \frac { ( 1 + \delta ) L G D _ { f } } { ( 1 - \delta ) \sqrt { T } } ,
|
| 662 |
+
$$
|
| 663 |
+
|
| 664 |
+
which concludes the proof.
|
| 665 |
+
|
| 666 |
+
# A.9 PROOF OF THEOREM 7
|
| 667 |
+
|
| 668 |
+
Theorem 2.2 of Friedlander & Schmidt (2012) states that when the gradient error
|
| 669 |
+
|
| 670 |
+
$$
|
| 671 |
+
\begin{array} { r } { \| g _ { k } - h _ { k } \| < \delta _ { k } \quad \mathrm { f o r \ a l l } \quad k \geq 1 , } \end{array}
|
| 672 |
+
$$
|
| 673 |
+
|
| 674 |
+
inequality (14) holds. It remains to show that the probability that (16) happens is at least $1 - \epsilon$ .
|
| 675 |
+
|
| 676 |
+
The assumption on the sample size $N _ { k }$ means that
|
| 677 |
+
|
| 678 |
+
$$
|
| 679 |
+
C _ { k } e ^ { - N _ { k } \tau ( \delta _ { k } / \| h _ { k } \| ) } \leq \epsilon / T .
|
| 680 |
+
$$
|
| 681 |
+
|
| 682 |
+
Then, substituting $\delta _ { k } = \delta \| h _ { k } \|$ into assumption (6) yields
|
| 683 |
+
|
| 684 |
+
$$
|
| 685 |
+
\operatorname* { P r } \left( \| g _ { k } - h _ { k } \| \ge \delta _ { k } \Big | g _ { 1 } , \dotsc , g _ { k - 1 } \right) \le C _ { k } e ^ { - N _ { k } \tau ( \delta _ { k } / \| h _ { k } \| ) } \le \epsilon / T .
|
| 686 |
+
$$
|
| 687 |
+
|
| 688 |
+
Hence, the probability that (16) happens is
|
| 689 |
+
|
| 690 |
+
$$
|
| 691 |
+
\prod _ { k = 1 } ^ { T } \left[ 1 - \operatorname* { P r } \left( \left\| g _ { k } - h _ { k } \right\| \ge \delta _ { k } \bigg | g _ { 1 } , \dots , g _ { k - 1 } \right) \right] \ge \prod _ { k = 1 } ^ { T } ( 1 - \epsilon / T ) \ge 1 - \epsilon ,
|
| 692 |
+
$$
|
| 693 |
+
|
| 694 |
+
which concludes the proof.
|
| 695 |
+
|
| 696 |
+
# B EXPERIMENT DETAILS
|
| 697 |
+
|
| 698 |
+
# B.1 THE “MIXTURE” DATA SET
|
| 699 |
+
|
| 700 |
+
The data set is a Gaussian mixture with $c = 3$ components in $d = 2$ dimensions. The components $\mathcal { N } ( \mu _ { i } , \sigma _ { i } ^ { 2 } I )$ with $\mu _ { 1 } ~ = ~ [ - 0 . 5 , 0 ]$ , $\sigma _ { 1 } ~ = ~ 0 . 7 5$ , $\mu _ { 2 } ~ = ~ [ 0 . 5 , 0 ]$ , $\sigma _ { 2 } ~ = ~ 0 . 5$ , $\mu _ { 3 } ~ = ~ [ 0 , 0 . 8 6 6 ]$ , and $\sigma _ { 3 } = 0 . 2 5$ are equally weighted but significantly overlap with each other. Random connections are made between every pair of points. For points in the same component, the probability that they are connected is $p _ { \mathrm { i n t r a } } = 1 { \tt e } ^ { - 3 }$ ; for points straddle across components, the probability is $p _ { \mathrm { i n t e r } } = 2 { \tt e } - 4$ . See Figure 4(a) for an illustration of the Gaussian mixture and Figure 4(b) for the graph adjacency matrix.
|
| 701 |
+
|
| 702 |
+

|
| 703 |
+
Figure 4: The “Mixture” data set (input features and graph).
|
| 704 |
+
|
| 705 |
+
# B.2 SUMMARY OF DATA SETS
|
| 706 |
+
|
| 707 |
+
See Table 2 for a summary of the data sets used in this work.
|
| 708 |
+
|
| 709 |
+
Table 2: Data sets.
|
| 710 |
+
|
| 711 |
+
<table><tr><td></td><td>Mixture</td><td>Cora</td><td>Pubmed</td></tr><tr><td>#Nodes</td><td>6.000</td><td>2,708</td><td>19,717</td></tr><tr><td>#Edges</td><td>16,709</td><td>5,429</td><td>44,338</td></tr><tr><td># Classes</td><td>3</td><td>7</td><td>3</td></tr><tr><td>#Features</td><td>2</td><td>1,433</td><td>500</td></tr><tr><td># Training</td><td>2,400</td><td>1,208</td><td>18,217</td></tr><tr><td># Validation</td><td>1,200</td><td>500</td><td>500</td></tr><tr><td>#Test</td><td>2,400</td><td>1,000</td><td>1,000</td></tr></table>
|
| 712 |
+
|
| 713 |
+
Table 3: Hyperparameters for different GCN architectures and training algorithms.
|
| 714 |
+
(a) 1-layer GCN
|
| 715 |
+
|
| 716 |
+
<table><tr><td></td><td>Mixture</td><td>Cora</td><td>Pubmed</td></tr><tr><td>Batch size</td><td>256</td><td>256</td><td>256</td></tr><tr><td>Regularization</td><td>0</td><td>0</td><td>0</td></tr><tr><td>SGD learning rate</td><td>1e+0</td><td>1e+3</td><td>1e+3</td></tr><tr><td>Adam learning rate</td><td>1e-2</td><td>le-1</td><td>le-1</td></tr><tr><td colspan="4">(b) 2-layer GCN</td></tr><tr><td></td><td>Mixture</td><td>Cora</td><td>Pubmed</td></tr><tr><td>Batch size</td><td>256</td><td>256</td><td>256</td></tr><tr><td>Regularization</td><td>0</td><td>0</td><td>0</td></tr><tr><td>Hidden unit</td><td>16</td><td>16</td><td>16</td></tr><tr><td>SGD learning rate</td><td>1e+0</td><td>1e+2</td><td>1e+1</td></tr><tr><td>Adam learning rate</td><td>1e-2</td><td>le-1</td><td>le-1</td></tr></table>
|
| 717 |
+
|
| 718 |
+
# B.3 (HYPER)PARAMETERS
|
| 719 |
+
|
| 720 |
+
See Table 3 for the hyperparameters used in the experiments. For parameter initialization, we use the Glorot uniform initializer (Glorot & Bengio, 2010).
|
| 721 |
+
|
| 722 |
+
# B.4 RUN TIME
|
| 723 |
+
|
| 724 |
+
See Table 4 for the run time (per epoch). As expected, a smaller sample size is more computationally efficient. SGD with consistent gradients runs faster than the standard SGD and Adam, both of which admit approximately the same computational cost.
|
| 725 |
+
|
| 726 |
+
Table 4: Time per epoch in seconds.
|
| 727 |
+
|
| 728 |
+
<table><tr><td colspan="4">1-layer GCN</td><td colspan="3">2-layer GCN</td></tr><tr><td></td><td>Mixture</td><td>Cora</td><td>Pubmed</td><td>Mixture</td><td>Cora</td><td>Pubmed</td></tr><tr><td>SGD (400)</td><td>0.0035</td><td>0.0269</td><td>0.1991</td><td>0.0103</td><td>0.0868</td><td>2.5014</td></tr><tr><td>SGD (800)</td><td>0.0018</td><td>0.0455</td><td>0.3554</td><td>0.0103</td><td>0.0974</td><td>2.5684</td></tr><tr><td>SGD (1600)</td><td>0.0027</td><td></td><td>0.7129</td><td>0.0142</td><td></td><td>3.2032</td></tr><tr><td>SGD (3200)</td><td></td><td></td><td>1.1847</td><td>=</td><td></td><td>3.8895</td></tr><tr><td>SGD unbiased</td><td>0.0044</td><td>0.0737</td><td>2.2425</td><td>0.0130</td><td>0.2031</td><td>7.9478</td></tr><tr><td>Adamunbiased</td><td>0.0049</td><td>0.0741</td><td>2.2313</td><td>0.0143</td><td>0.2080</td><td>7.9037</td></tr></table>
|
md/train/tHzvH4Rv1Qa/tHzvH4Rv1Qa.md
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generative Occupancy Fields for 3D Surface-Aware Image Synthesis
|
| 2 |
+
|
| 3 |
+
Xudong $\mathbf { X } \mathbf { u } ^ { \dag }$ Xingang Pan‡ Dahua Lin† Bo Dai§ †CUHK - SenseTime Joint Lab, The Chinese University of Hong Kong
|
| 4 |
+
‡Max Planck Institute for Informatics $^ { \ S } S$ - Lab, Nanyang Technological University
|
| 5 |
+
$^ \dag \{ \tt x x 0 1 8$ , dhlin}@ie.cuhk.edu.hk ‡xpan@mpi-inf.mpg.de §bo.dai@ntu.edu.sg
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
The advent of generative radiance fields has significantly promoted the development of 3D-aware image synthesis. The cumulative rendering process in radiance fields makes training these generative models much easier since gradients are distributed over the entire volume, but leads to diffused object surfaces. In the meantime, compared to radiance fields occupancy representations could inherently ensure deterministic surfaces. However, if we directly apply occupancy representations to generative models, during training they will only receive sparse gradients located on object surfaces and eventually suffer from the convergence problem. In this paper, we propose Generative Occupancy Fields (GOF), a novel model based on generative radiance fields that can learn compact object surfaces without impeding its training convergence. The key insight of GOF is a dedicated transition from the cumulative rendering in radiance fields to rendering with only the surface points as the learned surface gets more and more accurate. In this way, GOF combines the merits of two representations in a unified framework. In practice, the training-time transition of start from radiance fields and march to occupancy representations is achieved in GOF by gradually shrinking the sampling region in its rendering process from the entire volume to a minimal neighboring region around the surface. Through comprehensive experiments on multiple datasets, we demonstrate that GOF can synthesize high-quality images with 3D consistency and simultaneously learn compact and smooth object surfaces. Our code is available at https://github.com/SheldonTsui/GOF_NeurIPS2021.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Deep generative adversarial networks [1–4] have demonstrated their superiority in synthesizing photorealistic and striking images. However, these models are often constrained in the 2D domain, struggling to generate 3D consistent images, let alone grasping the underlying 3D object shapes. 3D-aware image synthesis thus becomes an appealing and promising choice as it learns a 3D representation explicitly from a collection of unposed images. Consequently, it can not only synthesize 3D consistent images by manually controlling the rendering camera poses, but also pave the way for various downstream tasks such as shape editing and relighting.
|
| 14 |
+
|
| 15 |
+
Inspired by the success of neural radiance fields (NeRF) [5] in 3D scene modeling, recent 3D-aware generative models, referred to as generative radiance fields (GRAFs), have applied NeRF as the explicit 3D representation for image synthesis [6, 7]. With the help of NeRF, they are capable of hallucinating photorealistic images in a 3D consistent manner. Moreover, since NeRF holds the superior ability for rendering translucent objects by compositing colored densities along each ray in its volume rendering process, it also significantly facilitates the training of GRAFs as gradients are naturally distributed over the entire volume. However, they still incur an inevitable incapacity of capturing an accurate and compact object surface. As shown in Fig. 1(a), the state-of-the-art GRAF model pi-GAN is prone to predict diffused object surfaces, as the volume densities are smoothly spread around the surfaces. Such diffused surfaces could significantly hamper the applications of GRAF models in downstream tasks such as shape recovery. Moreover, under different light conditions, the artifacts of surfaces could be amplified and inherited through the rendering process, resulting in synthesized images that are messy and faulty.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: (a) The cumulative rendering weights (color weights) of our approach GOF more focus on the surface (y-axis) than previous methods like pi-GAN [6], which indicates our predicted volume densities more concentrate on the object surfaces. (b) Owing to the diffused volume densities, the preceding method pi-GAN captures messy surface normals and object shapes. Moreover, the image rendered only with the surface points is quite noisy. In contrast, more surface-centralized densities predicted by our method ensure compact and smooth object surfaces thus enable a high-quality surface rendering during inference. (Zoom in for best view)
|
| 19 |
+
|
| 20 |
+
In this work, we propose Generative Occupancy Fields (GOF), a novel GRAF-like image synthesis model that can learn compact object surfaces. GOF is inspired by the design of occupancy networks [8] that implicitly represents a 3D surface with the continuous decision boundary of a neural classifier. In this way, occupancy networks are capable of effectively locating surfaces via root-finding and encouraging the compactness of modeled surfaces inherently. However, GOF avoids directly applying such a design to 3D-aware image synthesis. While occupancy networks require precise object masks to train [9, 10], a more crucial factor is that they rely on the surface points for differentiable rendering [11, 12, 9, 13]. A generative model equipped with occupancy representations will thus meet severe convergence problems during training due to the sparsity of gradients. To unify the merits of both NeRF and occupancy networks for 3D-aware image synthesis, GOF adopts the design of GRAFs and at the same time leverages a nontrivial transition from the cumulative rendering to rendering with only the surface points, i.e. start from radiance fields and march to occupancy representations. Specifically, GOF will reinterpret the alpha values in the cumulative rendering process as occupancy values, so that it can locate the learned surface via root-finding. Subsequently, it can naturally encourage the compactness of learned surfaces by gradually shrinking the sampling region in the rendering process from the entire volume to a minimal neighboring region around the surface.
|
| 21 |
+
|
| 22 |
+
Thanks to the unified integration of radiance fields and occupancy representations, GOF can benefit from the representation effectiveness of radiance fields while ensuring the compactness of learned object surfaces through the shrinking process. As presented in Fig. 1(a), in GOF the distribution of cumulative rendering weights concentrates more closely around object surfaces compared to that of pi-GAN, eventually resulting in a compact and smooth surface. Moreover, GOF can thus alternatively render an image only with points on the learned surfaces like occupancy networks as illustrated in Fig. 1 (b). And during inference such a rendering scheme has the potential to alleviate the burden of sampling a large number of points along each ray for synthesizing a single image. Through exhaustive experiments on synthetic and real-world datasets, we demonstrate that GOF can achieve state-of-the-art performance on 3D-aware image synthesis. Meanwhile, it is capable of capturing compact and accurate 3D shapes that empower its applications in various downstream tasks such as 3D shape reconstruction. We validate this point by quantitative results of 3D shape reconstruction on the Synface dataset. Finally, we have also verified the ability of GOF in rendering high-quality images with only the surface points, which is hardly achievable in previous approaches.
|
| 23 |
+
|
| 24 |
+
# 2 Related Work
|
| 25 |
+
|
| 26 |
+
Neural implicit function for 3D representations. A plethora of works [14, 8, 15–21] has exploited neural implicit functions for 3D geometry modeling. Among these works, neural radiance fields (NeRF) [5] has attracted growing attention due to its compelling results on novel view synthesis. It leverages an MLP network to approximate the radiance fields of static 3D scenes. And by learning to reconstruct existing views, it is capable of capturing 3D geometric details from only 2D supervision. A series of succeeding variants of NeRF have been proposed to improve it, including utilizing the spatial sparsity to reduce its computational complexity [22, 23], refining the rendering process to improve its efficiency [24, 25], as well as adopting reflectance decompositions to enhance its modeling capacity [26, 27]. There are also works that capitalize on the differentiable rendering of neural implicit functions for 3D reconstruction [11, 12, 9, 13, 28, 29]. Specifically, SDFDiff [12] relies on the interpolation of eight neighboring SDF samples around the surface intersection to obtain the derivatives, while Atzmon et al [28] use a sample network to relate samples’ positions to network parameters and thus achieve an improved generalization ability. More interestingly, by adopting occupancy representations, DVR [11] and IDR [9] show volumetric rendering is inherently differentiable so that network parameters can be optimized directly with derived analytic gradients. Different from methods aforementioned above, GOF is a generative model for 3D-aware image synthesis that can learn 3D representations from a set of 2D images with unknown camera poses.
|
| 27 |
+
|
| 28 |
+
Generative 3D-aware image synthesis. In order to synthesize 3D consistent images, researchers have explored a lot on how to incorporate 3D representations into the classical GAN model [1]. Some methods [30–32] resort to learning from 3D data directly, yet the requirement of 3D supervision limits their practical applicability. A more appealing alternative is thus learn from unposed 2D images in an unsupervised manner. Preceding works along this line of research adopt voxels as their intermediate 3D representations [33–35] and achieve explicit control over the pose of synthesized images. Inspired by the superior representation capacity of radiance fields over voxels, recent attempts [6, 7, 36] have replaced voxels with neural radiance fields [5] to improve the fidelity of synthesized 3D consistent images. Despite the striking performance, these models, referred to as generative radiance fields (GRAFs), tend to predict diffused object surfaces, which impedes its applicability in various downstream tasks. In this work, GOF aims at resolving this problem of GRAFs by combining them with the perspective of occupancy networks [8] and recent successes of recovering smooth and accurate shapes from natural images [37–40]. Recently, three concurrent works, UNISURF [10], NeuS [41] and VolSDF [42], also combine implicit surfaces and radiance fields in a unified framework, sharing similar spirits with our proposed GOF but different in tasks and focuses. Specifically, They focus on multi-view 3D reconstruction and attempt to alleviate the requirement of training-time precise masks through the integration of radiance fields and occupancy representations. Nevertheless, they still require images with ground-truth poses for training. By contrast, GOF targets on the challenging task of 3D-aware image synthesis, where the synthesized images should be not only natural and vivid, but also consistent in the 3D space. By integrating radiance fields and occupancy representations, GOF is able to facilitate the convergence of GRAFs and ensure the compactness of learned object surfaces. Compared to existing GRAFs, the applicability of GOF is thus significantly broadened.
|
| 29 |
+
|
| 30 |
+
# 3 Methodology
|
| 31 |
+
|
| 32 |
+
We propose generative occupancy fields (GOF), a novel synthesis model, belonging to generative radiance fields and aiming to learn from unposed images. Conditioned on a latent code $\mathbf { z } \sim p _ { \mathbf { z } }$ , our generator $g _ { \theta }$ can generate a 3D radiance field $\mathbf { R }$ , from which we can render a realistic image with a sampled camera pose $\xi \sim p _ { \xi }$ and simultaneously recover smooth and compact object surfaces. In the following, we first present the background of neural radiance fields, and then introduce our proposed GOF model in detail.
|
| 33 |
+
|
| 34 |
+
# 3.1 Neural Radiance Fields
|
| 35 |
+
|
| 36 |
+
We adopt neural radiance fields (NeRF) as our explicit 3D representation for image synthesis, owing to its strong performance in novel view synthesis on complex scenes. NeRF represents a static scene as per-point volume densities and view-dependent RGB colors. Given a 3D point $\mathbf { x } \in \mathbb { R } ^ { 3 }$ in space and a view direction $\mathbf { d } \in \mathbb { R } ^ { 3 }$ , NeRF capitalizes on a multi-layer perceptron (MLP) to predict the volume density $\sigma ( \mathbf { x } ) \in \mathbb { R }$ and the emitted color $\mathbf { c } ( \mathbf { x } , \mathbf { d } ) \in \mathbb { R } ^ { 3 }$ . To render a novel view for the scene, NeRF leverages the classic volume rendering technique [43] to estimate the color of each pixel. It starts by accumulating the colored densities of $N$ points $\left\{ { \bf x } _ { i } = { \bf o } + t _ { i } { \bf d } \right\}$ sampled within near and far bounds $[ t _ { n } , t _ { f } ]$ along the camera ray $\mathbf { r } ( t ) = \mathbf { o } \overset { \cdot } { + } t \mathbf { d }$ , where $\mathbf { o }$ stands for the camera origin. The integrated color is then estimated via alpha composition as follows:
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
Figure 2: Shrinking process. During the training, the sampling interval $\Delta$ is initially a half of the distance between near $t _ { n }$ and far bounds $t _ { f }$ and shrinks gradually to a pre-defined value $\Delta _ { \mathrm { m i n } }$ . For inference, we can use cumulative rendering by sampling points in the minimal interval $\Delta _ { \mathrm { m i n } }$ and alternatively render only with the surface points.
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\hat { \mathbf { C } } ( \mathbf { r } ) = \sum _ { i = 1 } ^ { N } T _ { i } \Big ( 1 - \exp \big ( - \sigma ( \mathbf { x } _ { i } ) \delta _ { i } \big ) \Big ) \mathbf { c } ( \mathbf { x } _ { i } , \mathbf { d } ) , \mathrm { ~ w h e r e ~ } T _ { i } = \exp ( - \sum _ { j = 1 } ^ { i - 1 } \sigma ( \mathbf { x } _ { j } ) \delta _ { j } ) ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $\delta _ { i } = | x _ { i + 1 } - x _ { i } |$ is the distance between adjacent points. Note that, equation (1) is naturally differentiable and NeRF can be directly optimized through the reconstruction error of existing views.
|
| 46 |
+
|
| 47 |
+
# 3.2 3D Surface-Aware Image Synthesis via Generative Occupancy Fields
|
| 48 |
+
|
| 49 |
+
To apply NeRF as the 3D representation, the proposed generative occupancy fields (GOF) incorporates an additional latent code $\mathbf { z } \sim p _ { \mathbf { z } }$ into NeRF, such that synthesizing an image follows a reformulated cumulative rendering process:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\hat { \mathbf { C } } ( \mathbf { r } , \mathbf { z } ) = \sum _ { i = 1 } ^ { N } T _ { i } \Big ( 1 - \exp \big ( - \sigma _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } ) \delta _ { i } \big ) \Big ) \mathbf { c } _ { \theta } \big ( \mathbf { x } _ { i } , \mathbf { d } , \mathbf { z } \big ) , \mathrm { ~ w h e r e ~ } T _ { i } = \exp \big ( - \sum _ { j = 1 } ^ { i - 1 } \sigma _ { \theta } ( \mathbf { x } _ { j } , \mathbf { z } ) \delta _ { j } \big ) .
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
However, directly training GOF according to Eq.(2) fails to maintain the surface compactness as reported in previous approaches [6, 7]. Actually, such a defect arises from an inevitable “shape-color ambiguity” of the cumulative rendering process, i.e., small perturbations on surfaces still lead to realistic RGB images which are enough to fool the discriminator.
|
| 56 |
+
|
| 57 |
+
Owing to the constrained range of poses seen at training, the discriminator is less motivated to further concentrate the color weights $w _ { i } \bar { = } T _ { i } \big ( 1 - \exp ( - \sigma _ { \theta } ( \mathbf { \bar { x } } _ { i } , \mathbf { z } ) \delta _ { i } ) \big )$ aforementioned in Fig. 1 (a) on the exact object surface. On the other hand, we observe that although leading to diffused surfaces at the end, color weights $w _ { i }$ gradually concentrate around the object surface as the training proceeds. Inspired by this observation, in GOF we propose a training-time operation to facilitate the concentration of color weights $w _ { i }$ . The basic idea is gradually shrinking the sample region in the cumulative rendering process from the entire volume to a narrow interval around the surface, so that color weights are enforced to continuously move towards the exact surface.
|
| 58 |
+
|
| 59 |
+
To enable the proposed training-time shrinking process, GOF is required to locate the surface by thresholding the predicted densities $\sigma _ { \boldsymbol { \theta } } ( \mathbf { x } , \mathbf { z } )$ , assuming points on the surface have the largest densities, However, values of the densities predicted in generative radiance fields could range from 0 to 50, making it hard to determine an effective threshold $\tau$ during the whole training period. On the other hand, in the cumulative rendering process shown in Eq.(2), we found that the intermediate alpha values used for numerical stability inherently fall in a fixed value range as:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\alpha _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } ) = 1 - \exp ( - \sigma _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } ) \delta _ { i } ) \in [ 0 , 1 ] .
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
More importantly, these alpha values $\alpha _ { \boldsymbol { \theta } } ( \mathbf { x } , \mathbf { z } )$ come close to 1 for points in the occupied space while approaching 0 for points in the free space, making them resemble the occupancy values [8] in both quantity and semantics. Inspired by the similarity, we thus propose to reformulate generative radiance fields by predicting alpha values $\alpha _ { \boldsymbol { \theta } } ( \mathbf { x } , \mathbf { z } )$ directly instead of volume densities $\sigma _ { \boldsymbol { \theta } } \bar { ( } \mathbf { x } , \mathbf { z } )$ . In the mean time, we reinterpret the alpha values as occupancy values, and subsequently locate surfaces with root-finding, a more effective strategy originated in occupancy networks [11]. According to the above reformulation and reinterpretation, we thus dub our method as Generative Occupancy Fields.
|
| 66 |
+
|
| 67 |
+
As GOF estimates alpha values instead of volume densities, the original volume rendering process in Eq.(2) conditioned on the latent code $\mathbf { z }$ is reformulated as
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\hat { \mathbf { C } } ( \mathbf { r } , \mathbf { z } ) = \sum _ { i = 1 } ^ { N } \alpha _ { \theta } \big ( \mathbf { x } _ { i } , \mathbf { z } \big ) \prod _ { j < i } \big ( 1 - \alpha _ { \theta } \big ( \mathbf { x } _ { j } , \mathbf { z } \big ) \big ) \mathbf { c } _ { \theta } \big ( \mathbf { x } _ { i } , \mathbf { d } , \mathbf { z } \big ) ,
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where the value range of $\alpha _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } )$ is guaranteed with a sigmoid function. And to locate the surface via root-finding, for a specific ray $\dot { \mathbf { r } } ( t ) = \mathbf { o } + t \mathbf { d }$ we will evenly sample $M$ points $\begin{array} { r } { \left\{ \mathbf { x } _ { k } = \mathbf { o } + t _ { k } \mathbf { d } ; k = \right. } \end{array}$ $1 , . . . , M \}$ that partition the entire volume $[ t _ { n } , t _ { f } ]$ into $M$ equally-spaced bins. After obtaining the corresponding alpha values $\{ \alpha _ { \boldsymbol { \theta } } ( \mathbf { x } _ { k } , \mathbf { z } ) ; k \stackrel { - } { = } 1 , . . . , M \}$ by querying the generator $g _ { \theta }$ , the surface $s$ is located in the $k ^ { \dot { S } }$ -th bin where $\alpha \theta$ changes for the first time from free space $( \alpha _ { \theta } < \tau )$ to occupied space $( \alpha _ { \theta } < \tau )$ ):
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
k ^ { S } = \underset { k } { \mathrm { a r g m i n } } \big ( \alpha _ { \theta } ( \mathbf { x } _ { k } , \mathbf { z } ) < \tau \leq \alpha _ { \theta } ( \mathbf { x } _ { k + 1 } , \mathbf { z } ) \big ) ,
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\tau$ is a pre-defined threshold. In practice, we empirically set $\tau$ as 0.5. In order to find the surface point $\mathbf { x } _ { s } = \mathbf { o } + t _ { s } \mathbf { d }$ more precisely, we further apply the above secant method iteratively for $m _ { s }$ times, resulting in a fine-grained bin $\left[ \mathbf { x } _ { k ^ { s } } , \mathbf { x } _ { k ^ { s } + 1 } \right]$ . It’s worth noting that the $M$ sampled points are only used for root-finding. Thus they do not require the computation of gradients in the implementation.
|
| 80 |
+
|
| 81 |
+
Based on the located surface $s$ , we can thus successfully conduct the proposed shrinking process, which is schematically elaborated in Fig. 2. Specifically, when sampling $N$ points for Eq.(4) at each training step, we will only sample within a region neighboring the surface $[ t _ { s } - \Delta , t _ { s } + \Delta ]$ :
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
t _ { i } \sim \mathcal { U } \left[ t _ { s } - \Delta + \frac { 2 i - 2 } { N } \Delta , t _ { s } - \Delta + \frac { 2 i } { N } \Delta \right] , \mathrm { w h e r e } i = 1 , 2 , . . . , N .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
$\Delta$ is the sampling interval, which is set to $\Delta _ { \mathrm { i n i t } } = ( t _ { f } - t _ { n } ) / 2$ at the beginning, a half of the distance between near $t _ { n }$ and far bounds $t _ { f }$ . And it will decrease monotonically with an exponential decay rate $\gamma$ until it drops to a pre-defined minimal value $\Delta _ { \mathrm { m i n } }$ . Formally, $\Delta _ { n } = \mathrm { m a x } ( \Delta _ { \mathrm { i n i t } } \exp ( - \gamma n ) , \Delta _ { \mathrm { m i n } } )$ for $n$ -th decaying step. Additionally, during training when the estimated $t _ { s }$ is too close to the near or the far bound so that the sampling region $[ t _ { s } - \Delta , t _ { s } + \Delta ]$ exceeds the original range $[ t _ { n } , t _ { f } ]$ , we will shift the region $[ t _ { s } - \Delta , t _ { s } + \Delta ]$ back to within $[ t _ { n } , t _ { f } ]$ . As shown in Fig. 2, at the beginning of training, points sampled for Eq.(4) will cover the entire volume, leading to dispersed gradients which facilitate the convergence of GOF. And as the training goes, the predicted surface will become more and more accurate, which is the outcome of gradually refining the sampling region, and in turn also makes the above shrinking operation valid.
|
| 88 |
+
|
| 89 |
+
Thanks to the dedicated shrinking process, the color weights $w _ { i }$ can successfully concentrate on the object surface as illustrated in Fig. 1(a). As a result, GOF is capable of synthesizing highfidelity images in a 3D-consistent manner and simultaneously capturing compact object surfaces. During inference, to synthesize an image under a random camera pose $\xi \sim p _ { \xi }$ , the generator $g _ { \boldsymbol { \theta } }$ will fetch a truncated latent code $\hat { \mathbf { z } }$ and sample $N$ points $\{ { \bf { x } } _ { i } \}$ on each ray within the minimal region $[ t _ { s } - \Delta _ { \mathrm { m i n } } , t _ { s } + \Delta _ { \mathrm { m i n } } ]$ for the rendering as in Eq.(4). An important benefit of learning a compact object surface is that we can effectively reduce the number of sampled points for rendering, even using only one point on each ray, i.e. the surface point. As shown in Fig. 1 (b), the image rendered with only the surface point is almost indistinguishable from that with multiple points. Such equivalence can be guaranteed theoretically when $\Delta _ { \operatorname* { m i n } } 0$ , and we include the proof in the supplementary material.
|
| 90 |
+
|
| 91 |
+
# 3.3 Loss Functions
|
| 92 |
+
|
| 93 |
+
Instead of training on posed 2D images, the proposed GOF leverages a corpus of unposed images for 3D-aware image synthesis, where multiple loss functions are adopted.
|
| 94 |
+
|
| 95 |
+
GAN Loss. Following pi-GAN [6], a GAN loss is used where GOF synthesizes fake images by randomly sampling camera poses $\xi$ from a dataset-related distribution $p _ { \xi }$ and rendering according to Eq.(4). Denote $I$ as a real image from the data distribution $p _ { \mathcal { D } }$ , the non-saturating GAN loss can be described as follows:
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\begin{array} { r l } & { \mathcal { L } _ { \mathrm { o r i g i n } } ( \theta _ { D } , \theta _ { G } ) = { \bf E } _ { { \bf z } \sim p _ { \bf z } , \xi \sim p _ { \xi } } \left[ f \Big ( D _ { \theta _ { D } } ( G _ { \theta _ { G } } ( { \bf z } , \xi ) ) \Big ) \right] } \\ & { \quad \quad \quad \quad \quad + { \bf E } _ { I \sim p _ { \mathcal D } } \left[ f ( - D _ { \theta _ { D } } ( I ) ) + \lambda | \nabla D _ { \theta _ { D } } ( I ) | ^ { 2 } \right] , } \\ & { \quad \quad \quad \quad \quad \mathrm { w h e r e ~ } f ( u ) = - \log ( 1 + \exp ( - u ) ) . } \end{array}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
However, $\mathcal { L } _ { \mathrm { o r i g i n } }$ alone is not sufficient to guide the training, which may lead to messy images with smoke-like artifacts. Therefore, two more regularizations are incorporated to reduce artifacts and further smooth the learned surfaces.
|
| 102 |
+
|
| 103 |
+
Normal Regularization. The first regularization is a prior on the surface normal smoothness, which is specially useful for learning from 2D real-world images [11]. In GOF, this normal prior is only employed for the surface points $\mathbf { x } _ { s } \in \mathcal { S }$ to encourage a natural and smooth surface:
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathcal { L } _ { \mathrm { n o r m a l } } = \sum _ { \mathbf { x } _ { s } \in \mathcal { S } } | | \mathbf { n } _ { \theta } ( \mathbf { x } _ { s } , \mathbf { z } ) - \mathbf { n } _ { \theta } ( \mathbf { x } _ { s } + \epsilon , \mathbf { z } ) | | _ { 2 } ,
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where $\epsilon$ is a small random 3D perturbation and $\mathbf { n } _ { \theta }$ denotes the normal vector, which can be computed by $\begin{array} { r } { \mathbf { n } _ { \theta } ( \mathbf { x } , \mathbf { z } ) = \nabla _ { \mathbf { x } } \alpha _ { \theta } ( \mathbf { x } , \mathbf { z } ) / | | \mathcal { \bar { \nabla } } _ { \mathbf { x } } \alpha _ { \theta } ( \mathbf { x } , \mathbf { z } ) | | _ { 2 } } \end{array}$ .
|
| 110 |
+
|
| 111 |
+
Opacity Regularization. Since alpha values predicted in GOF can be regarded as occupancy values, ideally the entropy of them should be 0 so that $\alpha _ { \boldsymbol { \theta } } ( \mathbf { x } , \mathbf { z } )$ values will equal 1 for points in the occupied space and 0 for points in the free space. We thus apply the second opacity regularization, aiming to reduce the entropy of predicted alpha values:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\mathcal { L } _ { \mathrm { o p a c i t y } } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \log ( \alpha _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } ) ) + \log ( 1 - \alpha _ { \theta } ( \mathbf { x } _ { i } , \mathbf { z } ) ) .
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
In summary, the final loss function for training GOF can be written as:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\mathcal { L } ( \theta , \phi ) = \mathcal { L } _ { \mathrm { o r i g i n } } ( \theta , \phi ) + \lambda _ { \mathrm { n o r m a l } } \mathcal { L } _ { \mathrm { n o r m a l } } + \lambda _ { \mathrm { o p a c i t y } } \mathcal { L } _ { \mathrm { o p a c i t y } } ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where $\lambda _ { \mathrm { { n o r m a l } } }$ and $\lambda _ { \mathrm { o p a c i t y } }$ are both balancing coefficients.
|
| 124 |
+
|
| 125 |
+
# 4 Experiments
|
| 126 |
+
|
| 127 |
+
Implementation Details. Unless stated otherwise, in all experiments we set $N$ , the number of points sampled for rendering, to 12, and set $M$ , the number of bins used in root-finding, to 12. As discussed in Sec.3.2, we apply an iterative process in root-finding. In practice, the number of iterations is set to $m _ { s } = 3$ times. During inference, GOF requires $M + m _ { s } + N$ queries to obtain the color of a pixel, while existing methods require $2 N$ queries due to the use of a hierarchical sampling strategy. Recall it is sufficient for GOF to sample only the surface point to render an image, GOF is thus capable of using just $M + m _ { s } + 1$ queries, potentially speeding up the rendering process in off-line applications. More training and implementation details can be found in the supplemental material.
|
| 128 |
+
|
| 129 |
+
Datasets. To assess our method comprehensively, we conduct experiments on three datasets, namely CelebA [44], BFM [45], and Cats [46]. Specifically, CelebA is a high-resolution face dataset containing 200, 000 diverse face images. Following pi-GAN [6], we crop all images in CelebA from the top of the hair to the bottom of the chin as a pre-processing step. As for the Cats dataset, it contains 6, 444 cat faces of size $1 2 8 \times 1 2 8$ . Finally, BFM is a synthetic face dataset rendered with Basel Face Model, where each face is paired with a ground-truth depth map, making it a good benchmark for quantitatively evaluating the quality of learned surfaces.
|
| 130 |
+
|
| 131 |
+
Comparison with baselines. To validate the effectiveness of GOF, we compare it with two representative GRAF methods, namely GRAF [7] and pi-GAN. Firstly, Fig. 3 demonstrates the qualitative comparison between these three methods, where we include the synthesized images, the learned surfaces in the form of 3D meshes, as well as the corresponding normal maps. As can be observed, GRAF struggles to render good images, let alone estimate compact and reasonable underlying surfaces. Compared to GRAF, pi-GAN can synthesize images and estimate corresponding surfaces with improved quality. However, messy parts can be clearly recognized on its learned surfaces and normal maps, indicating it is incapable of capturing the compact 3D geometric details. In contrast to both pi-GAN and GRAF, the proposed GOF is shown to hallucinate realistic images with 3D consistency and simultaneously learn smooth surface normals as well as compact object surfaces, which verifies the benefit of adopting the transition from radiance fields to occupancy fields. More qualitative results of synthesized images and corresponding surfaces are included in Fig. 4.
|
| 132 |
+
|
| 133 |
+
Table 1: Quantitative results $( 1 2 8 \times 1 2 8 \mathrm { p x } )$ ) on BFM, CelebA and Cats datasets, on three metrics Fréchet Inception Distance (FID), Inception Score (IS) and the weighted variance of sampled depth $\Sigma _ { t _ { i } } ( \times 1 0 ^ { - 4 } )$ .
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: Qualitative comparison on BFM (top), CelebA (middle), and Cats (bottom) datasets. Our method synthesizes realistic images while ensuring compact object surfaces.
|
| 137 |
+
|
| 138 |
+
Table 2: Comparisons on the compactness and accuracy of learned surfaces.
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Method</td><td>SIDE↓</td><td>MAD↓</td></tr><tr><td>Supervised</td><td>0.412</td><td>10.84</td></tr><tr><td>Unsup3d [37]</td><td>0.795</td><td>16.51</td></tr><tr><td>GRAF[7]</td><td>1.866</td><td>26.69</td></tr><tr><td>pi-GAN [6]</td><td>0.727</td><td>20.46</td></tr><tr><td>GAN2Shape [38]</td><td>0.759</td><td>14.94</td></tr><tr><td>Ours</td><td>0.779</td><td>13.81</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 3: Comparisons on the geometry properties of learned surfaces. We report mean curvature $( \mathbf { M C } ) ( \times 1 0 ^ { - 3 } )$ and mean geodesic distance(MGD) between random points to assess the geometry properties of recovered surfaces.
|
| 143 |
+
|
| 144 |
+
<table><tr><td colspan="2"></td><td>BFM</td><td>CelebA</td><td>Cats</td></tr><tr><td>MC↓</td><td>pi-GAN Ours</td><td>16.84 12.25</td><td>25.94 23.13</td><td>34.05 30.14</td></tr><tr><td>MGD↓</td><td>pi-GAN Ours</td><td>0.483 0.226</td><td>0.450 0.231</td><td>0.494 0.317</td></tr></table>
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 4: Generated images and their 3D meshes on CelebA and Cats datasets.
|
| 148 |
+
|
| 149 |
+
To quantitatively evaluate the quality of generated images, we report the Fréchet Inception Distance (FID) scores and Inception Score (IS) scores in Table 1. On these two metrics, GOF demonstrates substantial improvements over baseline methods. To further measure the compactness of learned surfaces, the concentration of color weights $w _ { i }$ as mentioned in Fig. 1 (a) is also computed. Specifically, We sample $N = 3 6$ equally-spaced points $\left\{ { \bf x } _ { i } = { \bf o } + t _ { i } { \bf d } \right\}$ within near and far bounds $[ t _ { n } , t _ { f } ]$ and calculate the corresponding color weights $w _ { i } , i = 1 , 2 , . . . , N$ . Actually, the weighted variance of these samples’ depth $t _ { i }$ reflects the concentration of color weights in a single image:
|
| 150 |
+
|
| 151 |
+
$$
|
| 152 |
+
\Sigma _ { t _ { i } } = \frac { N } { ( N - 1 ) \sum _ { i = 1 } ^ { N } w _ { i } } \sum _ { i = 1 } ^ { N } w _ { i } ( t _ { i } - \bar { t } ) ^ { 2 } , \mathrm { ~ w h e r e ~ } \bar { t } = \sum w _ { i } t _ { i } \Big / \sum w _ { i } .
|
| 153 |
+
$$
|
| 154 |
+
|
| 155 |
+
Intuitively, a smaller variance implies the learned surface is more compact. Finally, for each method, the overall concentration of color weights is averaged over 1000 randomly synthesized images at the $2 5 6 \times 2 5 6$ resolution. The results in terms of this new metric are also included in Table 1.
|
| 156 |
+
|
| 157 |
+
For the quality of learned surfaces, we first evaluate the compactness and accuracy of surfaces on the BFM dataset, since it contains ground-truth depth maps. Specifically, $5 0 K$ images are generated by each method, together with their corresponding depth maps. For each method, we train a separate CNN on these generated images and depth maps to predict depths from images. Subsequently, we can measure the accuracy of learned surfaces by running the CNN on the test split of BFM and comparing its outputs to the ground-truth depth maps using the scale-invariant depth error (SIDE) and the mean angle deviation (MAD). While MAD focuses more on the compactness of surfaces, SIDE emphasizes more on the accuracy of depth. As shown in Table 2, GOF significantly outperforms baseline methods on the MAD metric and is comparable to strong baselines on the SIDE metric. Moreover, we also report mean curvature (MC) and mean geodesic distance (MGD) between random points to assess the geometry properties of learned surfaces. The lower these two metrics, the smoother recovered object surfaces. Owing to the absence of such two metrics on ground-truth surfaces for reference, we consider the smoother surfaces better conform to ground-truth cases. The reported values on these two metrics are averaged over 100 randomly synthesized 3D meshes. Quantitative comparisons in Table 3 demonstrate our method GOF can preserve better geometry properties.
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 5: Rendering with only surface points. Images (right) rendered only with surface points are indistinguishable from those (left) obtained with cumulative rendering.
|
| 163 |
+
Figure 6: Qualitative ablation on proposed priors (upper row w/o $\mathcal { L } _ { \mathrm { o p a c i t y } }$ , bottom row w/o $\mathcal { L } _ { \mathrm { { n o r m a l } } }$ ).
|
| 164 |
+
|
| 165 |
+
Rendering only with surface points. As mentioned in Sec. 3.2, GOF is able to render an image using only the surface points. To verify this, we showcase in Fig. 5 images rendered by GOF using multiple points and only the surface point. As can be observed, images synthesized with these two strategies are nearly indistinguishable from each other. Thus, GOF possesses the potential to significantly reduce the number of generator queries when synthesizing an image. To compare the efficiency straightforwardly, we estimate the rendering speed of $2 5 6 \times 2 5 6$ images for both pi-GAN and GOF on a single Intel Xeon(R) CPU. On average, pi-GAN costs about 78s per image, while GOF takes about 56s, saving approximately $2 8 \%$ of the time. Owing to the reduction in the burden of queries, GOF enables a light rendering scheme that is promising for applications on mobile devices.
|
| 166 |
+
|
| 167 |
+
Ablation studies. We here analyze the effects of the proposed regularizations ${ \mathcal { L } } _ { \mathrm { n o r m a l } }$ and $\mathcal { L } _ { \mathrm { o p a c i t y } }$ Table 1 includes the quantitative ablation study on these priors. We also include qualitative samples in Fig. 6, which contains images synthesized by GOF without one regularization item. As shown in the BFM cases 6(a), removing opacity prior leads to the smoke-like artifacts around the cheek part and the absence of normal regularization might degrade the quality of learned normal maps. While testing on the real-world dataset 6(b), undesirable specular highlights emerge on the face and the hollows appear on the corresponding shapes if without the normal regularization. Moreover, we observe that removing opacity prior on CelebA dataset will make the face surfaces too flat and unnatural. It is worth noting that although the performance of GOF is deteriorated due to the absence of these priors, images and surfaces produced by GOF are still of reasonable quality when compared to that from previous approaches, indicating the transition from radiance fields to occupancy fields is the main cause that leads to the success of GOF. Moreover, we showcase the degenerated results on BFM dataset if our model is trained without the shrinking process. As illustrated in Fig. 7, despite the realistic generated images, there emerges random noise on the corresponding normal maps and some nasty dents appear on the face shapes, which demonstrates that the combination of our proposed occupancy representation and the shrinking sampling procedure ensures the surface compactness.
|
| 168 |
+
|
| 169 |
+

|
| 170 |
+
Figure 7: GOF results without the shrinking process. Noise emerges on normals and dents appear on shapes.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
Figure 8: GAN inversion results on real images. GOF can reconstruct the target images and simultaneously learn the corresponding normal maps as well as 3D shapes.
|
| 174 |
+
|
| 175 |
+

|
| 176 |
+
Figure 9: Relighting results. Our method GOF generates desirable images under various light conditions while baseline results are far from satisfactory.
|
| 177 |
+
|
| 178 |
+
Inverse rendering. Through GAN inversion, our method is also capable of inverse rendering as shown in Fig. 8. Given a real image, GOF can reconstruct the target image successfully and realize free view synthesis by controlling the viewpoints. Besides, the recovered normal maps as well as 3D shapes pave the way for downstream tasks such as relighting and editing.
|
| 179 |
+
|
| 180 |
+
Relighting. In Fig. 9 we provide the relighting results based on the learned normal maps by explicitly controlling the lighting directions. As our method and baselines can’t predict the corresponding albedo, the face-forwarding image is considered as the pseudo albedo. Thanks to better learned normal maps, our method GOF presents promising images under different light conditions. In contrast to ours, baseline methods like pi-GAN [6] tend to generate messy normal maps with obvious checkerboard-like artifacts, leading to noisy and dissatisfied relighting results.
|
| 181 |
+
|
| 182 |
+
Limitations. While training on real-world datasets, our method GOF might present similar dents in the hair regions as in existing approaches [6]. Besides, the adopted FiLMed-SIREN backbone in the generator will lead to stripe artifacts in the generated images especially when they are rendered only with surface points. Meanwhile, surface rendering mode will make furry cat images over-smooth and less realistic. Moreover, our method is more suitable for solid objects with only one surface.
|
| 183 |
+
|
| 184 |
+
# 5 Conclusion
|
| 185 |
+
|
| 186 |
+
In this work, we propose generative occupancy fields (GOF), a novel generative radiance fields for 3D-aware image synthesis. The crux of GOF is a dedicated transition from the cumulative rendering in radiance fields to rendering with only the surface points. Such a transition is inspired by the resemblance between the alpha values in radiance fields and the occupancy values in occupancy networks, so that we can reinterpret one as the other. In practice, such a transition is achieved during training by gradually shrinking the sampling region in the rendering process of GOF from the entire volume to a minimal neighboring region around the surface, where the surface is located via rootfinding on predicted alpha values. Thanks to the transition, surfaces learned by GOF continuously converge during the training, ensuring their compactness at the end. On three diverse datasets, GOF is shown to demonstrate great superiority in synthesizing 3D consistent images and in the meantime capturing compact surfaces, significantly broadening the application of generative radiance fields in downstream tasks.
|
| 187 |
+
|
| 188 |
+
# Acknowlegements
|
| 189 |
+
|
| 190 |
+
We would like to thank Eric R. Chan for sharing the codebase of pi-GAN. This work is supported by the Collaborative Research Grant from SenseTime (CUHK Agreement No. TS1712093), the General Research Fund (GRF) of Hong Kong (No. 14205719), the RIE2020 Industry Alignment Fund – Industry Collaboration Projects (IAF-ICP) Funding Initiative, as well as cash and in-kind contribution from the industry partner(s).
|
| 191 |
+
|
| 192 |
+
# References
|
| 193 |
+
|
| 194 |
+
[1] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. C. Courville, and Y. Bengio, “Generative adversarial nets,” in NIPS, 2014.
|
| 195 |
+
[2] A. Brock, J. Donahue, and K. Simonyan, “Large scale gan training for high fidelity natural image synthesis,” in International Conference on Learning Representations, 2018.
|
| 196 |
+
[3] T. Karras, S. Laine, and T. Aila, “A style-based generator architecture for generative adversarial networks,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4401–4410, 2019.
|
| 197 |
+
[4] T. Karras, S. Laine, M. Aittala, J. Hellsten, J. Lehtinen, and T. Aila, “Analyzing and improving the image quality of stylegan,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8110–8119, 2020.
|
| 198 |
+
[5] B. Mildenhall, P. P. Srinivasan, M. Tancik, J. T. Barron, R. Ramamoorthi, and R. Ng, “Nerf: Representing scenes as neural radiance fields for view synthesis,” in ECCV, pp. 405–421, Springer, 2020.
|
| 199 |
+
[6] E. R. Chan, M. Monteiro, P. Kellnhofer, J. Wu, and G. Wetzstein, “pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis,” in CVPR, 2021.
|
| 200 |
+
[7] K. Schwarz, Y. Liao, M. Niemeyer, and A. Geiger, “Graf: Generative radiance fields for 3d-aware image synthesis,” in NeurIPS, vol. 33, 2020.
|
| 201 |
+
[8] L. Mescheder, M. Oechsle, M. Niemeyer, S. Nowozin, and A. Geiger, “Occupancy networks: Learning 3d reconstruction in function space,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4460–4470, 2019.
|
| 202 |
+
[9] L. Yariv, Y. Kasten, D. Moran, M. Galun, M. Atzmon, B. Ronen, and Y. Lipman, “Multiview neural surface reconstruction by disentangling geometry and appearance,” Advances in Neural Information Processing Systems, vol. 33, 2020.
|
| 203 |
+
[10] M. Oechsle, S. Peng, and A. Geiger, “Unisurf: Unifying neural implicit surfaces and radiance fields for multi-view reconstruction,” arXiv preprint arXiv:2104.10078, 2021.
|
| 204 |
+
[11] M. Niemeyer, L. Mescheder, M. Oechsle, and A. Geiger, “Differentiable volumetric rendering: Learning implicit 3d representations without 3d supervision,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3504–3515, 2020.
|
| 205 |
+
[12] Y. Jiang, D. Ji, Z. Han, and M. Zwicker, “Sdfdiff: Differentiable rendering of signed distance fields for 3d shape optimization,” in The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020.
|
| 206 |
+
[13] S. Liu, Y. Zhang, S. Peng, B. Shi, M. Pollefeys, and Z. Cui, “Dist: Rendering deep implicit signed distance function with differentiable sphere tracing,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2019–2028, 2020.
|
| 207 |
+
[14] J. J. Park, P. Florence, J. Straub, R. Newcombe, and S. Lovegrove, “Deepsdf: Learning continuous signed distance functions for shape representation,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 165–174, 2019.
|
| 208 |
+
[15] Z. Chen and H. Zhang, “Learning implicit fields for generative shape modeling,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5939–5948, 2019.
|
| 209 |
+
[16] K. Genova, F. Cole, D. Vlasic, A. Sarna, W. T. Freeman, and T. Funkhouser, “Learning shape templates with structured implicit functions,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7154–7164, 2019.
|
| 210 |
+
[17] M. Michalkiewicz, J. K. Pontes, D. Jack, M. Baktashmotlagh, and A. Eriksson, “Implicit surface representations as layers in neural networks,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4743–4752, 2019.
|
| 211 |
+
[18] S. Saito, Z. Huang, R. Natsume, S. Morishima, A. Kanazawa, and H. Li, “Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization,” in Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2304–2314, 2019.
|
| 212 |
+
[19] S. Saito, T. Simon, J. Saragih, and H. Joo, “Pifuhd: Multi-level pixel-aligned implicit function for high-resolution 3d human digitization,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 84–93, 2020.
|
| 213 |
+
[20] V. Sitzmann, E. R. Chan, R. Tucker, N. Snavely, and G. Wetzstein, “Metasdf: Meta-learning signed distance functions,” arXiv preprint arXiv:2006.09662, 2020.
|
| 214 |
+
[21] V. Sitzmann, M. Zollhöfer, and G. Wetzstein, “Scene representation networks: Continuous 3d-structure-aware neural scene representations,” in Advances in Neural Information Processing Systems, 2019.
|
| 215 |
+
[22] L. Liu, J. Gu, K. Z. Lin, T.-S. Chua, and C. Theobalt, “Neural sparse voxel fields,” arXiv preprint arXiv:2007.11571, 2020.
|
| 216 |
+
[23] A. Yu, R. Li, M. Tancik, H. Li, R. Ng, and A. Kanazawa, “Plenoctrees for real-time rendering of neural radiance fields,” arXiv preprint arXiv:2103.14024, 2021.
|
| 217 |
+
[24] T. Neff, P. Stadlbauer, M. Parger, A. Kurz, J. H. Mueller, C. R. A. Chaitanya, A. Kaplanyan, and M. Steinberger, “Donerf: Towards real-time rendering of compact neural radiance fields using depth oracle networks,” arXiv preprint arXiv:2103.03231, 2021.
|
| 218 |
+
[25] P. Hedman, P. P. Srinivasan, B. Mildenhall, J. T. Barron, and P. Debevec, “Baking neural radiance fields for real-time view synthesis,” arXiv preprint arXiv:2103.14645, 2021.
|
| 219 |
+
[26] M. Boss, R. Braun, V. Jampani, J. T. Barron, C. Liu, and H. Lensch, “Nerd: Neural reflectance decomposition from image collections,” arXiv preprint arXiv:2012.03918, 2020.
|
| 220 |
+
[27] P. P. Srinivasan, B. Deng, X. Zhang, M. Tancik, B. Mildenhall, and J. T. Barron, “Nerv: Neural reflectance and visibility fields for relighting and view synthesis,” arXiv preprint arXiv:2012.03927, 2020.
|
| 221 |
+
[28] M. Atzmon, N. Haim, L. Yariv, O. Israelov, H. Maron, and Y. Lipman, “Controlling neural level sets,” arXiv preprint arXiv:1905.11911, 2019.
|
| 222 |
+
[29] P. Kellnhofer, L. C. Jebe, A. Jones, R. Spicer, K. Pulli, and G. Wetzstein, “Neural lumigraph rendering,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4287–4297, 2021.
|
| 223 |
+
[30] J. Wu, C. Zhang, T. Xue, B. Freeman, and J. Tenenbaum, “Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling,” in NIPS, 2016.
|
| 224 |
+
[31] X. Chen, D. Cohen-Or, B. Chen, and N. J. Mitra, “Towards a neural graphics pipeline for controllable image generation,” Computer Graphics Forum, vol. 40, no. 2, 2021.
|
| 225 |
+
[32] J.-Y. Zhu, Z. Zhang, C. Zhang, J. Wu, A. Torralba, J. Tenenbaum, and B. Freeman, “Visual object networks: Image generation with disentangled 3d representations,” in NeurIPS, 2018.
|
| 226 |
+
[33] Y. Liao, K. Schwarz, L. Mescheder, and A. Geiger, “Towards unsupervised learning of generative models for 3d controllable image synthesis,” in CVPR, pp. 5871–5880, 2020.
|
| 227 |
+
[34] T. Nguyen-Phuoc, C. Richardt, L. Mai, Y.-L. Yang, and N. Mitra, “Blockgan: Learning 3d object-aware scene representations from unlabelled images,” in Advances in Neural Information Processing Systems 33, Nov 2020.
|
| 228 |
+
[35] T. Nguyen-Phuoc, C. Li, L. Theis, C. Richardt, and Y.-L. Yang, “Hologan: Unsupervised learning of 3d representations from natural images,” in ICCV, pp. 7588–7597, 2019.
|
| 229 |
+
[36] M. Niemeyer and A. Geiger, “Giraffe: Representing scenes as compositional generative neural feature fields,” in CVPR, 2021.
|
| 230 |
+
[37] S. Wu, C. Rupprecht, and A. Vedaldi, “Unsupervised learning of probably symmetric deformable 3d objects from images in the wild,” in CVPR, 2020.
|
| 231 |
+
[38] X. Pan, B. Dai, Z. Liu, C. C. Loy, and P. Luo, “Do 2d gans know 3d shape? unsupervised 3d shape reconstruction from 2d image gans,” in ICLR, 2021.
|
| 232 |
+
[39] M. Sahasrabudhe, Z. Shu, E. Bartrum, R. Alp Guler, D. Samaras, and I. Kokkinos, “Lifting autoencoders: Unsupervised learning of a fully-disentangled 3d morphable model using deep non-rigid structure from motion,” in ICCV Workshops, pp. 0–0, 2019.
|
| 233 |
+
[40] X. Li, S. Liu, K. Kim, S. De Mello, V. Jampani, M.-H. Yang, and J. Kautz, “Self-supervised single-view 3d reconstruction via semantic consistency,” ECCV, 2020.
|
| 234 |
+
[41] P. Wang, L. Liu, Y. Liu, C. Theobalt, T. Komura, and W. Wang, “Neus: Learning neural implicit surfaces by volume rendering for multi-view reconstruction,” arXiv preprint arXiv:2106.10689, 2021.
|
| 235 |
+
[42] L. Yariv, J. Gu, Y. Kasten, and Y. Lipman, “Volume rendering of neural implicit surfaces,” arXiv preprint arXiv:2106.12052, 2021.
|
| 236 |
+
[43] J. T. Kajiya and B. P. Von Herzen, “Ray tracing volume densities,” ACM SIGGRAPH computer graphics, vol. 18, no. 3, pp. 165–174, 1984.
|
| 237 |
+
[44] Z. Liu, P. Luo, X. Wang, and X. Tang, “Deep learning face attributes in the wild,” in ICCV, pp. 3730–3738, 2015.
|
| 238 |
+
[45] P. Paysan, R. Knothe, B. Amberg, S. Romdhani, and T. Vetter, “A 3d face model for pose and illumination invariant face recognition,” in 2009 Sixth IEEE International Conference on Advanced Video and Signal Based Surveillance, pp. 296–301, Ieee, 2009.
|
| 239 |
+
[46] W. Zhang, J. Sun, and X. Tang, “Cat head detection-how to effectively exploit shape and texture features,” in ECCV, pp. 802–816, Springer, 2008.
|