ZHANGYUXUAN-zR commited on
Commit
b4bf9af
·
verified ·
1 Parent(s): f94d71e

Add files using upload-large-folder tool

Browse files
parse/train/AjZCiKuWQ9n/AjZCiKuWQ9n.md ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contrastive Mixture of Posteriors for Counterfactual Inference, Data Integration and Fairness
2
+
3
+ Anonymous Author(s)
4
+ Affiliation
5
+ Address
6
+ email
7
+
8
+ # Abstract
9
+
10
+ 1 Learning meaningful representations of data that can address challenges such as
11
+ 2 batch effect correction, data integration and counterfactual inference is a central
12
+ 3 problem in many domains including computational biology. Adopting a Condi
13
+ 4 tional VAE framework, we identify the mathematical principle that unites these
14
+ 5 challenges: learning a representation that is marginally independent of a condition
15
+ 6 variable. We therefore propose the Contrastive Mixture of Posteriors (CoMP)
16
+ 7 method that uses a novel misalignment penalty to enforce this independence. This
17
+ 8 penalty is defined in terms of mixtures of the variational posteriors themselves,
18
+ 9 unlike prior work which uses external discrepancy measures such as MMD to
19
+ 10 ensure independence in latent space. We show that CoMP has attractive theoretical
20
+ 11 properties compared to previous approaches, especially when there is complex
21
+ 12 global structure in latent space. We further demonstrate state of the art performance
22
+ 13 on a number of real-world problems, including the challenging tasks of aligning
23
+ 14 human tumour samples with cancer cell-lines and performing counterfactual in
24
+ 15 ference on single-cell RNA sequencing data. Incidentally, we find parallels with
25
+ 16 the fair representation learning literature, and demonstrate CoMP has competitive
26
+ 17 performance in learning fair yet expressive latent representations.
27
+
28
+ # 18 1 Introduction
29
+
30
+ 19 Large scale datasets describing the molecular properties of cells, tissues and organs in a state of health
31
+ 20 and disease are commonplace in computational biology. Referred to collectively as ‘omics data,
32
+ 21 thousands of features are measured per sample and, as single-cell methodologies have developed, it
33
+ 22 is now typical to measure such features across $\mathrm { 1 0 ^ { 5 } – 1 0 ^ { 6 } }$ samples [1, 2]. Given these two properties of
34
+ 23 ‘omics data, the need for scalable algorithms to learn meaningful low-dimensional representations
35
+ 24 that capture the variability of the data has grown. As such, Variational Autoencoders (VAEs) [3, 4]
36
+ 25 have become an important tool for solving a range of modelling problems in the biological sciences
37
+ 26 [5, 6, 7, 8, 9, 10]. One such problem is utilising representations for counterfactual inference,
38
+ 27 e.g. predicting how a certain cell or cell-type, observed only in the control, would have behaved when
39
+ 28 exposed to a drug [9, 10, 11]. Another key problem is removing batch effects—spurious shifts in
40
+ 29 observations due to differing experimental conditions—from data in order to integrate or compare
41
+ 30 multiple datasets [5, 12, 13, 14, 15].
42
+ 31 We present a formal account of these challenges and show that, to a great extent, they can be seen
43
+ 32 as different aspects of a the same underlying problem, namely, that of learning a representation
44
+ 33 that is marginally independent of a condition variable (e.g. experimental batch, stimulated vs.
45
+ 34 control). Figure 1 [CoMP] illustrates what this looks like in practice: the complete overlap of the cell
46
+ 35 populations from different conditions in the latent space. This directly addresses batch correction, and
47
+ 36 in the case where we also have a generative model that maps from latent space back to the original
48
+ 37 data space, methods that solve this problem can also be applied to counterfactual inference [10].
49
+ 38 This same mathematical requirement for independence also occurs in the fair representation learning
50
+ 39 literature, in which we seek a representation that removes a sensitive attribute, e.g. gender.
51
+ 40 Neither the VAE nor the conditional VAE (CVAE) [16] are typically successful at learning repre
52
+ 41 sentations that achieve this desired independence, as shown in Figure 1. Despite the CVAE being
53
+ 42 theoretically able to remove batch effects, there is no constraint that prevents it from from separating
54
+ 43 different conditions in latent space. Existing methods use a penalty to encourage the CVAE to learn
55
+ 44 representations that overlap correctly in latent space, with Maximum Mean Discrepancy (MMD) [17]
56
+ 45 being the most common penalty, applied in the VFAE [18] and the more recent trVAE [10]. These
57
+ 46 methods, however, suffer from a number of drawbacks: conceptually, they introduce an extraneous
58
+ 47 discrepancy measure that is not a part of the variational inference framework; practically, they re
59
+ 48 quire the choice of, and hyperparameter tuning for, an MMD kernel; empirically, whilst trVAE is a
60
+ 49 significant improvement over an unconstrained CVAE, Figure 1 [trVAE] shows that it can still fail to
61
+ 50 exactly align different conditions in latent space.
62
+ 51 To overcome these difficulties, we introduce Contrastive Mixture of Posteriors (CoMP), a new
63
+ 52 method for learning aligned representations in a CVAE framework. Our method features the novel
64
+ 53 CoMP misalignment penalty that forces the CVAE to remove batch effects. Inspired by contrastive
65
+ 54 learning [19, 20], the penalty encourages representations from different conditions to be close, whilst
66
+ 55 representations from the same condition should be spread out. To achieve this, we approximate the
67
+ 56 requisite marginal distributions using mixtures of the variational posteriors themselves, leading to a
68
+ 57 penalty that does not require an extraneous discrepancy measure or a separately tuned kernel. We
69
+ 58 prove that the CoMP penalty is a stochastic upper bound on a weighted sum of KL divergences, so
70
+ 59 minimising the penalty minimises a well-established statistical divergence measure. We analyse the
71
+ 60 training gradients of the CoMP and MMD penalties, finding key differences that help explain why
72
+ 61 CoMP gradients are generally more stable and better suited to datasets with complex global structure.
73
+ 62 As shown in Figure 1 [CoMP], our method can achieve visually perfect alignment on a number of
74
+ 63 real-world biological datasets. We apply CoMP to two challenging biological problems: 1) aligning
75
+ 64 gene expression profiles between tumours and their corresponding cell-lines, as tackled in [21] and
76
+ 65 2) estimating the gene expression profile of an unperturbed cell as if it had been treated with a
77
+ 66 chemical perturbation (counterfactual inference) [9]. We show that CoMP outperforms existing
78
+ 67 methods, achieving state-of-the-art performance on both tasks. Finally, given the connections to fair
79
+ 68 representation learning, we apply CoMP to the problem of learning a representation that is independent
80
+ 69 of gender in the UCI Adult Income dataset [22], showing that we can learn a representation that is
81
+ 70 fully independent of the protected attribute whilst maintaining useful information for other prediction
82
+ 71 tasks. CoMP represents a conceptually simple and empirically powerful method for learning aligned
83
+ 72 representation, opening the door to answering high-value questions in biology and beyond.
84
+
85
+ ![](images/0ff0cbebc367ff9e9f1806c6197f7bbb9853055deac0ce9ad0805db4ba514463.jpg)
86
+ Figure 1: Latent representations of a single-cell gene expression dataset under two conditions (see Section 6.2). From fully disjointed (VAE) to a well-mixed pair of distributions (CoMP).
87
+
88
+ # 2 Background
89
+
90
+ # 74 2.1 Variational Autoencoders and extensions
91
+
92
+ 75 We begin by assuming that we have $n$ observations $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { n }$ of an underlying data distribution.
93
+ 76 Variational autoencoders (VAEs) [3, 4] explain the high-dimensional observations $\mathbf { x } _ { i }$ using low
94
+ 77 dimensional representations $\mathbf { z } _ { i }$ . The standard VAE places a standard normal prior $\mathbf { z } \sim p ( \mathbf { z } )$ on
95
+ 78 the latent variable, and learns a generative model $p _ { \boldsymbol { \theta } } ( \mathbf { x } | \mathbf { z } )$ that reconstructs $\mathbf { x }$ using $\mathbf { z }$ , alongside
96
+ 79 an inference network $q _ { \phi } ( { \bf z } | { \bf x } )$ that encodes $\mathbf { x }$ to $\mathbf { z }$ . Both $\theta$ and $\phi$ are trained jointly by maximising
97
+ 80 the ELBO, a lower bound on marginal likelihood given by $\log p _ { \boldsymbol \theta } ( \mathbf { x } ) \geq \bar { \mathbb { E } } _ { q _ { \boldsymbol \phi } ( \mathbf { z } | \mathbf { x } ) } \left[ \log p _ { \boldsymbol \theta } ( \mathbf { x } | \mathbf { z } ) \right] \bar { - }$
98
+ 81 $\mathrm { K L } \left[ q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p ( \mathbf { z } ) \right]$ . This can be maximised using stochastic optimisers [23, 3]. Various extensions
99
+ 82 of the VAE have been proposed, such as the $\beta$ -VAE [24], which scales the KL term of the ELBO
100
+ 83 by a hyperparameter $\beta$ . Because the isotropic normal prior may limit the expressivity of the model
101
+ 84 [25], various authors have considered alternative priors. For example, [26] proposed the Variational
102
+ 85 Mixture of Posteriors (VaMP) prior, that replaces the isotropic Gaussian with a mixture of posteriors
103
+ 86 from the encoder network itself, evaluated at a number of learned pseudo-inputs.
104
+ 87 So far, we have assumed that the only data available are the observations $\mathbf { x } _ { 1 } , \ldots , \mathbf { x } _ { n }$ , but in many
105
+ 88 practical applications we may have additional information such as a condition label for each ob
106
+ 89 servation. For example, in gene knock-out studies, we have information about which gene was
107
+ 90 targeted for deletion in each cell; in multi-batch experiments we have information about which exper
108
+ 91 imental batch each samples was collected in. Thus, we augment our data by considering data pairs
109
+ 92 $( \mathbf { x } _ { 1 } , c _ { 1 } ) , \ldots , ( \mathbf { x } _ { n } , c _ { n } )$ where $\mathbf { x }$ is the same high-dimensional observation, and $c$ is a label indicating
110
+ 93 the condition or experimental batch that $\mathbf { x }$ was collected under.
111
+ 94 Whilst VAEs are theoretically able to model the pairs $\left( \mathbf { x } _ { i } , c _ { i } \right)$ , it makes sense to build a model that
112
+ 95 explicitly distinguishes between the $\mathbf { x }$ and $c$ . The simplest model is the Conditional VAE (CVAE)
113
+ 96 [16]. In this model, a conditional generative model $p _ { \theta } ( \mathbf { x } | \mathbf { z } , c )$ and a conditional inference network
114
+ 97 $q _ { \phi } ( \mathbf { z } | \mathbf { x } , c )$ are trained using a modified ELBO. A key observation for our work is that the CVAE has
115
+ 98 many different ways to model the data. For example, it can completely ignore the condition $c$ in $p _ { \theta }$
116
+ 99 and $q _ { \phi }$ , reducing to the original VAE. Assuming that $\mathbf { x }$ is not independent of $c$ , this failure mode of
117
+ 100 the CVAE would be apparent on a visualization of the representations. For example, different values
118
+ 101 of $c$ might be visible as separate latent clusters, as shown in Figure 1 [CVAE].
119
+
120
+ ![](images/0d413fd89df574dd8fcd5810e43676c70745bc61f80e0d4983cb7e4b366c2983.jpg)
121
+ Figure 2: Structural Equation Model for observation $\mathbf { x }$ under known condition $c$ with unobserved latent variable $\mathbf { z }$ . In this model, $\mathbf { z }$ and $c$ are independent in the prior.
122
+
123
+ # 2.2 Counterfactual inference
124
+
125
+ 103 If $\left( \mathbf { x } _ { i } , c _ { i } \right)$ represents an RNA transcript and the gene knock-out applied to the cell, a natural question
126
+ 104 to ask is “How would the transcript have differed if a different knock-out $c ^ { \prime }$ had been applied?” In
127
+ 105 general, counterfactual inference attempts to answer questions of the form “How would the data have
128
+ 106 changed if $c _ { i }$ had been replaced by $c ^ { \prime }$ ?” Answering counterfactual questions is a notoriously difficult
129
+ 107 task, because they naturally refer to unobservable data [27]. A principled approach to such questions
130
+ 108 is to adopt the framework of Structural Equation Models [28, 27]. For example, we could assume that
131
+ 109 the data generating process is given as in Figure 2. If this model is correct, counterfactual inference
132
+ 110 in the Pearl framework [27] can then be performed by: 1. abduction: inferring the latent $\mathbf { z }$ from $\mathbf { x }$
133
+ 111 and $c$ using $p ( \mathbf { z } | \mathbf { x } , c )$ , 2. action: swap $c$ for $c ^ { \prime }$ , 3. prediction: use $p ( \mathbf { x } | \mathbf { z } , c ^ { \prime } )$ to obtain a predictive
134
+ 112 distribution for the counterfactual. Thus, the counterfactual distribution of $\mathbf { x } _ { i }$ observed with condition
135
+ 113 $c _ { i }$ but predicted for condition $c ^ { \prime }$ is given by
136
+
137
+ $$
138
+ p \left( \mathbf { x } _ { c = c ^ { \prime } } | \mathbf { x } _ { i } , c _ { i } \right) = \int p ( \mathbf { z } | \mathbf { x } _ { i } , c _ { i } ) p ( \mathbf { x } | \mathbf { z } , c ^ { \prime } ) d \mathbf { z } .
139
+ $$
140
+
141
+ 114 In order to make use of this relationship, we must fit a latent variable model [29] such as a CVAE that will estimate the encoding distribution 115 $p ( \mathbf { z } | \mathbf { x } _ { i } , c _ { i } )$ and the generative distribution $p ( \mathbf { x } | \mathbf { z } , c ^ { \prime } )$ .
142
+
143
+ # 116 3 Unifying counterfactual inference, data integration and fairness
144
+
145
+ 117 We have seen that batch effect correction, data integration and counterfactual inference are central
146
+ 118 problems of interest for the application of latent variable models in computational biology.
147
+ 119 For counterfactual inference, latent variable models such as the CVAE are increasingly popular
148
+ 120 choices [29]. The failure mode in which different values of $c$ form separate latent clusters, however,
149
+ 121 can be catastrophic for this application. When this happens, simply switching $c _ { i }$ to $c ^ { \prime }$ is not correct,
150
+ 122 we have to account for the shift between clusters [9]. Mathematically, the latent space clustering
151
+ 123 phenomenon violates the assumption $\mathbf { z }$ ⊥⊥ $c$ that is required by the model in Figure 2. Thus, whilst it
152
+ 124 is not always possible to know when we have found the right causal model [30], we can immediately
153
+ 125 say that a model in which $\mathbf { z }$ and $c$ are dependent is not correct.
154
+ 126 Another key challenge for computational biology is data integration. Suppose our data
155
+ 127 $( \mathbf { x } _ { 1 } , c _ { 1 } ) , \ldots { \overset { } { , } } ( \mathbf { x } _ { n } , c _ { n } )$ in which $c _ { i }$ indicates the experimental batch, exhibits batch effects—these are
156
+ 128 changes in the observation $\mathbf { x } _ { i }$ due to the experimental conditions rather than true changes in the
157
+ 129 underlying biology. One approach to dataset integration is to create a representation $\mathbf { z } = \mathbf { z } ( \mathbf { x } , c )$
158
+ 130 that ‘subtracts’ the batch effects. Downstream tasks can then work with $\mathbf { z }$ in place of $\mathbf { x }$ without
159
+ 131 learning signal based on misleading batch effects. To know when we have successfully subtracted
160
+ 132 batch effects, we might assume that there are no population-level differences between batches. In
161
+ 133 other words, the marginal distribution of $\mathbf { z }$ should be the same for each value of the condition $c$ .
162
+ 134 Thirdly, this same notion of building a representation that cannot be used to recover $c$ has been studied
163
+ 135 widely in recent literature on fairness [31, 18, 32, 33]. In particular, if we wish to make a predictive
164
+ 136 rule based on $\mathbf { x }$ that does not discriminate between individuals in different conditions $c$ , we can use
165
+ 137 a fair representation $\mathbf { z }$ , one which cannot be used to recover $c$ , as an intermediate feature and train
166
+ 138 our model using z. Such a representation clearly needs to contain information from $\mathbf { x }$ , but without
167
+ 139 containing any information that could be used to recover $c$ .
168
+ 140 To connect these three notions of ‘alignment in representation space’ we recall the key components
169
+ 141 of the CVAE—the encoder $q _ { \phi } ( \mathbf { z } | \mathbf { x } , c )$ and decoder $p _ { \theta } ( \mathbf { x } | \mathbf { z } , c )$ —and we now drop the $\theta , \phi$ subscripts
170
+ 142 for conciseness. The marginal distribution of representations within condition $c \in { \mathcal { C } }$ is $q ( \mathbf { z } | c ) =$
171
+ 143 $\mathbb { E } _ { p ( \mathbf { x } | c ) } \left[ q ( \mathbf { z } | \mathbf { x } , c ) \right]$ , and the marginal distribution of over all conditions not equal to $c$ is denoted
172
+
173
+ $$
174
+ q ( \mathbf { z } | \lnot c ) = { \frac { \sum _ { c ^ { \prime } \in { \mathcal { C } } , c ^ { \prime } \neq c } p ( c ^ { \prime } ) q ( \mathbf { z } | c ^ { \prime } ) } { \sum _ { c ^ { \prime } \in { \mathcal { C } } , c ^ { \prime } \neq c } p ( c ^ { \prime } ) } } .
175
+ $$
176
+
177
+ 144 The following Theorem brings together key notions in counterfactual inference, data integration and
178
+ 145 fair representation learning. See Appendix $\mathbf { B }$ for the proof.
179
+ 146 Theorem 1. The following are equivalent: 1) $\mathbf { z }$ ⊥⊥ $c$ under distribution $q , 2 ,$ ) for every $c , c ^ { \prime } \in { \mathcal { C } }$ ,
180
+ 147 $q ( \mathbf { z } | c ) = q ( \mathbf { z } | c ^ { \prime } ) .$ , 3) for every $c \in { \mathcal { C } }$ , $q ( \mathbf { z } | c ) = q ( \mathbf { z } | \lnot c )$ , 4) the mutual information $I ( \mathbf { z } , c ) = 0$ under
181
+ 148 distribution q, 5) $\mathbf { z }$ cannot predict $c$ better than random guessing.
182
+
183
+ # 149 4 Contrastive Mixture of Posteriors
184
+
185
+ 150 We have seen that counterfactual inference, data integration and fair representation learning can be
186
+ 151 understood through the unified concept of learning a representation such that the latent variable $\mathbf { z }$ is
187
+ 152 independent of the condition $c$ under the distribution $q$ , so that the latent clusters with different values
188
+ 153 of $c$ are perfectly aligned. Building off the CVAE, which rarely achieves this in practice, a number of
189
+ 154 authors have attempted to use a penalty term to reduce the dependence of $\mathbf { z }$ upon $c$ during training.
190
+ 155 The most successful methods, such as trVAE [10], are based on a Maximum Mean Discrepancy
191
+ 156 (MMD) [17]. We discuss this and other common methods in Section 5. Whilst trVAE and related
192
+ 157 methods can work well, they require an MMD kernel, not a part of the original model, to be specified
193
+ 158 and its parameters to be carefully tuned. Experimentally, we observe that MMD-based methods
194
+ 159 can often struggle when there is complex global structure in the latent space. We also analyse the
195
+ 160 gradients of MMD penalties, showing that they have several undesirable properties.
196
+ 161 We propose a novel method to ensure the conditions of Theorem 1 do hold in a CVAE model. Our
197
+ 162 penalty is based on posterior distributions obtained from the model encoder itself. That is, we do not
198
+ 163 introduce any external discrepancy measure, rather we propose a penalty term that arises naturally
199
+ 164 from the model itself. Taking our inspiration from contrastive learning [19, 20] and the VaMP prior
200
+ 165 [26], we suggest a novel penalty to enforce equation condition 3) of Theorem 1. This equation
201
+ 166 requires the equality of the marginal distribution $q ( \mathbf { z } | c )$ and $q ( \mathbf { z } | \lnot c )$ for each $c \in { \mathcal { C } }$ . In practice,
202
+ 167 these marginal distributions can be approximated by finite mixtures. To encourage greater overlap
203
+ 168 between $q ( \mathbf { z } | c )$ and $q ( \mathbf { z } | \lnot c )$ , we can encourage points with the condition $c$ to be in areas of high
204
+ 169 density under the representation distribution for other conditions, i.e. areas in which $q ( \mathbf { z } | \lnot c )$ is also
205
+ 170 high. To encourage this, we can add the penalty term $\mathcal { P } _ { 0 } ( \mathbf { z } _ { i } , c _ { i } ) = - \log q ( \mathbf { z } _ { i } | \lnot c _ { i } )$ to the objective
206
+ 171 for the data pair $\left( \mathbf { x } _ { i } , c _ { i } \right)$ . When we minimise $\mathcal { P } _ { 0 }$ , this brings the representations of samples under
207
+ 172 condition $c _ { i }$ towards regions of high density under $q ( \mathbf { z } | \lnot c )$ . Since the density $q ( \mathbf { z } | \lnot c )$ is not known
208
+ 173 in closed form, we approximate $q ( \mathbf { z } | \lnot c )$ using other points in the same training batch as $\left( \mathbf { x } _ { i } , c _ { i } \right)$ .
209
+ 174 Indeed, suppose we have a batch $( \mathbf { x } _ { 1 } , c _ { 1 } ) , . . . , ( \mathbf { x } _ { B } , c _ { B } )$ . We let $I _ { c }$ denote the subset of indices for
210
+ 175 which $c _ { j } = c$ and $I _ { \neg c }$ denote its complement. We use the approximation
211
+
212
+ $$
213
+ \log q ( \mathbf { z } _ { i } | \lnot c _ { i } ) \approx \log \left( \frac { 1 } { | I _ { \lnot c _ { i } } | } \sum _ { j \in I _ { \lnot c _ { i } } } q ( \mathbf { z } _ { i } | \mathbf { x } _ { j } , c _ { j } ) \right)
214
+ $$
215
+
216
+ 176 and we will show in Theorem 2, this approximation in fact leads to a valid stochastic bound.
217
+
218
+ 177 It may happen that the penalty $\mathcal { P } _ { 0 }$ causes points to become too tightly clustered. Indeed, the
219
+ 178 penalty encourages latent variables to gravitate towards high density regions of $q ( \mathbf { z } | \lnot c _ { i } )$ . Inspired
220
+ 179 by contrastive learning, we include a second term which promotes higher entropy of the marginal,
221
+ 180 thereby avoiding tight clusters of points. Combined with $\mathcal { P } _ { 0 }$ , this leads us to a second penalty
222
+ 181 $\mathcal { P } _ { 1 } ( \mathbf { z } _ { i } , c _ { i } ) = \log \bar { q } ( \bar { \mathbf { z } } _ { i } | c _ { i } ) - \log q ( \bar { \mathbf { z } _ { i } } | \neg c _ { i } )$ . Again, the density $q ( \mathbf { z } | c )$ is not known in closed form,
223
+ 182 but we can approximate it using points within the same training batch in a similar fashion to (3).
224
+ 183 Combining both approximations and taking the mean over the batch gives our Contrastive Mixture of
225
+ 184 Posteriors $( C o M P )$ misalignment penalty
226
+
227
+ $$
228
+ \mathrm { C o M P \ p e n a l t y } = \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \left( \frac { 1 } { \left| I _ { c _ { i } } \right| } \sum _ { j \in I _ { c _ { i } } } q ( \mathbf { z } _ { i } | \mathbf { x } _ { j } , c _ { i } ) \right) - \log \left( \frac { 1 } { \left| I _ { - { \boldsymbol { \alpha } } _ { i } } \right| } \sum _ { j \in I _ { - { \boldsymbol { \alpha } } _ { i } } } q ( \mathbf { z } _ { i } | \mathbf { x } _ { j } , c _ { j } ) \right) .
229
+ $$
230
+
231
+ 185 where $\begin{array} { r } { { \bf x } _ { 1 : B } , c _ { 1 : B } , { \bf z } _ { 1 : B } \sim \prod _ { i = 1 } ^ { B } p ( { \bf x } _ { i } , c _ { i } ) q ( { \bf z } _ { i } | { \bf x } _ { i } , c _ { i } ) } \end{array}$ is a random training batch of size $B$ , $I _ { c }$ denotes
232
+ 186 the subset of $\{ 1 , \ldots , B \}$ with condition $c$ and $I _ { \neg c } = \{ 1 , \dots , B \} \setminus I _ { c }$ . Our method therefore utilises
233
+ 187 a training penalty for CVAE-type models that encourages the conditions of Theorem 1 to hold by
234
+ 188 using mixtures of the variational posteriors themselves to approximate $q ( \mathbf { z } | c )$ and $q ( \mathbf { z } | \lnot c )$ . We do
235
+ 189 not introduce an additional kernel or hyperparameter-heavy discrepancy measures.
236
+ 190 As hinted at by the definition of $\mathcal { P } _ { 1 }$ , CoMP can be seen as approximating a symmetrised KL
237
+ 91 divergence between the distributions $q ( \mathbf { z } | c )$ and $q ( \mathbf { z } | \lnot c )$ . In fact, the following theorem shows that
238
+ 92 the CoMP misalignment penalty is a stochastic upper bound on a weighted sum of KL-divergences.
239
+
240
+ 193 Theorem 2. The CoMP misalignment penalty satisfies
241
+
242
+ $$
243
+ \mathbb { E } _ { \prod _ { i = 1 } ^ { B } p ( \mathbf { x } _ { i } , c _ { i } ) q ( \mathbf { z } _ { 1 } | \mathbf { x } _ { i } , c _ { i } ) } \left[ \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \log \left( \frac { 1 } { | I _ { c _ { i } } | } \sum _ { j \in I _ { c _ { i } } } q ( \mathbf { z } _ { i } | \mathbf { x } _ { j } , c _ { i } ) \right) - \log \left( \frac { 1 } { | I _ { - c _ { i } } | } \sum _ { j \in I _ { - c _ { i } } } q ( \mathbf { z } _ { i } | \mathbf { x } _ { j } , c _ { j } ) \right) \right]
244
+ $$
245
+
246
+ 194 and the bound becomes tight as $B \infty$
247
+
248
+ 195 The proof is presented in Appendix B. Our result reveals that our new penalty directly enforces
249
+ 196 condition 3) of Theorem 1 by reducing the KL divergence between each pair $q ( \mathbf { z } | c ) , q ( \mathbf { z } | \lnot c )$ weighted
250
+ 197 by $p ( c )$ . As with standard contrastive learning, our method benefits from larger batch sizes. We
251
+ 198 add the CoMP misalignment penalty to the familiar $\beta$ -VAE objective to give our complete training
252
+ 199 objective for a batch of size $B$ as
253
+
254
+ $$
255
+ \mathcal { L } _ { B } ^ { \mathrm { { C o M P } } } = \frac { 1 } { B } \sum _ { i = 1 } ^ { B } \left[ \log p ( { \mathbf { x } _ { i } | \mathbf { z } _ { i } } , c _ { i } ) + \beta \log \frac { p ( { \mathbf { z } _ { i } } ) } { q ( { \mathbf { z } _ { i } | \mathbf { x } _ { i } } , c _ { i } ) } - \gamma \log \left( \frac { \frac { 1 } { | I _ { c } | } \sum _ { j \in I _ { c } } q ( { \mathbf { z } _ { i } | \mathbf { x } _ { j } } , c _ { i } ) } { \frac { 1 } { | I _ { - \infty } | } \sum _ { j \in I _ { - c } } q ( { \mathbf { z } _ { i } | \mathbf { x } _ { j } } , c _ { j } ) } \right) \right] .
256
+ $$
257
+
258
+ 200 with one new hyperparameter $\gamma$ that controls the strength of the regularisation we apply to enforce 01 the requirements $\mathbf { z } \perp \perp c$ . Theorem 2 shows that, if $\mathcal { L } _ { B } ^ { \beta }$ is the standard $\beta$ -VAE objective, then we are maximising202 $\begin{array} { r } { \mathbb { E } \left[ \mathcal { L } _ { B } ^ { \mathrm { C o M P } } \right] \leq \mathbb { E } \left[ \mathcal { L } _ { B } ^ { \beta } \right] - \gamma \sum _ { c \in \mathcal { C } } p ( c ) \mathrm { K L } \left[ q ( \mathbf { z } | c ) | | q ( \mathbf { z } | \lnot c ) \right] . } \end{array}$
259
+
260
+ # 4.1 Analysing CoMP gradients
261
+
262
+ 204 Before presenting empirical results on the performance of CoMP, we attempt to understand how it
263
+ 205 differs from existing penalties in the literature. Specifically, we compare CoMP with a Gaussian
264
+ 206 posterior family with MMD using a Radial Basis Kernel [34]. In Appendix $\textrm { C }$ , we show that both
265
+ 207 methods can be interpreted as applying a penalty to each element ${ \bf z } _ { i } , c _ { i }$ of the training batch. We
266
+ 208 show further that, under certain conditions, the gradient of the MMD penalty for $\mathbf { z } _ { i } , c _ { i }$ takes the form
267
+
268
+ $$
269
+ \nabla _ { \mathbf z _ { i } } \mathcal { P } _ { \mathrm { M M D } } ( \mathbf z _ { i } , c _ { i } ) = \frac { 2 } { \left| I _ { c _ { i } } \right| ^ { 2 } } \sum _ { j \in I _ { c _ { i } } } e ^ { - \left\| \mathbf z _ { i } - \mathbf z _ { j } \right\| ^ { 2 } } ( \mathbf z _ { j } - \mathbf z _ { i } ) - \frac { 4 } { \left| I _ { - c _ { i } } \right| \left| I _ { c _ { i } } \right| } \sum _ { j \in I _ { - c _ { i } } } e ^ { - \left\| \mathbf z _ { i } - \mathbf z _ { j } \right\| ^ { 2 } } ( \mathbf z _ { j } - \mathbf z _ { i } ) ,
270
+ $$
271
+
272
+ 209 whilst the CoMP penalty gradient takes the form
273
+
274
+ $$
275
+ \nabla _ { \mathbf z _ { i } } \mathcal { P } _ { \mathrm { C o M P } } ( \mathbf z _ { i } , c _ { i } ) = \frac { 2 \sum _ { j \in I _ { c _ { i } } } e ^ { - \| \mathbf z _ { i } - \mu _ { \mathbf z _ { j } } \| ^ { 2 } } ( \mu _ { \mathbf z _ { j } } - \mathbf z _ { i } ) } { B \sum _ { j \in I _ { c _ { i } } } e ^ { - \| \mathbf z _ { i } - \mu _ { \mathbf z _ { j } } \| ^ { 2 } } } - \frac { 2 \sum _ { j \in I _ { - c _ { i } } } e ^ { - \| \mathbf z _ { i } - \mu _ { \mathbf z _ { j } } \| ^ { 2 } } ( \mu _ { \mathbf z _ { j } } - \mathbf z _ { i } ) } { B \sum _ { j \in I _ { - c _ { i } } } e ^ { - \| \mathbf z _ { i } - \mu _ { \mathbf z _ { j } } \| ^ { 2 } } }
276
+ $$
277
+
278
+ 210 where $\mu _ { \mathbf { z } _ { j } }$ is the variational mean for $\mathbf { z } _ { j }$ . One important feature of the MMD gradients is that, if
279
+ 211 $\| \mathbf { z } _ { i } - \mathbf { z } _ { j } \| ^ { 2 }$ is large for all $j \neq i$ , for instance when the point $\mathbf { z } _ { i }$ is part of an isolated cluster, then
280
+ 212 the gradient to update the representation $\mathbf { z } _ { i }$ will be small. So if $\mathbf { z } _ { i }$ is already very isolated from the
281
+ 213 distribution $q ( \mathbf { z } | \lnot c _ { i } )$ , then the gradients bringing it closer to points with condition $\neg c _ { i }$ will be small.
282
+ 214 In comparison to the MMD gradient, it can be seen that gradients for CoMP are self-normalised. This
283
+ 215 means that the gradient through $\mathbf { z } _ { i }$ will be large, even when $\mathbf { z } _ { i }$ is very far away from any points with
284
+ 216 condition $\lnot c _ { i }$ . This, in turn, suggests that that CoMP is likely to be preferable to MMD when we have
285
+ 217 a number of isolated clusters or interesting global structure in latent space, something which often
286
+ 218 occurs with biological data. The CoMP approach also bears a relationship with nearest-neighbour
287
+ 219 approaches [35]. Indeed, for a Gaussian posterior as $\sigma \to 0$ , the $\neg c _ { i }$ term of the gradient places all
288
+ 220 its weight on the nearest element of the batch under condition $\lnot c _ { i }$ .
289
+
290
+ # 21 5 Related Work
291
+
292
+ The problem of batch correction in data integration has been addressed using linear [12, 13] and nonlinear methods [14, 15] that perform transformations of the original feature space. In both cases, the goal is to transform the feature space so that information related to the scientific question of interest is retained while dependence on the batch (or nuisance covariate) is reduced. Methods based on representation learning learn a low-dimensional representation, $\mathbf { z } = q ( \mathbf { x } )$ , which is independent of nuisance factors while also being a faithful representation of the original data [18, 5, 36, 10, 37]. Of these, the work that is most similar to ours are the VFAE [18], in which the authors introduce an MMD [17] penalty to encourage the marginal distributions of $\mathbf { z }$ under different values of $c$ to be close, and the trVAE [10], where the MMD penalty is applied to the output of the first layer of the decoder, rather than to $\mathbf { z }$ directly. Representation learning algorithms for counterfactual inference have been shown to benefit from a penalty enforcing distributional similarity between the representations of the treated and untreated samples [12]. Elsewhere, authors have applied the variational autoencoder to inference on causal graphs [38, 39, 40].
293
+
294
+ # 6 Experiments
295
+
296
+ We perform experiments on three datasets; 1) Tumour / Cell Line: bulk expression profiles of tumours and cancer cell-lines across 39 different cancer types; 2) Single-cell PBMCs: single-cell gene expression (scRNA-seq) profiles of interferon (IFN)- $\beta$ stimulated and untreated peripheral blood mononuclear cells (PBMCs) [41]; 3) UCI Adult Income: personal information relating to education, marriage status, ethnicity, self-reported gender of census participants and a binary high / low income label $\$ 50,000$ threshold) [22]. All experiments used a 90/10 training/validation split.
297
+
298
+ 242 The two broad objectives across our experiments are 1) to demonstrate the extent to which the two
299
+ 243 random variables $\mathbf { z } _ { i }$ and $c _ { i }$ are independent, and 2) to quantify useful information retained in $\mathbf { z } _ { i }$ . To
300
+ 244 benchmark CoMP on the first objective, we use the following pair of $k$ nearest-neighbor metrics:
301
+ 245 $\mathrm { k B E T } _ { k , \alpha }$ [42], the metric used to evaluate batch correction methods in biology, and a local Silhouette
302
+ 246 Coefficient [43] $s _ { k , c }$ . In both cases a low value close to zero would indicate good local mixing of
303
+ 247 sample representations. As for the second objective, if we assume the existence of an additional
304
+ 248 discrete label $d _ { i }$ that represents information one wishes to preserve – in the Tumour / Cell Line
305
+ 249 case, $d _ { i }$ is the cancer type, while for the PBMC experiment, it refers to cell type – then we calculate
306
+ 250 kBET and $s$ separately for every fixed- $\cdot d _ { i }$ subpopulation and take the mean. We refer to these as the
307
+ 251 mean Silhouette Coefficient $\tilde { s } _ { k , c }$ and the mean kBET metric m-kBET respectively. Full details of the
308
+ 252 datasets and metrics are given in Appendix D.
309
+
310
+ Table 1: Tumour / Cell Line experiment results, with $k = 1 0 0$ , $c = \mathrm { C e l l }$ Line, and $\alpha = 0 . 0 1$ . $s _ { k , c }$ and $\tilde { s } _ { k , c }$ are the two Silhouette Coefficient variants (see Section 6). The top scores are in bold.
311
+
312
+ <table><tr><td></td><td>Accuracy</td><td>Sk,c</td><td>kBETk,α</td><td>SkC</td><td>m-kBETk,α</td></tr><tr><td>VAE</td><td>0.209</td><td>0.658</td><td>0.974</td><td>0.803</td><td>0.581</td></tr><tr><td>CVAE</td><td>0.328</td><td>0.554</td><td>0.931</td><td>0.684</td><td>0.571</td></tr><tr><td>VFAE</td><td>0.585</td><td>0.168</td><td>0.258</td><td>0.198</td><td>0.188</td></tr><tr><td>trVAE</td><td>0.585</td><td>0.096</td><td>0.163</td><td>0.138</td><td>0.123</td></tr><tr><td>Celligner</td><td>0.578</td><td>0.082</td><td>0.525</td><td>0.568</td><td>0.226</td></tr><tr><td>CoMP (ours)</td><td>0.579</td><td>0.023</td><td>0.160</td><td>0.094</td><td>0.101</td></tr></table>
313
+
314
+ ![](images/dc4b70da9bf34e957efb443e8e1af70f1eff4b08f7bb48c2c3918ec057b87b99.jpg)
315
+ Figure 3: 2D UMAP projection of posterior means of $\mathbf { z } _ { i }$ from Tumour / Cell Line data. Tumours (blue) and cell lines (orange).
316
+
317
+ # 253 6.1 Alignment of tumour and cell-line samples
318
+
319
+ Despite their widespread use in pre-clinical cancer studies, cancer cell-lines are known to have significantly different gene expression profiles compared to their corresponding tumour samples. Here we evaluate the ability of CoMP to factorise out the tumour / cell line condition from its latent representations. This can be seen as both a dataset integration and batch effect correction task. In addition to the set of $k$ nearest neighbor-based mixing evaluations, we train a Random Forest model on the representations of the tumour samples and their cancer-type labels and assess the prediction accuracy on held-out cell lines. To match the results from [21], the evaluations are performed on the 2D UMAP projections, The results are presented in Table 1.
320
+
321
+ 262 As expected, both the VAE and CVAE baselines fail at the mixing task; the three explicitly penalised
322
+ 263 VAE models and, to a lesser extent, the Cellinger method have good mixing performances, with
323
+ 264 CoMP outperforming the benchmark models by a significant margin on the silhouette coefficient
324
+ 265 and kBET metric, while successfully maintaining a high accuracy in the cancer-type prediction
325
+ 266 task. We also see from Figure 3 that CoMP representations have the fewest instances of isolated
326
+ 267 tumour-only clusters. Finally, from our evaluation on the s˜ and m-kBET metrics, we can deduce that
327
+ 268 the occurrence of cell lines of one cancer type erroneously clustering around tumours of a different
328
+ 269 type is less frequent for CoMP compared to the other models. In Appendix D we qualitatively validate
329
+ 270 this for several example clusters.
330
+
331
+ # 271 6.2 Interventions
332
+
333
+ 272 Obtaining molecular measurements from biological tissues typically requires destructive sampling.
334
+ 273 For example, to obtain scRNA-seq data, each cell is lysed so that the RNA molecules contained
335
+ 274 within it can be extracted and sequenced. This process destroys each cell, meaning that we are
336
+ 275 unable to study the gene expression profile of the same cell over time or under multiple experimental
337
+ 276 conditions. As we discussed in Section 2.2, counterfactual inference can be used to predict how the
338
+ 277 molecular status of a destroyed biological sample would have differed if it were measured under
339
+ 278 different experimental conditions, such as applications of different drugs.
340
+ 279 To assess CoMP’s utility in counterfactual inference, we trained it on scRNA-seq data from PBMCs
341
+ 280 that were either stimulated with IFN- $\beta$ or left untreated (control) [41]. It is clear from Figure 4 that
342
+ 281 IFN- $\beta$ stimulation causes clear shifts in the latent space between stimulated and control cells from the
343
+ 282 same cell type. Noticeably, the CD14 and CD16 monocyte and dendritic cell (DC) populations see
344
+ 283 greater shifts in their gene expression after stimulation. CVAE fails to align these particular cell types
345
+ 284 in the latent space, while trVAE, VFAE and CoMP perform better. However, stimulated and control
346
+
347
+ ![](images/ff21b1fc101b5af6efc2466078bffa9ed6bf9da95bc9f379690155738e1b2615.jpg)
348
+ Figure 4: 2D UMAP projections of posterior means of $\mathbf { z } _ { i }$ derived from stimulated and control PBMC scRNA-seq data. Top row: colours indicate immune cell types, bottom row: colours indicate condition (IFN- $\boldsymbol { \cdot } \beta$ stimulation or control).
349
+
350
+ ![](images/2f0fd834e0c272052e0dd93f5d85ad9437039cd7287a792972a66c27667d413f.jpg)
351
+ Figure 5: The difference in gene expression values for the top 50 differentially expressed genes (up-regulated: red, down-regulated: blue) between IFN- $\beta$ stimulated cells and counterfactually stimulated control cells for CD14 monocytes, dendritic cells (DC) and natural killer (NK) cells. See Appendix D for further details.
352
+
353
+ cells are better mixed in the latent space derived from CoMP than those from the other models (see metrics presented in Appendix D).
354
+
355
+ Next we perform a counterfactual prediction task under a $\mathrm { I F N } { - \beta }$ control-to-stimulation variable swap, i.e. the gene expression profiles for control cells were reconstructed through the decoder with the condition, $c \to$ stimulated. This means we utilise equation (1) with our encoder $q _ { \phi } ( \mathbf { z } | \mathbf { x } , c )$ and decoder $p _ { \theta } ( \mathbf { x } | \mathbf { z } , c ^ { \prime } )$ in place of $p ( \mathbf { z } | \mathbf { x } , c )$ and $p ( \mathbf { x } | \mathbf { z } , c ^ { \prime } )$ . The degree to which the models respect the requirement $\mathbf { z }$ ⊥⊥ $c$ will influence the quality of predictions. Figure 5 shows how the profiles of (actual) stimulated cells differ from the counterfactual predictions for a selection of cell types (see Appendix $\mathrm { D }$ for the complete set of results). We see that baseline models tend to systematically underestimate the expression of genes up-regulated by stimulation and overestimate those downregulated. CoMP outperforms all other models by accurately predicting the expression alterations brought about by stimulation.
356
+
357
+ # 6.3 Fair Classification
358
+
359
+ The goal for this fair classification task is to learn a representation on the Adult Income dataset that is not predictive of an individual’s gender whilst still being predictive of their income. We compute a baseline by predicting gender and income labels directly from the input data and compare our method to the published results for the VFAE [18] and the trVAE. We also include results for a standard VAE and CVAE. Unlike in [18], where the representations $\mathbf { z }$ are sampled from the posterior before classification, our experiments used the posterior means to avoid the noise from sampling acting to mask the inclusion of predictive information about gender in the encodings.
360
+
361
+ 305 CoMP achieves a gender accuracy that is close to random $( 6 7 . 5 \% )$ , tying with the VFAE results from
362
+ 306 [18] whilst also remaining competitive with the other methods on income accuracy (Table 2). CoMP
363
+ 307 also outperforms all methods on the nearest neighbour and silhouette metrics (Table 2). Latent space
364
+ 308 mixing between males and females can be seen qualitatively in the 2D UMAP projection (Figure 6).
365
+
366
+ Table 2: UCI Adult Income experiment results with $k = 1 0 0 0$ , $c = \mathrm { M a l e }$ for $s _ { k , c }$ , and $k = 1 0 0$ , $\alpha = 0 . 0 1$ for $\mathrm { k B E T } _ { k , \alpha }$ . A lower gender prediction accuracy is better; 0.675 is the lowest achievable.
367
+
368
+ <table><tr><td colspan="2">Gender Acc.</td><td>Income Acc.</td><td>Sk,C</td><td>kBETk,α</td></tr><tr><td>Original data</td><td>0.796</td><td>0.849</td><td>0.067</td><td>0.786</td></tr><tr><td>VAE</td><td>0.764</td><td>0.812</td><td>0.054</td><td>0.748</td></tr><tr><td>CVAE</td><td>0.778</td><td>0.819</td><td>0.054</td><td>0.724</td></tr><tr><td>VFAE (sampled) [18]</td><td>0.680</td><td>0.815</td><td>=</td><td>1</td></tr><tr><td>VFAE (mean)</td><td>0.789</td><td>0.805</td><td>0.046</td><td>0.571</td></tr><tr><td>trVAE</td><td>0.698</td><td>0.808</td><td>0.066</td><td>0.731</td></tr><tr><td>CoMP (ours)</td><td>0.679</td><td>0.805</td><td>0.011</td><td>0.451</td></tr></table>
369
+
370
+ ![](images/d8771a7a2a392b671ce6555ac317f0ac1d424cac72ebb0f8219fe6a58c3e31d0.jpg)
371
+ Figure 6: UMAP projections for the UCI Adult Income dataset, coloured by gender. Showing the original data and latents for trVAE, VFAE and CoMP. Male (blue) and female (yellow).
372
+
373
+ # 309 7 Conclusion
374
+
375
+ 310 Limitations We presented Contrastive Mixture of Posteriors (CoMP) as an effective means to
376
+ 311 perform batch correction, data integration, counterfactual inference and fair representation learning
377
+ 312 in a CVAE framework. Whilst CoMP covers the majority of common use-cases for these tasks, there
378
+ 313 are several limitations that are avenues of future research. For example, in scRNA-seq analysis, there
379
+ 314 is often the need to integrate more than two datasets together, or to adjust for continuous condition
380
+ 315 variables. Mathematically, CoMP is applicable to any number of discrete conditions, and it would be
381
+ 316 interesting to apply it to a setting with $> 2$ conditions. Extensions of CoMP could tackle the case
382
+ 317 of a continuous condition variable. Additionally, CoMP requires the condition variable $c$ to be fully
383
+ 318 observed: future work might attempt to generalise to the partially observed case.
384
+ 319 Summary We identified marginal independence between the representation z and condition $c$ as
385
+ 320 the mathematical thread linking data integration, counterfactual inference and fairness. We proposed
386
+ 321 CoMP, a novel method to enforce this independence requirement in practice. We saw that CoMP
387
+ 322 has several attractive theoretic properties. First, CoMP only uses the variational posteriors, requiring
388
+ 323 no additional discrepancy measures such as MMD. Second, we proved that the CoMP penalty can
389
+ 324 be interpreted as an upper-bound on a weighted sum of KL divergences, connecting it to a well
390
+ 325 founded divergence measure. Third, we demonstrated that, unlike MMD, CoMP gradients have a
391
+ 326 self-normalising property, allowing one to obtain strong gradients for distant points in a latent space
392
+ 327 with complex global structure. Empirically, we demonstrated CoMP’s performance when applied to
393
+ 328 two biological and one fair representation learning dataset. These biological datasets are of critical
394
+ 329 importance in drug discovery, for example matching cell-lines to tumours for effective pre-clinical
395
+ 330 assay development of anti-cancer compounds. Overall, CoMP has the best in class performance on
396
+ 331 all tasks across a range of metrics that measure either latent space mixing or fairness.
397
+
398
+ # References
399
+
400
+ [1] Valentine Svensson, Roser Vento-Tormo, and Sarah A Teichmann. Exponential scaling of single-cell rna-seq in the past decade. Nature protocols, 13(4):599–604, 2018.
401
+ [2] Aviv Regev, Sarah A Teichmann, Eric S Lander, Ido Amit, Christophe Benoist, Ewan Birney, Bernd Bodenmiller, Peter Campbell, Piero Carninci, Menna Clatworthy, et al. Science forum: the human cell atlas. Elife, 6:e27041, 2017.
402
+ [3] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
403
+ [4] Danilo Jimenez Rezende, S. Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014.
404
+ [5] Romain Lopez, Jeffrey Regier, Michael B Cole, Michael I Jordan, and Nir Yosef. Deep generative modeling for single-cell transcriptomics. Nature methods, 15(12):1053–1058, 2018.
405
+ [6] Gregory P Way and Casey S Greene. Extracting a biologically relevant latent space from cancer transcriptomes with variational autoencoders. In PACIFIC SYMPOSIUM ON BIOCOMPUTING 2018: Proceedings of the Pacific Symposium, pages 80–91. World Scientific, 2018.
406
+ [7] Dongfang Wang and Jin Gu. Vasc: dimension reduction and visualization of single-cell rna-seq data by deep variational autoencoder. Genomics, proteomics & bioinformatics, 16(5):320–331, 2018.
407
+ [8] Christopher Heje Grønbech, Maximillian Fornitz Vording, Pascal N Timshel, Casper Kaae Sønderby, Tune H Pers, and Ole Winther. scvae: Variational auto-encoders for single-cell gene expression data. Bioinformatics, 36(16):4415–4422, 2020.
408
+ [9] Mohammad Lotfollahi, F Alexander Wolf, and Fabian J Theis. scGen predicts single-cell perturbation responses. Nature methods, 16(8):715, 2019.
409
+ [10] Mohammad Lotfollahi, Mohsen Naghipourfar, Fabian J Theis, and F Alexander Wolf. Conditional out-of-sample generation for unpaired data using trVAE. arXiv preprint arXiv:1910.01791, 2019.
410
+ [11] Matthew Amodio, D. V. Dijk, R. Montgomery, Guy Wolf, and Smita Krishnaswamy. Out-of-sample extrapolation with neuron editing. arXiv: Quantitative Methods, 2018.
411
+ [12] W. Johnson, Cheng Li, and Ariel Rabinovic. Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics, 8 1:118–27, 2007.
412
+ [13] J. Leek and John D. Storey. Capturing heterogeneity in gene expression studies by surrogate variable analysis. PLoS Genetics, 3, 2007.
413
+ [14] Laleh Haghverdi, A. Lun, Michael D. Morgan, and J. Marioni. Batch effects in single-cell rna-sequencing data are corrected by matching mutual nearest neighbors. Nature Biotechnology, 36:421–427, 2018.
414
+ [15] Allison Warren, Andrew Jones, Tsukasa Shibue, William C Hahn, Jesse S Boehm, Francisca Vazquez, Aviad Tsherniak, and James M McFarland. Global computational alignment of tumor and cell line transcriptional profiles. Nature Communications, 12(22), 2021.
415
+ [16] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pages 3483–3491, 2015.
416
+ [17] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(1):723–773, 2012.
417
+ [18] Christos Louizos, Kevin Swersky, Yujia Li, Max Welling, and Richard Zemel. The variational fair autoencoder. arXiv preprint arXiv:1511.00830, 2015.
418
+ [19] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
419
+ [20] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020.
420
+ [21] Allison Warren, Yejia Chen, Andrew Jones, Tsukasa Shibue, William C Hahn, Jesse S Boehm, Francisca Vazquez, Aviad Tsherniak, and James M McFarland. Global computational alignment of tumor and cell line transcriptional profiles. Nature Communications, 12(1):1–12, 2021.
421
+ [22] Dheeru Dua and Casey Graff. UCI machine learning repository, 2017.
422
+ [23] Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951.
423
+ [24] 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. International Conference on Learning Representations, 2017.
424
+ [25] Emile Mathieu, Tom Rainforth, N. Siddharth, and Yee Whye Teh. Disentangling disentanglement in variational autoencoders. In In International Conference on Machine Learning, pages 4402–4412. PMLR, 2019.
425
+ [26] Jakub Tomczak and Max Welling. Vae with a vampprior. In International Conference on Artificial Intelligence and Statistics, pages 1214–1223. PMLR, 2018.
426
+ [27] Judea Pearl. Causality. Cambridge university press, 2009.
427
+ [28] Kenneth A. Bollen. Structural equation models. Wiley, 2005.
428
+ [29] Fredrik Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In International conference on machine learning, pages 3020–3029, 2016.
429
+ [30] Jonas Peters, Joris Mooij, Dominik Janzing, and Bernhard Schölkopf. Identifiability of causal graphs using functional models. arXiv preprint arXiv:1202.3757, 2012.
430
+ [31] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. Learning fair representations. In International conference on machine learning, pages 325–333. PMLR, 2013.
431
+ [32] Matt J. Kusner, Joshua R. Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. arXiv preprint arXiv:1703.06856, 2017.
432
+ [33] Craig A Glastonbury, Michael Ferlaino, Christoffer Nellåker, and Cecilia M Lindgren. Adjusting for confounding in unsupervised latent representations of images. arXiv preprint arXiv:1811.06498, 2018.
433
+ [34] Jean-Philippe Vert, Koji Tsuda, and Bernhard Schölkopf. A primer on kernel methods. Kernel methods in computational biology, 47:35–70, 2004.
434
+ [35] Ke Li and Jitendra Malik. Implicit maximum likelihood estimation. arXiv preprint arXiv:1809.09087, 2018.
435
+ [36] Romain Lopez, Jeffrey Regier, Michael I Jordan, and Nir Yosef. Information constraints on auto-encoding variational bayes. In Advances in Neural Information Processing Systems, pages 6114–6125, 2018.
436
+ [37] Kaspar Märtens and Christopher Yau. Neural decomposition: Functional anova with variational autoencoders. In International Conference on Artificial Intelligence and Statistics, pages 2917–2927. PMLR, 2020.
437
+ [38] Christos Louizos, Uri Shalit, Joris M Mooij, David Sontag, Richard Zemel, and Max Welling. Causal effect inference with deep latent-variable models. In Advances in Neural Information Processing Systems, pages 6446–6456, 2017.
438
+ [39] H. Kim, Seungjae Shin, Joonho Jang, Kyungwoo Song, Weonyoung Joo, Wanmo Kang, and Il-Chul Moon. Counterfactual fairness with disentangled causal effect variational autoencoder. In AAAI, 2021.
439
+ [40] Stephen R. Pfohl, Tony Duan, Daisy Yi Ding, and Nigam H. Shah. Counterfactual reasoning for fair clinical risk prediction. In Finale Doshi-Velez, Jim Fackler, Ken Jung, David Kale, Rajesh Ranganath, Byron Wallace, and Jenna Wiens, editors, Proceedings of the 4th Machine Learning for Healthcare Conference, volume 106 of Proceedings of Machine Learning Research, pages 325–358, Ann Arbor, Michigan, 09–10 Aug 2019. PMLR.
440
+ [41] Hyun Min Kang, Meena Subramaniam, Sasha Targ, Michelle Nguyen, Lenka Maliskova, Elizabeth McCarthy, Eunice Wan, Simon Wong, Lauren Byrnes, Cristina M Lanata, et al. Multiplexed droplet single-cell rna-sequencing using natural genetic variation. Nature biotechnology, 36(1):89, 2018.
441
+ [42] Maren Büttner, Zhichao Miao, F Alexander Wolf, Sarah A Teichmann, and Fabian J Theis. A test metric for assessing single-cell rna-seq batch correction. Nature methods, 16(1):43–49, 2019.
442
+ [43] Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987.
443
+ [44] Christian P. Robert and Judith Rousseau. How Principled and Practical Are Penalised Complexity Priors? Statistical Science, 32(1):36–40, February 2017.
444
+ [45] Murray Aitkin. Posterior Bayes Factors. Journal of the Royal Statistical Society. Series B (Methodological), 53(1):111–142, 1991.
445
+ [46] Paul Fearnhead and Dennis Prangle. Constructing summary statistics for approximate Bayesian computation: semi-automatic approximate Bayesian computation. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(3):419–474, 2012.
446
+ [47] Adam Foster, Martin Jankowiak, Matthew O’Meara, Yee Whye Teh, and Tom Rainforth. A unified stochastic gradient approach to designing bayesian-optimal experiments. In International Conference on Artificial Intelligence and Statistics, pages 2959–2969. PMLR, 2020.
447
+ [48] J. Weinstein, E. Collisson, G. Mills, K. Shaw, B. Ozenberger, Kyle Ellrott, I. Shmulevich, C. Sander, and Joshua M. Stuart. The Cancer Genome Atlas Pan-Cancer analysis project. Nature Genetics, 45:1113–1120, 2013.
448
+ 443 [49] DS Gerhard, S Hunger, C Lau, J Maris, P Meltzer, S Meshinchi, E Perlman, J Zhang, J Guidry-Auvil, and
449
+ 444 M Smith. Therapeutically applicable research to generate effective treatments (target) project: Half of
450
+ 445 pediatric cancers have their own" driver" genes. In PEDIATRIC BLOOD & CANCER, volume 65, pages
451
+ 446 S45–S45. WILEY 111 RIVER ST, HOBOKEN 07030-5774, NJ USA, 2018.
452
+ 447 [50] M. Ghandi, F. Huang, J. Jané-Valbuena, G. Kryukov, Christopher Lo, E. McDonald, J. Barretina, E. Gelfand,
453
+ 448 C. Bielski, Haoxin Li, Kevin Hu, Alexander Y. Andreev-Drakhlin, J. Kim, J. Hess, B. Haas, F. Aguet,
454
+ 449 B. Weir, M. Rothberg, B. Paolella, M. Lawrence, Rehan Akbani, Y. Lu, Hong L. Tiv, P. Gokhale, Antoine
455
+ 450 de Weck, Ali Amin Mansour, C. Oh, J. Shih, Kevin Hadi, Yanay Rosen, J. Bistline, K. Venkatesan,
456
+ 451 Anupama Reddy, Dmitriy Sonkin, Manway Liu, J. Lehár, J. Korn, D. Porter, M. Jones, J. Golji, G. Caponigro, Jordan E. Taylor, C. Dunning, Amanda L Creech, Allison Warren, James M. McFarland, Mahdi Zamanighomi, A. Kauffmann, Nicolas Stransky, M. Imielinski, Y. Maruvka, A. Cherniack, Aviad Tsher- ´ niak, F. Vazquez, J. Jaffe, A. A. Lane, D. Weinstock, C. Johannessen, Michael P. Morrissey, F. Stegmeier, R. Schlegel, W. Hahn, G. Getz, G. Mills, J. Boehm, T. Golub, L. Garraway, and W. Sellers. Next-generation characterization of the Cancer Cell Line Encyclopedia. Nature, 569:503–508, 2019.
457
+
458
+ # Checklist
459
+
460
+ 1. For all authors...
461
+
462
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
463
+ (b) Did you describe the limitations of your work? [Yes] See Section 7
464
+ (c) Did you discuss any potential negative societal impacts of your work? [N/A]
465
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
466
+
467
+ 2. If you are including theoretical results...
468
+
469
+ (a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix
470
+
471
+ 3. If you ran experiments...
472
+
473
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See Appendix D
474
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix D
475
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Appendix D
476
+ (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix D
477
+
478
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
479
+
480
+ (a) If your work uses existing assets, did you cite the creators? [Yes]
481
+ (b) Did you mention the license of the assets? [Yes]
482
+ (c) Did you include any new assets either in the supplemental material or as a URL? [Yes] See Appendix D
483
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
484
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
485
+
486
+ 5. If you used crowdsourcing or conducted research with human subjects...
487
+
488
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
489
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
490
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
parse/train/AjZCiKuWQ9n/AjZCiKuWQ9n_content_list.json ADDED
@@ -0,0 +1,1125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Contrastive Mixture of Posteriors for Counterfactual Inference, Data Integration and Fairness ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 179,
8
+ 122,
9
+ 818,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
17
+ "bbox": [
18
+ 423,
19
+ 226,
20
+ 578,
21
+ 281
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 318,
32
+ 535,
33
+ 334
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "1 Learning meaningful representations of data that can address challenges such as \n2 batch effect correction, data integration and counterfactual inference is a central \n3 problem in many domains including computational biology. Adopting a Condi \n4 tional VAE framework, we identify the mathematical principle that unites these \n5 challenges: learning a representation that is marginally independent of a condition \n6 variable. We therefore propose the Contrastive Mixture of Posteriors (CoMP) \n7 method that uses a novel misalignment penalty to enforce this independence. This \n8 penalty is defined in terms of mixtures of the variational posteriors themselves, \n9 unlike prior work which uses external discrepancy measures such as MMD to \n10 ensure independence in latent space. We show that CoMP has attractive theoretical \n11 properties compared to previous approaches, especially when there is complex \n12 global structure in latent space. We further demonstrate state of the art performance \n13 on a number of real-world problems, including the challenging tasks of aligning \n14 human tumour samples with cancer cell-lines and performing counterfactual in \n15 ference on single-cell RNA sequencing data. Incidentally, we find parallels with \n16 the fair representation learning literature, and demonstrate CoMP has competitive \n17 performance in learning fair yet expressive latent representations. ",
40
+ "bbox": [
41
+ 148,
42
+ 349,
43
+ 766,
44
+ 585
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "18 1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 148,
54
+ 612,
55
+ 312,
56
+ 630
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "19 Large scale datasets describing the molecular properties of cells, tissues and organs in a state of health \n20 and disease are commonplace in computational biology. Referred to collectively as ‘omics data, \n21 thousands of features are measured per sample and, as single-cell methodologies have developed, it \n22 is now typical to measure such features across $\\mathrm { 1 0 ^ { 5 } – 1 0 ^ { 6 } }$ samples [1, 2]. Given these two properties of \n23 ‘omics data, the need for scalable algorithms to learn meaningful low-dimensional representations \n24 that capture the variability of the data has grown. As such, Variational Autoencoders (VAEs) [3, 4] \n25 have become an important tool for solving a range of modelling problems in the biological sciences \n26 [5, 6, 7, 8, 9, 10]. One such problem is utilising representations for counterfactual inference, \n27 e.g. predicting how a certain cell or cell-type, observed only in the control, would have behaved when \n28 exposed to a drug [9, 10, 11]. Another key problem is removing batch effects—spurious shifts in \n29 observations due to differing experimental conditions—from data in order to integrate or compare \n30 multiple datasets [5, 12, 13, 14, 15]. \n31 We present a formal account of these challenges and show that, to a great extent, they can be seen \n32 as different aspects of a the same underlying problem, namely, that of learning a representation \n33 that is marginally independent of a condition variable (e.g. experimental batch, stimulated vs. \n34 control). Figure 1 [CoMP] illustrates what this looks like in practice: the complete overlap of the cell \n35 populations from different conditions in the latent space. This directly addresses batch correction, and \n36 in the case where we also have a generative model that maps from latent space back to the original \n37 data space, methods that solve this problem can also be applied to counterfactual inference [10]. \n38 This same mathematical requirement for independence also occurs in the fair representation learning \n39 literature, in which we seek a representation that removes a sensitive attribute, e.g. gender. \n40 Neither the VAE nor the conditional VAE (CVAE) [16] are typically successful at learning repre \n41 sentations that achieve this desired independence, as shown in Figure 1. Despite the CVAE being \n42 theoretically able to remove batch effects, there is no constraint that prevents it from from separating \n43 different conditions in latent space. Existing methods use a penalty to encourage the CVAE to learn \n44 representations that overlap correctly in latent space, with Maximum Mean Discrepancy (MMD) [17] \n45 being the most common penalty, applied in the VFAE [18] and the more recent trVAE [10]. These \n46 methods, however, suffer from a number of drawbacks: conceptually, they introduce an extraneous \n47 discrepancy measure that is not a part of the variational inference framework; practically, they re \n48 quire the choice of, and hyperparameter tuning for, an MMD kernel; empirically, whilst trVAE is a \n49 significant improvement over an unconstrained CVAE, Figure 1 [trVAE] shows that it can still fail to \n50 exactly align different conditions in latent space. \n51 To overcome these difficulties, we introduce Contrastive Mixture of Posteriors (CoMP), a new \n52 method for learning aligned representations in a CVAE framework. Our method features the novel \n53 CoMP misalignment penalty that forces the CVAE to remove batch effects. Inspired by contrastive \n54 learning [19, 20], the penalty encourages representations from different conditions to be close, whilst \n55 representations from the same condition should be spread out. To achieve this, we approximate the \n56 requisite marginal distributions using mixtures of the variational posteriors themselves, leading to a \n57 penalty that does not require an extraneous discrepancy measure or a separately tuned kernel. We \n58 prove that the CoMP penalty is a stochastic upper bound on a weighted sum of KL divergences, so \n59 minimising the penalty minimises a well-established statistical divergence measure. We analyse the \n60 training gradients of the CoMP and MMD penalties, finding key differences that help explain why \n61 CoMP gradients are generally more stable and better suited to datasets with complex global structure. \n62 As shown in Figure 1 [CoMP], our method can achieve visually perfect alignment on a number of \n63 real-world biological datasets. We apply CoMP to two challenging biological problems: 1) aligning \n64 gene expression profiles between tumours and their corresponding cell-lines, as tackled in [21] and \n65 2) estimating the gene expression profile of an unperturbed cell as if it had been treated with a \n66 chemical perturbation (counterfactual inference) [9]. We show that CoMP outperforms existing \n67 methods, achieving state-of-the-art performance on both tasks. Finally, given the connections to fair \n68 representation learning, we apply CoMP to the problem of learning a representation that is independent \n69 of gender in the UCI Adult Income dataset [22], showing that we can learn a representation that is \n70 fully independent of the protected attribute whilst maintaining useful information for other prediction \n71 tasks. CoMP represents a conceptually simple and empirically powerful method for learning aligned \n72 representation, opening the door to answering high-value questions in biology and beyond. ",
63
+ "bbox": [
64
+ 145,
65
+ 645,
66
+ 825,
67
+ 810
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "",
74
+ "bbox": [
75
+ 147,
76
+ 816,
77
+ 825,
78
+ 900
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "image",
84
+ "img_path": "images/0ff0cbebc367ff9e9f1806c6197f7bbb9853055deac0ce9ad0805db4ba514463.jpg",
85
+ "image_caption": [
86
+ "Figure 1: Latent representations of a single-cell gene expression dataset under two conditions (see Section 6.2). From fully disjointed (VAE) to a well-mixed pair of distributions (CoMP). "
87
+ ],
88
+ "image_footnote": [],
89
+ "bbox": [
90
+ 184,
91
+ 89,
92
+ 812,
93
+ 205
94
+ ],
95
+ "page_idx": 1
96
+ },
97
+ {
98
+ "type": "text",
99
+ "text": "",
100
+ "bbox": [
101
+ 148,
102
+ 273,
103
+ 826,
104
+ 315
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 145,
113
+ 321,
114
+ 825,
115
+ 474
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 145,
124
+ 481,
125
+ 825,
126
+ 633
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "",
133
+ "bbox": [
134
+ 147,
135
+ 638,
136
+ 825,
137
+ 791
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 Background ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 161,
147
+ 813,
148
+ 308,
149
+ 829
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "74 2.1 Variational Autoencoders and extensions ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 150,
159
+ 843,
160
+ 496,
161
+ 858
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "75 We begin by assuming that we have $n$ observations $\\mathbf { x } _ { 1 } , \\ldots , \\mathbf { x } _ { n }$ of an underlying data distribution. \n76 Variational autoencoders (VAEs) [3, 4] explain the high-dimensional observations $\\mathbf { x } _ { i }$ using low \n77 dimensional representations $\\mathbf { z } _ { i }$ . The standard VAE places a standard normal prior $\\mathbf { z } \\sim p ( \\mathbf { z } )$ on \n78 the latent variable, and learns a generative model $p _ { \\boldsymbol { \\theta } } ( \\mathbf { x } | \\mathbf { z } )$ that reconstructs $\\mathbf { x }$ using $\\mathbf { z }$ , alongside \n79 an inference network $q _ { \\phi } ( { \\bf z } | { \\bf x } )$ that encodes $\\mathbf { x }$ to $\\mathbf { z }$ . Both $\\theta$ and $\\phi$ are trained jointly by maximising \n80 the ELBO, a lower bound on marginal likelihood given by $\\log p _ { \\boldsymbol \\theta } ( \\mathbf { x } ) \\geq \\bar { \\mathbb { E } } _ { q _ { \\boldsymbol \\phi } ( \\mathbf { z } | \\mathbf { x } ) } \\left[ \\log p _ { \\boldsymbol \\theta } ( \\mathbf { x } | \\mathbf { z } ) \\right] \\bar { - }$ \n81 $\\mathrm { K L } \\left[ q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p ( \\mathbf { z } ) \\right]$ . This can be maximised using stochastic optimisers [23, 3]. Various extensions \n82 of the VAE have been proposed, such as the $\\beta$ -VAE [24], which scales the KL term of the ELBO \n83 by a hyperparameter $\\beta$ . Because the isotropic normal prior may limit the expressivity of the model \n84 [25], various authors have considered alternative priors. For example, [26] proposed the Variational \n85 Mixture of Posteriors (VaMP) prior, that replaces the isotropic Gaussian with a mixture of posteriors \n86 from the encoder network itself, evaluated at a number of learned pseudo-inputs. \n87 So far, we have assumed that the only data available are the observations $\\mathbf { x } _ { 1 } , \\ldots , \\mathbf { x } _ { n }$ , but in many \n88 practical applications we may have additional information such as a condition label for each ob \n89 servation. For example, in gene knock-out studies, we have information about which gene was \n90 targeted for deletion in each cell; in multi-batch experiments we have information about which exper \n91 imental batch each samples was collected in. Thus, we augment our data by considering data pairs \n92 $( \\mathbf { x } _ { 1 } , c _ { 1 } ) , \\ldots , ( \\mathbf { x } _ { n } , c _ { n } )$ where $\\mathbf { x }$ is the same high-dimensional observation, and $c$ is a label indicating \n93 the condition or experimental batch that $\\mathbf { x }$ was collected under. \n94 Whilst VAEs are theoretically able to model the pairs $\\left( \\mathbf { x } _ { i } , c _ { i } \\right)$ , it makes sense to build a model that \n95 explicitly distinguishes between the $\\mathbf { x }$ and $c$ . The simplest model is the Conditional VAE (CVAE) \n96 [16]. In this model, a conditional generative model $p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } , c )$ and a conditional inference network \n97 $q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } , c )$ are trained using a modified ELBO. A key observation for our work is that the CVAE has \n98 many different ways to model the data. For example, it can completely ignore the condition $c$ in $p _ { \\theta }$ \n99 and $q _ { \\phi }$ , reducing to the original VAE. Assuming that $\\mathbf { x }$ is not independent of $c$ , this failure mode of \n100 the CVAE would be apparent on a visualization of the representations. For example, different values \n101 of $c$ might be visible as separate latent clusters, as shown in Figure 1 [CVAE]. ",
168
+ "bbox": [
169
+ 147,
170
+ 869,
171
+ 825,
172
+ 911
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "image",
178
+ "img_path": "images/0d413fd89df574dd8fcd5810e43676c70745bc61f80e0d4983cb7e4b366c2983.jpg",
179
+ "image_caption": [
180
+ "Figure 2: Structural Equation Model for observation $\\mathbf { x }$ under known condition $c$ with unobserved latent variable $\\mathbf { z }$ . In this model, $\\mathbf { z }$ and $c$ are independent in the prior. "
181
+ ],
182
+ "image_footnote": [],
183
+ "bbox": [
184
+ 436,
185
+ 87,
186
+ 562,
187
+ 148
188
+ ],
189
+ "page_idx": 2
190
+ },
191
+ {
192
+ "type": "text",
193
+ "text": "",
194
+ "bbox": [
195
+ 145,
196
+ 215,
197
+ 825,
198
+ 343
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "",
205
+ "bbox": [
206
+ 145,
207
+ 348,
208
+ 825,
209
+ 446
210
+ ],
211
+ "page_idx": 2
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "",
216
+ "bbox": [
217
+ 143,
218
+ 452,
219
+ 825,
220
+ 564
221
+ ],
222
+ "page_idx": 2
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "2.2 Counterfactual inference ",
227
+ "text_level": 1,
228
+ "bbox": [
229
+ 161,
230
+ 580,
231
+ 385,
232
+ 594
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "103 If $\\left( \\mathbf { x } _ { i } , c _ { i } \\right)$ represents an RNA transcript and the gene knock-out applied to the cell, a natural question \n104 to ask is “How would the transcript have differed if a different knock-out $c ^ { \\prime }$ had been applied?” In \n105 general, counterfactual inference attempts to answer questions of the form “How would the data have \n106 changed if $c _ { i }$ had been replaced by $c ^ { \\prime }$ ?” Answering counterfactual questions is a notoriously difficult \n107 task, because they naturally refer to unobservable data [27]. A principled approach to such questions \n108 is to adopt the framework of Structural Equation Models [28, 27]. For example, we could assume that \n109 the data generating process is given as in Figure 2. If this model is correct, counterfactual inference \n110 in the Pearl framework [27] can then be performed by: 1. abduction: inferring the latent $\\mathbf { z }$ from $\\mathbf { x }$ \n111 and $c$ using $p ( \\mathbf { z } | \\mathbf { x } , c )$ , 2. action: swap $c$ for $c ^ { \\prime }$ , 3. prediction: use $p ( \\mathbf { x } | \\mathbf { z } , c ^ { \\prime } )$ to obtain a predictive \n112 distribution for the counterfactual. Thus, the counterfactual distribution of $\\mathbf { x } _ { i }$ observed with condition \n113 $c _ { i }$ but predicted for condition $c ^ { \\prime }$ is given by ",
239
+ "bbox": [
240
+ 140,
241
+ 606,
242
+ 825,
243
+ 758
244
+ ],
245
+ "page_idx": 2
246
+ },
247
+ {
248
+ "type": "equation",
249
+ "img_path": "images/9dfdd1fb470d836286e087a13f84ecb1f9075205a31a8a538d3fe8a4445252c8.jpg",
250
+ "text": "$$\np \\left( \\mathbf { x } _ { c = c ^ { \\prime } } | \\mathbf { x } _ { i } , c _ { i } \\right) = \\int p ( \\mathbf { z } | \\mathbf { x } _ { i } , c _ { i } ) p ( \\mathbf { x } | \\mathbf { z } , c ^ { \\prime } ) d \\mathbf { z } .\n$$",
251
+ "text_format": "latex",
252
+ "bbox": [
253
+ 348,
254
+ 765,
255
+ 648,
256
+ 797
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "114 In order to make use of this relationship, we must fit a latent variable model [29] such as a CVAE that will estimate the encoding distribution 115 $p ( \\mathbf { z } | \\mathbf { x } _ { i } , c _ { i } )$ and the generative distribution $p ( \\mathbf { x } | \\mathbf { z } , c ^ { \\prime } )$ . ",
263
+ "bbox": [
264
+ 147,
265
+ 803,
266
+ 825,
267
+ 833
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "116 3 Unifying counterfactual inference, data integration and fairness ",
274
+ "text_level": 1,
275
+ "bbox": [
276
+ 148,
277
+ 851,
278
+ 736,
279
+ 869
280
+ ],
281
+ "page_idx": 2
282
+ },
283
+ {
284
+ "type": "text",
285
+ "text": "117 We have seen that batch effect correction, data integration and counterfactual inference are central \n118 problems of interest for the application of latent variable models in computational biology. \n119 For counterfactual inference, latent variable models such as the CVAE are increasingly popular \n120 choices [29]. The failure mode in which different values of $c$ form separate latent clusters, however, \n121 can be catastrophic for this application. When this happens, simply switching $c _ { i }$ to $c ^ { \\prime }$ is not correct, \n122 we have to account for the shift between clusters [9]. Mathematically, the latent space clustering \n123 phenomenon violates the assumption $\\mathbf { z }$ ⊥⊥ $c$ that is required by the model in Figure 2. Thus, whilst it \n124 is not always possible to know when we have found the right causal model [30], we can immediately \n125 say that a model in which $\\mathbf { z }$ and $c$ are dependent is not correct. \n126 Another key challenge for computational biology is data integration. Suppose our data \n127 $( \\mathbf { x } _ { 1 } , c _ { 1 } ) , \\ldots { \\overset { } { , } } ( \\mathbf { x } _ { n } , c _ { n } )$ in which $c _ { i }$ indicates the experimental batch, exhibits batch effects—these are \n128 changes in the observation $\\mathbf { x } _ { i }$ due to the experimental conditions rather than true changes in the \n129 underlying biology. One approach to dataset integration is to create a representation $\\mathbf { z } = \\mathbf { z } ( \\mathbf { x } , c )$ \n130 that ‘subtracts’ the batch effects. Downstream tasks can then work with $\\mathbf { z }$ in place of $\\mathbf { x }$ without \n131 learning signal based on misleading batch effects. To know when we have successfully subtracted \n132 batch effects, we might assume that there are no population-level differences between batches. In \n133 other words, the marginal distribution of $\\mathbf { z }$ should be the same for each value of the condition $c$ . \n134 Thirdly, this same notion of building a representation that cannot be used to recover $c$ has been studied \n135 widely in recent literature on fairness [31, 18, 32, 33]. In particular, if we wish to make a predictive \n136 rule based on $\\mathbf { x }$ that does not discriminate between individuals in different conditions $c$ , we can use \n137 a fair representation $\\mathbf { z }$ , one which cannot be used to recover $c$ , as an intermediate feature and train \n138 our model using z. Such a representation clearly needs to contain information from $\\mathbf { x }$ , but without \n139 containing any information that could be used to recover $c$ . \n140 To connect these three notions of ‘alignment in representation space’ we recall the key components \n141 of the CVAE—the encoder $q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } , c )$ and decoder $p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } , c )$ —and we now drop the $\\theta , \\phi$ subscripts \n142 for conciseness. The marginal distribution of representations within condition $c \\in { \\mathcal { C } }$ is $q ( \\mathbf { z } | c ) =$ \n143 $\\mathbb { E } _ { p ( \\mathbf { x } | c ) } \\left[ q ( \\mathbf { z } | \\mathbf { x } , c ) \\right]$ , and the marginal distribution of over all conditions not equal to $c$ is denoted ",
286
+ "bbox": [
287
+ 142,
288
+ 882,
289
+ 823,
290
+ 912
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "",
297
+ "bbox": [
298
+ 140,
299
+ 92,
300
+ 825,
301
+ 189
302
+ ],
303
+ "page_idx": 3
304
+ },
305
+ {
306
+ "type": "text",
307
+ "text": "",
308
+ "bbox": [
309
+ 140,
310
+ 194,
311
+ 825,
312
+ 306
313
+ ],
314
+ "page_idx": 3
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "",
319
+ "bbox": [
320
+ 140,
321
+ 311,
322
+ 825,
323
+ 395
324
+ ],
325
+ "page_idx": 3
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "",
330
+ "bbox": [
331
+ 140,
332
+ 401,
333
+ 825,
334
+ 458
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "equation",
340
+ "img_path": "images/78aac7941c858118c9d67d9646679615a5b73013536a973dcc5ada2d21038f44.jpg",
341
+ "text": "$$\nq ( \\mathbf { z } | \\lnot c ) = { \\frac { \\sum _ { c ^ { \\prime } \\in { \\mathcal { C } } , c ^ { \\prime } \\neq c } p ( c ^ { \\prime } ) q ( \\mathbf { z } | c ^ { \\prime } ) } { \\sum _ { c ^ { \\prime } \\in { \\mathcal { C } } , c ^ { \\prime } \\neq c } p ( c ^ { \\prime } ) } } .\n$$",
342
+ "text_format": "latex",
343
+ "bbox": [
344
+ 377,
345
+ 462,
346
+ 620,
347
+ 501
348
+ ],
349
+ "page_idx": 3
350
+ },
351
+ {
352
+ "type": "text",
353
+ "text": "144 The following Theorem brings together key notions in counterfactual inference, data integration and \n145 fair representation learning. See Appendix $\\mathbf { B }$ for the proof. \n146 Theorem 1. The following are equivalent: 1) $\\mathbf { z }$ ⊥⊥ $c$ under distribution $q , 2 ,$ ) for every $c , c ^ { \\prime } \\in { \\mathcal { C } }$ , \n147 $q ( \\mathbf { z } | c ) = q ( \\mathbf { z } | c ^ { \\prime } ) .$ , 3) for every $c \\in { \\mathcal { C } }$ , $q ( \\mathbf { z } | c ) = q ( \\mathbf { z } | \\lnot c )$ , 4) the mutual information $I ( \\mathbf { z } , c ) = 0$ under \n148 distribution q, 5) $\\mathbf { z }$ cannot predict $c$ better than random guessing. ",
354
+ "bbox": [
355
+ 143,
356
+ 505,
357
+ 825,
358
+ 534
359
+ ],
360
+ "page_idx": 3
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "",
365
+ "bbox": [
366
+ 142,
367
+ 536,
368
+ 825,
369
+ 579
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "149 4 Contrastive Mixture of Posteriors ",
376
+ "text_level": 1,
377
+ "bbox": [
378
+ 142,
379
+ 597,
380
+ 486,
381
+ 614
382
+ ],
383
+ "page_idx": 3
384
+ },
385
+ {
386
+ "type": "text",
387
+ "text": "150 We have seen that counterfactual inference, data integration and fair representation learning can be \n151 understood through the unified concept of learning a representation such that the latent variable $\\mathbf { z }$ is \n152 independent of the condition $c$ under the distribution $q$ , so that the latent clusters with different values \n153 of $c$ are perfectly aligned. Building off the CVAE, which rarely achieves this in practice, a number of \n154 authors have attempted to use a penalty term to reduce the dependence of $\\mathbf { z }$ upon $c$ during training. \n155 The most successful methods, such as trVAE [10], are based on a Maximum Mean Discrepancy \n156 (MMD) [17]. We discuss this and other common methods in Section 5. Whilst trVAE and related \n157 methods can work well, they require an MMD kernel, not a part of the original model, to be specified \n158 and its parameters to be carefully tuned. Experimentally, we observe that MMD-based methods \n159 can often struggle when there is complex global structure in the latent space. We also analyse the \n160 gradients of MMD penalties, showing that they have several undesirable properties. \n161 We propose a novel method to ensure the conditions of Theorem 1 do hold in a CVAE model. Our \n162 penalty is based on posterior distributions obtained from the model encoder itself. That is, we do not \n163 introduce any external discrepancy measure, rather we propose a penalty term that arises naturally \n164 from the model itself. Taking our inspiration from contrastive learning [19, 20] and the VaMP prior \n165 [26], we suggest a novel penalty to enforce equation condition 3) of Theorem 1. This equation \n166 requires the equality of the marginal distribution $q ( \\mathbf { z } | c )$ and $q ( \\mathbf { z } | \\lnot c )$ for each $c \\in { \\mathcal { C } }$ . In practice, \n167 these marginal distributions can be approximated by finite mixtures. To encourage greater overlap \n168 between $q ( \\mathbf { z } | c )$ and $q ( \\mathbf { z } | \\lnot c )$ , we can encourage points with the condition $c$ to be in areas of high \n169 density under the representation distribution for other conditions, i.e. areas in which $q ( \\mathbf { z } | \\lnot c )$ is also \n170 high. To encourage this, we can add the penalty term $\\mathcal { P } _ { 0 } ( \\mathbf { z } _ { i } , c _ { i } ) = - \\log q ( \\mathbf { z } _ { i } | \\lnot c _ { i } )$ to the objective \n171 for the data pair $\\left( \\mathbf { x } _ { i } , c _ { i } \\right)$ . When we minimise $\\mathcal { P } _ { 0 }$ , this brings the representations of samples under \n172 condition $c _ { i }$ towards regions of high density under $q ( \\mathbf { z } | \\lnot c )$ . Since the density $q ( \\mathbf { z } | \\lnot c )$ is not known \n173 in closed form, we approximate $q ( \\mathbf { z } | \\lnot c )$ using other points in the same training batch as $\\left( \\mathbf { x } _ { i } , c _ { i } \\right)$ . \n174 Indeed, suppose we have a batch $( \\mathbf { x } _ { 1 } , c _ { 1 } ) , . . . , ( \\mathbf { x } _ { B } , c _ { B } )$ . We let $I _ { c }$ denote the subset of indices for \n175 which $c _ { j } = c$ and $I _ { \\neg c }$ denote its complement. We use the approximation ",
388
+ "bbox": [
389
+ 140,
390
+ 627,
391
+ 825,
392
+ 781
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "",
399
+ "bbox": [
400
+ 140,
401
+ 786,
402
+ 825,
403
+ 911
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "",
410
+ "bbox": [
411
+ 140,
412
+ 90,
413
+ 826,
414
+ 175
415
+ ],
416
+ "page_idx": 4
417
+ },
418
+ {
419
+ "type": "equation",
420
+ "img_path": "images/8ce28abb7b113415c3014d24df7349ead67fb0c155056e42ab467bc0744e3a14.jpg",
421
+ "text": "$$\n\\log q ( \\mathbf { z } _ { i } | \\lnot c _ { i } ) \\approx \\log \\left( \\frac { 1 } { | I _ { \\lnot c _ { i } } | } \\sum _ { j \\in I _ { \\lnot c _ { i } } } q ( \\mathbf { z } _ { i } | \\mathbf { x } _ { j } , c _ { j } ) \\right)\n$$",
422
+ "text_format": "latex",
423
+ "bbox": [
424
+ 338,
425
+ 179,
426
+ 658,
427
+ 222
428
+ ],
429
+ "page_idx": 4
430
+ },
431
+ {
432
+ "type": "text",
433
+ "text": "176 and we will show in Theorem 2, this approximation in fact leads to a valid stochastic bound. ",
434
+ "bbox": [
435
+ 143,
436
+ 224,
437
+ 776,
438
+ 241
439
+ ],
440
+ "page_idx": 4
441
+ },
442
+ {
443
+ "type": "text",
444
+ "text": "177 It may happen that the penalty $\\mathcal { P } _ { 0 }$ causes points to become too tightly clustered. Indeed, the \n178 penalty encourages latent variables to gravitate towards high density regions of $q ( \\mathbf { z } | \\lnot c _ { i } )$ . Inspired \n179 by contrastive learning, we include a second term which promotes higher entropy of the marginal, \n180 thereby avoiding tight clusters of points. Combined with $\\mathcal { P } _ { 0 }$ , this leads us to a second penalty \n181 $\\mathcal { P } _ { 1 } ( \\mathbf { z } _ { i } , c _ { i } ) = \\log \\bar { q } ( \\bar { \\mathbf { z } } _ { i } | c _ { i } ) - \\log q ( \\bar { \\mathbf { z } _ { i } } | \\neg c _ { i } )$ . Again, the density $q ( \\mathbf { z } | c )$ is not known in closed form, \n182 but we can approximate it using points within the same training batch in a similar fashion to (3). \n183 Combining both approximations and taking the mean over the batch gives our Contrastive Mixture of \n184 Posteriors $( C o M P )$ misalignment penalty ",
445
+ "bbox": [
446
+ 140,
447
+ 246,
448
+ 826,
449
+ 358
450
+ ],
451
+ "page_idx": 4
452
+ },
453
+ {
454
+ "type": "equation",
455
+ "img_path": "images/9e9198d0e8849b44ac87c43ed093f2d604981d39ef58be6d3152339cfb8de3de.jpg",
456
+ "text": "$$\n\\mathrm { C o M P \\ p e n a l t y } = \\frac { 1 } { B } \\sum _ { i = 1 } ^ { B } \\log \\left( \\frac { 1 } { \\left| I _ { c _ { i } } \\right| } \\sum _ { j \\in I _ { c _ { i } } } q ( \\mathbf { z } _ { i } | \\mathbf { x } _ { j } , c _ { i } ) \\right) - \\log \\left( \\frac { 1 } { \\left| I _ { - { \\boldsymbol { \\alpha } } _ { i } } \\right| } \\sum _ { j \\in I _ { - { \\boldsymbol { \\alpha } } _ { i } } } q ( \\mathbf { z } _ { i } | \\mathbf { x } _ { j } , c _ { j } ) \\right) .\n$$",
457
+ "text_format": "latex",
458
+ "bbox": [
459
+ 192,
460
+ 361,
461
+ 782,
462
+ 407
463
+ ],
464
+ "page_idx": 4
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "185 where $\\begin{array} { r } { { \\bf x } _ { 1 : B } , c _ { 1 : B } , { \\bf z } _ { 1 : B } \\sim \\prod _ { i = 1 } ^ { B } p ( { \\bf x } _ { i } , c _ { i } ) q ( { \\bf z } _ { i } | { \\bf x } _ { i } , c _ { i } ) } \\end{array}$ is a random training batch of size $B$ , $I _ { c }$ denotes \n186 the subset of $\\{ 1 , \\ldots , B \\}$ with condition $c$ and $I _ { \\neg c } = \\{ 1 , \\dots , B \\} \\setminus I _ { c }$ . Our method therefore utilises \n187 a training penalty for CVAE-type models that encourages the conditions of Theorem 1 to hold by \n188 using mixtures of the variational posteriors themselves to approximate $q ( \\mathbf { z } | c )$ and $q ( \\mathbf { z } | \\lnot c )$ . We do \n189 not introduce an additional kernel or hyperparameter-heavy discrepancy measures. \n190 As hinted at by the definition of $\\mathcal { P } _ { 1 }$ , CoMP can be seen as approximating a symmetrised KL \n91 divergence between the distributions $q ( \\mathbf { z } | c )$ and $q ( \\mathbf { z } | \\lnot c )$ . In fact, the following theorem shows that \n92 the CoMP misalignment penalty is a stochastic upper bound on a weighted sum of KL-divergences. ",
469
+ "bbox": [
470
+ 140,
471
+ 412,
472
+ 826,
473
+ 486
474
+ ],
475
+ "page_idx": 4
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "",
480
+ "bbox": [
481
+ 151,
482
+ 491,
483
+ 825,
484
+ 535
485
+ ],
486
+ "page_idx": 4
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "193 Theorem 2. The CoMP misalignment penalty satisfies ",
491
+ "bbox": [
492
+ 142,
493
+ 536,
494
+ 534,
495
+ 553
496
+ ],
497
+ "page_idx": 4
498
+ },
499
+ {
500
+ "type": "equation",
501
+ "img_path": "images/2ee3131e27d11165e7b97a42484496b91d822068c96a6fa2d1353cc96ee17ec2.jpg",
502
+ "text": "$$\n\\mathbb { E } _ { \\prod _ { i = 1 } ^ { B } p ( \\mathbf { x } _ { i } , c _ { i } ) q ( \\mathbf { z } _ { 1 } | \\mathbf { x } _ { i } , c _ { i } ) } \\left[ \\frac { 1 } { B } \\sum _ { i = 1 } ^ { B } \\log \\left( \\frac { 1 } { | I _ { c _ { i } } | } \\sum _ { j \\in I _ { c _ { i } } } q ( \\mathbf { z } _ { i } | \\mathbf { x } _ { j } , c _ { i } ) \\right) - \\log \\left( \\frac { 1 } { | I _ { - c _ { i } } | } \\sum _ { j \\in I _ { - c _ { i } } } q ( \\mathbf { z } _ { i } | \\mathbf { x } _ { j } , c _ { j } ) \\right) \\right]\n$$",
503
+ "text_format": "latex",
504
+ "bbox": [
505
+ 179,
506
+ 556,
507
+ 815,
508
+ 638
509
+ ],
510
+ "page_idx": 4
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "194 and the bound becomes tight as $B \\infty$ ",
515
+ "bbox": [
516
+ 142,
517
+ 642,
518
+ 444,
519
+ 656
520
+ ],
521
+ "page_idx": 4
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "195 The proof is presented in Appendix B. Our result reveals that our new penalty directly enforces \n196 condition 3) of Theorem 1 by reducing the KL divergence between each pair $q ( \\mathbf { z } | c ) , q ( \\mathbf { z } | \\lnot c )$ weighted \n197 by $p ( c )$ . As with standard contrastive learning, our method benefits from larger batch sizes. We \n198 add the CoMP misalignment penalty to the familiar $\\beta$ -VAE objective to give our complete training \n199 objective for a batch of size $B$ as ",
526
+ "bbox": [
527
+ 142,
528
+ 665,
529
+ 825,
530
+ 736
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "equation",
536
+ "img_path": "images/1fb23ea504ef718982c91372ca51a7dc7e7ccc9f5da3ae565597f12c571828cd.jpg",
537
+ "text": "$$\n\\mathcal { L } _ { B } ^ { \\mathrm { { C o M P } } } = \\frac { 1 } { B } \\sum _ { i = 1 } ^ { B } \\left[ \\log p ( { \\mathbf { x } _ { i } | \\mathbf { z } _ { i } } , c _ { i } ) + \\beta \\log \\frac { p ( { \\mathbf { z } _ { i } } ) } { q ( { \\mathbf { z } _ { i } | \\mathbf { x } _ { i } } , c _ { i } ) } - \\gamma \\log \\left( \\frac { \\frac { 1 } { | I _ { c } | } \\sum _ { j \\in I _ { c } } q ( { \\mathbf { z } _ { i } | \\mathbf { x } _ { j } } , c _ { i } ) } { \\frac { 1 } { | I _ { - \\infty } | } \\sum _ { j \\in I _ { - c } } q ( { \\mathbf { z } _ { i } | \\mathbf { x } _ { j } } , c _ { j } ) } \\right) \\right] .\n$$",
538
+ "text_format": "latex",
539
+ "bbox": [
540
+ 179,
541
+ 739,
542
+ 795,
543
+ 784
544
+ ],
545
+ "page_idx": 4
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "200 with one new hyperparameter $\\gamma$ that controls the strength of the regularisation we apply to enforce 01 the requirements $\\mathbf { z } \\perp \\perp c$ . Theorem 2 shows that, if $\\mathcal { L } _ { B } ^ { \\beta }$ is the standard $\\beta$ -VAE objective, then we are maximising202 $\\begin{array} { r } { \\mathbb { E } \\left[ \\mathcal { L } _ { B } ^ { \\mathrm { C o M P } } \\right] \\leq \\mathbb { E } \\left[ \\mathcal { L } _ { B } ^ { \\beta } \\right] - \\gamma \\sum _ { c \\in \\mathcal { C } } p ( c ) \\mathrm { K L } \\left[ q ( \\mathbf { z } | c ) | | q ( \\mathbf { z } | \\lnot c ) \\right] . } \\end{array}$ ",
550
+ "bbox": [
551
+ 148,
552
+ 787,
553
+ 825,
554
+ 844
555
+ ],
556
+ "page_idx": 4
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "4.1 Analysing CoMP gradients ",
561
+ "text_level": 1,
562
+ "bbox": [
563
+ 171,
564
+ 857,
565
+ 401,
566
+ 873
567
+ ],
568
+ "page_idx": 4
569
+ },
570
+ {
571
+ "type": "text",
572
+ "text": "204 Before presenting empirical results on the performance of CoMP, we attempt to understand how it \n205 differs from existing penalties in the literature. Specifically, we compare CoMP with a Gaussian \n206 posterior family with MMD using a Radial Basis Kernel [34]. In Appendix $\\textrm { C }$ , we show that both \n207 methods can be interpreted as applying a penalty to each element ${ \\bf z } _ { i } , c _ { i }$ of the training batch. We \n208 show further that, under certain conditions, the gradient of the MMD penalty for $\\mathbf { z } _ { i } , c _ { i }$ takes the form ",
573
+ "bbox": [
574
+ 148,
575
+ 882,
576
+ 826,
577
+ 912
578
+ ],
579
+ "page_idx": 4
580
+ },
581
+ {
582
+ "type": "text",
583
+ "text": "",
584
+ "bbox": [
585
+ 137,
586
+ 90,
587
+ 828,
588
+ 133
589
+ ],
590
+ "page_idx": 5
591
+ },
592
+ {
593
+ "type": "equation",
594
+ "img_path": "images/5026d068fa6a83e48a443da221eabcfdb0688a75ae9d8026f6582ed2c49db000.jpg",
595
+ "text": "$$\n\\nabla _ { \\mathbf z _ { i } } \\mathcal { P } _ { \\mathrm { M M D } } ( \\mathbf z _ { i } , c _ { i } ) = \\frac { 2 } { \\left| I _ { c _ { i } } \\right| ^ { 2 } } \\sum _ { j \\in I _ { c _ { i } } } e ^ { - \\left\\| \\mathbf z _ { i } - \\mathbf z _ { j } \\right\\| ^ { 2 } } ( \\mathbf z _ { j } - \\mathbf z _ { i } ) - \\frac { 4 } { \\left| I _ { - c _ { i } } \\right| \\left| I _ { c _ { i } } \\right| } \\sum _ { j \\in I _ { - c _ { i } } } e ^ { - \\left\\| \\mathbf z _ { i } - \\mathbf z _ { j } \\right\\| ^ { 2 } } ( \\mathbf z _ { j } - \\mathbf z _ { i } ) ,\n$$",
596
+ "text_format": "latex",
597
+ "bbox": [
598
+ 181,
599
+ 133,
600
+ 797,
601
+ 174
602
+ ],
603
+ "page_idx": 5
604
+ },
605
+ {
606
+ "type": "text",
607
+ "text": "209 whilst the CoMP penalty gradient takes the form ",
608
+ "bbox": [
609
+ 142,
610
+ 175,
611
+ 495,
612
+ 189
613
+ ],
614
+ "page_idx": 5
615
+ },
616
+ {
617
+ "type": "equation",
618
+ "img_path": "images/d9746b8c826ba7476f8762053495e3d050b69ec9b94c597c0c4481e403fbd770.jpg",
619
+ "text": "$$\n\\nabla _ { \\mathbf z _ { i } } \\mathcal { P } _ { \\mathrm { C o M P } } ( \\mathbf z _ { i } , c _ { i } ) = \\frac { 2 \\sum _ { j \\in I _ { c _ { i } } } e ^ { - \\| \\mathbf z _ { i } - \\mu _ { \\mathbf z _ { j } } \\| ^ { 2 } } ( \\mu _ { \\mathbf z _ { j } } - \\mathbf z _ { i } ) } { B \\sum _ { j \\in I _ { c _ { i } } } e ^ { - \\| \\mathbf z _ { i } - \\mu _ { \\mathbf z _ { j } } \\| ^ { 2 } } } - \\frac { 2 \\sum _ { j \\in I _ { - c _ { i } } } e ^ { - \\| \\mathbf z _ { i } - \\mu _ { \\mathbf z _ { j } } \\| ^ { 2 } } ( \\mu _ { \\mathbf z _ { j } } - \\mathbf z _ { i } ) } { B \\sum _ { j \\in I _ { - c _ { i } } } e ^ { - \\| \\mathbf z _ { i } - \\mu _ { \\mathbf z _ { j } } \\| ^ { 2 } } }\n$$",
620
+ "text_format": "latex",
621
+ "bbox": [
622
+ 189,
623
+ 189,
624
+ 789,
625
+ 238
626
+ ],
627
+ "page_idx": 5
628
+ },
629
+ {
630
+ "type": "text",
631
+ "text": "210 where $\\mu _ { \\mathbf { z } _ { j } }$ is the variational mean for $\\mathbf { z } _ { j }$ . One important feature of the MMD gradients is that, if \n211 $\\| \\mathbf { z } _ { i } - \\mathbf { z } _ { j } \\| ^ { 2 }$ is large for all $j \\neq i$ , for instance when the point $\\mathbf { z } _ { i }$ is part of an isolated cluster, then \n212 the gradient to update the representation $\\mathbf { z } _ { i }$ will be small. So if $\\mathbf { z } _ { i }$ is already very isolated from the \n213 distribution $q ( \\mathbf { z } | \\lnot c _ { i } )$ , then the gradients bringing it closer to points with condition $\\neg c _ { i }$ will be small. \n214 In comparison to the MMD gradient, it can be seen that gradients for CoMP are self-normalised. This \n215 means that the gradient through $\\mathbf { z } _ { i }$ will be large, even when $\\mathbf { z } _ { i }$ is very far away from any points with \n216 condition $\\lnot c _ { i }$ . This, in turn, suggests that that CoMP is likely to be preferable to MMD when we have \n217 a number of isolated clusters or interesting global structure in latent space, something which often \n218 occurs with biological data. The CoMP approach also bears a relationship with nearest-neighbour \n219 approaches [35]. Indeed, for a Gaussian posterior as $\\sigma \\to 0$ , the $\\neg c _ { i }$ term of the gradient places all \n220 its weight on the nearest element of the batch under condition $\\lnot c _ { i }$ . ",
632
+ "bbox": [
633
+ 140,
634
+ 238,
635
+ 825,
636
+ 392
637
+ ],
638
+ "page_idx": 5
639
+ },
640
+ {
641
+ "type": "text",
642
+ "text": "21 5 Related Work ",
643
+ "text_level": 1,
644
+ "bbox": [
645
+ 155,
646
+ 411,
647
+ 320,
648
+ 428
649
+ ],
650
+ "page_idx": 5
651
+ },
652
+ {
653
+ "type": "text",
654
+ "text": "The problem of batch correction in data integration has been addressed using linear [12, 13] and nonlinear methods [14, 15] that perform transformations of the original feature space. In both cases, the goal is to transform the feature space so that information related to the scientific question of interest is retained while dependence on the batch (or nuisance covariate) is reduced. Methods based on representation learning learn a low-dimensional representation, $\\mathbf { z } = q ( \\mathbf { x } )$ , which is independent of nuisance factors while also being a faithful representation of the original data [18, 5, 36, 10, 37]. Of these, the work that is most similar to ours are the VFAE [18], in which the authors introduce an MMD [17] penalty to encourage the marginal distributions of $\\mathbf { z }$ under different values of $c$ to be close, and the trVAE [10], where the MMD penalty is applied to the output of the first layer of the decoder, rather than to $\\mathbf { z }$ directly. Representation learning algorithms for counterfactual inference have been shown to benefit from a penalty enforcing distributional similarity between the representations of the treated and untreated samples [12]. Elsewhere, authors have applied the variational autoencoder to inference on causal graphs [38, 39, 40]. ",
655
+ "bbox": [
656
+ 158,
657
+ 441,
658
+ 825,
659
+ 621
660
+ ],
661
+ "page_idx": 5
662
+ },
663
+ {
664
+ "type": "text",
665
+ "text": "6 Experiments ",
666
+ "text_level": 1,
667
+ "bbox": [
668
+ 165,
669
+ 638,
670
+ 312,
671
+ 656
672
+ ],
673
+ "page_idx": 5
674
+ },
675
+ {
676
+ "type": "text",
677
+ "text": "We perform experiments on three datasets; 1) Tumour / Cell Line: bulk expression profiles of tumours and cancer cell-lines across 39 different cancer types; 2) Single-cell PBMCs: single-cell gene expression (scRNA-seq) profiles of interferon (IFN)- $\\beta$ stimulated and untreated peripheral blood mononuclear cells (PBMCs) [41]; 3) UCI Adult Income: personal information relating to education, marriage status, ethnicity, self-reported gender of census participants and a binary high / low income label $\\$ 50,000$ threshold) [22]. All experiments used a 90/10 training/validation split. ",
678
+ "bbox": [
679
+ 168,
680
+ 670,
681
+ 825,
682
+ 752
683
+ ],
684
+ "page_idx": 5
685
+ },
686
+ {
687
+ "type": "text",
688
+ "text": "242 The two broad objectives across our experiments are 1) to demonstrate the extent to which the two \n243 random variables $\\mathbf { z } _ { i }$ and $c _ { i }$ are independent, and 2) to quantify useful information retained in $\\mathbf { z } _ { i }$ . To \n244 benchmark CoMP on the first objective, we use the following pair of $k$ nearest-neighbor metrics: \n245 $\\mathrm { k B E T } _ { k , \\alpha }$ [42], the metric used to evaluate batch correction methods in biology, and a local Silhouette \n246 Coefficient [43] $s _ { k , c }$ . In both cases a low value close to zero would indicate good local mixing of \n247 sample representations. As for the second objective, if we assume the existence of an additional \n248 discrete label $d _ { i }$ that represents information one wishes to preserve – in the Tumour / Cell Line \n249 case, $d _ { i }$ is the cancer type, while for the PBMC experiment, it refers to cell type – then we calculate \n250 kBET and $s$ separately for every fixed- $\\cdot d _ { i }$ subpopulation and take the mean. We refer to these as the \n251 mean Silhouette Coefficient $\\tilde { s } _ { k , c }$ and the mean kBET metric m-kBET respectively. Full details of the \n252 datasets and metrics are given in Appendix D. ",
689
+ "bbox": [
690
+ 142,
691
+ 760,
692
+ 825,
693
+ 911
694
+ ],
695
+ "page_idx": 5
696
+ },
697
+ {
698
+ "type": "table",
699
+ "img_path": "images/40fb8f1cb2525d73db562c4ece24d64aabfd74da5ee035391df0ab0fddf023ea.jpg",
700
+ "table_caption": [
701
+ "Table 1: Tumour / Cell Line experiment results, with $k = 1 0 0$ , $c = \\mathrm { C e l l }$ Line, and $\\alpha = 0 . 0 1$ . $s _ { k , c }$ and $\\tilde { s } _ { k , c }$ are the two Silhouette Coefficient variants (see Section 6). The top scores are in bold. "
702
+ ],
703
+ "table_footnote": [],
704
+ "table_body": "<table><tr><td></td><td>Accuracy</td><td>Sk,c</td><td>kBETk,α</td><td>SkC</td><td>m-kBETk,α</td></tr><tr><td>VAE</td><td>0.209</td><td>0.658</td><td>0.974</td><td>0.803</td><td>0.581</td></tr><tr><td>CVAE</td><td>0.328</td><td>0.554</td><td>0.931</td><td>0.684</td><td>0.571</td></tr><tr><td>VFAE</td><td>0.585</td><td>0.168</td><td>0.258</td><td>0.198</td><td>0.188</td></tr><tr><td>trVAE</td><td>0.585</td><td>0.096</td><td>0.163</td><td>0.138</td><td>0.123</td></tr><tr><td>Celligner</td><td>0.578</td><td>0.082</td><td>0.525</td><td>0.568</td><td>0.226</td></tr><tr><td>CoMP (ours)</td><td>0.579</td><td>0.023</td><td>0.160</td><td>0.094</td><td>0.101</td></tr></table>",
705
+ "bbox": [
706
+ 258,
707
+ 123,
708
+ 738,
709
+ 231
710
+ ],
711
+ "page_idx": 6
712
+ },
713
+ {
714
+ "type": "image",
715
+ "img_path": "images/dc4b70da9bf34e957efb443e8e1af70f1eff4b08f7bb48c2c3918ec057b87b99.jpg",
716
+ "image_caption": [
717
+ "Figure 3: 2D UMAP projection of posterior means of $\\mathbf { z } _ { i }$ from Tumour / Cell Line data. Tumours (blue) and cell lines (orange). "
718
+ ],
719
+ "image_footnote": [],
720
+ "bbox": [
721
+ 178,
722
+ 252,
723
+ 820,
724
+ 334
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "253 6.1 Alignment of tumour and cell-line samples ",
731
+ "text_level": 1,
732
+ "bbox": [
733
+ 142,
734
+ 405,
735
+ 509,
736
+ 420
737
+ ],
738
+ "page_idx": 6
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "Despite their widespread use in pre-clinical cancer studies, cancer cell-lines are known to have significantly different gene expression profiles compared to their corresponding tumour samples. Here we evaluate the ability of CoMP to factorise out the tumour / cell line condition from its latent representations. This can be seen as both a dataset integration and batch effect correction task. In addition to the set of $k$ nearest neighbor-based mixing evaluations, we train a Random Forest model on the representations of the tumour samples and their cancer-type labels and assess the prediction accuracy on held-out cell lines. To match the results from [21], the evaluations are performed on the 2D UMAP projections, The results are presented in Table 1. ",
743
+ "bbox": [
744
+ 158,
745
+ 433,
746
+ 825,
747
+ 544
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "262 As expected, both the VAE and CVAE baselines fail at the mixing task; the three explicitly penalised \n263 VAE models and, to a lesser extent, the Cellinger method have good mixing performances, with \n264 CoMP outperforming the benchmark models by a significant margin on the silhouette coefficient \n265 and kBET metric, while successfully maintaining a high accuracy in the cancer-type prediction \n266 task. We also see from Figure 3 that CoMP representations have the fewest instances of isolated \n267 tumour-only clusters. Finally, from our evaluation on the s˜ and m-kBET metrics, we can deduce that \n268 the occurrence of cell lines of one cancer type erroneously clustering around tumours of a different \n269 type is less frequent for CoMP compared to the other models. In Appendix D we qualitatively validate \n270 this for several example clusters. ",
754
+ "bbox": [
755
+ 140,
756
+ 549,
757
+ 825,
758
+ 675
759
+ ],
760
+ "page_idx": 6
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "271 6.2 Interventions ",
765
+ "text_level": 1,
766
+ "bbox": [
767
+ 142,
768
+ 696,
769
+ 305,
770
+ 712
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "272 Obtaining molecular measurements from biological tissues typically requires destructive sampling. \n273 For example, to obtain scRNA-seq data, each cell is lysed so that the RNA molecules contained \n274 within it can be extracted and sequenced. This process destroys each cell, meaning that we are \n275 unable to study the gene expression profile of the same cell over time or under multiple experimental \n276 conditions. As we discussed in Section 2.2, counterfactual inference can be used to predict how the \n277 molecular status of a destroyed biological sample would have differed if it were measured under \n278 different experimental conditions, such as applications of different drugs. \n279 To assess CoMP’s utility in counterfactual inference, we trained it on scRNA-seq data from PBMCs \n280 that were either stimulated with IFN- $\\beta$ or left untreated (control) [41]. It is clear from Figure 4 that \n281 IFN- $\\beta$ stimulation causes clear shifts in the latent space between stimulated and control cells from the \n282 same cell type. Noticeably, the CD14 and CD16 monocyte and dendritic cell (DC) populations see \n283 greater shifts in their gene expression after stimulation. CVAE fails to align these particular cell types \n284 in the latent space, while trVAE, VFAE and CoMP perform better. However, stimulated and control ",
777
+ "bbox": [
778
+ 142,
779
+ 724,
780
+ 825,
781
+ 821
782
+ ],
783
+ "page_idx": 6
784
+ },
785
+ {
786
+ "type": "text",
787
+ "text": "",
788
+ "bbox": [
789
+ 142,
790
+ 828,
791
+ 823,
792
+ 911
793
+ ],
794
+ "page_idx": 6
795
+ },
796
+ {
797
+ "type": "image",
798
+ "img_path": "images/ff21b1fc101b5af6efc2466078bffa9ed6bf9da95bc9f379690155738e1b2615.jpg",
799
+ "image_caption": [
800
+ "Figure 4: 2D UMAP projections of posterior means of $\\mathbf { z } _ { i }$ derived from stimulated and control PBMC scRNA-seq data. Top row: colours indicate immune cell types, bottom row: colours indicate condition (IFN- $\\boldsymbol { \\cdot } \\beta$ stimulation or control). "
801
+ ],
802
+ "image_footnote": [],
803
+ "bbox": [
804
+ 194,
805
+ 87,
806
+ 803,
807
+ 263
808
+ ],
809
+ "page_idx": 7
810
+ },
811
+ {
812
+ "type": "image",
813
+ "img_path": "images/2f0fd834e0c272052e0dd93f5d85ad9437039cd7287a792972a66c27667d413f.jpg",
814
+ "image_caption": [
815
+ "Figure 5: The difference in gene expression values for the top 50 differentially expressed genes (up-regulated: red, down-regulated: blue) between IFN- $\\beta$ stimulated cells and counterfactually stimulated control cells for CD14 monocytes, dendritic cells (DC) and natural killer (NK) cells. See Appendix D for further details. "
816
+ ],
817
+ "image_footnote": [],
818
+ "bbox": [
819
+ 176,
820
+ 332,
821
+ 816,
822
+ 468
823
+ ],
824
+ "page_idx": 7
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "cells are better mixed in the latent space derived from CoMP than those from the other models (see metrics presented in Appendix D). ",
829
+ "bbox": [
830
+ 148,
831
+ 563,
832
+ 826,
833
+ 590
834
+ ],
835
+ "page_idx": 7
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "Next we perform a counterfactual prediction task under a $\\mathrm { I F N } { - \\beta }$ control-to-stimulation variable swap, i.e. the gene expression profiles for control cells were reconstructed through the decoder with the condition, $c \\to$ stimulated. This means we utilise equation (1) with our encoder $q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } , c )$ and decoder $p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } , c ^ { \\prime } )$ in place of $p ( \\mathbf { z } | \\mathbf { x } , c )$ and $p ( \\mathbf { x } | \\mathbf { z } , c ^ { \\prime } )$ . The degree to which the models respect the requirement $\\mathbf { z }$ ⊥⊥ $c$ will influence the quality of predictions. Figure 5 shows how the profiles of (actual) stimulated cells differ from the counterfactual predictions for a selection of cell types (see Appendix $\\mathrm { D }$ for the complete set of results). We see that baseline models tend to systematically underestimate the expression of genes up-regulated by stimulation and overestimate those downregulated. CoMP outperforms all other models by accurately predicting the expression alterations brought about by stimulation. ",
840
+ "bbox": [
841
+ 173,
842
+ 597,
843
+ 825,
844
+ 736
845
+ ],
846
+ "page_idx": 7
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "6.3 Fair Classification ",
851
+ "text_level": 1,
852
+ "bbox": [
853
+ 161,
854
+ 753,
855
+ 339,
856
+ 768
857
+ ],
858
+ "page_idx": 7
859
+ },
860
+ {
861
+ "type": "text",
862
+ "text": "The goal for this fair classification task is to learn a representation on the Adult Income dataset that is not predictive of an individual’s gender whilst still being predictive of their income. We compute a baseline by predicting gender and income labels directly from the input data and compare our method to the published results for the VFAE [18] and the trVAE. We also include results for a standard VAE and CVAE. Unlike in [18], where the representations $\\mathbf { z }$ are sampled from the posterior before classification, our experiments used the posterior means to avoid the noise from sampling acting to mask the inclusion of predictive information about gender in the encodings. ",
863
+ "bbox": [
864
+ 171,
865
+ 780,
866
+ 825,
867
+ 877
868
+ ],
869
+ "page_idx": 7
870
+ },
871
+ {
872
+ "type": "text",
873
+ "text": "305 CoMP achieves a gender accuracy that is close to random $( 6 7 . 5 \\% )$ , tying with the VFAE results from \n306 [18] whilst also remaining competitive with the other methods on income accuracy (Table 2). CoMP \n307 also outperforms all methods on the nearest neighbour and silhouette metrics (Table 2). Latent space \n308 mixing between males and females can be seen qualitatively in the 2D UMAP projection (Figure 6). ",
874
+ "bbox": [
875
+ 147,
876
+ 883,
877
+ 825,
878
+ 911
879
+ ],
880
+ "page_idx": 7
881
+ },
882
+ {
883
+ "type": "table",
884
+ "img_path": "images/d716a36e63dabbc7397f98c753243ef554fc09209772cbc6b70f82e6b9b3ca74.jpg",
885
+ "table_caption": [
886
+ "Table 2: UCI Adult Income experiment results with $k = 1 0 0 0$ , $c = \\mathrm { M a l e }$ for $s _ { k , c }$ , and $k = 1 0 0$ , $\\alpha = 0 . 0 1$ for $\\mathrm { k B E T } _ { k , \\alpha }$ . A lower gender prediction accuracy is better; 0.675 is the lowest achievable. "
887
+ ],
888
+ "table_footnote": [],
889
+ "table_body": "<table><tr><td colspan=\"2\">Gender Acc.</td><td>Income Acc.</td><td>Sk,C</td><td>kBETk,α</td></tr><tr><td>Original data</td><td>0.796</td><td>0.849</td><td>0.067</td><td>0.786</td></tr><tr><td>VAE</td><td>0.764</td><td>0.812</td><td>0.054</td><td>0.748</td></tr><tr><td>CVAE</td><td>0.778</td><td>0.819</td><td>0.054</td><td>0.724</td></tr><tr><td>VFAE (sampled) [18]</td><td>0.680</td><td>0.815</td><td>=</td><td>1</td></tr><tr><td>VFAE (mean)</td><td>0.789</td><td>0.805</td><td>0.046</td><td>0.571</td></tr><tr><td>trVAE</td><td>0.698</td><td>0.808</td><td>0.066</td><td>0.731</td></tr><tr><td>CoMP (ours)</td><td>0.679</td><td>0.805</td><td>0.011</td><td>0.451</td></tr></table>",
890
+ "bbox": [
891
+ 245,
892
+ 123,
893
+ 750,
894
+ 252
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "image",
900
+ "img_path": "images/d8771a7a2a392b671ce6555ac317f0ac1d424cac72ebb0f8219fe6a58c3e31d0.jpg",
901
+ "image_caption": [
902
+ "Figure 6: UMAP projections for the UCI Adult Income dataset, coloured by gender. Showing the original data and latents for trVAE, VFAE and CoMP. Male (blue) and female (yellow). "
903
+ ],
904
+ "image_footnote": [],
905
+ "bbox": [
906
+ 181,
907
+ 280,
908
+ 816,
909
+ 398
910
+ ],
911
+ "page_idx": 8
912
+ },
913
+ {
914
+ "type": "text",
915
+ "text": "",
916
+ "bbox": [
917
+ 143,
918
+ 476,
919
+ 826,
920
+ 503
921
+ ],
922
+ "page_idx": 8
923
+ },
924
+ {
925
+ "type": "text",
926
+ "text": "309 7 Conclusion ",
927
+ "text_level": 1,
928
+ "bbox": [
929
+ 142,
930
+ 537,
931
+ 299,
932
+ 555
933
+ ],
934
+ "page_idx": 8
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "310 Limitations We presented Contrastive Mixture of Posteriors (CoMP) as an effective means to \n311 perform batch correction, data integration, counterfactual inference and fair representation learning \n312 in a CVAE framework. Whilst CoMP covers the majority of common use-cases for these tasks, there \n313 are several limitations that are avenues of future research. For example, in scRNA-seq analysis, there \n314 is often the need to integrate more than two datasets together, or to adjust for continuous condition \n315 variables. Mathematically, CoMP is applicable to any number of discrete conditions, and it would be \n316 interesting to apply it to a setting with $> 2$ conditions. Extensions of CoMP could tackle the case \n317 of a continuous condition variable. Additionally, CoMP requires the condition variable $c$ to be fully \n318 observed: future work might attempt to generalise to the partially observed case. \n319 Summary We identified marginal independence between the representation z and condition $c$ as \n320 the mathematical thread linking data integration, counterfactual inference and fairness. We proposed \n321 CoMP, a novel method to enforce this independence requirement in practice. We saw that CoMP \n322 has several attractive theoretic properties. First, CoMP only uses the variational posteriors, requiring \n323 no additional discrepancy measures such as MMD. Second, we proved that the CoMP penalty can \n324 be interpreted as an upper-bound on a weighted sum of KL divergences, connecting it to a well \n325 founded divergence measure. Third, we demonstrated that, unlike MMD, CoMP gradients have a \n326 self-normalising property, allowing one to obtain strong gradients for distant points in a latent space \n327 with complex global structure. Empirically, we demonstrated CoMP’s performance when applied to \n328 two biological and one fair representation learning dataset. These biological datasets are of critical \n329 importance in drug discovery, for example matching cell-lines to tumours for effective pre-clinical \n330 assay development of anti-cancer compounds. Overall, CoMP has the best in class performance on \n331 all tasks across a range of metrics that measure either latent space mixing or fairness. ",
939
+ "bbox": [
940
+ 140,
941
+ 577,
942
+ 825,
943
+ 703
944
+ ],
945
+ "page_idx": 8
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "",
950
+ "bbox": [
951
+ 140,
952
+ 732,
953
+ 825,
954
+ 911
955
+ ],
956
+ "page_idx": 8
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "References ",
961
+ "text_level": 1,
962
+ "bbox": [
963
+ 151,
964
+ 89,
965
+ 267,
966
+ 106
967
+ ],
968
+ "page_idx": 9
969
+ },
970
+ {
971
+ "type": "text",
972
+ "text": "[1] Valentine Svensson, Roser Vento-Tormo, and Sarah A Teichmann. Exponential scaling of single-cell rna-seq in the past decade. Nature protocols, 13(4):599–604, 2018. \n[2] Aviv Regev, Sarah A Teichmann, Eric S Lander, Ido Amit, Christophe Benoist, Ewan Birney, Bernd Bodenmiller, Peter Campbell, Piero Carninci, Menna Clatworthy, et al. Science forum: the human cell atlas. Elife, 6:e27041, 2017. \n[3] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. \n[4] Danilo Jimenez Rezende, S. Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In ICML, 2014. \n[5] Romain Lopez, Jeffrey Regier, Michael B Cole, Michael I Jordan, and Nir Yosef. Deep generative modeling for single-cell transcriptomics. Nature methods, 15(12):1053–1058, 2018. \n[6] Gregory P Way and Casey S Greene. Extracting a biologically relevant latent space from cancer transcriptomes with variational autoencoders. In PACIFIC SYMPOSIUM ON BIOCOMPUTING 2018: Proceedings of the Pacific Symposium, pages 80–91. World Scientific, 2018. \n[7] Dongfang Wang and Jin Gu. Vasc: dimension reduction and visualization of single-cell rna-seq data by deep variational autoencoder. Genomics, proteomics & bioinformatics, 16(5):320–331, 2018. \n[8] Christopher Heje Grønbech, Maximillian Fornitz Vording, Pascal N Timshel, Casper Kaae Sønderby, Tune H Pers, and Ole Winther. scvae: Variational auto-encoders for single-cell gene expression data. Bioinformatics, 36(16):4415–4422, 2020. \n[9] Mohammad Lotfollahi, F Alexander Wolf, and Fabian J Theis. scGen predicts single-cell perturbation responses. Nature methods, 16(8):715, 2019. \n[10] Mohammad Lotfollahi, Mohsen Naghipourfar, Fabian J Theis, and F Alexander Wolf. Conditional out-of-sample generation for unpaired data using trVAE. arXiv preprint arXiv:1910.01791, 2019. \n[11] Matthew Amodio, D. V. Dijk, R. Montgomery, Guy Wolf, and Smita Krishnaswamy. Out-of-sample extrapolation with neuron editing. arXiv: Quantitative Methods, 2018. \n[12] W. Johnson, Cheng Li, and Ariel Rabinovic. Adjusting batch effects in microarray expression data using empirical Bayes methods. Biostatistics, 8 1:118–27, 2007. \n[13] J. Leek and John D. Storey. Capturing heterogeneity in gene expression studies by surrogate variable analysis. PLoS Genetics, 3, 2007. \n[14] Laleh Haghverdi, A. Lun, Michael D. Morgan, and J. Marioni. Batch effects in single-cell rna-sequencing data are corrected by matching mutual nearest neighbors. Nature Biotechnology, 36:421–427, 2018. \n[15] Allison Warren, Andrew Jones, Tsukasa Shibue, William C Hahn, Jesse S Boehm, Francisca Vazquez, Aviad Tsherniak, and James M McFarland. Global computational alignment of tumor and cell line transcriptional profiles. Nature Communications, 12(22), 2021. \n[16] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in neural information processing systems, pages 3483–3491, 2015. \n[17] Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Schölkopf, and Alexander Smola. A kernel two-sample test. The Journal of Machine Learning Research, 13(1):723–773, 2012. \n[18] Christos Louizos, Kevin Swersky, Yujia Li, Max Welling, and Richard Zemel. The variational fair autoencoder. arXiv preprint arXiv:1511.00830, 2015. \n[19] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. \n[20] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020. \n[21] Allison Warren, Yejia Chen, Andrew Jones, Tsukasa Shibue, William C Hahn, Jesse S Boehm, Francisca Vazquez, Aviad Tsherniak, and James M McFarland. Global computational alignment of tumor and cell line transcriptional profiles. Nature Communications, 12(1):1–12, 2021. \n[22] Dheeru Dua and Casey Graff. UCI machine learning repository, 2017. \n[23] Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951. \n[24] 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. International Conference on Learning Representations, 2017. \n[25] Emile Mathieu, Tom Rainforth, N. Siddharth, and Yee Whye Teh. Disentangling disentanglement in variational autoencoders. In In International Conference on Machine Learning, pages 4402–4412. PMLR, 2019. \n[26] Jakub Tomczak and Max Welling. Vae with a vampprior. In International Conference on Artificial Intelligence and Statistics, pages 1214–1223. PMLR, 2018. \n[27] Judea Pearl. Causality. Cambridge university press, 2009. \n[28] Kenneth A. Bollen. Structural equation models. Wiley, 2005. \n[29] Fredrik Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In International conference on machine learning, pages 3020–3029, 2016. \n[30] Jonas Peters, Joris Mooij, Dominik Janzing, and Bernhard Schölkopf. Identifiability of causal graphs using functional models. arXiv preprint arXiv:1202.3757, 2012. \n[31] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork. Learning fair representations. In International conference on machine learning, pages 325–333. PMLR, 2013. \n[32] Matt J. Kusner, Joshua R. Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. arXiv preprint arXiv:1703.06856, 2017. \n[33] Craig A Glastonbury, Michael Ferlaino, Christoffer Nellåker, and Cecilia M Lindgren. Adjusting for confounding in unsupervised latent representations of images. arXiv preprint arXiv:1811.06498, 2018. \n[34] Jean-Philippe Vert, Koji Tsuda, and Bernhard Schölkopf. A primer on kernel methods. Kernel methods in computational biology, 47:35–70, 2004. \n[35] Ke Li and Jitendra Malik. Implicit maximum likelihood estimation. arXiv preprint arXiv:1809.09087, 2018. \n[36] Romain Lopez, Jeffrey Regier, Michael I Jordan, and Nir Yosef. Information constraints on auto-encoding variational bayes. In Advances in Neural Information Processing Systems, pages 6114–6125, 2018. \n[37] Kaspar Märtens and Christopher Yau. Neural decomposition: Functional anova with variational autoencoders. In International Conference on Artificial Intelligence and Statistics, pages 2917–2927. PMLR, 2020. \n[38] Christos Louizos, Uri Shalit, Joris M Mooij, David Sontag, Richard Zemel, and Max Welling. Causal effect inference with deep latent-variable models. In Advances in Neural Information Processing Systems, pages 6446–6456, 2017. \n[39] H. Kim, Seungjae Shin, Joonho Jang, Kyungwoo Song, Weonyoung Joo, Wanmo Kang, and Il-Chul Moon. Counterfactual fairness with disentangled causal effect variational autoencoder. In AAAI, 2021. \n[40] Stephen R. Pfohl, Tony Duan, Daisy Yi Ding, and Nigam H. Shah. Counterfactual reasoning for fair clinical risk prediction. In Finale Doshi-Velez, Jim Fackler, Ken Jung, David Kale, Rajesh Ranganath, Byron Wallace, and Jenna Wiens, editors, Proceedings of the 4th Machine Learning for Healthcare Conference, volume 106 of Proceedings of Machine Learning Research, pages 325–358, Ann Arbor, Michigan, 09–10 Aug 2019. PMLR. \n[41] Hyun Min Kang, Meena Subramaniam, Sasha Targ, Michelle Nguyen, Lenka Maliskova, Elizabeth McCarthy, Eunice Wan, Simon Wong, Lauren Byrnes, Cristina M Lanata, et al. Multiplexed droplet single-cell rna-sequencing using natural genetic variation. Nature biotechnology, 36(1):89, 2018. \n[42] Maren Büttner, Zhichao Miao, F Alexander Wolf, Sarah A Teichmann, and Fabian J Theis. A test metric for assessing single-cell rna-seq batch correction. Nature methods, 16(1):43–49, 2019. \n[43] Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics, 20:53–65, 1987. \n[44] Christian P. Robert and Judith Rousseau. How Principled and Practical Are Penalised Complexity Priors? Statistical Science, 32(1):36–40, February 2017. \n[45] Murray Aitkin. Posterior Bayes Factors. Journal of the Royal Statistical Society. Series B (Methodological), 53(1):111–142, 1991. \n[46] Paul Fearnhead and Dennis Prangle. Constructing summary statistics for approximate Bayesian computation: semi-automatic approximate Bayesian computation. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(3):419–474, 2012. \n[47] Adam Foster, Martin Jankowiak, Matthew O’Meara, Yee Whye Teh, and Tom Rainforth. A unified stochastic gradient approach to designing bayesian-optimal experiments. In International Conference on Artificial Intelligence and Statistics, pages 2959–2969. PMLR, 2020. \n[48] J. Weinstein, E. Collisson, G. Mills, K. Shaw, B. Ozenberger, Kyle Ellrott, I. Shmulevich, C. Sander, and Joshua M. Stuart. The Cancer Genome Atlas Pan-Cancer analysis project. Nature Genetics, 45:1113–1120, 2013. \n443 [49] DS Gerhard, S Hunger, C Lau, J Maris, P Meltzer, S Meshinchi, E Perlman, J Zhang, J Guidry-Auvil, and \n444 M Smith. Therapeutically applicable research to generate effective treatments (target) project: Half of \n445 pediatric cancers have their own\" driver\" genes. In PEDIATRIC BLOOD & CANCER, volume 65, pages \n446 S45–S45. WILEY 111 RIVER ST, HOBOKEN 07030-5774, NJ USA, 2018. \n447 [50] M. Ghandi, F. Huang, J. Jané-Valbuena, G. Kryukov, Christopher Lo, E. McDonald, J. Barretina, E. Gelfand, \n448 C. Bielski, Haoxin Li, Kevin Hu, Alexander Y. Andreev-Drakhlin, J. Kim, J. Hess, B. Haas, F. Aguet, \n449 B. Weir, M. Rothberg, B. Paolella, M. Lawrence, Rehan Akbani, Y. Lu, Hong L. Tiv, P. Gokhale, Antoine \n450 de Weck, Ali Amin Mansour, C. Oh, J. Shih, Kevin Hadi, Yanay Rosen, J. Bistline, K. Venkatesan, \n451 Anupama Reddy, Dmitriy Sonkin, Manway Liu, J. Lehár, J. Korn, D. Porter, M. Jones, J. Golji, G. Caponigro, Jordan E. Taylor, C. Dunning, Amanda L Creech, Allison Warren, James M. McFarland, Mahdi Zamanighomi, A. Kauffmann, Nicolas Stransky, M. Imielinski, Y. Maruvka, A. Cherniack, Aviad Tsher- ´ niak, F. Vazquez, J. Jaffe, A. A. Lane, D. Weinstock, C. Johannessen, Michael P. Morrissey, F. Stegmeier, R. Schlegel, W. Hahn, G. Getz, G. Mills, J. Boehm, T. Golub, L. Garraway, and W. Sellers. Next-generation characterization of the Cancer Cell Line Encyclopedia. Nature, 569:503–508, 2019. ",
973
+ "bbox": [
974
+ 169,
975
+ 114,
976
+ 828,
977
+ 915
978
+ ],
979
+ "page_idx": 9
980
+ },
981
+ {
982
+ "type": "text",
983
+ "text": "",
984
+ "bbox": [
985
+ 165,
986
+ 90,
987
+ 830,
988
+ 911
989
+ ],
990
+ "page_idx": 10
991
+ },
992
+ {
993
+ "type": "text",
994
+ "text": "",
995
+ "bbox": [
996
+ 138,
997
+ 92,
998
+ 826,
999
+ 275
1000
+ ],
1001
+ "page_idx": 11
1002
+ },
1003
+ {
1004
+ "type": "text",
1005
+ "text": "Checklist ",
1006
+ "text_level": 1,
1007
+ "bbox": [
1008
+ 142,
1009
+ 294,
1010
+ 254,
1011
+ 310
1012
+ ],
1013
+ "page_idx": 11
1014
+ },
1015
+ {
1016
+ "type": "text",
1017
+ "text": "1. For all authors... ",
1018
+ "bbox": [
1019
+ 214,
1020
+ 320,
1021
+ 339,
1022
+ 335
1023
+ ],
1024
+ "page_idx": 11
1025
+ },
1026
+ {
1027
+ "type": "text",
1028
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Section 7 \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
1029
+ "bbox": [
1030
+ 238,
1031
+ 339,
1032
+ 825,
1033
+ 431
1034
+ ],
1035
+ "page_idx": 11
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "text": "2. If you are including theoretical results... ",
1040
+ "bbox": [
1041
+ 214,
1042
+ 435,
1043
+ 493,
1044
+ 449
1045
+ ],
1046
+ "page_idx": 11
1047
+ },
1048
+ {
1049
+ "type": "text",
1050
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes] See Appendix ",
1051
+ "bbox": [
1052
+ 232,
1053
+ 453,
1054
+ 781,
1055
+ 484
1056
+ ],
1057
+ "page_idx": 11
1058
+ },
1059
+ {
1060
+ "type": "text",
1061
+ "text": "3. If you ran experiments... ",
1062
+ "bbox": [
1063
+ 214,
1064
+ 488,
1065
+ 393,
1066
+ 503
1067
+ ],
1068
+ "page_idx": 11
1069
+ },
1070
+ {
1071
+ "type": "text",
1072
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See Appendix D \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix D \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Appendix D \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix D ",
1073
+ "bbox": [
1074
+ 238,
1075
+ 507,
1076
+ 825,
1077
+ 640
1078
+ ],
1079
+ "page_idx": 11
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1084
+ "bbox": [
1085
+ 218,
1086
+ 643,
1087
+ 823,
1088
+ 659
1089
+ ],
1090
+ "page_idx": 11
1091
+ },
1092
+ {
1093
+ "type": "text",
1094
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [Yes] \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] See Appendix D \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
1095
+ "bbox": [
1096
+ 238,
1097
+ 662,
1098
+ 825,
1099
+ 784
1100
+ ],
1101
+ "page_idx": 11
1102
+ },
1103
+ {
1104
+ "type": "text",
1105
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1106
+ "bbox": [
1107
+ 214,
1108
+ 787,
1109
+ 705,
1110
+ 803
1111
+ ],
1112
+ "page_idx": 11
1113
+ },
1114
+ {
1115
+ "type": "text",
1116
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1117
+ "bbox": [
1118
+ 238,
1119
+ 806,
1120
+ 825,
1121
+ 896
1122
+ ],
1123
+ "page_idx": 11
1124
+ }
1125
+ ]
parse/train/AjZCiKuWQ9n/AjZCiKuWQ9n_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/AjZCiKuWQ9n/AjZCiKuWQ9n_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg_2JHKvH/BJg_2JHKvH.md ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SEMI-SUPERVISED LEARNING WITH NORMALIZING FLOWS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ We propose Flow Gaussian Mixture Model (FlowGMM), a general-purpose method for semi-supervised learning based on a simple and principled probabilistic framework. We approximate the joint distribution of the labeled and unlabeled data with a flexible mixture model implemented as a Gaussian mixture transformed by a normalizing flow. We train the model by maximizing the exact joint likelihood of the labeled and unlabeled data. We evaluate FlowGMM on a wide range of semi-supervised classification problems across different data types: AG-News and Yahoo Answers text data, MNIST, SVHN and CIFAR-10 image classification problems as well as tabular UCI datasets. FlowGMM achieves promising results on image classification problems and outperforms the competing methods on other types of data. FlowGMM learns an interpretable latent representation space and allows hyper-parameter free feature visualization at real time rates. Finally, we show that FlowGMM can be calibrated to produce meaningful uncertainty estimates for its predictions.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ In many domains unlabeled data is plentiful, while labeled data may be scarce. Semi-supervised learning framework leverages both labeled and unlabeled data reducing the need for expensive manual annotation. Recently, consistency-based methods have shown outstanding performance in semisupervised image classification (Laine & Aila, 2016; Miyato et al., 2018; Tarvainen & Valpola, 2017; Athiwaratkun et al., 2019; Verma et al., 2019; Berthelot et al., 2019) and are currently state-of-the-art on challenging datasets like CIFAR-10, CIFAR-100, and ImageNet. However, these methods have not seen much application on domains other than images, where a suitable set of data perturbations to which the classifier should be invariant is not known a priori.
12
+
13
+ In this paper, we employ a simple and principled probabilistic framework for semi-supervised learning. We introduce a mixture distribution for modeling the data, where different components correspond to different classes. We can maximize the joint likelihood of unlabeled (using the mixture) and labeled (using individual mixture components) data. At test time, we classify the input to belong to the class corresponding to mixture component with the highest likelihood.
14
+
15
+ In order to apply this framework to complex data, we need to choose a sufficiently flexible family of distributions in the mixture, preserving the ability to compute exact likelihoods. We propose Flow Gaussian Mixture Model (FlowGMM), a mixture model based on normalizing flows (Dinh et al., 2014). Each component of the mixture is modeled as a trainable invertible transformation (normalizing flow) of the corresponding component of a Gaussian mixture in the latent space. The transformation is shared among all the mixture components. Due to invertibility, we can compute exact likelihood of the data using the change of variable formula.
16
+
17
+ We illustrate FlowGMM on a toy problem in Figure 1. We are solving a binary semi-supervised classification problem on the dataset shown in panel (a): the labeled data is shown with triangles colored according to their class, and unlabeled data is shown with blue circles. We introduce a Gaussian mixture with two components corresponding to each of the classes, shown in panel (c) in the latent space $\mathcal { Z }$ and an invertible transformation $f$ . The transformation $f$ is then trained to map the data distribution in the data space $\mathcal { X }$ to the latent Gaussian mixture in the $\mathcal { Z }$ space, mapping the labeled data to the corresponding mixture component. We visualize the learned transformation in panel (b), showing the positions of the images $f ( x )$ for all of the training data points. The inverse $f ^ { - 1 }$ of this mapping serves as a class-conditional generative model, that we visualize in panel (d). To classify a data point $x$ in the input space we compute its image $f ( x )$ in the latent space, and pick the class corresponding to the Gaussian that is closest to $f ( x )$ . We visualize the decision boundary of the learned classifier with a dashed line in panel (a).
18
+
19
+ ![](images/25cf50d85425a364bcb5402e89ddd79617e0a63a072fdd712098296937197c61.jpg)
20
+ Figure 1: Illustration of semi-supervised learning with FlowGMM on a binary classification problem. Colors represent the two classes or the corresponding Gaussian mixture components. Labeled data is shown with triangles, colored by the corresponding class label, and blue dots represent unlabeled data. (a): Data distribution and the classifier decision boundary. (b): The learned mapping of the data to the latent space. (c): Samples from the Gaussian mixture in the latent space. (d): Samples from the model in the data space.
21
+
22
+ Many of the previous attempts of using generative models for classification (Salimans et al., 2016; Nalisnick et al., 2019; Chen et al., 2019) have relied upon multitask learning, where a shared latent representation is learned for the generative model and the classifier. With the method of Chen et al. (2019), hybrid modeling is observed to reduce performance for both tasks in the supervised case. For GANs, Dai et al. (2017) have pointed out that classification performance and generative performance are in direct conflict: a perfect generator yields no benefit to classification performance. FlowGMM takes a different approach, where the generative model is used directly as a Bayes classifier, and in the limit of a perfect generative model the Bayes classifier achieves provably optimal misclassification rate (see e.g. Mohri et al., 2018).
23
+
24
+ FlowGMM naturally encodes the clustering principle: the decision boundary between classes must lie in the low-density region in the data space. Indeed, in the latent space the decision boundary between two classes coincides with the hyperplane perpendicular to the line segment connecting means of the corresponding mixture components and passing through the midpoint of this line segment (assuming the components are normal distributions with identity covariance matrices); in panel (b) of Figure 1 we show the decision boundary in the latent space with a dashed line. The density of the latent distribution near the decision boundary is low. As the flow is trained to represent data as a transformation of this latent distribution, the density near the decision boundary should also be low. In panel (a) of Figure 1 the decision boundary indeed lies in the low-density region.
25
+
26
+ The contributions of this work are as follows:
27
+
28
+ • We propose FlowGMM, a new probabilistic classification model based on normalizing flows, that can be naturally applied to semi-supervised learning. We evaluate FlowGMM on a range of semi-supervised classification benchmarks including text, tabular and image data, and it works well. FlowGMM outperforms alternative approaches on non-image data and shows promise for image data. We propose modified consistency regularization for FlowGMM and empirically demonstrate that it substantially improves performance of the method on image classification problems.
29
+
30
+ • We conduct a thorough empirical analysis of FlowGMM for supervised and semisupervised classification. One of the important features of FlowGMM is its interpretability. To demonstrate it, we visualize the learned latent space representations for the proposed semi-supervised model and show that interpolations between data points from different classes pass through low-density regions. We show how our classification model can be used for optimization free feature visualization. We also study the predictive uncertainties produced by the method and show that they can be calibrated by scaling the variances of mixture components.
31
+
32
+ # 2 BACKGROUND: NORMALIZING FLOWS
33
+
34
+ The normalizing flow (Dinh et al., 2016) is an unsupervised model for density estimation defined as an invertible mapping $f : \mathcal { X } \mathcal { Z }$ from the data space $\mathcal { X }$ to the latent space $\mathcal { Z }$ . We can model the data distribution as a transformation $f ^ { - 1 } : { \mathcal { Z } } \to { \bar { \mathcal { X } } }$ applied to a random variable from the latent distribution $z \sim p _ { \mathcal { Z } }$ often chosen to be Gaussian. The density of the transformed random variable $x = f ^ { - 1 } ( z )$ is given by the change of variables formula
35
+
36
+ $$
37
+ p \chi ( x ) = p \mathcal { Z } \bigl ( f ( x ) \bigr ) \cdot \left| \operatorname* { d e t } \left( \frac { \partial f } { \partial x } \right) \right| .
38
+ $$
39
+
40
+ The mapping $f$ is implemented as a sequence of invertible functions, parametrized by a neural network with architecture that is designed to ensure invertibility and efficient computation of logdeterminants, and a set of parameters $\theta$ that can be optimized. The model can be trained by maximizing the likelihood (equation 1) of the training data with respect to the parameters $\theta$ .
41
+
42
+ # 3 FLOW GAUSSIAN MIXTURE MODEL (FLOWGMM)
43
+
44
+ In FlowGMM, we introduce a discrete latent variable $y$ for the class label, $y \in \{ 1 \ldots . c \}$ . Our latent space distribution, conditioned on a given label $k$ , is Gaussian with mean $\mu _ { k }$ and covariance $\Sigma _ { k }$ :
45
+
46
+ $$
47
+ p _ { \mathcal { Z } } ( z | y = k ) = \mathcal { N } ( z | \mu _ { k } , \Sigma _ { k } ) .
48
+ $$
49
+
50
+ The marginal distribution of $z$ is then a Gaussian mixture. When the classes are balanced, this distribution is
51
+
52
+ $$
53
+ p _ { \mathcal Z } ( z ) = \frac { 1 } { \mathcal { C } } \sum _ { k = 1 } ^ { \mathcal { C } } \mathcal { N } ( z | \mu _ { k } , \Sigma _ { k } ) .
54
+ $$
55
+
56
+ Thus, the likelihood for labeled data is
57
+
58
+ $$
59
+ p _ { \mathcal { X } } ( x | y = k ) = \mathcal { N } \left( f ( x ) | \mu _ { k } , \Sigma _ { k } \right) \cdot \left| \operatorname* { d e t } \left( \frac { \partial f } { \partial x } \right) \right| ,
60
+ $$
61
+
62
+ and the likelihood for data with unknown label is $\begin{array} { r } { p _ { \mathcal { X } } ( x ) = \sum _ { k } p _ { \mathcal { X } } ( x | y = k ) p ( y = k ) } \end{array}$ . If we have access to both a labeled dataset $\mathcal { D } _ { \ell }$ and an unlabeled dataset $\mathcal { D } _ { u }$ , then we can train our model in a semi-supervised way to maximize the joint likelihood of the labeled and unlabeled data
63
+
64
+ $$
65
+ p _ { \mathcal { X } } ( \mathcal { D } _ { \ell } , \mathcal { D } _ { u } ) = \prod _ { ( x _ { i } , y _ { i } ) \in \mathcal { D } _ { \ell } } p _ { \mathcal { X } } ( x _ { i } , y _ { i } ) \prod _ { x _ { j } \in \mathcal { D } _ { u } } p _ { \mathcal { X } } ( x _ { j } ) ,
66
+ $$
67
+
68
+ over the parameters $\theta$ of the bijective function $f$ , which learns a density model with a Bayes classifier: given a test point $x$ , the model predictive distribution is given by
69
+
70
+ $$
71
+ p _ { \mathcal { X } } ( y | x ) = p _ { \mathcal { X } } ( x | y ) p ( y ) / p ( x ) = \frac { \mathcal { N } \left( f ( x ) | \mu _ { y } , \Sigma _ { y } \right) } { \sum _ { k = 1 } ^ { \mathcal { C } } \mathcal { N } \left( f ( x ) | \mu _ { k } , \Sigma _ { k } \right) } .
72
+ $$
73
+
74
+ We can then make predictions for a test point $x$ with the Bayes decision rule
75
+
76
+ $$
77
+ y = \arg \operatorname* { m a x } _ { i \in \{ 1 , \ldots , { c } \} } p _ { \mathcal { X } } ( y = i | x ) .
78
+ $$
79
+
80
+ Alternatively to direct likelihood maximization, we can adapt Expectation Maximization algorithm for model training (discussed in Appendix A).
81
+
82
+ # 3.1 CONSISTENCY REGULARIZATION
83
+
84
+ Most of the existing state-of-the-art approaches to semi-supervised learning on image data are based on consistency regularization (Laine & Aila, 2016; Miyato et al., 2018; Tarvainen & Valpola, 2017; Athiwaratkun et al., 2019; Verma et al., 2019). These methods penalize changes in network predictions with respect to input perturbations, such as random translations and horizontal flips, with an additional loss term that can be computed on unlabeled data,
85
+
86
+ $$
87
+ \ell _ { c o n s } ( x ) = \| g ( x ^ { \prime } ) - g ( x ^ { \prime \prime } ) \| ^ { 2 } ,
88
+ $$
89
+
90
+ where $x ^ { \prime } , x ^ { \prime \prime }$ are random perturbations of $x$ , and $g$ is the vector of probabilities over the classes.
91
+
92
+ Motivated by these methods, we introduce a simple consistency regularization term for FlowGMM. Let $y ^ { \prime \prime }$ be the label predicted on image $x ^ { \prime \prime }$ by FlowGMM according to equation 5. We then define the consistency loss term as the negative log likelihood of the input $x ^ { \prime }$ given the label $y ^ { \prime \prime }$ :
93
+
94
+ $$
95
+ L _ { \mathrm { c o n s } } ( x ^ { \prime } , x ^ { \prime \prime } ) = - \log p ( x ^ { \prime } | y ^ { \prime \prime } ) = - \log N ( f ( x ^ { \prime } ) | \mu _ { y ^ { \prime \prime } } , \Sigma _ { y ^ { \prime \prime } } ) - \log \left| \operatorname* { d e t } \left( \frac { \partial f } { \partial x ^ { \prime } } \right) \right| .
96
+ $$
97
+
98
+ This loss term encourages the model to map small perturbations of the same unlabeled inputs to the same components of the Gaussian mixture distribution in the latent space. Unlike the standard consistency loss of equation 6, the proposed loss in equation 7 takes values on the same scale as the data log likelihood (equation 4), and empirically we found it to perform better. We refer to FlowGMM with the consistency term as FlowGMM-cons. The final loss for FlowGMM-cons is then the weighted sum of the consistency loss (equation 7) and the negative log likelihood of both labeled and unlabeled data (equation 4).
99
+
100
+ # 4 RELATED WORK
101
+
102
+ Generative models have been used extensively in semi-supervised learning. In the work of Kingma et al. (2014), it was shown how the likelihood model of Variational Autoencoder (Kingma & Welling, 2013) could be used for semi-supervised image classification on datasets like MNIST and SVHN. Xu et al. (2017) later extended this framework to semi-supervised text classification. Generative Adversarial Networks (GANs) have been employed for semi-supervised learning through multitask objective where the model learns to simultaneously discriminate generated images from real (labeled and unlabeled) images and classify labeled data.
103
+
104
+ Along with GANs and VAEs, Normalizing Flows (NF) (Dinh et al., 2014) present another major class of deep generative models. Unlike GANs and VAEs, normalizing flows can be trained using exact likelihood. NFs admit controllable latent representations and can be sampled efficiently unlike auto-regressive models (Papamakarios et al., 2017; Oord et al., 2016). Recent work (Dinh et al., 2016; Kingma & Dhariwal, 2018; Behrmann et al., 2018) demonstrated that normalizing flows can produce high-fidelity samples for natural image datasets. Some normalizing flow papers (such as RealNVP (Dinh et al., 2016)) have used class-conditional sampling, where the transformation is conditioned on the class label. To do so, they pass the class label as an input to coupling layers, conditioning the output of the flow on the class.
105
+
106
+ Deep Invertible Generalized Linear Model (DIGLM, Nalisnick et al., 2019), most closely related to our work, trains a classifier on the latent representation of a normalizing flow to perform supervised or semi-supervised image classification. Our approach is principally different, as we use a mixture of Gaussians in the latent space $\mathcal { Z }$ and perform classification based on class-conditional likelihoods (see equation 5), rather than training a separate classifier. One of the key advantages of our approach is the explicit encoding of clustering principle in the method and a more natural probabilistic interpretation.
107
+
108
+ # 5 EXPERIMENTS
109
+
110
+ In all experiments, we use the RealNVP normalizing flow architecture. Throughout training, Gaussian mixture parameters are fixed: the means are initialized randomly from the standard normal distribution and the covariances are set to $I$ . See Appendix B for further discussion on GMM initialization and training.
111
+
112
+ # 5.1 SYNTHETIC DATA
113
+
114
+ We first apply FlowGMM to a range of two-dimensional synthetic datasets, in order to get a better visual intuition for the method. We use RealNVP architecture with 5 coupling layers, defined by fully-connected shift and scale networks, each with 1 hidden layer of size 512. In addition to the semi-supervised setting, we also trained the method only using the labeled data. In Figure 2 we visualize the decision boundaries of the classifier corresponding to FlowGMM for both of these settings on the two circles and pinwheel datasets. On both datasets FlowGMM is able to leverage the unlabeled data to push the decision boundary to a low-density region, as expected. On the two circles dataset the method is unable to fit the data perfectly, as it is impossible to represent this dataset as an invertible continuous mapping of two Gaussians, because they are topologically distinct. FlowGMM still produces a reasonable decision boundary and improves over the case when only labeled data is available. We provide additional visualizations in Appendix C, Figure 4.
115
+
116
+ ![](images/f4e929b21f9c1ca06c2fc39a2a9767651f687640b0b721001c6e90f894c51fac.jpg)
117
+ Figure 2: Illustration of FlowGMM performance on synthetic datasets. Labeled data is shown with colored triangles, and unlabeled data is shown with blue circles. Colors represent different classes. We compare the classifier decision boundaries when only using labeled data (panels b, d) and when using both labeled and unlabeled data (panels a, c) on two circles (panels a, b) and pinwheel (panels c, d) datasets. FlowGMM leverages unlabeled data to push the decision boundary to low-density regions of the space.
118
+
119
+ Table 1: Accuracy on BERT embedded text classification datasets and UCI datasets with a small number of labeled examples. The kNN baseline, logistic regression, and the 3-Layer $\mathrm { N N } +$ Dropout were trained on the labeled data only. Numbers reported for each method are the best of 3 runs (ranked by performance on the validation set). $n _ { l }$ and $n _ { u }$ are the number of labeled and unlabeled data points.
120
+ Dataset $\left( n _ { l } \right/ n _ { u }$ , classes)
121
+
122
+ <table><tr><td>Method</td><td>AG-News (200 / 200k,4)</td><td>Yahoo Answers (800 /50k,10)</td><td>Hepmass (20/140k,2)</td><td>Miniboone (20 / 65k,2)</td></tr><tr><td>kNN</td><td>51.3</td><td>28.4</td><td>84.6</td><td>77.7</td></tr><tr><td>Logistic Regression</td><td>78.9</td><td>54.9</td><td>84.9</td><td>75.9</td></tr><tr><td>3-Layer NN + Dropout</td><td>78.1</td><td>55.6</td><td>84.4</td><td>77.3</td></tr><tr><td>RBF Label Spreading</td><td>54.6</td><td>30.4</td><td>87.1</td><td>78.8</td></tr><tr><td>kNN Label Spreading</td><td>56.7</td><td>25.6</td><td>87.2</td><td>78.1</td></tr><tr><td>I-model</td><td>80.6</td><td>56.6</td><td>87.9</td><td>78.3</td></tr><tr><td>FlowGMM</td><td>84.8</td><td>57.4</td><td>88.8</td><td>80.6</td></tr></table>
123
+
124
+ # 5.2 TEXT AND TABULAR DATA
125
+
126
+ We believe that FlowGMM can be especially useful for semi-supervised learning on tabular data. Consistency-based semi-supervised methods have mostly been developed for image classification, where the predictions of the method are regularized to be invariant to random flips and translations of the image. On tabular data, where the structure is less prominent, finding suitable transformations to apply for consistency-based methods is not-trivial. Similarly, approaches based on GANs have mostly been developed for images. We evaluate FlowGMM on the Hepmass and Miniboone UCI classification datasets (previously used in Papamakarios et al. (2017) for density estimation).
127
+
128
+ Along with standard tabular UCI datasets, we also consider text classification on AG-News and Yahoo Answers datasets. Using the recent advances in transfer learning for NLP, we construct embeddings for input texts using the BERT transformer model (Devlin et al., 2018) trained on a corpus of Wikipedia articles, and then train FlowGMM and other baselines on the embeddings.
129
+
130
+ We compare FlowGMM to the graph based label spreading method from Zhou et al. (2004), a Π-Model (Laine & Aila, 2016) that uses dropout perturbations, as well as supervised logistic regression, $\mathbf { k }$ -nearest neighbors, and neural network that were trained on the labeled data only. We report
131
+
132
+ Table 2: Accuracy of the FlowGMM, VAE model $( \mathbf { M } 1 + \mathbf { M } 2 \mathbf { \Lambda }$ VAE, Kingma et al., 2014), DIGLM (Nalisnick et al., 2019) in supervised and semi-supervised settings on MNIST, SVHN, and CIFAR10. FlowGMM Sup (All labels) as well as DIGLM Sup (All labels) were trained on full train datasets with all labels to demonstrate general capacity of these models. FlowGMM Sup $\mathbf { \rho } _ { n _ { l } }$ labels) was trained on $n _ { l }$ labeled examples (and no unlabeled data). For reference, at the bottom we list the performance of the Π-Model (Laine & Aila, 2016) and BadGAN (Dai et al., 2017) as representative consistency-based and GAN-based state-of-the-art methods. Both of these methods use non-invertible architectures with substantially higher base performance and, thus, are not directly comparable.
133
+
134
+ Dataset (nl / nu)
135
+
136
+ <table><tr><td>Method</td><td>MNIST (1k/59k)</td><td>SVHN (1k/72k)</td><td>CIFAR-10 (4k/46k)</td></tr><tr><td>DIGLM Sup (All labels)</td><td>99.27</td><td>95.74</td><td>-</td></tr><tr><td>FlowGMM Sup (All labels)</td><td>99.63</td><td>95.81</td><td>88.44</td></tr><tr><td>M1+M2 VAE SSL DIGLM SSL</td><td>97.60 99.0</td><td>63.98</td><td></td></tr><tr><td>FlowGMM Sup (nt labels)</td><td>97.36</td><td>= 78.26</td><td>= 73.13</td></tr><tr><td>FlowGMM</td><td>98.94</td><td></td><td></td></tr><tr><td>FlowGMM-cons</td><td></td><td>82.42</td><td>78.24</td></tr><tr><td></td><td>99.0</td><td>86.44</td><td>80.9</td></tr><tr><td>BadGAN</td><td>=</td><td>95.75</td><td>85.59</td></tr><tr><td>II-Model</td><td></td><td>94.57</td><td>87.64</td></tr></table>
137
+
138
+ the results in Table 5.1, where FlowGMM beats the competing semi-supervised learning methods on each of the considered datasets. Implementation details for FlowGMM, the baselines, and the dataset preprocessing details are listed in Appendix D.
139
+
140
+ # 5.3 IMAGE CLASSIFICATION
141
+
142
+ We next evaluate the proposed method on semi-supervised image classification benchmarks on CIFAR-10, MNIST and SVHN datasets. For all the datasets, we use RealNVP (Dinh et al., 2016) architecture. Exact implementation details are listed in the appendix E. The supervised model is trained using the same loss (equation 4), where all the data points are labeled $( n _ { u } = 0 )$ ).
143
+
144
+ We present the results for FlowGMM and FlowGMM-cons in Table 2. We also report results from DIGLM (Nalisnick et al., 2019) (which only report semi-supervised performance on MNIST and supervised performance on MNIST and SVHN) and the $\mathbf { M } 1 { + } \mathbf { M } 2$ VAE model (Kingma et al., 2014). FlowGMM outperforms $\mathbf { M } 1 { + } \mathbf { M } 2$ model and performs better or on par with DIGLM. Furthermore, FlowGMM-cons improves over FlowGMM on all three datasets, suggesting that consistency regularization is very beneficial for the proposed model when useful perturbations are available.
145
+
146
+ Following Oliver et al. (2018), we evaluate FlowGMM-cons varying the number of labeled data points. Specifically, we follow the setup of Kingma et al. (2014) and train FlowGMM-cons on MNIST with 100, 600, 1000 and 3000 labeled data points. We present the results in Table 3. FlowGMM-cons outperforms the $\mathbf { M } 1 { + } \mathbf { M } 2$ model of Kingma et al. (2014) in all the considered settings.
147
+
148
+ We note that the results presented in this section are not directly comparable with the state-of-theart methods using GANs or consistency regularization (see e.g. Laine & Aila, 2016; Dai et al., 2017; Athiwaratkun et al., 2019; Berthelot et al., 2019), as the architecture we employ is much less powerful for classification than the ConvNet and ResNet architectures that have been designed for classification without the constraint of invertibility. We believe that invertible architectures with better inductive biases for classification (possibly like iResNet (Behrmann et al., 2018)) may help bridge this gap. The space of images is challenging to model and while there has been substantial progress using normalizing flows, there is still much ground to cover.
149
+
150
+ Table 3: Semi-supervised classification accuracy for FlowGMM-cons and VAE $\mathbf { M } 1 + \mathbf { M } 2$ model (Kingma et al., 2014) on MNIST for different number of labeled data points $n _ { l }$ .
151
+
152
+ <table><tr><td>Method</td><td>n =100</td><td>n = 600</td><td>n = 1000</td><td>n = 3000</td></tr><tr><td>M1+M2 VAE SSL (nt labels)</td><td>96.67</td><td>97.41 ± 0.05</td><td>97.60± 0.02</td><td>97.82 ± 0.04</td></tr><tr><td>FlowGMM-cons (ni labels)</td><td>98.2</td><td>98.7</td><td>99</td><td>99.2</td></tr></table>
153
+
154
+ Table 4: Negative log-likelihood and Expected Calibration Error for supervised FlowGMM trained on MNIST (1k train, 1k validation, 10k test) and CIFAR-10 ( $5 0 \mathrm { k }$ train, 1k validation, $9 \mathrm { k }$ test). FlowGMM-temp stands for tempered FlowGMM where a single scalar parameter $\sigma ^ { 2 }$ was learned on a validation set for variances in all components.
155
+
156
+ <table><tr><td rowspan="2"></td><td colspan="2">MNIST (test acc 97.3%)</td><td colspan="2">CIFAR-10 (test acc 89.3%)</td></tr><tr><td>FlowGMM</td><td>FlowGMM-temp</td><td>FlowGMM</td><td>FlowGMM-temp</td></tr><tr><td>NLL↓</td><td>0.295</td><td>0.094</td><td>2.98</td><td>0.444</td></tr><tr><td>ECE↓</td><td>0.024</td><td>0.004</td><td>0.108</td><td>0.038</td></tr></table>
157
+
158
+ # 6 MODEL ANALYSIS
159
+
160
+ # 6.1 UNCERTAINTY AND CALIBRATION
161
+
162
+ In many machine learning applications, it is crucial to understand how confident a model is in its predictions. In classification problems, well-calibrated models are expected to output meaningful probabilities of belonging to a particular class. In Guo et al. (2017), it was observed that modern deep learning models are highly overconfident, however, simple temperature scaling can substantially improve model’s calibration. In this section, we analyze the predictive uncertainties produced by the FlowGMM. In Appendix Section F, we additionally study the ability of FlowGMM to detect out-of-domain data.
163
+
164
+ When using FlowGMM for classification, the class predictive probabilities are $p ( y ~ = ~ k | x ) ~ =$ $\begin{array} { r } { \mathcal { N } ( x | \mu _ { k } , \boldsymbol { \Sigma _ { k } ^ { - } } ) / \sum _ { m } \mathcal { N } ( x | \mu _ { m } , \boldsymbol { \Sigma } _ { m } ) } \end{array}$ . Since we initialize Gaussian mixture means randomly from the standard normal distribution and do not train them along with the flow parameters (see section B), FlowGMM predictions become inherently overconfident due to the curse of dimensionality. Indeed, consider two Gaussians with means sampled independently from the standard normal $\mu _ { 1 } , \mu _ { 2 } \sim \mathcal { N } ( 0 , I )$ in $D$ -dimensional space. If $s _ { 1 } \sim \mathcal { N } ( \mu _ { 1 } , I )$ is a sample from the first Gaussian, then its expected squared distances to both mixture means are $\mathbb { E } \left[ \lVert s _ { 1 } - \mu _ { 1 } \rVert ^ { 2 } \right] = D$ and $\mathbb { E } \left[ \lVert s _ { 1 } - \mu _ { 2 } \rVert ^ { 2 } \right] = 3 D$ (for a detailed derivation see Appendix Section G.). In high dimensional spaces, such logits would lead to hard label assignment in FlowGMM $\boldsymbol { p } ( y | x ) = 1$ for exactly one class). In fact, in the experiments we observe that FlowGMM is overconfident and performs hard label assignment: predicted class probabilities are all close to either 1 or 0.
165
+
166
+ We address this problem by learning a single scalar parameter $\sigma ^ { 2 }$ for all components in the Gaussian mixture (the component $k$ will be $\bar { \mathcal { N } } ( \mu _ { k } , \bar { \sigma } ^ { 2 } I ) )$ by minimizing the negative log likelihood on a validation set. This way we can re-calibrate the variance of the latent GMM in a natural way. This procedure is also equivalent to applying temperature scaling (Guo et al., 2017) to logits $\log \mathcal { N } ( x | \mu _ { k } , \Sigma _ { k } )$ . We test FlowGMM calibration on MNIST and CIFAR datasets in the supervised setting. On MNIST we restricted the training set size to 1000 objects, since on the full dataset the model makes too few mistakes which makes evaluating calibration harder. In Table 4, we report negative log likelihood and expected calibration error (ECE, see Guo et al. (2017) for a description of this metric). We can see that re-calibrating variances of the Gaussians in the mixture significantly improves both metrics and mitigates overconfidence. The effectiveness of this simple rescaling procedure suggests that the latent space distances learned by the flow model are correlated with the probabilities of belonging to a particular class: the closer a datapoint is to the mean of a Gaussian in the latent space, the more likely it belongs to the corresponding class.
167
+
168
+ ![](images/b834a0b4c6efead5e83eb18dfd66b065cbb69bb8b24acda051517db5722b5aa3.jpg)
169
+ Figure 3: Visualizations of the latent space representations learned by supervised FlowGMM on MNIST. (a): Latent space interpolations between test images from the same class and (b): from different classes. Observe that interpolations between objects from different classes pass through low-density regions. (c): Histogram of distances from unlabeled data to the decision boundary for FlowGMM-cons trained on $1 k$ labeled and $5 9 k$ unlabeled data and FlowGMM Sup trained on $1 k$ labeled data only. FlowGMM-cons is able to push the decision boundary away from the data distribution using unlabeled data. (d): Feature visualization for CIFAR10: four test reconstructions are shown as an intermediate feature is perturbed. The value of the perturbation $\alpha$ is shown in red vs the distribution of the channel activations. Observe that the channel visualized activates on zeroed out pixels to the left of the image mimicking the random translations applied to the training data.
170
+
171
+ # 6.2 LEARNED LATENT REPRESENTATIONS
172
+
173
+ We next analyze the latent representation space learned by FlowGMM. We examine latent interpolations between members of the same class in Figure 3 (a) and between different classes in Figure 3 (b) for our MNIST FlowGMM-cons model trained with $n _ { \ell } = 1 k$ labels. As expected, inter-class interpolations pass through regions of low-density, leading to low quality samples but intra-class interpolations do not. These observations suggest that, as expected, the model learns to put the decision boundary in the low-density region of the data space.
174
+
175
+ In Appendix section H, we present images corresponding to the means of the Gaussian mixture and class-conditional samples from FlowGMM.
176
+
177
+ Distance to Decision Boundary To explicitly test this conclusion, we compute the distribution of distances from unlabeled data to the decision boundary for FlowGMM-cons and FlowGMM Sup trained on labeled data only. In order to compute this distance exactly for an image $x$ , we find the two closest means $\mu ^ { \prime } , \bar { \mu ^ { \prime \prime } }$ to the corresponding latent variable $z = { \dot { f } } ( x )$ , and evaluate the expression $\begin{array} { r } { d ( x ) \ = \ \frac { \left| \| \mu ^ { \prime } - f ( x ) \| ^ { 2 } - \| \mu ^ { \prime \prime } - f ( x ) \| ^ { 2 } \right| } { 2 \| \mu ^ { \prime } - \mu ^ { \prime \prime } \| } } \end{array}$ We visualize the distributions of the distances for the supervised and semi-supervised method in Figure 3 (c). While most of the unlabeled data are far from the decision boundary for both methods, the supervised method puts a substantially larger fraction of data close to the decision boundary. For example, the distance to the decision boundary is smaller than 5 for 1089 unlabeled data points with supervised model, but only 143 data points with FlowGMM-cons. This increased separation suggests that FlowGMM-cons indeed pushes the decision boundary away from the data distribution in agreement with the clustering principle.
178
+
179
+ # 6.3 FEATURE VISUALIZATION
180
+
181
+ Feature visualization has become an important tool for increasing the interpretability of neural networks. The majority of methods rely on maximizing the activations of a given neuron, channel, or layer over a parametrization of an input image with different kinds of image regularization (Szegedy et al., 2013; Olah et al., 2017; Mahendran & Vedaldi, 2015). These methods, while effective, require optimization and regularization hyper-parameters and iterative optimization too costly for real time interactive exploration.
182
+
183
+ Since our classification model uses a flow which is a sequence of invertible transformations $f ( x ) =$ $f _ { : L } ( x ) : = f _ { L } \circ f _ { L - 1 } \circ . . . f _ { 1 } ( x )$ , intermediate activations can be inverted directly. This means that we can combine the methods of feature inversion and feature maximization directly by feeding in a set of input images, modifying intermediate activations arbitrarily, and inverting the representation.
184
+
185
+ Given a set of activations in the $\ell ^ { t h }$ layer $a _ { \ell } [ c , i , j ] = f _ { : \ell } ( x ) _ { c i j }$ with channels $c$ and spatial extent $i , j$ , we may perturb a single neuron with
186
+
187
+ $$
188
+ x ( \alpha ) = f _ { : \ell } ^ { - 1 } ( f _ { : \ell } ( x ) + \alpha \sigma _ { c } \delta _ { c } ) ,
189
+ $$
190
+
191
+ where $\delta _ { c }$ is a one hot vector at channel $c$ ; and $\sigma _ { c }$ is the standard deviation of the activations in channel $c$ over the the training set and spatial locations. This can be performed at real time rates to explore the activation parametrized by $\alpha$ and the location $c i j$ without any optimization or hyper-parameters. The feature visualization of intermediate layers on CIFAR10 test images are shown in panel (d) of Figure 3. The given channel being visualized appears to activate on the zeroed pixels from random translations as well as the green channel, giving us insight into the workings of the model.
192
+
193
+ # 7 DISCUSSION
194
+
195
+ We proposed FlowGMM, a natural and interpretable model for semi-supervised learning with normalizing flows. FlowGMM outperforms graph-based and consistency-based baselines on tabular data including semi-supervised text classification with BERT embeddings. On image classification, FlowGMM is not yet competitive with the state-of-the-art approaches (Athiwaratkun et al., 2019; Verma et al., 2019), but we expect that the results could be greatly improved by using a better flow architecture that has stronger inductive biases for classification.
196
+
197
+ FlowGMM is greatly extensible and can be easily adapted to different settings. For example, consider an extreme case of semi-supervised learning where some classes may be completely unlabeled, and the model has to identify those extra classes and cluster them separately. An effective model that can operate in this setting could, for example, be used for automated scientific discovery: when applied to classify certain experimental data, it can identify new separate classes that were not considered by experts. FlowGMM can be applied in this scenario: instead of the standard Gaussian mixture model (GMM) in the latent space we can use the Chinese Restaurant Process GMM (CRPGMM), which can infer the number of mixture components from data automatically (Rasmussen, 2000).
198
+
199
+ Further, we can easily adapt FlowGMM to few-shot learning setting where the model has to generalize to classes not seen at train time by only using a few examples of that new class. In particular, we can fix the parameters of the flow model and add a new Gaussian to the mixture whenever we add a new class. We can estimate the parameters of this Gaussian from the few available examples.
200
+
201
+ We view interpretability as another strong advantage of FlowGMM. The access to latent space representations and feature visualization technique discussed in Section 6 as well as the ability to sample from the model can be used to get insights into the performance of the model in practical applications.
202
+
203
+ # REFERENCES
204
+
205
+ Ben Athiwaratkun, Marc Finzi, Pavel Izmailov, and Andrew Gordon Wilson. There are many consistent explanations of unlabeled data: Why you should average. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ rkgKBhA5Y7.
206
+
207
+ Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Invertible residual networks. ¨ arXiv preprint arXiv:1811.00995, 2018.
208
+
209
+ 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.
210
+
211
+ Ricky TQ Chen, Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Residual flows for ¨ invertible generative modeling. arXiv preprint arXiv:1906.02735, 2019.
212
+
213
+ Zihang Dai, Zhilin Yang, Fan Yang, William W Cohen, and Ruslan R Salakhutdinov. Good semisupervised learning that requires a bad GAN. In Advances in Neural Information Processing Systems 30, pp. 6510–6520. 2017.
214
+
215
+ Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
216
+
217
+ Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
218
+
219
+ Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. arXiv preprint arXiv:1605.08803, 2016.
220
+
221
+ Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. CoRR, abs/1706.04599, 2017. URL http://arxiv.org/abs/1706.04599.
222
+
223
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
224
+
225
+ Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013.
226
+
227
+ Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible $1 \times 1$ convolutions. In Advances in Neural Information Processing Systems, pp. 10215–10224, 2018.
228
+
229
+ Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in neural information processing systems, pp. 3581–3589, 2014.
230
+
231
+ Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016.
232
+
233
+ Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5188–5196, 2015.
234
+
235
+ Takeru Miyato, Shin-ichi Maeda, Shin Ishii, and Masanori Koyama. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 2018.
236
+
237
+ Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2018.
238
+
239
+ 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.
240
+
241
+ Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Hybrid models with deep and invertible features. arXiv preprint arXiv:1902.02767, 2019.
242
+
243
+ Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. doi: 10.23915/distill.00007. https://distill.pub/2017/feature-visualization.
244
+
245
+ Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In Advances in Neural Information Processing Systems, pp. 3235–3246, 2018.
246
+
247
+ Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016.
248
+
249
+ George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017.
250
+
251
+ Carl Edward Rasmussen. The infinite gaussian mixture model. In Advances in neural information processing systems, pp. 554–560, 2000.
252
+
253
+ 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.
254
+
255
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
256
+
257
+ Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pp. 1195–1204, 2017.
258
+
259
+ Vikas Verma, Alex Lamb, Juho Kannala, Yoshua Bengio, and David Lopez-Paz. Interpolation consistency training for semi-supervised learning. arXiv preprint arXiv:1903.03825, 2019.
260
+
261
+ Weidi Xu, Haoze Sun, Chao Deng, and Ying Tan. Variational autoencoder for semi-supervised text classification. In Thirty-First AAAI Conference on Artificial Intelligence, 2017.
262
+
263
+ Dengyong Zhou, Olivier Bousquet, Thomas N Lal, Jason Weston, and Bernhard Scholkopf. Learn- ¨ ing with local and global consistency. In Advances in neural information processing systems, pp. 321–328, 2004.
264
+
265
+ # A EXPECTATION MAXIMIZATION
266
+
267
+ As an alternative to direct optimization of the likelihood (equation 4), we consider ExpectationMaximization algorithm (EM). EM is a popular approach for finding maximum likelihood estimates in mixture models. Suppose $X = \{ x _ { i } \} _ { i = 1 } ^ { n }$ is the observed dataset, $T = \{ t _ { i } \} _ { i = 1 } ^ { n }$ are corresponding unobserved latent variables (often denoting the component in mixture model) and $\theta$ is a vector of model parameters. EM algorithm consists of the two alternating steps: on E-step, we compute posterior probabilities of latent variables for each data point $q ( t _ { i } | x _ { i } ) = P ( t _ { i } | x _ { i } , \theta )$ ; and on M-step, we fix $q$ and maximize the expected log likelihood of the data and latent variables with respect to $\theta$ : $\mathbb { E } _ { q } \log P ( X , T | \theta ) \to \operatorname* { m a x } _ { \theta }$ . The algorithm can be easily adapted to the semi-supervised setting where a subset of data is labeled with $\{ y _ { i } ^ { l } \} _ { i = 1 } ^ { n _ { l } }$ : then, on $\mathrm { E }$ -step we have hard assignment to the true mixture component $q ( t _ { i } | x _ { i } ) = I [ t _ { i } = y _ { i } ^ { l } ]$ for labeled data points.
268
+
269
+ EM algorithm is applicable in our setting which is fitting the transformed mixture of Gaussians. We can perform the exact $\mathrm { E }$ -step for unlabeled data in the model since
270
+
271
+ $$
272
+ q ( t | x ) = { \frac { p ( x | t , \theta ) } { p ( x | \theta ) } } = { \frac { { \mathcal { N } } ( f ( x ) | \mu _ { t } , \Sigma _ { t } ) \cdot \left| \operatorname* { d e t } \left( { \frac { \partial f } { \partial x } } \right) \right| } { \sum _ { k = 1 } ^ { \mathcal { C } } { \mathcal { N } } ( f ( x ) | \mu _ { k } , \Sigma _ { k } ) \cdot \left| \operatorname* { d e t } \left( { \frac { \partial f } { \partial x } } \right) \right| } } = { \frac { { \mathcal { N } } ( f ( x ) | \mu _ { t } , \Sigma _ { t } ) } { \sum _ { k = 1 } ^ { \mathcal { C } } { \mathcal { N } } ( f ( x ) | \mu _ { k } , \Sigma _ { k } ) } }
273
+ $$
274
+
275
+ which coincides with the $\mathrm { E }$ -step of EM algorithm on Gaussian mixture model. On M-step, the objective has the following form:
276
+
277
+ $$
278
+ \sum _ { i = 1 } ^ { n _ { l } } \log \left[ \mathcal { N } ( f _ { \theta } ( x _ { i } ^ { l } ) | \mu _ { y _ { i } ^ { l } } , \Sigma _ { y _ { i } ^ { l } } ) \left| \frac { \partial f _ { \theta } } { \partial x _ { i } ^ { l } } \right| \right] + \sum _ { i = 1 } ^ { n _ { u } } \mathbb { E } _ { q ( t _ { i } | x _ { i } ^ { u } , \theta ) } \log \left[ \mathcal { N } ( f _ { \theta } ( x _ { i } ^ { u } ) | \mu _ { t _ { i } } , \Sigma _ { t _ { i } } ) \left| \frac { \partial f _ { \theta } } { \partial x _ { i } ^ { u } } \right| \right] .
279
+ $$
280
+
281
+ Since the exact solution is not tractable due to complexity of the flow model, we perform a stochastic gradient step to optimize the expected log likelihood with respect to flow parameters $\theta$ .
282
+
283
+ Note that unlike regular EM algorithm for mixture models, we have Gaussian mixture parameters $\{ ( \mu _ { k } , \Sigma _ { k } ) \} _ { k = 1 } ^ { \mathcal { C } }$ fixed in our experiments, and on M-step the update of $\theta$ induces the change of $z _ { i } =$ $f _ { \boldsymbol { \theta } } ( \boldsymbol { x } _ { i } )$ latent space representations.
284
+
285
+ Using EM algorithm for optimization in the semi-supervised setting on MNIST dataset with 1000 labeled images, we obtain $9 8 . 9 7 \%$ accuracy which is comparable to the result for FlowGMM with regular SGD training. However, in our experiments, we observed that on E-step, hard label assignment happens for unlabeled points $\mathbf { \bar { \Psi } } q ( t | x ) \approx 1$ for one of the classes) because of the high dimensionality of the problem (see section 6.1) which affects the M-step objective and hinders training.
286
+
287
+ # B LATENT DISTRIBUTION MEAN AND COVARIANCE CHOICES
288
+
289
+ Initialization In our experiments, we draw the mean vectors $\mu _ { i }$ of Gaussian mixture model randomly from the standard normal distribution $\mu _ { i } \sim \mathcal { N } ( 0 , I )$ , and set the covariance matrices to identity $\Sigma _ { i } = I$ for all classes; we fixed GMM parameters throughout training. However, one could potentially benefit from data-dependent placing of means in the latent space. We experimented with different initialization methods, in particular, initializing means using the mean point of latent representations of labeled data in each class: $\mu _ { i } = ( 1 / n _ { l } ^ { i } ) \textstyle \sum _ { m = 1 } ^ { n _ { l } ^ { i } } f ( x _ { m } ^ { i } )$ where $x _ { m } ^ { i }$ represents labeled data points from class $i$ and $n _ { l } ^ { i }$ is the total number of labeled points in that class. In addition, we can scale all means by a scalar value ${ \hat { \mu } } _ { i } = r \mu _ { i }$ to increase or decrease distances between them. We observed that such initialization leads to much faster convergence of FlowGMM on semi-supervised classification on MNIST dataset, however, the final performance of the model was worse compared to the one with random mean placing. We hypothesize that it becomes easier for the flow model to warm up faster with data-dependent initialization because Gaussian means are closer to the initial latent representations, but afterwards the model gets stuck in a suboptimal solution.
290
+
291
+ GMM training FlowGMM would become even more flexible and expressive if we could learn Gaussian mixture parameters in a principled way. In the current setup where means are sampled from√ the standard normal distribution, the distances between mixture components are about $\sqrt { 2 D }$ where $D$ is the dimensionality of the data (see Appendix G). Thus, classes are quite far apart from each other in the latent space, which, as observed in Section 6.1, leads to model miscalibration. Training GMM parameters can further increase interpretability of the learned latent space representations: we can imagine a scenario in which some of the classes are very similar or even intersecting, and it would be useful to represent it in the latent space. We could train GMM by directly optimizing likelihood (equation 4), or using expectation maximization (see Section A), either jointly with the flow parameters or iteratively switching between training flow parameters with the fixed GMM and training GMM with the fixed flow. In our initial experiments on semi-supervised classification on MNIST, training GMM jointly with the flow parameters did not improve performance or lead to substantial change of the latent representations. Further improvements require careful hyperparameter choice which we leave for future work.
292
+
293
+ ![](images/8bc2da5f17acd9c0a03c362ce398089cd0884a969f11b585932339b489f33962.jpg)
294
+ Figure 4: Illustration of FlowGMM on synthetic datasets: two circles (top row), eight Gaussians (middle row) and pinwheel (bottom row). (a): Data distribution and classification decision boundaries. Unlabeled data is shown with blue circles and labeled data is shown with colored triangles, where color represents the class. Background color visualizes the classification decision boundaries of FlowGMM. (b): Mapping of the data to the latent space. (c): Gaussian mixture in the latent space. (d): Samples from the learned generative model corresponding to different classes, as shown by their color.
295
+
296
+ # C SYNTHETIC EXPERIMENTS
297
+
298
+ In Figure 4 we visualize the classification decision boundaries of FlowGMM as well as the learned mapping to the latent space and generated samples for three different synthetic datasets.
299
+
300
+ # D TABULAR DATA PREPARATION AND HYPERPARAMETERS
301
+
302
+ The AG-News and Yahoo Answers were constructed by applying BERT embeddings to the text input, yielding a 768 dimensional vector for each data point. AG-News has 4 classes while Yahoo Answers has 10. The UCI datasets Hepmass and Miniboone were constructed using the data preprocessing from Papamakarios et al. (2017), but with the inclusion of the removed background process class so that the two problems can be used for binary classification. We then subsample the fraction of background class examples so that the dataset is balanced. For each of the datasets, a separate validation set of size $5 \mathrm { k }$ was used to tune hyperparameters. All neural network models use the ADAM optimizer (Kingma & Ba, 2014).
303
+
304
+ Table 5
305
+
306
+ <table><tr><td>Method Learning Rate</td><td>AG-News</td><td>Yahoo Answers</td><td>Hepmass</td><td>Miniboone</td></tr><tr><td>3-Layer NN + Dropout</td><td>3e-4</td><td>3e-4</td><td>3e-4</td><td>3e-4</td></tr><tr><td>II-model</td><td>1e-3</td><td>1e-4</td><td>3e-3</td><td>1e-4</td></tr><tr><td>FlowGMM</td><td>1e-4</td><td>1e-4</td><td>3e-3</td><td>3e-4</td></tr><tr><td>kNN</td><td>k=4</td><td>k=18</td><td>k=9</td><td>k=3</td></tr></table>
307
+
308
+ $\mathbf { k }$ -Nearest Neighbors: We tested both using both L2 distance and L2 with inputs normalized to unit norm, $\sin ^ { 2 }$ distance), and the latter performed the best. The value $k$ chosen in the method was found sweeping over $1 - 2 0$ , and the optimal values for each of the datasets are shown in 5.
309
+
310
+ 3 Layer $\mathbf { N N } +$ Dropout: The 3-Layer $\mathrm { N N } +$ Dropout baseline network has three fully connected hidden layers with inner dimension $k = 5 1 2$ , ReLU nonlinearities, and dropout with $p = 0 . 5$ . We use the learning rate $\mathrm { 3 e { - } 4 }$ for training the supervised baseline across all datasets.
311
+
312
+ Π-Model: The Π-Model uses the same network architecture, and dropout for the perturbations. The additional consistency loss per unlabeled data point is computed as $L _ { \mathrm { U n l a b } } = | | g ( x ^ { \prime \prime } ) - g ( x ^ { \prime } ) | | ^ { 2 }$ , where $g$ is are the output probabilities after the softmax layer of the neural network and the consistency weight $\lambda = 3 0$ which worked the best across the datasets. The model was trained for 50 epochs with labeled and unlabeled batch size $n _ { \ell }$ for AG-News and Yahoo Answers, and labeled and unlabeled batch sizes $n _ { \ell }$ and 2000 for Hepmass and Miniboone.
313
+
314
+ Label Spreading: We use the local and global consistency method from Zhou et al. (2004), $Y ^ { * } =$ $( I - \alpha \bar { S } ) ^ { - 1 } Y$ where in our case $Y$ is the matrix of labels for the labeled, unlabeled, and test data but filled with zeros for unlabeled and test. $S = D ^ { - 1 / 2 } W D ^ { - 1 / 2 }$ computed from the affinity matrix $W _ { i j } = \exp \left( - \gamma \sin ^ { 2 } ( x _ { i } , x _ { j } ) \right)$ where $\begin{array} { r } { \sin ^ { 2 } ( x _ { i } , x _ { j } ) : = 1 - \frac { \langle x _ { i } , x _ { j } \rangle } { \| x _ { i } \| \| x _ { j } \| } } \end{array}$ . This is equivalent to L2 distance on the inputs normalized to unit magnitude. Because the algorithm scales poorly with number of unlabeled points for dense affinity matrices, $O ( n _ { u } ^ { 3 } )$ , we we subsampled the number of unlabeled data points to $1 0 k$ and test data points to $5 k$ for this graph method. However, we also evaluate the label spreading algorithm with a sparse kNN affinity matrix on using a larger subset $2 0 k$ of unlabeled data. The two hyperparameters for label spreading $( \gamma / k$ and $\alpha$ ) were tuned by separate grid search for each of the datasets. In both cases, we use the inductive variant of the algorithm where the test data is not included in the unlabeled data.
315
+
316
+ FlowGMM: We train our FlowGMM model with a RealNVP normalizing flow, similar to the architectures used in Papamakarios et al. (2017). Specifically, the model uses 7 coupling layers, with 1 hidden layer each and 256 hidden units for the UCI datasets but 512 for text classification. UCI models were trained for 50 epochs of unlabeled data and the text datasets were trained for 30 epochs of unlabeled data. The labeled and unlabeled batch sizes are the same as in the Π-Model.
317
+
318
+ The tuned learning rates for each of the models that we used for these experiments are shown in table 5.
319
+
320
+ # E IMAGE DATA PREPARATION AND HYPERPARAMETERS
321
+
322
+ We use the CIFAR-10 multi-scale architecture with 2 scales, each containing 3 coupling layers defined by 8 residual blocks with 64 feature maps. We use Adam optimizer (Kingma & Ba, 2014) with learning rate $1 0 ^ { - 3 }$ for CIFAR-10 and SVHN and $1 0 ^ { - 4 }$ for MNIST. We train the supervised model for 100 epochs, and semi-supervised models for 1000 passes through the labeled data for CIFAR-10 and SVHN and 3000 passes for MNIST. We use a batch size of 64 and sample 32 labeled and 32 unlabeled data points in each mini-batch. For the consistency loss term (equation 7), we linearly increase the weight from 0 to 1 for the first 100 epochs following Athiwaratkun et al. (2019).
323
+
324
+ For FlowGMM and FlowGMM-cons, we re-weight the loss on labeled data by $\lambda = 3$ (value tuned on validation (Kingma et al., 2014) on CIFAR-10), as otherwise, we observed that the method underfits the labeled data.
325
+
326
+ # F OUT-OF-DOMAIN DATA DETECTION
327
+
328
+ Density models have held promise for being able to detect out-of-domain data, an especially important task for robust machine learning systems (Nalisnick et al., 2019). Recently, it has been shown that existing flow and autoregressive density models are not as apt at this task as previously thought, yielding high likelihood on images coming from other (simpler) distributions. The conclusion put forward is that datasets like SVHN are encompassed by, or have roughly the same mean but lower variance than, more complex datasets like CIFAR10 (Nalisnick et al., 2018). We examine this hypothesis in the context of our flow model which has a multi-modal latent space distribution unlike methods considered in Nalisnick et al. (2018).
329
+
330
+ ![](images/03c120b2b67ca21f9f317f98afb01e803e6410988754d8489801ef847329c82e.jpg)
331
+ Figure 5: Left: Log likelihoods on in- and out-of-domain data for our model trained on MNIST. Center: Log likelihoods on in- and out-of-domain data for our model trained on FashionMNIST. Right: MNIST digits get mapped onto the sandal mode of the FashionMNIST model $7 5 \%$ of the time, often being assigned higher likelihood than elements of the original sandal class. Representative elements are shown above.
332
+
333
+ Using a fully supervised model trained on MNIST, we evaluate the log likelihood for data points coming from the NotMNIST dataset, consisting of letters instead of digits, and the FashionMNIST dataset. We then train a supervised model on the more complex dataset FashionMNIST and evaluate on MNIST and NotMNIST. The distribution of the log likelihood $\log p _ { \mathcal { X } } ( \cdot ) \ =$ $\begin{array} { r } { \log p _ { \mathcal Z } ( f ( \cdot ) ) + \log \left| \operatorname* { d e t } \left( \frac { \partial f } { \partial x } \right) \right| } \end{array}$ on these datasets is shown in Figure 5. For the model trained on MNIST we see that the data from Fashion MNIST and NotMNIST is assigned lower likelihood, as expected. However, the model trained on FashionMNIST predicts higher likelihoods for MNIST images. The majority $( \approx 7 5 \% )$ of the MNIST data points get mapped into the mode of the FashionMNIST model corresponding to sandals, which is the class with the largest fraction of pixels that are zero. Similarly, for the model trained on MNIST the image of all zeros has very high likelihood and gets mapped to the mode corresponding to the digit 1 which has the largest fraction of empty space.
334
+
335
+ # G EXPECTED DISTANCES BETWEEN GAUSSIAN SAMPLES
336
+
337
+ Consider two Gaussians with means sampled independently from the standard normal $\mu _ { 1 } , \mu _ { 2 } \sim { \mathcal { N } } ( 0 , I )$ in $D$ -dimensional space. If $\bar { s } _ { 1 } \sim \mathcal { N } ( \mu _ { 1 } , I )$ is a sample from the first Gaussian, then its expected squared distances to both mixture means are:
338
+
339
+ $$
340
+ \mathbb { E } \left[ \Vert s _ { 1 } - \mu _ { 1 } \Vert ^ { 2 } \right] = \mathbb { E } \left[ \mathbb { E } \left[ \Vert s _ { 1 } - \mu _ { 1 } \Vert ^ { 2 } | \mu _ { 1 } \right] \right] = \mathbb { E } \left[ \sum _ { i = 1 } ^ { D } \mathbb { E } \left[ ( s _ { 1 , i } - \mu _ { 1 , i } ) ^ { 2 } | \mu _ { 1 , i } \right] \right]
341
+ $$
342
+
343
+ $$
344
+ = \mathbb { E } \left[ \sum _ { i = 1 } ^ { D } \left( \mathbb { E } [ s _ { 1 , i } ^ { 2 } ] - 2 \mu _ { 1 , i } ^ { 2 } + \mu _ { 1 , i } ^ { 2 } \right) \right] = \mathbb { E } \left[ \sum _ { i = 1 } ^ { D } \left( 1 + \mu _ { 1 , i } ^ { 2 } - \mu _ { 1 , i } ^ { 2 } \right) \right] = D
345
+ $$
346
+
347
+ $$
348
+ \begin{array} { l } { \displaystyle \mathbb { E } \left[ \| s _ { 1 } - \mu _ { 2 } \| ^ { 2 } \right] = \mathbb { E } \left[ \mathbb { E } \left[ \| s _ { 1 } - \mu _ { 2 } \| ^ { 2 } | \mu _ { 1 } , \mu _ { 2 } \right] \right] = \mathbb { E } \left[ \sum _ { i = 1 } ^ { D } \mathbb { E } \left[ ( s _ { 1 , i } - \mu _ { 2 , i } ) ^ { 2 } | \mu _ { 1 , i } , \mu _ { 2 , i } \right] \right] } \\ { \displaystyle \quad = \mathbb { E } \left[ \sum _ { i = 1 } ^ { D } \left( 1 + \mu _ { 1 , i } ^ { 2 } - 2 \mu _ { 1 , i } \mu _ { 2 , i } + \mu _ { 2 , i } ^ { 2 } \right) \right] = 3 D } \end{array}
349
+ $$
350
+
351
+ For high-dimensional Gaussians the random variables $\| s _ { 1 } ~ - ~ \mu _ { 1 } \| ^ { 2 }$ and $\| s _ { 1 } ~ - ~ \mu _ { 2 } \| ^ { 2 }$ will be concentrated around their expectations. Since the function $\exp ( - x )$ decreases rapidly to zero for positive $x$ , the probability of $s _ { 1 }$ belonging to the first Gaussian $\exp ( - \Vert s _ { 1 } \ d$ µ $\begin{array}{c} \begin{array} { r l r } { \varepsilon _ { 1 } \| ^ { 2 } ) \big / \left( \exp ( - \| s _ { 1 } - \mu _ { 1 } \| ^ { 2 } ) + \exp ( - \| s _ { 1 } - \mu _ { 2 } \| ^ { 2 } ) \right) } & { \approx } & { \exp ( - D ) / \big ( \exp ( - D ) + \exp ( - 3 D ) \big ) } \\ & { } & \end{array} = \exp ( - 1 ) \left( \exp ( - \| s _ { 1 } - \mu _ { 1 } \| ^ { 2 } ) + \exp ( - \| s _ { 1 } - \mu _ { 2 } \| ^ { 2 } ) \right) \mid \mu _ { 1 } \approx \exp ( - D ) / \big ( \exp ( - D ) + \exp ( - 3 D ) \big ) \end{array}$ $1 / ( 1 + \exp ( - 2 D ) )$ saturates at 1 with the growth of dimensionality $D$ .
352
+
353
+ # H FLOWGMM AS GENERATIVE MODEL
354
+
355
+ ![](images/dc7d18b1a5a0424c4cd9ee2fb6db9a660e829eed39a79225f3b743e1d74e1701.jpg)
356
+ Figure 6: Visualizations of the latent space representations learned by supervised FlowGMM on MNIST. (a): Images corresponding to means of the Gaussians corresponding to different classes. (b): Class-conditional samples from the model at a reduced temperature $T = 0 . 2 5$ .
357
+
358
+ In Figure 6a we show the images $f ^ { - 1 } ( \mu _ { i } )$ corresponding to the means of the Gaussians representing each class. We see that the flow correctly learns to map the means to samples from the corresponding classes.Next, in Figure 6b we show class-conditional samples from the model. To produce a sample from class $i$ , we first generate $z \sim \mathcal { N } ( \mu _ { i } , T I )$ , where $T$ is a temperature parameter that controls trade-off between sample quality and diversity; we then compute the samples as $f ^ { - 1 } ( z )$ . We set $T = 0 . 2 5 ^ { 2 }$ to produce samples in Figure 6b. As we can see, FlowGMM can produce reasonable class-conditional samples simultaneously with achieving a high classification accuracy $( 9 9 . 6 3 \%$ ) on the MNIST dataset.
parse/train/BJg_2JHKvH/BJg_2JHKvH_content_list.json ADDED
@@ -0,0 +1,1867 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SEMI-SUPERVISED LEARNING WITH NORMALIZING FLOWS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 823,
10
+ 145
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 236,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "We propose Flow Gaussian Mixture Model (FlowGMM), a general-purpose method for semi-supervised learning based on a simple and principled probabilistic framework. We approximate the joint distribution of the labeled and unlabeled data with a flexible mixture model implemented as a Gaussian mixture transformed by a normalizing flow. We train the model by maximizing the exact joint likelihood of the labeled and unlabeled data. We evaluate FlowGMM on a wide range of semi-supervised classification problems across different data types: AG-News and Yahoo Answers text data, MNIST, SVHN and CIFAR-10 image classification problems as well as tabular UCI datasets. FlowGMM achieves promising results on image classification problems and outperforms the competing methods on other types of data. FlowGMM learns an interpretable latent representation space and allows hyper-parameter free feature visualization at real time rates. Finally, we show that FlowGMM can be calibrated to produce meaningful uncertainty estimates for its predictions. ",
40
+ "bbox": [
41
+ 233,
42
+ 265,
43
+ 764,
44
+ 458
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 482,
55
+ 336,
56
+ 498
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "In many domains unlabeled data is plentiful, while labeled data may be scarce. Semi-supervised learning framework leverages both labeled and unlabeled data reducing the need for expensive manual annotation. Recently, consistency-based methods have shown outstanding performance in semisupervised image classification (Laine & Aila, 2016; Miyato et al., 2018; Tarvainen & Valpola, 2017; Athiwaratkun et al., 2019; Verma et al., 2019; Berthelot et al., 2019) and are currently state-of-the-art on challenging datasets like CIFAR-10, CIFAR-100, and ImageNet. However, these methods have not seen much application on domains other than images, where a suitable set of data perturbations to which the classifier should be invariant is not known a priori. ",
63
+ "bbox": [
64
+ 174,
65
+ 512,
66
+ 825,
67
+ 625
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "In this paper, we employ a simple and principled probabilistic framework for semi-supervised learning. We introduce a mixture distribution for modeling the data, where different components correspond to different classes. We can maximize the joint likelihood of unlabeled (using the mixture) and labeled (using individual mixture components) data. At test time, we classify the input to belong to the class corresponding to mixture component with the highest likelihood. ",
74
+ "bbox": [
75
+ 174,
76
+ 631,
77
+ 823,
78
+ 700
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "In order to apply this framework to complex data, we need to choose a sufficiently flexible family of distributions in the mixture, preserving the ability to compute exact likelihoods. We propose Flow Gaussian Mixture Model (FlowGMM), a mixture model based on normalizing flows (Dinh et al., 2014). Each component of the mixture is modeled as a trainable invertible transformation (normalizing flow) of the corresponding component of a Gaussian mixture in the latent space. The transformation is shared among all the mixture components. Due to invertibility, we can compute exact likelihood of the data using the change of variable formula. ",
85
+ "bbox": [
86
+ 174,
87
+ 708,
88
+ 825,
89
+ 805
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "We illustrate FlowGMM on a toy problem in Figure 1. We are solving a binary semi-supervised classification problem on the dataset shown in panel (a): the labeled data is shown with triangles colored according to their class, and unlabeled data is shown with blue circles. We introduce a Gaussian mixture with two components corresponding to each of the classes, shown in panel (c) in the latent space $\\mathcal { Z }$ and an invertible transformation $f$ . The transformation $f$ is then trained to map the data distribution in the data space $\\mathcal { X }$ to the latent Gaussian mixture in the $\\mathcal { Z }$ space, mapping the labeled data to the corresponding mixture component. We visualize the learned transformation in panel (b), showing the positions of the images $f ( x )$ for all of the training data points. The inverse $f ^ { - 1 }$ of this mapping serves as a class-conditional generative model, that we visualize in panel (d). To classify a data point $x$ in the input space we compute its image $f ( x )$ in the latent space, and pick the class corresponding to the Gaussian that is closest to $f ( x )$ . We visualize the decision boundary of the learned classifier with a dashed line in panel (a). ",
96
+ "bbox": [
97
+ 174,
98
+ 811,
99
+ 823,
100
+ 924
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "image",
106
+ "img_path": "images/25cf50d85425a364bcb5402e89ddd79617e0a63a072fdd712098296937197c61.jpg",
107
+ "image_caption": [
108
+ "Figure 1: Illustration of semi-supervised learning with FlowGMM on a binary classification problem. Colors represent the two classes or the corresponding Gaussian mixture components. Labeled data is shown with triangles, colored by the corresponding class label, and blue dots represent unlabeled data. (a): Data distribution and the classifier decision boundary. (b): The learned mapping of the data to the latent space. (c): Samples from the Gaussian mixture in the latent space. (d): Samples from the model in the data space. "
109
+ ],
110
+ "image_footnote": [],
111
+ "bbox": [
112
+ 184,
113
+ 102,
114
+ 803,
115
+ 234
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "",
122
+ "bbox": [
123
+ 174,
124
+ 345,
125
+ 823,
126
+ 401
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Many of the previous attempts of using generative models for classification (Salimans et al., 2016; Nalisnick et al., 2019; Chen et al., 2019) have relied upon multitask learning, where a shared latent representation is learned for the generative model and the classifier. With the method of Chen et al. (2019), hybrid modeling is observed to reduce performance for both tasks in the supervised case. For GANs, Dai et al. (2017) have pointed out that classification performance and generative performance are in direct conflict: a perfect generator yields no benefit to classification performance. FlowGMM takes a different approach, where the generative model is used directly as a Bayes classifier, and in the limit of a perfect generative model the Bayes classifier achieves provably optimal misclassification rate (see e.g. Mohri et al., 2018). ",
133
+ "bbox": [
134
+ 174,
135
+ 409,
136
+ 825,
137
+ 534
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "FlowGMM naturally encodes the clustering principle: the decision boundary between classes must lie in the low-density region in the data space. Indeed, in the latent space the decision boundary between two classes coincides with the hyperplane perpendicular to the line segment connecting means of the corresponding mixture components and passing through the midpoint of this line segment (assuming the components are normal distributions with identity covariance matrices); in panel (b) of Figure 1 we show the decision boundary in the latent space with a dashed line. The density of the latent distribution near the decision boundary is low. As the flow is trained to represent data as a transformation of this latent distribution, the density near the decision boundary should also be low. In panel (a) of Figure 1 the decision boundary indeed lies in the low-density region. ",
144
+ "bbox": [
145
+ 174,
146
+ 541,
147
+ 825,
148
+ 666
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "The contributions of this work are as follows: ",
155
+ "bbox": [
156
+ 176,
157
+ 674,
158
+ 472,
159
+ 686
160
+ ],
161
+ "page_idx": 1
162
+ },
163
+ {
164
+ "type": "text",
165
+ "text": "• We propose FlowGMM, a new probabilistic classification model based on normalizing flows, that can be naturally applied to semi-supervised learning. We evaluate FlowGMM on a range of semi-supervised classification benchmarks including text, tabular and image data, and it works well. FlowGMM outperforms alternative approaches on non-image data and shows promise for image data. We propose modified consistency regularization for FlowGMM and empirically demonstrate that it substantially improves performance of the method on image classification problems. ",
166
+ "bbox": [
167
+ 217,
168
+ 705,
169
+ 825,
170
+ 803
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "• We conduct a thorough empirical analysis of FlowGMM for supervised and semisupervised classification. One of the important features of FlowGMM is its interpretability. To demonstrate it, we visualize the learned latent space representations for the proposed semi-supervised model and show that interpolations between data points from different classes pass through low-density regions. We show how our classification model can be used for optimization free feature visualization. We also study the predictive uncertainties produced by the method and show that they can be calibrated by scaling the variances of mixture components. ",
177
+ "bbox": [
178
+ 217,
179
+ 813,
180
+ 823,
181
+ 924
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "2 BACKGROUND: NORMALIZING FLOWS ",
188
+ "text_level": 1,
189
+ "bbox": [
190
+ 174,
191
+ 102,
192
+ 529,
193
+ 118
194
+ ],
195
+ "page_idx": 2
196
+ },
197
+ {
198
+ "type": "text",
199
+ "text": "The normalizing flow (Dinh et al., 2016) is an unsupervised model for density estimation defined as an invertible mapping $f : \\mathcal { X } \\mathcal { Z }$ from the data space $\\mathcal { X }$ to the latent space $\\mathcal { Z }$ . We can model the data distribution as a transformation $f ^ { - 1 } : { \\mathcal { Z } } \\to { \\bar { \\mathcal { X } } }$ applied to a random variable from the latent distribution $z \\sim p _ { \\mathcal { Z } }$ often chosen to be Gaussian. The density of the transformed random variable $x = f ^ { - 1 } ( z )$ is given by the change of variables formula ",
200
+ "bbox": [
201
+ 173,
202
+ 132,
203
+ 825,
204
+ 204
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "equation",
210
+ "img_path": "images/b3575a65393989597acc7d2ee2afc48c768af1ec0685d5fbaac0f189a8c808e5.jpg",
211
+ "text": "$$\np \\chi ( x ) = p \\mathcal { Z } \\bigl ( f ( x ) \\bigr ) \\cdot \\left| \\operatorname* { d e t } \\left( \\frac { \\partial f } { \\partial x } \\right) \\right| .\n$$",
212
+ "text_format": "latex",
213
+ "bbox": [
214
+ 382,
215
+ 208,
216
+ 616,
217
+ 244
218
+ ],
219
+ "page_idx": 2
220
+ },
221
+ {
222
+ "type": "text",
223
+ "text": "The mapping $f$ is implemented as a sequence of invertible functions, parametrized by a neural network with architecture that is designed to ensure invertibility and efficient computation of logdeterminants, and a set of parameters $\\theta$ that can be optimized. The model can be trained by maximizing the likelihood (equation 1) of the training data with respect to the parameters $\\theta$ . ",
224
+ "bbox": [
225
+ 173,
226
+ 247,
227
+ 825,
228
+ 305
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "3 FLOW GAUSSIAN MIXTURE MODEL (FLOWGMM) ",
235
+ "text_level": 1,
236
+ "bbox": [
237
+ 174,
238
+ 324,
239
+ 627,
240
+ 340
241
+ ],
242
+ "page_idx": 2
243
+ },
244
+ {
245
+ "type": "text",
246
+ "text": "In FlowGMM, we introduce a discrete latent variable $y$ for the class label, $y \\in \\{ 1 \\ldots . c \\}$ . Our latent space distribution, conditioned on a given label $k$ , is Gaussian with mean $\\mu _ { k }$ and covariance $\\Sigma _ { k }$ : ",
247
+ "bbox": [
248
+ 169,
249
+ 354,
250
+ 823,
251
+ 383
252
+ ],
253
+ "page_idx": 2
254
+ },
255
+ {
256
+ "type": "equation",
257
+ "img_path": "images/7d8a344a8590d17425b2702a3016254e9c16f66be41b6f2462488bf89c37f4ad.jpg",
258
+ "text": "$$\np _ { \\mathcal { Z } } ( z | y = k ) = \\mathcal { N } ( z | \\mu _ { k } , \\Sigma _ { k } ) .\n$$",
259
+ "text_format": "latex",
260
+ "bbox": [
261
+ 398,
262
+ 388,
263
+ 599,
264
+ 406
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "The marginal distribution of $z$ is then a Gaussian mixture. When the classes are balanced, this distribution is ",
271
+ "bbox": [
272
+ 174,
273
+ 411,
274
+ 828,
275
+ 439
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "equation",
281
+ "img_path": "images/6c7e159ae5a643ed3f33c526edce526b0afe484c4bfd72ccb2497ee2982fa1db.jpg",
282
+ "text": "$$\np _ { \\mathcal Z } ( z ) = \\frac { 1 } { \\mathcal { C } } \\sum _ { k = 1 } ^ { \\mathcal { C } } \\mathcal { N } ( z | \\mu _ { k } , \\Sigma _ { k } ) .\n$$",
283
+ "text_format": "latex",
284
+ "bbox": [
285
+ 398,
286
+ 435,
287
+ 599,
288
+ 479
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "Thus, the likelihood for labeled data is ",
295
+ "bbox": [
296
+ 174,
297
+ 479,
298
+ 428,
299
+ 494
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "equation",
305
+ "img_path": "images/4b233e2b84a491e9e2109018a64662055f7f93e7f5608a6be587422d500c30c8.jpg",
306
+ "text": "$$\np _ { \\mathcal { X } } ( x | y = k ) = \\mathcal { N } \\left( f ( x ) | \\mu _ { k } , \\Sigma _ { k } \\right) \\cdot \\left| \\operatorname* { d e t } \\left( \\frac { \\partial f } { \\partial x } \\right) \\right| ,\n$$",
307
+ "text_format": "latex",
308
+ "bbox": [
309
+ 334,
310
+ 500,
311
+ 661,
312
+ 535
313
+ ],
314
+ "page_idx": 2
315
+ },
316
+ {
317
+ "type": "text",
318
+ "text": "and the likelihood for data with unknown label is $\\begin{array} { r } { p _ { \\mathcal { X } } ( x ) = \\sum _ { k } p _ { \\mathcal { X } } ( x | y = k ) p ( y = k ) } \\end{array}$ . If we have access to both a labeled dataset $\\mathcal { D } _ { \\ell }$ and an unlabeled dataset $\\mathcal { D } _ { u }$ , then we can train our model in a semi-supervised way to maximize the joint likelihood of the labeled and unlabeled data ",
319
+ "bbox": [
320
+ 176,
321
+ 539,
322
+ 825,
323
+ 582
324
+ ],
325
+ "page_idx": 2
326
+ },
327
+ {
328
+ "type": "equation",
329
+ "img_path": "images/ddcaec849383d8044685f2890a743d5edd5f788fcd96e3c8840562c153446a6c.jpg",
330
+ "text": "$$\np _ { \\mathcal { X } } ( \\mathcal { D } _ { \\ell } , \\mathcal { D } _ { u } ) = \\prod _ { ( x _ { i } , y _ { i } ) \\in \\mathcal { D } _ { \\ell } } p _ { \\mathcal { X } } ( x _ { i } , y _ { i } ) \\prod _ { x _ { j } \\in \\mathcal { D } _ { u } } p _ { \\mathcal { X } } ( x _ { j } ) ,\n$$",
331
+ "text_format": "latex",
332
+ "bbox": [
333
+ 328,
334
+ 585,
335
+ 668,
336
+ 623
337
+ ],
338
+ "page_idx": 2
339
+ },
340
+ {
341
+ "type": "text",
342
+ "text": "over the parameters $\\theta$ of the bijective function $f$ , which learns a density model with a Bayes classifier: given a test point $x$ , the model predictive distribution is given by ",
343
+ "bbox": [
344
+ 173,
345
+ 627,
346
+ 821,
347
+ 656
348
+ ],
349
+ "page_idx": 2
350
+ },
351
+ {
352
+ "type": "equation",
353
+ "img_path": "images/7b3c2c0b4c0909ab107c4b8d7f78a70e9ae54d189361a4ded45b3f0a3c4222d9.jpg",
354
+ "text": "$$\np _ { \\mathcal { X } } ( y | x ) = p _ { \\mathcal { X } } ( x | y ) p ( y ) / p ( x ) = \\frac { \\mathcal { N } \\left( f ( x ) | \\mu _ { y } , \\Sigma _ { y } \\right) } { \\sum _ { k = 1 } ^ { \\mathcal { C } } \\mathcal { N } \\left( f ( x ) | \\mu _ { k } , \\Sigma _ { k } \\right) } .\n$$",
355
+ "text_format": "latex",
356
+ "bbox": [
357
+ 303,
358
+ 661,
359
+ 694,
360
+ 699
361
+ ],
362
+ "page_idx": 2
363
+ },
364
+ {
365
+ "type": "text",
366
+ "text": "We can then make predictions for a test point $x$ with the Bayes decision rule ",
367
+ "bbox": [
368
+ 174,
369
+ 703,
370
+ 674,
371
+ 718
372
+ ],
373
+ "page_idx": 2
374
+ },
375
+ {
376
+ "type": "equation",
377
+ "img_path": "images/38b30f2f98b75da84565e824887dbf853486a867ae4d31229e23123d8c01d119.jpg",
378
+ "text": "$$\ny = \\arg \\operatorname* { m a x } _ { i \\in \\{ 1 , \\ldots , { c } \\} } p _ { \\mathcal { X } } ( y = i | x ) .\n$$",
379
+ "text_format": "latex",
380
+ "bbox": [
381
+ 393,
382
+ 723,
383
+ 604,
384
+ 748
385
+ ],
386
+ "page_idx": 2
387
+ },
388
+ {
389
+ "type": "text",
390
+ "text": "Alternatively to direct likelihood maximization, we can adapt Expectation Maximization algorithm for model training (discussed in Appendix A). ",
391
+ "bbox": [
392
+ 174,
393
+ 761,
394
+ 825,
395
+ 790
396
+ ],
397
+ "page_idx": 2
398
+ },
399
+ {
400
+ "type": "text",
401
+ "text": "3.1 CONSISTENCY REGULARIZATION ",
402
+ "text_level": 1,
403
+ "bbox": [
404
+ 176,
405
+ 806,
406
+ 446,
407
+ 821
408
+ ],
409
+ "page_idx": 2
410
+ },
411
+ {
412
+ "type": "text",
413
+ "text": "Most of the existing state-of-the-art approaches to semi-supervised learning on image data are based on consistency regularization (Laine & Aila, 2016; Miyato et al., 2018; Tarvainen & Valpola, 2017; Athiwaratkun et al., 2019; Verma et al., 2019). These methods penalize changes in network predictions with respect to input perturbations, such as random translations and horizontal flips, with an additional loss term that can be computed on unlabeled data, ",
414
+ "bbox": [
415
+ 174,
416
+ 832,
417
+ 825,
418
+ 904
419
+ ],
420
+ "page_idx": 2
421
+ },
422
+ {
423
+ "type": "equation",
424
+ "img_path": "images/b724fa4768ccfd5817249909af2b2e70dab63ad588a744df45337d5682a5000a.jpg",
425
+ "text": "$$\n\\ell _ { c o n s } ( x ) = \\| g ( x ^ { \\prime } ) - g ( x ^ { \\prime \\prime } ) \\| ^ { 2 } ,\n$$",
426
+ "text_format": "latex",
427
+ "bbox": [
428
+ 397,
429
+ 906,
430
+ 599,
431
+ 925
432
+ ],
433
+ "page_idx": 2
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "where $x ^ { \\prime } , x ^ { \\prime \\prime }$ are random perturbations of $x$ , and $g$ is the vector of probabilities over the classes. ",
438
+ "bbox": [
439
+ 171,
440
+ 103,
441
+ 797,
442
+ 118
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Motivated by these methods, we introduce a simple consistency regularization term for FlowGMM. Let $y ^ { \\prime \\prime }$ be the label predicted on image $x ^ { \\prime \\prime }$ by FlowGMM according to equation 5. We then define the consistency loss term as the negative log likelihood of the input $x ^ { \\prime }$ given the label $y ^ { \\prime \\prime }$ : ",
449
+ "bbox": [
450
+ 174,
451
+ 125,
452
+ 823,
453
+ 167
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "equation",
459
+ "img_path": "images/dc6278ec800d00584218f2f135f7d0b5d9d36a597d05b98e2a3d9b3e73a6491f.jpg",
460
+ "text": "$$\nL _ { \\mathrm { c o n s } } ( x ^ { \\prime } , x ^ { \\prime \\prime } ) = - \\log p ( x ^ { \\prime } | y ^ { \\prime \\prime } ) = - \\log N ( f ( x ^ { \\prime } ) | \\mu _ { y ^ { \\prime \\prime } } , \\Sigma _ { y ^ { \\prime \\prime } } ) - \\log \\left| \\operatorname* { d e t } \\left( \\frac { \\partial f } { \\partial x ^ { \\prime } } \\right) \\right| .\n$$",
461
+ "text_format": "latex",
462
+ "bbox": [
463
+ 230,
464
+ 174,
465
+ 766,
466
+ 209
467
+ ],
468
+ "page_idx": 3
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "This loss term encourages the model to map small perturbations of the same unlabeled inputs to the same components of the Gaussian mixture distribution in the latent space. Unlike the standard consistency loss of equation 6, the proposed loss in equation 7 takes values on the same scale as the data log likelihood (equation 4), and empirically we found it to perform better. We refer to FlowGMM with the consistency term as FlowGMM-cons. The final loss for FlowGMM-cons is then the weighted sum of the consistency loss (equation 7) and the negative log likelihood of both labeled and unlabeled data (equation 4). ",
473
+ "bbox": [
474
+ 173,
475
+ 215,
476
+ 825,
477
+ 314
478
+ ],
479
+ "page_idx": 3
480
+ },
481
+ {
482
+ "type": "text",
483
+ "text": "4 RELATED WORK ",
484
+ "text_level": 1,
485
+ "bbox": [
486
+ 176,
487
+ 334,
488
+ 339,
489
+ 351
490
+ ],
491
+ "page_idx": 3
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Generative models have been used extensively in semi-supervised learning. In the work of Kingma et al. (2014), it was shown how the likelihood model of Variational Autoencoder (Kingma & Welling, 2013) could be used for semi-supervised image classification on datasets like MNIST and SVHN. Xu et al. (2017) later extended this framework to semi-supervised text classification. Generative Adversarial Networks (GANs) have been employed for semi-supervised learning through multitask objective where the model learns to simultaneously discriminate generated images from real (labeled and unlabeled) images and classify labeled data. ",
496
+ "bbox": [
497
+ 174,
498
+ 366,
499
+ 825,
500
+ 464
501
+ ],
502
+ "page_idx": 3
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "Along with GANs and VAEs, Normalizing Flows (NF) (Dinh et al., 2014) present another major class of deep generative models. Unlike GANs and VAEs, normalizing flows can be trained using exact likelihood. NFs admit controllable latent representations and can be sampled efficiently unlike auto-regressive models (Papamakarios et al., 2017; Oord et al., 2016). Recent work (Dinh et al., 2016; Kingma & Dhariwal, 2018; Behrmann et al., 2018) demonstrated that normalizing flows can produce high-fidelity samples for natural image datasets. Some normalizing flow papers (such as RealNVP (Dinh et al., 2016)) have used class-conditional sampling, where the transformation is conditioned on the class label. To do so, they pass the class label as an input to coupling layers, conditioning the output of the flow on the class. ",
507
+ "bbox": [
508
+ 174,
509
+ 469,
510
+ 825,
511
+ 595
512
+ ],
513
+ "page_idx": 3
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "Deep Invertible Generalized Linear Model (DIGLM, Nalisnick et al., 2019), most closely related to our work, trains a classifier on the latent representation of a normalizing flow to perform supervised or semi-supervised image classification. Our approach is principally different, as we use a mixture of Gaussians in the latent space $\\mathcal { Z }$ and perform classification based on class-conditional likelihoods (see equation 5), rather than training a separate classifier. One of the key advantages of our approach is the explicit encoding of clustering principle in the method and a more natural probabilistic interpretation. ",
518
+ "bbox": [
519
+ 174,
520
+ 603,
521
+ 825,
522
+ 700
523
+ ],
524
+ "page_idx": 3
525
+ },
526
+ {
527
+ "type": "text",
528
+ "text": "5 EXPERIMENTS ",
529
+ "text_level": 1,
530
+ "bbox": [
531
+ 176,
532
+ 722,
533
+ 326,
534
+ 738
535
+ ],
536
+ "page_idx": 3
537
+ },
538
+ {
539
+ "type": "text",
540
+ "text": "In all experiments, we use the RealNVP normalizing flow architecture. Throughout training, Gaussian mixture parameters are fixed: the means are initialized randomly from the standard normal distribution and the covariances are set to $I$ . See Appendix B for further discussion on GMM initialization and training. ",
541
+ "bbox": [
542
+ 174,
543
+ 753,
544
+ 823,
545
+ 810
546
+ ],
547
+ "page_idx": 3
548
+ },
549
+ {
550
+ "type": "text",
551
+ "text": "5.1 SYNTHETIC DATA ",
552
+ "text_level": 1,
553
+ "bbox": [
554
+ 176,
555
+ 828,
556
+ 336,
557
+ 842
558
+ ],
559
+ "page_idx": 3
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "We first apply FlowGMM to a range of two-dimensional synthetic datasets, in order to get a better visual intuition for the method. We use RealNVP architecture with 5 coupling layers, defined by fully-connected shift and scale networks, each with 1 hidden layer of size 512. In addition to the semi-supervised setting, we also trained the method only using the labeled data. In Figure 2 we visualize the decision boundaries of the classifier corresponding to FlowGMM for both of these settings on the two circles and pinwheel datasets. On both datasets FlowGMM is able to leverage the unlabeled data to push the decision boundary to a low-density region, as expected. On the two circles dataset the method is unable to fit the data perfectly, as it is impossible to represent this dataset as an invertible continuous mapping of two Gaussians, because they are topologically distinct. FlowGMM still produces a reasonable decision boundary and improves over the case when only labeled data is available. We provide additional visualizations in Appendix C, Figure 4. ",
564
+ "bbox": [
565
+ 174,
566
+ 853,
567
+ 823,
568
+ 924
569
+ ],
570
+ "page_idx": 3
571
+ },
572
+ {
573
+ "type": "image",
574
+ "img_path": "images/f4e929b21f9c1ca06c2fc39a2a9767651f687640b0b721001c6e90f894c51fac.jpg",
575
+ "image_caption": [
576
+ "Figure 2: Illustration of FlowGMM performance on synthetic datasets. Labeled data is shown with colored triangles, and unlabeled data is shown with blue circles. Colors represent different classes. We compare the classifier decision boundaries when only using labeled data (panels b, d) and when using both labeled and unlabeled data (panels a, c) on two circles (panels a, b) and pinwheel (panels c, d) datasets. FlowGMM leverages unlabeled data to push the decision boundary to low-density regions of the space. "
577
+ ],
578
+ "image_footnote": [],
579
+ "bbox": [
580
+ 189,
581
+ 114,
582
+ 802,
583
+ 242
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "table",
589
+ "img_path": "images/04e69b5ff83116590a6ec2d64699da711215142780b42f079dd0a5ad4a36973c.jpg",
590
+ "table_caption": [
591
+ "Table 1: Accuracy on BERT embedded text classification datasets and UCI datasets with a small number of labeled examples. The kNN baseline, logistic regression, and the 3-Layer $\\mathrm { N N } +$ Dropout were trained on the labeled data only. Numbers reported for each method are the best of 3 runs (ranked by performance on the validation set). $n _ { l }$ and $n _ { u }$ are the number of labeled and unlabeled data points. ",
592
+ "Dataset $\\left( n _ { l } \\right/ n _ { u }$ , classes) "
593
+ ],
594
+ "table_footnote": [],
595
+ "table_body": "<table><tr><td>Method</td><td>AG-News (200 / 200k,4)</td><td>Yahoo Answers (800 /50k,10)</td><td>Hepmass (20/140k,2)</td><td>Miniboone (20 / 65k,2)</td></tr><tr><td>kNN</td><td>51.3</td><td>28.4</td><td>84.6</td><td>77.7</td></tr><tr><td>Logistic Regression</td><td>78.9</td><td>54.9</td><td>84.9</td><td>75.9</td></tr><tr><td>3-Layer NN + Dropout</td><td>78.1</td><td>55.6</td><td>84.4</td><td>77.3</td></tr><tr><td>RBF Label Spreading</td><td>54.6</td><td>30.4</td><td>87.1</td><td>78.8</td></tr><tr><td>kNN Label Spreading</td><td>56.7</td><td>25.6</td><td>87.2</td><td>78.1</td></tr><tr><td>I-model</td><td>80.6</td><td>56.6</td><td>87.9</td><td>78.3</td></tr><tr><td>FlowGMM</td><td>84.8</td><td>57.4</td><td>88.8</td><td>80.6</td></tr></table>",
596
+ "bbox": [
597
+ 214,
598
+ 436,
599
+ 782,
600
+ 573
601
+ ],
602
+ "page_idx": 4
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "",
607
+ "bbox": [
608
+ 173,
609
+ 587,
610
+ 825,
611
+ 671
612
+ ],
613
+ "page_idx": 4
614
+ },
615
+ {
616
+ "type": "text",
617
+ "text": "5.2 TEXT AND TABULAR DATA ",
618
+ "text_level": 1,
619
+ "bbox": [
620
+ 176,
621
+ 688,
622
+ 400,
623
+ 702
624
+ ],
625
+ "page_idx": 4
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "We believe that FlowGMM can be especially useful for semi-supervised learning on tabular data. Consistency-based semi-supervised methods have mostly been developed for image classification, where the predictions of the method are regularized to be invariant to random flips and translations of the image. On tabular data, where the structure is less prominent, finding suitable transformations to apply for consistency-based methods is not-trivial. Similarly, approaches based on GANs have mostly been developed for images. We evaluate FlowGMM on the Hepmass and Miniboone UCI classification datasets (previously used in Papamakarios et al. (2017) for density estimation). ",
630
+ "bbox": [
631
+ 174,
632
+ 713,
633
+ 825,
634
+ 811
635
+ ],
636
+ "page_idx": 4
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "Along with standard tabular UCI datasets, we also consider text classification on AG-News and Yahoo Answers datasets. Using the recent advances in transfer learning for NLP, we construct embeddings for input texts using the BERT transformer model (Devlin et al., 2018) trained on a corpus of Wikipedia articles, and then train FlowGMM and other baselines on the embeddings. ",
641
+ "bbox": [
642
+ 174,
643
+ 819,
644
+ 825,
645
+ 875
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "We compare FlowGMM to the graph based label spreading method from Zhou et al. (2004), a Π-Model (Laine & Aila, 2016) that uses dropout perturbations, as well as supervised logistic regression, $\\mathbf { k }$ -nearest neighbors, and neural network that were trained on the labeled data only. We report ",
652
+ "bbox": [
653
+ 176,
654
+ 882,
655
+ 823,
656
+ 924
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "text",
662
+ "text": "Table 2: Accuracy of the FlowGMM, VAE model $( \\mathbf { M } 1 + \\mathbf { M } 2 \\mathbf { \\Lambda }$ VAE, Kingma et al., 2014), DIGLM (Nalisnick et al., 2019) in supervised and semi-supervised settings on MNIST, SVHN, and CIFAR10. FlowGMM Sup (All labels) as well as DIGLM Sup (All labels) were trained on full train datasets with all labels to demonstrate general capacity of these models. FlowGMM Sup $\\mathbf { \\rho } _ { n _ { l } }$ labels) was trained on $n _ { l }$ labeled examples (and no unlabeled data). For reference, at the bottom we list the performance of the Π-Model (Laine & Aila, 2016) and BadGAN (Dai et al., 2017) as representative consistency-based and GAN-based state-of-the-art methods. Both of these methods use non-invertible architectures with substantially higher base performance and, thus, are not directly comparable. ",
663
+ "bbox": [
664
+ 173,
665
+ 99,
666
+ 825,
667
+ 226
668
+ ],
669
+ "page_idx": 5
670
+ },
671
+ {
672
+ "type": "table",
673
+ "img_path": "images/cbb9b80a47f85d12c23e779c5bd82d455da5c7b6bbc5dff39e69eec7a0ca6e4a.jpg",
674
+ "table_caption": [
675
+ "Dataset (nl / nu) "
676
+ ],
677
+ "table_footnote": [],
678
+ "table_body": "<table><tr><td>Method</td><td>MNIST (1k/59k)</td><td>SVHN (1k/72k)</td><td>CIFAR-10 (4k/46k)</td></tr><tr><td>DIGLM Sup (All labels)</td><td>99.27</td><td>95.74</td><td>-</td></tr><tr><td>FlowGMM Sup (All labels)</td><td>99.63</td><td>95.81</td><td>88.44</td></tr><tr><td>M1+M2 VAE SSL DIGLM SSL</td><td>97.60 99.0</td><td>63.98</td><td></td></tr><tr><td>FlowGMM Sup (nt labels)</td><td>97.36</td><td>= 78.26</td><td>= 73.13</td></tr><tr><td>FlowGMM</td><td>98.94</td><td></td><td></td></tr><tr><td>FlowGMM-cons</td><td></td><td>82.42</td><td>78.24</td></tr><tr><td></td><td>99.0</td><td>86.44</td><td>80.9</td></tr><tr><td>BadGAN</td><td>=</td><td>95.75</td><td>85.59</td></tr><tr><td>II-Model</td><td></td><td>94.57</td><td>87.64</td></tr></table>",
679
+ "bbox": [
680
+ 289,
681
+ 253,
682
+ 707,
683
+ 417
684
+ ],
685
+ "page_idx": 5
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "the results in Table 5.1, where FlowGMM beats the competing semi-supervised learning methods on each of the considered datasets. Implementation details for FlowGMM, the baselines, and the dataset preprocessing details are listed in Appendix D. ",
690
+ "bbox": [
691
+ 174,
692
+ 457,
693
+ 825,
694
+ 501
695
+ ],
696
+ "page_idx": 5
697
+ },
698
+ {
699
+ "type": "text",
700
+ "text": "5.3 IMAGE CLASSIFICATION ",
701
+ "text_level": 1,
702
+ "bbox": [
703
+ 174,
704
+ 545,
705
+ 380,
706
+ 559
707
+ ],
708
+ "page_idx": 5
709
+ },
710
+ {
711
+ "type": "text",
712
+ "text": "We next evaluate the proposed method on semi-supervised image classification benchmarks on CIFAR-10, MNIST and SVHN datasets. For all the datasets, we use RealNVP (Dinh et al., 2016) architecture. Exact implementation details are listed in the appendix E. The supervised model is trained using the same loss (equation 4), where all the data points are labeled $( n _ { u } = 0 )$ ). ",
713
+ "bbox": [
714
+ 174,
715
+ 582,
716
+ 823,
717
+ 637
718
+ ],
719
+ "page_idx": 5
720
+ },
721
+ {
722
+ "type": "text",
723
+ "text": "We present the results for FlowGMM and FlowGMM-cons in Table 2. We also report results from DIGLM (Nalisnick et al., 2019) (which only report semi-supervised performance on MNIST and supervised performance on MNIST and SVHN) and the $\\mathbf { M } 1 { + } \\mathbf { M } 2$ VAE model (Kingma et al., 2014). FlowGMM outperforms $\\mathbf { M } 1 { + } \\mathbf { M } 2$ model and performs better or on par with DIGLM. Furthermore, FlowGMM-cons improves over FlowGMM on all three datasets, suggesting that consistency regularization is very beneficial for the proposed model when useful perturbations are available. ",
724
+ "bbox": [
725
+ 174,
726
+ 645,
727
+ 825,
728
+ 728
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Following Oliver et al. (2018), we evaluate FlowGMM-cons varying the number of labeled data points. Specifically, we follow the setup of Kingma et al. (2014) and train FlowGMM-cons on MNIST with 100, 600, 1000 and 3000 labeled data points. We present the results in Table 3. FlowGMM-cons outperforms the $\\mathbf { M } 1 { + } \\mathbf { M } 2$ model of Kingma et al. (2014) in all the considered settings. ",
735
+ "bbox": [
736
+ 174,
737
+ 734,
738
+ 823,
739
+ 806
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "We note that the results presented in this section are not directly comparable with the state-of-theart methods using GANs or consistency regularization (see e.g. Laine & Aila, 2016; Dai et al., 2017; Athiwaratkun et al., 2019; Berthelot et al., 2019), as the architecture we employ is much less powerful for classification than the ConvNet and ResNet architectures that have been designed for classification without the constraint of invertibility. We believe that invertible architectures with better inductive biases for classification (possibly like iResNet (Behrmann et al., 2018)) may help bridge this gap. The space of images is challenging to model and while there has been substantial progress using normalizing flows, there is still much ground to cover. ",
746
+ "bbox": [
747
+ 174,
748
+ 811,
749
+ 825,
750
+ 924
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "table",
756
+ "img_path": "images/eb2eabeae1fd0821d14baaf168736fea0b913d1f9ce0080cfe75b42928cedd7d.jpg",
757
+ "table_caption": [
758
+ "Table 3: Semi-supervised classification accuracy for FlowGMM-cons and VAE $\\mathbf { M } 1 + \\mathbf { M } 2$ model (Kingma et al., 2014) on MNIST for different number of labeled data points $n _ { l }$ . "
759
+ ],
760
+ "table_footnote": [],
761
+ "table_body": "<table><tr><td>Method</td><td>n =100</td><td>n = 600</td><td>n = 1000</td><td>n = 3000</td></tr><tr><td>M1+M2 VAE SSL (nt labels)</td><td>96.67</td><td>97.41 ± 0.05</td><td>97.60± 0.02</td><td>97.82 ± 0.04</td></tr><tr><td>FlowGMM-cons (ni labels)</td><td>98.2</td><td>98.7</td><td>99</td><td>99.2</td></tr></table>",
762
+ "bbox": [
763
+ 212,
764
+ 138,
765
+ 784,
766
+ 188
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "table",
772
+ "img_path": "images/29448dfa79b2b7b9af2ded65fa67725f9ebd5f0caf886540b72543192644ff02.jpg",
773
+ "table_caption": [
774
+ "Table 4: Negative log-likelihood and Expected Calibration Error for supervised FlowGMM trained on MNIST (1k train, 1k validation, 10k test) and CIFAR-10 ( $5 0 \\mathrm { k }$ train, 1k validation, $9 \\mathrm { k }$ test). FlowGMM-temp stands for tempered FlowGMM where a single scalar parameter $\\sigma ^ { 2 }$ was learned on a validation set for variances in all components. "
775
+ ],
776
+ "table_footnote": [],
777
+ "table_body": "<table><tr><td rowspan=\"2\"></td><td colspan=\"2\">MNIST (test acc 97.3%)</td><td colspan=\"2\">CIFAR-10 (test acc 89.3%)</td></tr><tr><td>FlowGMM</td><td>FlowGMM-temp</td><td>FlowGMM</td><td>FlowGMM-temp</td></tr><tr><td>NLL↓</td><td>0.295</td><td>0.094</td><td>2.98</td><td>0.444</td></tr><tr><td>ECE↓</td><td>0.024</td><td>0.004</td><td>0.108</td><td>0.038</td></tr></table>",
778
+ "bbox": [
779
+ 261,
780
+ 286,
781
+ 735,
782
+ 353
783
+ ],
784
+ "page_idx": 6
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "6 MODEL ANALYSIS ",
789
+ "text_level": 1,
790
+ "bbox": [
791
+ 174,
792
+ 395,
793
+ 361,
794
+ 411
795
+ ],
796
+ "page_idx": 6
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "6.1 UNCERTAINTY AND CALIBRATION ",
801
+ "text_level": 1,
802
+ "bbox": [
803
+ 176,
804
+ 439,
805
+ 452,
806
+ 454
807
+ ],
808
+ "page_idx": 6
809
+ },
810
+ {
811
+ "type": "text",
812
+ "text": "In many machine learning applications, it is crucial to understand how confident a model is in its predictions. In classification problems, well-calibrated models are expected to output meaningful probabilities of belonging to a particular class. In Guo et al. (2017), it was observed that modern deep learning models are highly overconfident, however, simple temperature scaling can substantially improve model’s calibration. In this section, we analyze the predictive uncertainties produced by the FlowGMM. In Appendix Section F, we additionally study the ability of FlowGMM to detect out-of-domain data. ",
813
+ "bbox": [
814
+ 173,
815
+ 473,
816
+ 825,
817
+ 571
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "When using FlowGMM for classification, the class predictive probabilities are $p ( y ~ = ~ k | x ) ~ =$ $\\begin{array} { r } { \\mathcal { N } ( x | \\mu _ { k } , \\boldsymbol { \\Sigma _ { k } ^ { - } } ) / \\sum _ { m } \\mathcal { N } ( x | \\mu _ { m } , \\boldsymbol { \\Sigma } _ { m } ) } \\end{array}$ . Since we initialize Gaussian mixture means randomly from the standard normal distribution and do not train them along with the flow parameters (see section B), FlowGMM predictions become inherently overconfident due to the curse of dimensionality. Indeed, consider two Gaussians with means sampled independently from the standard normal $\\mu _ { 1 } , \\mu _ { 2 } \\sim \\mathcal { N } ( 0 , I )$ in $D$ -dimensional space. If $s _ { 1 } \\sim \\mathcal { N } ( \\mu _ { 1 } , I )$ is a sample from the first Gaussian, then its expected squared distances to both mixture means are $\\mathbb { E } \\left[ \\lVert s _ { 1 } - \\mu _ { 1 } \\rVert ^ { 2 } \\right] = D$ and $\\mathbb { E } \\left[ \\lVert s _ { 1 } - \\mu _ { 2 } \\rVert ^ { 2 } \\right] = 3 D$ (for a detailed derivation see Appendix Section G.). In high dimensional spaces, such logits would lead to hard label assignment in FlowGMM $\\boldsymbol { p } ( y | x ) = 1$ for exactly one class). In fact, in the experiments we observe that FlowGMM is overconfident and performs hard label assignment: predicted class probabilities are all close to either 1 or 0. ",
824
+ "bbox": [
825
+ 173,
826
+ 579,
827
+ 825,
828
+ 736
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "We address this problem by learning a single scalar parameter $\\sigma ^ { 2 }$ for all components in the Gaussian mixture (the component $k$ will be $\\bar { \\mathcal { N } } ( \\mu _ { k } , \\bar { \\sigma } ^ { 2 } I ) )$ by minimizing the negative log likelihood on a validation set. This way we can re-calibrate the variance of the latent GMM in a natural way. This procedure is also equivalent to applying temperature scaling (Guo et al., 2017) to logits $\\log \\mathcal { N } ( x | \\mu _ { k } , \\Sigma _ { k } )$ . We test FlowGMM calibration on MNIST and CIFAR datasets in the supervised setting. On MNIST we restricted the training set size to 1000 objects, since on the full dataset the model makes too few mistakes which makes evaluating calibration harder. In Table 4, we report negative log likelihood and expected calibration error (ECE, see Guo et al. (2017) for a description of this metric). We can see that re-calibrating variances of the Gaussians in the mixture significantly improves both metrics and mitigates overconfidence. The effectiveness of this simple rescaling procedure suggests that the latent space distances learned by the flow model are correlated with the probabilities of belonging to a particular class: the closer a datapoint is to the mean of a Gaussian in the latent space, the more likely it belongs to the corresponding class. ",
835
+ "bbox": [
836
+ 174,
837
+ 742,
838
+ 825,
839
+ 924
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "image",
845
+ "img_path": "images/b834a0b4c6efead5e83eb18dfd66b065cbb69bb8b24acda051517db5722b5aa3.jpg",
846
+ "image_caption": [
847
+ "Figure 3: Visualizations of the latent space representations learned by supervised FlowGMM on MNIST. (a): Latent space interpolations between test images from the same class and (b): from different classes. Observe that interpolations between objects from different classes pass through low-density regions. (c): Histogram of distances from unlabeled data to the decision boundary for FlowGMM-cons trained on $1 k$ labeled and $5 9 k$ unlabeled data and FlowGMM Sup trained on $1 k$ labeled data only. FlowGMM-cons is able to push the decision boundary away from the data distribution using unlabeled data. (d): Feature visualization for CIFAR10: four test reconstructions are shown as an intermediate feature is perturbed. The value of the perturbation $\\alpha$ is shown in red vs the distribution of the channel activations. Observe that the channel visualized activates on zeroed out pixels to the left of the image mimicking the random translations applied to the training data. "
848
+ ],
849
+ "image_footnote": [],
850
+ "bbox": [
851
+ 181,
852
+ 104,
853
+ 805,
854
+ 229
855
+ ],
856
+ "page_idx": 7
857
+ },
858
+ {
859
+ "type": "text",
860
+ "text": "6.2 LEARNED LATENT REPRESENTATIONS ",
861
+ "text_level": 1,
862
+ "bbox": [
863
+ 176,
864
+ 409,
865
+ 480,
866
+ 422
867
+ ],
868
+ "page_idx": 7
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "We next analyze the latent representation space learned by FlowGMM. We examine latent interpolations between members of the same class in Figure 3 (a) and between different classes in Figure 3 (b) for our MNIST FlowGMM-cons model trained with $n _ { \\ell } = 1 k$ labels. As expected, inter-class interpolations pass through regions of low-density, leading to low quality samples but intra-class interpolations do not. These observations suggest that, as expected, the model learns to put the decision boundary in the low-density region of the data space. ",
873
+ "bbox": [
874
+ 174,
875
+ 434,
876
+ 825,
877
+ 518
878
+ ],
879
+ "page_idx": 7
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "In Appendix section H, we present images corresponding to the means of the Gaussian mixture and class-conditional samples from FlowGMM. ",
884
+ "bbox": [
885
+ 174,
886
+ 525,
887
+ 823,
888
+ 553
889
+ ],
890
+ "page_idx": 7
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "Distance to Decision Boundary To explicitly test this conclusion, we compute the distribution of distances from unlabeled data to the decision boundary for FlowGMM-cons and FlowGMM Sup trained on labeled data only. In order to compute this distance exactly for an image $x$ , we find the two closest means $\\mu ^ { \\prime } , \\bar { \\mu ^ { \\prime \\prime } }$ to the corresponding latent variable $z = { \\dot { f } } ( x )$ , and evaluate the expression $\\begin{array} { r } { d ( x ) \\ = \\ \\frac { \\left| \\| \\mu ^ { \\prime } - f ( x ) \\| ^ { 2 } - \\| \\mu ^ { \\prime \\prime } - f ( x ) \\| ^ { 2 } \\right| } { 2 \\| \\mu ^ { \\prime } - \\mu ^ { \\prime \\prime } \\| } } \\end{array}$ We visualize the distributions of the distances for the supervised and semi-supervised method in Figure 3 (c). While most of the unlabeled data are far from the decision boundary for both methods, the supervised method puts a substantially larger fraction of data close to the decision boundary. For example, the distance to the decision boundary is smaller than 5 for 1089 unlabeled data points with supervised model, but only 143 data points with FlowGMM-cons. This increased separation suggests that FlowGMM-cons indeed pushes the decision boundary away from the data distribution in agreement with the clustering principle. ",
895
+ "bbox": [
896
+ 173,
897
+ 569,
898
+ 825,
899
+ 734
900
+ ],
901
+ "page_idx": 7
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "6.3 FEATURE VISUALIZATION ",
906
+ "text_level": 1,
907
+ "bbox": [
908
+ 176,
909
+ 751,
910
+ 397,
911
+ 765
912
+ ],
913
+ "page_idx": 7
914
+ },
915
+ {
916
+ "type": "text",
917
+ "text": "Feature visualization has become an important tool for increasing the interpretability of neural networks. The majority of methods rely on maximizing the activations of a given neuron, channel, or layer over a parametrization of an input image with different kinds of image regularization (Szegedy et al., 2013; Olah et al., 2017; Mahendran & Vedaldi, 2015). These methods, while effective, require optimization and regularization hyper-parameters and iterative optimization too costly for real time interactive exploration. ",
918
+ "bbox": [
919
+ 174,
920
+ 776,
921
+ 825,
922
+ 861
923
+ ],
924
+ "page_idx": 7
925
+ },
926
+ {
927
+ "type": "text",
928
+ "text": "Since our classification model uses a flow which is a sequence of invertible transformations $f ( x ) =$ $f _ { : L } ( x ) : = f _ { L } \\circ f _ { L - 1 } \\circ . . . f _ { 1 } ( x )$ , intermediate activations can be inverted directly. This means that we can combine the methods of feature inversion and feature maximization directly by feeding in a set of input images, modifying intermediate activations arbitrarily, and inverting the representation. ",
929
+ "bbox": [
930
+ 174,
931
+ 867,
932
+ 823,
933
+ 924
934
+ ],
935
+ "page_idx": 7
936
+ },
937
+ {
938
+ "type": "text",
939
+ "text": "Given a set of activations in the $\\ell ^ { t h }$ layer $a _ { \\ell } [ c , i , j ] = f _ { : \\ell } ( x ) _ { c i j }$ with channels $c$ and spatial extent $i , j$ , we may perturb a single neuron with ",
940
+ "bbox": [
941
+ 173,
942
+ 102,
943
+ 823,
944
+ 132
945
+ ],
946
+ "page_idx": 8
947
+ },
948
+ {
949
+ "type": "equation",
950
+ "img_path": "images/5fa7a6f3583015acc7a81ee25c7c77a9cad429bc4f1444f535ed67955782c7f8.jpg",
951
+ "text": "$$\nx ( \\alpha ) = f _ { : \\ell } ^ { - 1 } ( f _ { : \\ell } ( x ) + \\alpha \\sigma _ { c } \\delta _ { c } ) ,\n$$",
952
+ "text_format": "latex",
953
+ "bbox": [
954
+ 397,
955
+ 137,
956
+ 599,
957
+ 157
958
+ ],
959
+ "page_idx": 8
960
+ },
961
+ {
962
+ "type": "text",
963
+ "text": "where $\\delta _ { c }$ is a one hot vector at channel $c$ ; and $\\sigma _ { c }$ is the standard deviation of the activations in channel $c$ over the the training set and spatial locations. This can be performed at real time rates to explore the activation parametrized by $\\alpha$ and the location $c i j$ without any optimization or hyper-parameters. The feature visualization of intermediate layers on CIFAR10 test images are shown in panel (d) of Figure 3. The given channel being visualized appears to activate on the zeroed pixels from random translations as well as the green channel, giving us insight into the workings of the model. ",
964
+ "bbox": [
965
+ 173,
966
+ 162,
967
+ 825,
968
+ 247
969
+ ],
970
+ "page_idx": 8
971
+ },
972
+ {
973
+ "type": "text",
974
+ "text": "7 DISCUSSION ",
975
+ "text_level": 1,
976
+ "bbox": [
977
+ 174,
978
+ 266,
979
+ 310,
980
+ 282
981
+ ],
982
+ "page_idx": 8
983
+ },
984
+ {
985
+ "type": "text",
986
+ "text": "We proposed FlowGMM, a natural and interpretable model for semi-supervised learning with normalizing flows. FlowGMM outperforms graph-based and consistency-based baselines on tabular data including semi-supervised text classification with BERT embeddings. On image classification, FlowGMM is not yet competitive with the state-of-the-art approaches (Athiwaratkun et al., 2019; Verma et al., 2019), but we expect that the results could be greatly improved by using a better flow architecture that has stronger inductive biases for classification. ",
987
+ "bbox": [
988
+ 174,
989
+ 297,
990
+ 825,
991
+ 382
992
+ ],
993
+ "page_idx": 8
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "FlowGMM is greatly extensible and can be easily adapted to different settings. For example, consider an extreme case of semi-supervised learning where some classes may be completely unlabeled, and the model has to identify those extra classes and cluster them separately. An effective model that can operate in this setting could, for example, be used for automated scientific discovery: when applied to classify certain experimental data, it can identify new separate classes that were not considered by experts. FlowGMM can be applied in this scenario: instead of the standard Gaussian mixture model (GMM) in the latent space we can use the Chinese Restaurant Process GMM (CRPGMM), which can infer the number of mixture components from data automatically (Rasmussen, 2000). ",
998
+ "bbox": [
999
+ 174,
1000
+ 388,
1001
+ 825,
1002
+ 513
1003
+ ],
1004
+ "page_idx": 8
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Further, we can easily adapt FlowGMM to few-shot learning setting where the model has to generalize to classes not seen at train time by only using a few examples of that new class. In particular, we can fix the parameters of the flow model and add a new Gaussian to the mixture whenever we add a new class. We can estimate the parameters of this Gaussian from the few available examples. ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 520,
1012
+ 823,
1013
+ 577
1014
+ ],
1015
+ "page_idx": 8
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "We view interpretability as another strong advantage of FlowGMM. The access to latent space representations and feature visualization technique discussed in Section 6 as well as the ability to sample from the model can be used to get insights into the performance of the model in practical applications. ",
1020
+ "bbox": [
1021
+ 174,
1022
+ 584,
1023
+ 823,
1024
+ 638
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "REFERENCES ",
1031
+ "text_level": 1,
1032
+ "bbox": [
1033
+ 176,
1034
+ 103,
1035
+ 285,
1036
+ 117
1037
+ ],
1038
+ "page_idx": 9
1039
+ },
1040
+ {
1041
+ "type": "text",
1042
+ "text": "Ben Athiwaratkun, Marc Finzi, Pavel Izmailov, and Andrew Gordon Wilson. There are many consistent explanations of unlabeled data: Why you should average. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ rkgKBhA5Y7. ",
1043
+ "bbox": [
1044
+ 173,
1045
+ 126,
1046
+ 825,
1047
+ 181
1048
+ ],
1049
+ "page_idx": 9
1050
+ },
1051
+ {
1052
+ "type": "text",
1053
+ "text": "Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Invertible residual networks. ¨ arXiv preprint arXiv:1811.00995, 2018. ",
1054
+ "bbox": [
1055
+ 169,
1056
+ 190,
1057
+ 823,
1058
+ 219
1059
+ ],
1060
+ "page_idx": 9
1061
+ },
1062
+ {
1063
+ "type": "text",
1064
+ "text": "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. ",
1065
+ "bbox": [
1066
+ 176,
1067
+ 227,
1068
+ 823,
1069
+ 270
1070
+ ],
1071
+ "page_idx": 9
1072
+ },
1073
+ {
1074
+ "type": "text",
1075
+ "text": "Ricky TQ Chen, Jens Behrmann, David Duvenaud, and Jorn-Henrik Jacobsen. Residual flows for ¨ invertible generative modeling. arXiv preprint arXiv:1906.02735, 2019. ",
1076
+ "bbox": [
1077
+ 171,
1078
+ 279,
1079
+ 823,
1080
+ 308
1081
+ ],
1082
+ "page_idx": 9
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "Zihang Dai, Zhilin Yang, Fan Yang, William W Cohen, and Ruslan R Salakhutdinov. Good semisupervised learning that requires a bad GAN. In Advances in Neural Information Processing Systems 30, pp. 6510–6520. 2017. ",
1087
+ "bbox": [
1088
+ 174,
1089
+ 315,
1090
+ 823,
1091
+ 359
1092
+ ],
1093
+ "page_idx": 9
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. ",
1098
+ "bbox": [
1099
+ 171,
1100
+ 367,
1101
+ 821,
1102
+ 397
1103
+ ],
1104
+ "page_idx": 9
1105
+ },
1106
+ {
1107
+ "type": "text",
1108
+ "text": "Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014. ",
1109
+ "bbox": [
1110
+ 173,
1111
+ 405,
1112
+ 821,
1113
+ 434
1114
+ ],
1115
+ "page_idx": 9
1116
+ },
1117
+ {
1118
+ "type": "text",
1119
+ "text": "Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using Real NVP. arXiv preprint arXiv:1605.08803, 2016. ",
1120
+ "bbox": [
1121
+ 173,
1122
+ 441,
1123
+ 823,
1124
+ 472
1125
+ ],
1126
+ "page_idx": 9
1127
+ },
1128
+ {
1129
+ "type": "text",
1130
+ "text": "Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. CoRR, abs/1706.04599, 2017. URL http://arxiv.org/abs/1706.04599. ",
1131
+ "bbox": [
1132
+ 173,
1133
+ 479,
1134
+ 823,
1135
+ 508
1136
+ ],
1137
+ "page_idx": 9
1138
+ },
1139
+ {
1140
+ "type": "text",
1141
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1142
+ "bbox": [
1143
+ 173,
1144
+ 517,
1145
+ 823,
1146
+ 546
1147
+ ],
1148
+ "page_idx": 9
1149
+ },
1150
+ {
1151
+ "type": "text",
1152
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational Bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1153
+ "bbox": [
1154
+ 174,
1155
+ 554,
1156
+ 825,
1157
+ 583
1158
+ ],
1159
+ "page_idx": 9
1160
+ },
1161
+ {
1162
+ "type": "text",
1163
+ "text": "Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible $1 \\times 1$ convolutions. In Advances in Neural Information Processing Systems, pp. 10215–10224, 2018. ",
1164
+ "bbox": [
1165
+ 173,
1166
+ 592,
1167
+ 823,
1168
+ 622
1169
+ ],
1170
+ "page_idx": 9
1171
+ },
1172
+ {
1173
+ "type": "text",
1174
+ "text": "Durk P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Advances in neural information processing systems, pp. 3581–3589, 2014. ",
1175
+ "bbox": [
1176
+ 174,
1177
+ 628,
1178
+ 823,
1179
+ 671
1180
+ ],
1181
+ "page_idx": 9
1182
+ },
1183
+ {
1184
+ "type": "text",
1185
+ "text": "Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016. ",
1186
+ "bbox": [
1187
+ 173,
1188
+ 680,
1189
+ 823,
1190
+ 709
1191
+ ],
1192
+ "page_idx": 9
1193
+ },
1194
+ {
1195
+ "type": "text",
1196
+ "text": "Aravindh Mahendran and Andrea Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 5188–5196, 2015. ",
1197
+ "bbox": [
1198
+ 174,
1199
+ 717,
1200
+ 823,
1201
+ 761
1202
+ ],
1203
+ "page_idx": 9
1204
+ },
1205
+ {
1206
+ "type": "text",
1207
+ "text": "Takeru Miyato, Shin-ichi Maeda, Shin Ishii, and Masanori Koyama. Virtual adversarial training: a regularization method for supervised and semi-supervised learning. IEEE transactions on pattern analysis and machine intelligence, 2018. ",
1208
+ "bbox": [
1209
+ 173,
1210
+ 768,
1211
+ 823,
1212
+ 813
1213
+ ],
1214
+ "page_idx": 9
1215
+ },
1216
+ {
1217
+ "type": "text",
1218
+ "text": "Mehryar Mohri, Afshin Rostamizadeh, and Ameet Talwalkar. Foundations of machine learning. MIT press, 2018. ",
1219
+ "bbox": [
1220
+ 173,
1221
+ 820,
1222
+ 821,
1223
+ 849
1224
+ ],
1225
+ "page_idx": 9
1226
+ },
1227
+ {
1228
+ "type": "text",
1229
+ "text": "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. ",
1230
+ "bbox": [
1231
+ 174,
1232
+ 857,
1233
+ 821,
1234
+ 887
1235
+ ],
1236
+ "page_idx": 9
1237
+ },
1238
+ {
1239
+ "type": "text",
1240
+ "text": "Eric Nalisnick, Akihiro Matsukawa, Yee Whye Teh, Dilan Gorur, and Balaji Lakshminarayanan. Hybrid models with deep and invertible features. arXiv preprint arXiv:1902.02767, 2019. ",
1241
+ "bbox": [
1242
+ 176,
1243
+ 895,
1244
+ 820,
1245
+ 924
1246
+ ],
1247
+ "page_idx": 9
1248
+ },
1249
+ {
1250
+ "type": "text",
1251
+ "text": "Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. Feature visualization. Distill, 2017. doi: 10.23915/distill.00007. https://distill.pub/2017/feature-visualization. ",
1252
+ "bbox": [
1253
+ 171,
1254
+ 103,
1255
+ 823,
1256
+ 132
1257
+ ],
1258
+ "page_idx": 10
1259
+ },
1260
+ {
1261
+ "type": "text",
1262
+ "text": "Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In Advances in Neural Information Processing Systems, pp. 3235–3246, 2018. ",
1263
+ "bbox": [
1264
+ 176,
1265
+ 140,
1266
+ 821,
1267
+ 184
1268
+ ],
1269
+ "page_idx": 10
1270
+ },
1271
+ {
1272
+ "type": "text",
1273
+ "text": "Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016. ",
1274
+ "bbox": [
1275
+ 169,
1276
+ 193,
1277
+ 823,
1278
+ 222
1279
+ ],
1280
+ "page_idx": 10
1281
+ },
1282
+ {
1283
+ "type": "text",
1284
+ "text": "George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pp. 2338–2347, 2017. ",
1285
+ "bbox": [
1286
+ 173,
1287
+ 229,
1288
+ 823,
1289
+ 260
1290
+ ],
1291
+ "page_idx": 10
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "Carl Edward Rasmussen. The infinite gaussian mixture model. In Advances in neural information processing systems, pp. 554–560, 2000. ",
1296
+ "bbox": [
1297
+ 173,
1298
+ 267,
1299
+ 823,
1300
+ 296
1301
+ ],
1302
+ "page_idx": 10
1303
+ },
1304
+ {
1305
+ "type": "text",
1306
+ "text": "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. ",
1307
+ "bbox": [
1308
+ 174,
1309
+ 305,
1310
+ 823,
1311
+ 348
1312
+ ],
1313
+ "page_idx": 10
1314
+ },
1315
+ {
1316
+ "type": "text",
1317
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. ",
1318
+ "bbox": [
1319
+ 173,
1320
+ 357,
1321
+ 823,
1322
+ 387
1323
+ ],
1324
+ "page_idx": 10
1325
+ },
1326
+ {
1327
+ "type": "text",
1328
+ "text": "Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pp. 1195–1204, 2017. ",
1329
+ "bbox": [
1330
+ 173,
1331
+ 395,
1332
+ 823,
1333
+ 438
1334
+ ],
1335
+ "page_idx": 10
1336
+ },
1337
+ {
1338
+ "type": "text",
1339
+ "text": "Vikas Verma, Alex Lamb, Juho Kannala, Yoshua Bengio, and David Lopez-Paz. Interpolation consistency training for semi-supervised learning. arXiv preprint arXiv:1903.03825, 2019. ",
1340
+ "bbox": [
1341
+ 173,
1342
+ 446,
1343
+ 821,
1344
+ 476
1345
+ ],
1346
+ "page_idx": 10
1347
+ },
1348
+ {
1349
+ "type": "text",
1350
+ "text": "Weidi Xu, Haoze Sun, Chao Deng, and Ying Tan. Variational autoencoder for semi-supervised text classification. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. ",
1351
+ "bbox": [
1352
+ 173,
1353
+ 484,
1354
+ 820,
1355
+ 513
1356
+ ],
1357
+ "page_idx": 10
1358
+ },
1359
+ {
1360
+ "type": "text",
1361
+ "text": "Dengyong Zhou, Olivier Bousquet, Thomas N Lal, Jason Weston, and Bernhard Scholkopf. Learn- ¨ ing with local and global consistency. In Advances in neural information processing systems, pp. 321–328, 2004. ",
1362
+ "bbox": [
1363
+ 173,
1364
+ 522,
1365
+ 826,
1366
+ 564
1367
+ ],
1368
+ "page_idx": 10
1369
+ },
1370
+ {
1371
+ "type": "text",
1372
+ "text": "A EXPECTATION MAXIMIZATION ",
1373
+ "text_level": 1,
1374
+ "bbox": [
1375
+ 176,
1376
+ 102,
1377
+ 464,
1378
+ 118
1379
+ ],
1380
+ "page_idx": 11
1381
+ },
1382
+ {
1383
+ "type": "text",
1384
+ "text": "As an alternative to direct optimization of the likelihood (equation 4), we consider ExpectationMaximization algorithm (EM). EM is a popular approach for finding maximum likelihood estimates in mixture models. Suppose $X = \\{ x _ { i } \\} _ { i = 1 } ^ { n }$ is the observed dataset, $T = \\{ t _ { i } \\} _ { i = 1 } ^ { n }$ are corresponding unobserved latent variables (often denoting the component in mixture model) and $\\theta$ is a vector of model parameters. EM algorithm consists of the two alternating steps: on E-step, we compute posterior probabilities of latent variables for each data point $q ( t _ { i } | x _ { i } ) = P ( t _ { i } | x _ { i } , \\theta )$ ; and on M-step, we fix $q$ and maximize the expected log likelihood of the data and latent variables with respect to $\\theta$ : $\\mathbb { E } _ { q } \\log P ( X , T | \\theta ) \\to \\operatorname* { m a x } _ { \\theta }$ . The algorithm can be easily adapted to the semi-supervised setting where a subset of data is labeled with $\\{ y _ { i } ^ { l } \\} _ { i = 1 } ^ { n _ { l } }$ : then, on $\\mathrm { E }$ -step we have hard assignment to the true mixture component $q ( t _ { i } | x _ { i } ) = I [ t _ { i } = y _ { i } ^ { l } ]$ for labeled data points. ",
1385
+ "bbox": [
1386
+ 173,
1387
+ 133,
1388
+ 825,
1389
+ 277
1390
+ ],
1391
+ "page_idx": 11
1392
+ },
1393
+ {
1394
+ "type": "text",
1395
+ "text": "EM algorithm is applicable in our setting which is fitting the transformed mixture of Gaussians. We can perform the exact $\\mathrm { E }$ -step for unlabeled data in the model since ",
1396
+ "bbox": [
1397
+ 173,
1398
+ 282,
1399
+ 823,
1400
+ 310
1401
+ ],
1402
+ "page_idx": 11
1403
+ },
1404
+ {
1405
+ "type": "equation",
1406
+ "img_path": "images/b3269ceb1ed61dd774e6f25d0635d9ac51e4ab8e7f2f78519709e14695cbaac6.jpg",
1407
+ "text": "$$\nq ( t | x ) = { \\frac { p ( x | t , \\theta ) } { p ( x | \\theta ) } } = { \\frac { { \\mathcal { N } } ( f ( x ) | \\mu _ { t } , \\Sigma _ { t } ) \\cdot \\left| \\operatorname* { d e t } \\left( { \\frac { \\partial f } { \\partial x } } \\right) \\right| } { \\sum _ { k = 1 } ^ { \\mathcal { C } } { \\mathcal { N } } ( f ( x ) | \\mu _ { k } , \\Sigma _ { k } ) \\cdot \\left| \\operatorname* { d e t } \\left( { \\frac { \\partial f } { \\partial x } } \\right) \\right| } } = { \\frac { { \\mathcal { N } } ( f ( x ) | \\mu _ { t } , \\Sigma _ { t } ) } { \\sum _ { k = 1 } ^ { \\mathcal { C } } { \\mathcal { N } } ( f ( x ) | \\mu _ { k } , \\Sigma _ { k } ) } }\n$$",
1408
+ "text_format": "latex",
1409
+ "bbox": [
1410
+ 212,
1411
+ 316,
1412
+ 784,
1413
+ 371
1414
+ ],
1415
+ "page_idx": 11
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "which coincides with the $\\mathrm { E }$ -step of EM algorithm on Gaussian mixture model. On M-step, the objective has the following form: ",
1420
+ "bbox": [
1421
+ 171,
1422
+ 376,
1423
+ 825,
1424
+ 405
1425
+ ],
1426
+ "page_idx": 11
1427
+ },
1428
+ {
1429
+ "type": "equation",
1430
+ "img_path": "images/21146a46e89e2fb5931e40f7d33aeee67d9d0cbd5e701ba1cdc6eacf13070758.jpg",
1431
+ "text": "$$\n\\sum _ { i = 1 } ^ { n _ { l } } \\log \\left[ \\mathcal { N } ( f _ { \\theta } ( x _ { i } ^ { l } ) | \\mu _ { y _ { i } ^ { l } } , \\Sigma _ { y _ { i } ^ { l } } ) \\left| \\frac { \\partial f _ { \\theta } } { \\partial x _ { i } ^ { l } } \\right| \\right] + \\sum _ { i = 1 } ^ { n _ { u } } \\mathbb { E } _ { q ( t _ { i } | x _ { i } ^ { u } , \\theta ) } \\log \\left[ \\mathcal { N } ( f _ { \\theta } ( x _ { i } ^ { u } ) | \\mu _ { t _ { i } } , \\Sigma _ { t _ { i } } ) \\left| \\frac { \\partial f _ { \\theta } } { \\partial x _ { i } ^ { u } } \\right| \\right] .\n$$",
1432
+ "text_format": "latex",
1433
+ "bbox": [
1434
+ 205,
1435
+ 411,
1436
+ 789,
1437
+ 452
1438
+ ],
1439
+ "page_idx": 11
1440
+ },
1441
+ {
1442
+ "type": "text",
1443
+ "text": "Since the exact solution is not tractable due to complexity of the flow model, we perform a stochastic gradient step to optimize the expected log likelihood with respect to flow parameters $\\theta$ . ",
1444
+ "bbox": [
1445
+ 176,
1446
+ 457,
1447
+ 821,
1448
+ 487
1449
+ ],
1450
+ "page_idx": 11
1451
+ },
1452
+ {
1453
+ "type": "text",
1454
+ "text": "Note that unlike regular EM algorithm for mixture models, we have Gaussian mixture parameters $\\{ ( \\mu _ { k } , \\Sigma _ { k } ) \\} _ { k = 1 } ^ { \\mathcal { C } }$ fixed in our experiments, and on M-step the update of $\\theta$ induces the change of $z _ { i } =$ $f _ { \\boldsymbol { \\theta } } ( \\boldsymbol { x } _ { i } )$ latent space representations. ",
1455
+ "bbox": [
1456
+ 174,
1457
+ 492,
1458
+ 823,
1459
+ 535
1460
+ ],
1461
+ "page_idx": 11
1462
+ },
1463
+ {
1464
+ "type": "text",
1465
+ "text": "Using EM algorithm for optimization in the semi-supervised setting on MNIST dataset with 1000 labeled images, we obtain $9 8 . 9 7 \\%$ accuracy which is comparable to the result for FlowGMM with regular SGD training. However, in our experiments, we observed that on E-step, hard label assignment happens for unlabeled points $\\mathbf { \\bar { \\Psi } } q ( t | x ) \\approx 1$ for one of the classes) because of the high dimensionality of the problem (see section 6.1) which affects the M-step objective and hinders training. ",
1466
+ "bbox": [
1467
+ 174,
1468
+ 541,
1469
+ 825,
1470
+ 612
1471
+ ],
1472
+ "page_idx": 11
1473
+ },
1474
+ {
1475
+ "type": "text",
1476
+ "text": "B LATENT DISTRIBUTION MEAN AND COVARIANCE CHOICES ",
1477
+ "text_level": 1,
1478
+ "bbox": [
1479
+ 174,
1480
+ 632,
1481
+ 702,
1482
+ 648
1483
+ ],
1484
+ "page_idx": 11
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "Initialization In our experiments, we draw the mean vectors $\\mu _ { i }$ of Gaussian mixture model randomly from the standard normal distribution $\\mu _ { i } \\sim \\mathcal { N } ( 0 , I )$ , and set the covariance matrices to identity $\\Sigma _ { i } = I$ for all classes; we fixed GMM parameters throughout training. However, one could potentially benefit from data-dependent placing of means in the latent space. We experimented with different initialization methods, in particular, initializing means using the mean point of latent representations of labeled data in each class: $\\mu _ { i } = ( 1 / n _ { l } ^ { i } ) \\textstyle \\sum _ { m = 1 } ^ { n _ { l } ^ { i } } f ( x _ { m } ^ { i } )$ where $x _ { m } ^ { i }$ represents labeled data points from class $i$ and $n _ { l } ^ { i }$ is the total number of labeled points in that class. In addition, we can scale all means by a scalar value ${ \\hat { \\mu } } _ { i } = r \\mu _ { i }$ to increase or decrease distances between them. We observed that such initialization leads to much faster convergence of FlowGMM on semi-supervised classification on MNIST dataset, however, the final performance of the model was worse compared to the one with random mean placing. We hypothesize that it becomes easier for the flow model to warm up faster with data-dependent initialization because Gaussian means are closer to the initial latent representations, but afterwards the model gets stuck in a suboptimal solution. ",
1489
+ "bbox": [
1490
+ 173,
1491
+ 662,
1492
+ 825,
1493
+ 851
1494
+ ],
1495
+ "page_idx": 11
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "GMM training FlowGMM would become even more flexible and expressive if we could learn Gaussian mixture parameters in a principled way. In the current setup where means are sampled from√ the standard normal distribution, the distances between mixture components are about $\\sqrt { 2 D }$ where $D$ is the dimensionality of the data (see Appendix G). Thus, classes are quite far apart from each other in the latent space, which, as observed in Section 6.1, leads to model miscalibration. Training GMM parameters can further increase interpretability of the learned latent space representations: we can imagine a scenario in which some of the classes are very similar or even intersecting, and it would be useful to represent it in the latent space. We could train GMM by directly optimizing likelihood (equation 4), or using expectation maximization (see Section A), either jointly with the flow parameters or iteratively switching between training flow parameters with the fixed GMM and training GMM with the fixed flow. In our initial experiments on semi-supervised classification on MNIST, training GMM jointly with the flow parameters did not improve performance or lead to substantial change of the latent representations. Further improvements require careful hyperparameter choice which we leave for future work. ",
1500
+ "bbox": [
1501
+ 174,
1502
+ 866,
1503
+ 823,
1504
+ 924
1505
+ ],
1506
+ "page_idx": 11
1507
+ },
1508
+ {
1509
+ "type": "image",
1510
+ "img_path": "images/8bc2da5f17acd9c0a03c362ce398089cd0884a969f11b585932339b489f33962.jpg",
1511
+ "image_caption": [
1512
+ "Figure 4: Illustration of FlowGMM on synthetic datasets: two circles (top row), eight Gaussians (middle row) and pinwheel (bottom row). (a): Data distribution and classification decision boundaries. Unlabeled data is shown with blue circles and labeled data is shown with colored triangles, where color represents the class. Background color visualizes the classification decision boundaries of FlowGMM. (b): Mapping of the data to the latent space. (c): Gaussian mixture in the latent space. (d): Samples from the learned generative model corresponding to different classes, as shown by their color. "
1513
+ ],
1514
+ "image_footnote": [],
1515
+ "bbox": [
1516
+ 163,
1517
+ 102,
1518
+ 802,
1519
+ 502
1520
+ ],
1521
+ "page_idx": 12
1522
+ },
1523
+ {
1524
+ "type": "text",
1525
+ "text": "",
1526
+ "bbox": [
1527
+ 174,
1528
+ 621,
1529
+ 825,
1530
+ 761
1531
+ ],
1532
+ "page_idx": 12
1533
+ },
1534
+ {
1535
+ "type": "text",
1536
+ "text": "C SYNTHETIC EXPERIMENTS ",
1537
+ "text_level": 1,
1538
+ "bbox": [
1539
+ 176,
1540
+ 781,
1541
+ 431,
1542
+ 797
1543
+ ],
1544
+ "page_idx": 12
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "In Figure 4 we visualize the classification decision boundaries of FlowGMM as well as the learned mapping to the latent space and generated samples for three different synthetic datasets. ",
1549
+ "bbox": [
1550
+ 173,
1551
+ 814,
1552
+ 823,
1553
+ 842
1554
+ ],
1555
+ "page_idx": 12
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "D TABULAR DATA PREPARATION AND HYPERPARAMETERS ",
1560
+ "text_level": 1,
1561
+ "bbox": [
1562
+ 173,
1563
+ 864,
1564
+ 673,
1565
+ 878
1566
+ ],
1567
+ "page_idx": 12
1568
+ },
1569
+ {
1570
+ "type": "text",
1571
+ "text": "The AG-News and Yahoo Answers were constructed by applying BERT embeddings to the text input, yielding a 768 dimensional vector for each data point. AG-News has 4 classes while Yahoo Answers has 10. The UCI datasets Hepmass and Miniboone were constructed using the data preprocessing from Papamakarios et al. (2017), but with the inclusion of the removed background process class so that the two problems can be used for binary classification. We then subsample the fraction of background class examples so that the dataset is balanced. For each of the datasets, a separate validation set of size $5 \\mathrm { k }$ was used to tune hyperparameters. All neural network models use the ADAM optimizer (Kingma & Ba, 2014). ",
1572
+ "bbox": [
1573
+ 174,
1574
+ 895,
1575
+ 821,
1576
+ 924
1577
+ ],
1578
+ "page_idx": 12
1579
+ },
1580
+ {
1581
+ "type": "table",
1582
+ "img_path": "images/0d20e57f324438de79e0c1fc367864f241f69a2f83d3d4727477cebf1d0b25f7.jpg",
1583
+ "table_caption": [
1584
+ "Table 5 "
1585
+ ],
1586
+ "table_footnote": [],
1587
+ "table_body": "<table><tr><td>Method Learning Rate</td><td>AG-News</td><td>Yahoo Answers</td><td>Hepmass</td><td>Miniboone</td></tr><tr><td>3-Layer NN + Dropout</td><td>3e-4</td><td>3e-4</td><td>3e-4</td><td>3e-4</td></tr><tr><td>II-model</td><td>1e-3</td><td>1e-4</td><td>3e-3</td><td>1e-4</td></tr><tr><td>FlowGMM</td><td>1e-4</td><td>1e-4</td><td>3e-3</td><td>3e-4</td></tr><tr><td>kNN</td><td>k=4</td><td>k=18</td><td>k=9</td><td>k=3</td></tr></table>",
1588
+ "bbox": [
1589
+ 250,
1590
+ 127,
1591
+ 750,
1592
+ 200
1593
+ ],
1594
+ "page_idx": 13
1595
+ },
1596
+ {
1597
+ "type": "text",
1598
+ "text": "",
1599
+ "bbox": [
1600
+ 173,
1601
+ 218,
1602
+ 825,
1603
+ 301
1604
+ ],
1605
+ "page_idx": 13
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "$\\mathbf { k }$ -Nearest Neighbors: We tested both using both L2 distance and L2 with inputs normalized to unit norm, $\\sin ^ { 2 }$ distance), and the latter performed the best. The value $k$ chosen in the method was found sweeping over $1 - 2 0$ , and the optimal values for each of the datasets are shown in 5. ",
1610
+ "bbox": [
1611
+ 174,
1612
+ 309,
1613
+ 825,
1614
+ 351
1615
+ ],
1616
+ "page_idx": 13
1617
+ },
1618
+ {
1619
+ "type": "text",
1620
+ "text": "3 Layer $\\mathbf { N N } +$ Dropout: The 3-Layer $\\mathrm { N N } +$ Dropout baseline network has three fully connected hidden layers with inner dimension $k = 5 1 2$ , ReLU nonlinearities, and dropout with $p = 0 . 5$ . We use the learning rate $\\mathrm { 3 e { - } 4 }$ for training the supervised baseline across all datasets. ",
1621
+ "bbox": [
1622
+ 174,
1623
+ 357,
1624
+ 825,
1625
+ 400
1626
+ ],
1627
+ "page_idx": 13
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "Π-Model: The Π-Model uses the same network architecture, and dropout for the perturbations. The additional consistency loss per unlabeled data point is computed as $L _ { \\mathrm { U n l a b } } = | | g ( x ^ { \\prime \\prime } ) - g ( x ^ { \\prime } ) | | ^ { 2 }$ , where $g$ is are the output probabilities after the softmax layer of the neural network and the consistency weight $\\lambda = 3 0$ which worked the best across the datasets. The model was trained for 50 epochs with labeled and unlabeled batch size $n _ { \\ell }$ for AG-News and Yahoo Answers, and labeled and unlabeled batch sizes $n _ { \\ell }$ and 2000 for Hepmass and Miniboone. ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 406,
1635
+ 825,
1636
+ 491
1637
+ ],
1638
+ "page_idx": 13
1639
+ },
1640
+ {
1641
+ "type": "text",
1642
+ "text": "Label Spreading: We use the local and global consistency method from Zhou et al. (2004), $Y ^ { * } =$ $( I - \\alpha \\bar { S } ) ^ { - 1 } Y$ where in our case $Y$ is the matrix of labels for the labeled, unlabeled, and test data but filled with zeros for unlabeled and test. $S = D ^ { - 1 / 2 } W D ^ { - 1 / 2 }$ computed from the affinity matrix $W _ { i j } = \\exp \\left( - \\gamma \\sin ^ { 2 } ( x _ { i } , x _ { j } ) \\right)$ where $\\begin{array} { r } { \\sin ^ { 2 } ( x _ { i } , x _ { j } ) : = 1 - \\frac { \\langle x _ { i } , x _ { j } \\rangle } { \\| x _ { i } \\| \\| x _ { j } \\| } } \\end{array}$ . This is equivalent to L2 distance on the inputs normalized to unit magnitude. Because the algorithm scales poorly with number of unlabeled points for dense affinity matrices, $O ( n _ { u } ^ { 3 } )$ , we we subsampled the number of unlabeled data points to $1 0 k$ and test data points to $5 k$ for this graph method. However, we also evaluate the label spreading algorithm with a sparse kNN affinity matrix on using a larger subset $2 0 k$ of unlabeled data. The two hyperparameters for label spreading $( \\gamma / k$ and $\\alpha$ ) were tuned by separate grid search for each of the datasets. In both cases, we use the inductive variant of the algorithm where the test data is not included in the unlabeled data. ",
1643
+ "bbox": [
1644
+ 173,
1645
+ 497,
1646
+ 825,
1647
+ 657
1648
+ ],
1649
+ "page_idx": 13
1650
+ },
1651
+ {
1652
+ "type": "text",
1653
+ "text": "FlowGMM: We train our FlowGMM model with a RealNVP normalizing flow, similar to the architectures used in Papamakarios et al. (2017). Specifically, the model uses 7 coupling layers, with 1 hidden layer each and 256 hidden units for the UCI datasets but 512 for text classification. UCI models were trained for 50 epochs of unlabeled data and the text datasets were trained for 30 epochs of unlabeled data. The labeled and unlabeled batch sizes are the same as in the Π-Model. ",
1654
+ "bbox": [
1655
+ 174,
1656
+ 665,
1657
+ 825,
1658
+ 734
1659
+ ],
1660
+ "page_idx": 13
1661
+ },
1662
+ {
1663
+ "type": "text",
1664
+ "text": "The tuned learning rates for each of the models that we used for these experiments are shown in table 5. ",
1665
+ "bbox": [
1666
+ 174,
1667
+ 741,
1668
+ 823,
1669
+ 770
1670
+ ],
1671
+ "page_idx": 13
1672
+ },
1673
+ {
1674
+ "type": "text",
1675
+ "text": "E IMAGE DATA PREPARATION AND HYPERPARAMETERS ",
1676
+ "text_level": 1,
1677
+ "bbox": [
1678
+ 174,
1679
+ 794,
1680
+ 647,
1681
+ 809
1682
+ ],
1683
+ "page_idx": 13
1684
+ },
1685
+ {
1686
+ "type": "text",
1687
+ "text": "We use the CIFAR-10 multi-scale architecture with 2 scales, each containing 3 coupling layers defined by 8 residual blocks with 64 feature maps. We use Adam optimizer (Kingma & Ba, 2014) with learning rate $1 0 ^ { - 3 }$ for CIFAR-10 and SVHN and $1 0 ^ { - 4 }$ for MNIST. We train the supervised model for 100 epochs, and semi-supervised models for 1000 passes through the labeled data for CIFAR-10 and SVHN and 3000 passes for MNIST. We use a batch size of 64 and sample 32 labeled and 32 unlabeled data points in each mini-batch. For the consistency loss term (equation 7), we linearly increase the weight from 0 to 1 for the first 100 epochs following Athiwaratkun et al. (2019). ",
1688
+ "bbox": [
1689
+ 174,
1690
+ 825,
1691
+ 825,
1692
+ 924
1693
+ ],
1694
+ "page_idx": 13
1695
+ },
1696
+ {
1697
+ "type": "text",
1698
+ "text": "For FlowGMM and FlowGMM-cons, we re-weight the loss on labeled data by $\\lambda = 3$ (value tuned on validation (Kingma et al., 2014) on CIFAR-10), as otherwise, we observed that the method underfits the labeled data. ",
1699
+ "bbox": [
1700
+ 176,
1701
+ 103,
1702
+ 823,
1703
+ 146
1704
+ ],
1705
+ "page_idx": 14
1706
+ },
1707
+ {
1708
+ "type": "text",
1709
+ "text": "F OUT-OF-DOMAIN DATA DETECTION ",
1710
+ "text_level": 1,
1711
+ "bbox": [
1712
+ 174,
1713
+ 170,
1714
+ 501,
1715
+ 185
1716
+ ],
1717
+ "page_idx": 14
1718
+ },
1719
+ {
1720
+ "type": "text",
1721
+ "text": "Density models have held promise for being able to detect out-of-domain data, an especially important task for robust machine learning systems (Nalisnick et al., 2019). Recently, it has been shown that existing flow and autoregressive density models are not as apt at this task as previously thought, yielding high likelihood on images coming from other (simpler) distributions. The conclusion put forward is that datasets like SVHN are encompassed by, or have roughly the same mean but lower variance than, more complex datasets like CIFAR10 (Nalisnick et al., 2018). We examine this hypothesis in the context of our flow model which has a multi-modal latent space distribution unlike methods considered in Nalisnick et al. (2018). ",
1722
+ "bbox": [
1723
+ 173,
1724
+ 202,
1725
+ 825,
1726
+ 314
1727
+ ],
1728
+ "page_idx": 14
1729
+ },
1730
+ {
1731
+ "type": "image",
1732
+ "img_path": "images/03c120b2b67ca21f9f317f98afb01e803e6410988754d8489801ef847329c82e.jpg",
1733
+ "image_caption": [
1734
+ "Figure 5: Left: Log likelihoods on in- and out-of-domain data for our model trained on MNIST. Center: Log likelihoods on in- and out-of-domain data for our model trained on FashionMNIST. Right: MNIST digits get mapped onto the sandal mode of the FashionMNIST model $7 5 \\%$ of the time, often being assigned higher likelihood than elements of the original sandal class. Representative elements are shown above. "
1735
+ ],
1736
+ "image_footnote": [],
1737
+ "bbox": [
1738
+ 183,
1739
+ 340,
1740
+ 795,
1741
+ 443
1742
+ ],
1743
+ "page_idx": 14
1744
+ },
1745
+ {
1746
+ "type": "text",
1747
+ "text": "Using a fully supervised model trained on MNIST, we evaluate the log likelihood for data points coming from the NotMNIST dataset, consisting of letters instead of digits, and the FashionMNIST dataset. We then train a supervised model on the more complex dataset FashionMNIST and evaluate on MNIST and NotMNIST. The distribution of the log likelihood $\\log p _ { \\mathcal { X } } ( \\cdot ) \\ =$ $\\begin{array} { r } { \\log p _ { \\mathcal Z } ( f ( \\cdot ) ) + \\log \\left| \\operatorname* { d e t } \\left( \\frac { \\partial f } { \\partial x } \\right) \\right| } \\end{array}$ on these datasets is shown in Figure 5. For the model trained on MNIST we see that the data from Fashion MNIST and NotMNIST is assigned lower likelihood, as expected. However, the model trained on FashionMNIST predicts higher likelihoods for MNIST images. The majority $( \\approx 7 5 \\% )$ of the MNIST data points get mapped into the mode of the FashionMNIST model corresponding to sandals, which is the class with the largest fraction of pixels that are zero. Similarly, for the model trained on MNIST the image of all zeros has very high likelihood and gets mapped to the mode corresponding to the digit 1 which has the largest fraction of empty space. ",
1748
+ "bbox": [
1749
+ 173,
1750
+ 544,
1751
+ 825,
1752
+ 719
1753
+ ],
1754
+ "page_idx": 14
1755
+ },
1756
+ {
1757
+ "type": "text",
1758
+ "text": "G EXPECTED DISTANCES BETWEEN GAUSSIAN SAMPLES ",
1759
+ "text_level": 1,
1760
+ "bbox": [
1761
+ 176,
1762
+ 743,
1763
+ 665,
1764
+ 761
1765
+ ],
1766
+ "page_idx": 14
1767
+ },
1768
+ {
1769
+ "type": "text",
1770
+ "text": "Consider two Gaussians with means sampled independently from the standard normal $\\mu _ { 1 } , \\mu _ { 2 } \\sim { \\mathcal { N } } ( 0 , I )$ in $D$ -dimensional space. If $\\bar { s } _ { 1 } \\sim \\mathcal { N } ( \\mu _ { 1 } , I )$ is a sample from the first Gaussian, then its expected squared distances to both mixture means are: ",
1771
+ "bbox": [
1772
+ 176,
1773
+ 776,
1774
+ 823,
1775
+ 820
1776
+ ],
1777
+ "page_idx": 14
1778
+ },
1779
+ {
1780
+ "type": "equation",
1781
+ "img_path": "images/18bf6addd75a37f27b380f1cff34620c526468bead42e9428ba8b407c6c039ee.jpg",
1782
+ "text": "$$\n\\mathbb { E } \\left[ \\Vert s _ { 1 } - \\mu _ { 1 } \\Vert ^ { 2 } \\right] = \\mathbb { E } \\left[ \\mathbb { E } \\left[ \\Vert s _ { 1 } - \\mu _ { 1 } \\Vert ^ { 2 } | \\mu _ { 1 } \\right] \\right] = \\mathbb { E } \\left[ \\sum _ { i = 1 } ^ { D } \\mathbb { E } \\left[ ( s _ { 1 , i } - \\mu _ { 1 , i } ) ^ { 2 } | \\mu _ { 1 , i } \\right] \\right]\n$$",
1783
+ "text_format": "latex",
1784
+ "bbox": [
1785
+ 243,
1786
+ 828,
1787
+ 751,
1788
+ 872
1789
+ ],
1790
+ "page_idx": 14
1791
+ },
1792
+ {
1793
+ "type": "equation",
1794
+ "img_path": "images/586629209f574d7b04281445811c833b80b53a8ff60dad7a3e194d5d61620da7.jpg",
1795
+ "text": "$$\n= \\mathbb { E } \\left[ \\sum _ { i = 1 } ^ { D } \\left( \\mathbb { E } [ s _ { 1 , i } ^ { 2 } ] - 2 \\mu _ { 1 , i } ^ { 2 } + \\mu _ { 1 , i } ^ { 2 } \\right) \\right] = \\mathbb { E } \\left[ \\sum _ { i = 1 } ^ { D } \\left( 1 + \\mu _ { 1 , i } ^ { 2 } - \\mu _ { 1 , i } ^ { 2 } \\right) \\right] = D\n$$",
1796
+ "text_format": "latex",
1797
+ "bbox": [
1798
+ 263,
1799
+ 883,
1800
+ 733,
1801
+ 929
1802
+ ],
1803
+ "page_idx": 14
1804
+ },
1805
+ {
1806
+ "type": "equation",
1807
+ "img_path": "images/dbd740244052eda5bd4a23f673c728895a472766649a91bb9564be38fc1ba387.jpg",
1808
+ "text": "$$\n\\begin{array} { l } { \\displaystyle \\mathbb { E } \\left[ \\| s _ { 1 } - \\mu _ { 2 } \\| ^ { 2 } \\right] = \\mathbb { E } \\left[ \\mathbb { E } \\left[ \\| s _ { 1 } - \\mu _ { 2 } \\| ^ { 2 } | \\mu _ { 1 } , \\mu _ { 2 } \\right] \\right] = \\mathbb { E } \\left[ \\sum _ { i = 1 } ^ { D } \\mathbb { E } \\left[ ( s _ { 1 , i } - \\mu _ { 2 , i } ) ^ { 2 } | \\mu _ { 1 , i } , \\mu _ { 2 , i } \\right] \\right] } \\\\ { \\displaystyle \\quad = \\mathbb { E } \\left[ \\sum _ { i = 1 } ^ { D } \\left( 1 + \\mu _ { 1 , i } ^ { 2 } - 2 \\mu _ { 1 , i } \\mu _ { 2 , i } + \\mu _ { 2 , i } ^ { 2 } \\right) \\right] = 3 D } \\end{array}\n$$",
1809
+ "text_format": "latex",
1810
+ "bbox": [
1811
+ 215,
1812
+ 113,
1813
+ 779,
1814
+ 204
1815
+ ],
1816
+ "page_idx": 15
1817
+ },
1818
+ {
1819
+ "type": "text",
1820
+ "text": "For high-dimensional Gaussians the random variables $\\| s _ { 1 } ~ - ~ \\mu _ { 1 } \\| ^ { 2 }$ and $\\| s _ { 1 } ~ - ~ \\mu _ { 2 } \\| ^ { 2 }$ will be concentrated around their expectations. Since the function $\\exp ( - x )$ decreases rapidly to zero for positive $x$ , the probability of $s _ { 1 }$ belonging to the first Gaussian $\\exp ( - \\Vert s _ { 1 } \\ d$ µ $\\begin{array}{c} \\begin{array} { r l r } { \\varepsilon _ { 1 } \\| ^ { 2 } ) \\big / \\left( \\exp ( - \\| s _ { 1 } - \\mu _ { 1 } \\| ^ { 2 } ) + \\exp ( - \\| s _ { 1 } - \\mu _ { 2 } \\| ^ { 2 } ) \\right) } & { \\approx } & { \\exp ( - D ) / \\big ( \\exp ( - D ) + \\exp ( - 3 D ) \\big ) } \\\\ & { } & \\end{array} = \\exp ( - 1 ) \\left( \\exp ( - \\| s _ { 1 } - \\mu _ { 1 } \\| ^ { 2 } ) + \\exp ( - \\| s _ { 1 } - \\mu _ { 2 } \\| ^ { 2 } ) \\right) \\mid \\mu _ { 1 } \\approx \\exp ( - D ) / \\big ( \\exp ( - D ) + \\exp ( - 3 D ) \\big ) \\end{array}$ $1 / ( 1 + \\exp ( - 2 D ) )$ saturates at 1 with the growth of dimensionality $D$ . ",
1821
+ "bbox": [
1822
+ 173,
1823
+ 213,
1824
+ 826,
1825
+ 286
1826
+ ],
1827
+ "page_idx": 15
1828
+ },
1829
+ {
1830
+ "type": "text",
1831
+ "text": "H FLOWGMM AS GENERATIVE MODEL ",
1832
+ "text_level": 1,
1833
+ "bbox": [
1834
+ 173,
1835
+ 306,
1836
+ 514,
1837
+ 321
1838
+ ],
1839
+ "page_idx": 15
1840
+ },
1841
+ {
1842
+ "type": "image",
1843
+ "img_path": "images/dc7d18b1a5a0424c4cd9ee2fb6db9a660e829eed39a79225f3b743e1d74e1701.jpg",
1844
+ "image_caption": [
1845
+ "Figure 6: Visualizations of the latent space representations learned by supervised FlowGMM on MNIST. (a): Images corresponding to means of the Gaussians corresponding to different classes. (b): Class-conditional samples from the model at a reduced temperature $T = 0 . 2 5$ . "
1846
+ ],
1847
+ "image_footnote": [],
1848
+ "bbox": [
1849
+ 416,
1850
+ 340,
1851
+ 580,
1852
+ 462
1853
+ ],
1854
+ "page_idx": 15
1855
+ },
1856
+ {
1857
+ "type": "text",
1858
+ "text": "In Figure 6a we show the images $f ^ { - 1 } ( \\mu _ { i } )$ corresponding to the means of the Gaussians representing each class. We see that the flow correctly learns to map the means to samples from the corresponding classes.Next, in Figure 6b we show class-conditional samples from the model. To produce a sample from class $i$ , we first generate $z \\sim \\mathcal { N } ( \\mu _ { i } , T I )$ , where $T$ is a temperature parameter that controls trade-off between sample quality and diversity; we then compute the samples as $f ^ { - 1 } ( z )$ . We set $T = 0 . 2 5 ^ { 2 }$ to produce samples in Figure 6b. As we can see, FlowGMM can produce reasonable class-conditional samples simultaneously with achieving a high classification accuracy $( 9 9 . 6 3 \\%$ ) on the MNIST dataset. ",
1859
+ "bbox": [
1860
+ 173,
1861
+ 534,
1862
+ 825,
1863
+ 646
1864
+ ],
1865
+ "page_idx": 15
1866
+ }
1867
+ ]
parse/train/BJg_2JHKvH/BJg_2JHKvH_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJg_2JHKvH/BJg_2JHKvH_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByBAl2eAZ/ByBAl2eAZ.md ADDED
@@ -0,0 +1,378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PARAMETER SPACE NOISE FOR EXPLORATION
2
+
3
+ Matthias Plappert†‡, Rein Houthooft†, Prafulla Dhariwal†, Szymon Sidor†, Richard Y. Chen†, Xi Chen††, Tamim Asfour‡, Pieter Abbeel††, and Marcin Andrychowicz † OpenAI ‡ Karlsruhe Institute of Technology (KIT) †† University of California, Berkeley Correspondence to matthias@openai.com
4
+
5
+ # ABSTRACT
6
+
7
+ Deep reinforcement learning (RL) methods generally engage in exploratory behavior through noise injection in the action space. An alternative is to add noise directly to the agent’s parameters, which can lead to more consistent exploration and a richer set of behaviors. Methods such as evolutionary strategies use parameter perturbations, but discard all temporal structure in the process and require significantly more samples. Combining parameter noise with traditional RL methods allows to combine the best of both worlds. We demonstrate that both off- and on-policy methods benefit from this approach through experimental comparison of DQN, DDPG, and TRPO on high-dimensional discrete action environments as well as continuous control tasks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Exploration remains a key challenge in contemporary deep reinforcement learning (RL). Its main purpose is to ensure that the agent’s behavior does not converge prematurely to a local optimum. Enabling efficient and effective exploration is, however, not trivial since it is not directed by the reward function of the underlying Markov decision process (MDP). Although a plethora of methods have been proposed to tackle this challenge in high-dimensional and/or continuous-action MDPs, they often rely on complex additional structures such as counting tables (Tang et al., 2016), density modeling of the state space (Ostrovski et al., 2017), learned dynamics models (Houthooft et al., 2016; Achiam & Sastry, 2017; Stadie et al., 2015), or self-supervised curiosity (Pathak et al., 2017).
12
+
13
+ An orthogonal way of increasing the exploratory nature of these algorithms is through the addition of temporally-correlated noise, for example as done in bootstrapped DQN (Osband et al., 2016a). Along the same lines, it was shown that the addition of parameter noise leads to better exploration by obtaining a policy that exhibits a larger variety of behaviors (Sun et al., 2009b; Salimans et al., 2017). We discuss these related approaches in greater detail in Section 5. Their main limitation, however, is that they are either only proposed and evaluated for the on-policy setting with relatively small and shallow function approximators (Rückstieß et al., 2008) or disregard all temporal structure and gradient information (Salimans et al., 2017; Kober & Peters, 2008; Sehnke et al., 2010).
14
+
15
+ This paper investigates how parameter space noise can be effectively combined with off-the-shelf deep RL algorithms such as DQN (Mnih et al., 2015), DDPG (Lillicrap et al., 2015), and TRPO (Schulman et al., 2015b) to improve their exploratory behavior. Experiments show that this form of exploration is applicable to both high-dimensional discrete environments and continuous control tasks, using on- and off-policy methods. Our results indicate that parameter noise outperforms traditional action space noise-based baselines, especially in tasks where the reward signal is extremely sparse.
16
+
17
+ # 2 BACKGROUND
18
+
19
+ We consider the standard RL framework consisting of an agent interacting with an environment. To simplify the exposition we assume that the environment is fully observable. An environment is modeled as a Markov decision process (MDP) and is defined by a set of states $s$ , a set of actions $\mathcal { A }$ , a distribution over initial states $p ( s _ { 0 } )$ , a reward function $r : S \times \mathcal { A } \mapsto \mathbb { R }$ , transition probabilities $p ( s _ { t + 1 } | s _ { t } , a _ { t } )$ , a time horizon $T$ , and a discount factor $\gamma \in \ [ 0 , 1 )$ . We denote by $\pi _ { \theta }$ a policy parametrized by $\theta$ , which can be either deterministic, $\pi : { \mathcal { S } } \mapsto A$ , or stochastic, $\pi : S \mapsto { \mathcal { P } } ( { \mathcal { A } } )$ . The agent’s goal is to maximize the expected discounted return $\begin{array} { r } { \eta ( \pi _ { \theta } ) = \mathbb { E } _ { \tau } [ \sum _ { t = 0 } ^ { T } \gamma ^ { t } r ( s _ { t } , a _ { t } ) ] } \end{array}$ , where $\tau =$ $( s _ { 0 } , a _ { 0 } , \ldots , s _ { T } )$ denotes a trajectory with $s _ { 0 } \sim p ( s _ { 0 } )$ , $a _ { t } \sim \pi _ { \theta } ( a _ { t } | s _ { t } )$ , and $s _ { t + 1 } \sim p \big ( s _ { t + 1 } \vert s _ { t } , a _ { t } \big )$ . Experimental evaluation is based on the undiscounted return $\begin{array} { r } { \mathbb { E } _ { \tau } [ \sum _ { t = 0 } ^ { T } r ( s _ { t } , a _ { t } ) ] } \end{array}$ . 1
20
+
21
+ # 2.1 OFF-POLICY METHODS
22
+
23
+ Off-policy RL methods allow learning based on data captured by arbitrary policies. This paper considers two popular off-policy algorithms, namely Deep Q-Networks (DQN, Mnih et al. (2015)) and Deep Deterministic Policy Gradients (DDPG, Lillicrap et al. (2015)).
24
+
25
+ Deep Q-Networks (DQN) DQN uses a deep neural network as a function approximator to estimate the optimal $Q$ -value function, which conforms to the Bellman optimality equation:
26
+
27
+ $$
28
+ Q ( s _ { t } , a _ { t } ) = r ( s _ { t } , a _ { t } ) + \gamma \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } Q ( s _ { t + 1 } , a ^ { \prime } ) .
29
+ $$
30
+
31
+ The policy is implicitly defined by $Q$ as $\pi ( s _ { t } ) = \operatorname { a r g m a x } _ { a ^ { \prime } \in \mathcal { A } } Q ( s _ { t } , a ^ { \prime } )$ . Typically, a stochastic $\epsilon$ - greedy or Boltzmann policy (Sutton & Barto, 1998) is derived from the $Q$ -value function to encourage exploration, which relies on sampling noise in the action space. The $Q$ -network predicts a $Q$ -value for each action and is updated using off-policy data from a replay buffer.
32
+
33
+ Deep Deterministic Policy Gradients (DDPG) DDPG is an actor-critic algorithm, applicable to continuous action spaces. Similar to DQN, the critic estimates the $Q$ -value function using off-policy data and the recursive Bellman equation:
34
+
35
+ $$
36
+ Q ( s _ { t } , a _ { t } ) = r ( s _ { t } , a _ { t } ) + \gamma Q \left( s _ { t + 1 } , \pi _ { \theta } ( s _ { t + 1 } ) \right) ,
37
+ $$
38
+
39
+ where $\pi _ { \theta }$ is the actor or policy. The actor is trained to maximize the critic’s estimated $Q$ -values by back-propagating through both networks. For exploration, DDPG uses a stochastic policy of the form $\widehat { \pi _ { \boldsymbol { \theta } } } ( \boldsymbol { s } _ { t } ) \bar { \mathbf { \xi } } = \bar { \pi } _ { \boldsymbol { \theta } } ( \boldsymbol { s } _ { t } ) \bar { \mathbf { \xi } } + w$ , where $w$ is either $\boldsymbol { w } \sim \mathcal { N } ( 0 , \sigma ^ { 2 } I )$ (uncorrelated) or $w \stackrel { \cdot } { \sim } \mathrm { O D } ( 0 , \sigma ^ { 2 } )$ c(correlated).2 Again, exploration is realized through action space noise.
40
+
41
+ # 2.2 ON-POLICY METHODS
42
+
43
+ In contrast to off-policy algorithms, on-policy methods require updating function approximators according to the currently followed policy. In particular, we will consider Trust Region Policy Optimization (TRPO, Schulman et al. (2015a)), an extension of traditional policy gradient methods (Williams, 1992b) using the natural gradient direction (Peters & Schaal, 2008; Kakade, 2001).
44
+
45
+ Trust Region Policy Optimization (TRPO) TRPO improves upon REINFORCE (Williams, 1992b) by computing an ascent direction that ensures a small change in the policy distribution. More specifically, TRPO solves the following constrained optimization problem:
46
+
47
+ $$
48
+ \begin{array} { r l } { \mathrm { m a x i m i z e } _ { \theta } } & { E _ { s \sim \rho _ { \theta ^ { \prime } } , a \sim \pi _ { \theta ^ { \prime } } } [ \frac { \pi _ { \theta } ( a | s ) } { \pi _ { \theta } ^ { \prime } ( a | s ) } A ( s , a ) ] } \\ { \mathrm { s . t . } \quad } & { E _ { s \sim \rho _ { \theta ^ { \prime } } } [ D _ { \mathrm { K L } } ( \pi _ { \theta ^ { \prime } } ( \cdot | s ) | | \pi _ { \theta } ( \cdot | s ) ) ] \leq \delta _ { \mathrm { K L } } } \end{array}
49
+ $$
50
+
51
+ where $\rho _ { \theta } = \rho _ { \pi _ { \theta } }$ is the discounted state-visitation frequencies induced by $\pi _ { \theta }$ , $A ( s , a )$ denotes the advantage function estimated by the empirical return minus the baseline, and $\delta _ { \mathrm { K L } }$ is a step size parameter which controls how much the policy is allowed to change per iteration.
52
+
53
+ # 3 PARAMETER SPACE NOISE FOR EXPLORATION
54
+
55
+ This work considers policies that are realized as parameterized functions, which we denote as $\pi _ { \theta }$ , with $\theta$ being the parameter vector. We represent policies as neural networks but our technique can be applied to arbitrary parametric models. To achieve structured exploration, we sample from a set of policies by applying additive Gaussian noise to the parameter vector of the current policy: $\widetilde { \theta } = \theta + \Lambda ( 0 , \sigma ^ { 2 } I )$ . Importantly, the perturbed policy is sampled at the beginning of each episode and kept fixed for the entire rollout. For convenience and readability, we denote this perturbed policy as $\widetilde { \pi } : = \pi _ { \widetilde { \theta } }$ and analogously define $\pi : = \pi _ { \theta }$ .
56
+
57
+ State-dependent exploration As pointed out by Rückstieß et al. (2008), there is a crucial difference between action space noise and parameter space noise. Consider the continuous action space case. When using Gaussian action noise, actions are sampled according to some stochastic policy, generating $a _ { t } = \bar { \pi } ( s _ { t } ) + \mathcal { N } ( 0 , \sigma ^ { 2 } I )$ . Therefore, even for a fixed state $s$ , we will almost certainly obtain a different action whenever that state is sampled again in the rollout, since action space noise is completely independent of the current state $s _ { t }$ (notice that this is equally true for correlated action space noise). In contrast, if the parameters of the policy are perturbed at the beginning of each episode, we get $a _ { t } = \widetilde { \pi } ( s _ { t } )$ . In this case, the same action will be taken every time the same state $s _ { t }$ is esampled in the rollout. This ensures consistency in actions, and directly introduces a dependence between the state and the exploratory action taken.
58
+
59
+ Perturbing deep neural networks It is not immediately obvious that deep neural networks, with potentially millions of parameters and complicated nonlinear interactions, can be perturbed in meaningful ways by applying spherical Gaussian noise. However, as recently shown by Salimans et al. (2017), a simple reparameterization of the network achieves exactly this. More concretely, we use layer normalization (Ba et al., 2016) between perturbed layers.3 Due to this normalizing across activations within a layer, the same perturbation scale can be used across all layers, even though different layers may exhibit different sensitivities to noise.
60
+
61
+ Adaptive noise scaling Parameter space noise requires us to pick a suitable scale $\sigma$ . This can be problematic since the scale will strongly depend on the specific network architecture, and is likely to vary over time as parameters become more sensitive to noise as learning progresses. Additionally, while it is easy to intuitively grasp the scale of action space noise, it is far harder to understand the scale in parameter space. We propose a simple solution that resolves all aforementioned limitations in an easy and straightforward way. This is achieved by adapting the scale of the parameter space noise over time and relating it to the variance in action space that it induces. More concretely, we can define a distance measure between perturbed and non-perturbed policy in action space and adaptively increase or decrease the parameter space noise depending on whether it is below or above a certain threshold:
62
+
63
+ $$
64
+ \sigma _ { k + 1 } = { \left\{ \begin{array} { l l } { \alpha \sigma _ { k } } & { { \mathrm { i f ~ } } d ( \pi , { \widetilde { \pi } } ) \leq \delta , } \\ { { \frac { 1 } { \alpha } } \sigma _ { k } } & { { \mathrm { o t h e r w i s e } } , } \end{array} \right. }
65
+ $$
66
+
67
+ where $\alpha \in \mathbb { R } _ { > 0 }$ is a scaling factor and $\delta \in \mathbb { R } _ { > 0 }$ a threshold value. The concrete realization of $d ( \cdot , \cdot )$ depends on the algorithm at hand and we describe appropriate distance measures for DQN, DDPG, and TRPO in Appendix C.
68
+
69
+ Parameter space noise for off-policy methods In the off-policy case, parameter space noise can be applied straightforwardly since, by definition, data that was collected off-policy can be used. More concretely, we only perturb the policy for exploration and train the non-perturbed network on this data by replaying it.
70
+
71
+ Parameter space noise for on-policy methods Parameter noise can be incorporated in an onpolicy setting, using an adapted policy gradient, as set forth by Rückstieß et al. (2008). Policy gradient methods optimize $\mathbb { E } _ { \tau \sim ( \pi , p ) } [ R ( \tau ) ]$ . Given a stochastic policy $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ with $\theta \sim \mathcal { N } ( \phi , \Sigma )$ , the expected return can be expanded using likelihood ratios and the re-parametrization trick (Kingma & Welling, 2013) as
72
+
73
+ $$
74
+ \nabla _ { \phi , \Sigma } \mathbb { E } _ { \tau } [ R ( \tau ) ] \approx \frac { 1 } { N } \sum _ { \epsilon ^ { i } , \tau ^ { i } } \left[ \sum _ { t = 0 } ^ { T - 1 } \nabla _ { \phi , \Sigma } \log \pi ( a _ { t } | s _ { t } ; \phi + \epsilon ^ { i } \Sigma ^ { \frac { 1 } { 2 } } ) R _ { t } ( \tau ^ { i } ) \right]
75
+ $$
76
+
77
+ for $N$ samples $\epsilon ^ { i } \sim \mathcal { N } ( 0 , I )$ and $\tau ^ { i } \sim ( \pi _ { \phi + \epsilon ^ { i } \Sigma ^ { \frac { 1 } { 2 } } } , p )$ π i 1 , p) (see Appendix B for a full derivation). Rather than updating $\Sigma$ according to the previously derived policy gradient, we fix its value to $\sigma ^ { 2 } I$ and scale it adaptively as described in Appendix $\textrm { C }$ .
78
+
79
+ # 4 EXPERIMENTS
80
+
81
+ This section answers the following questions:
82
+
83
+ (i) Do existing state-of-the-art RL algorithms benefit from incorporating parameter space noise? (ii) Does parameter space noise aid in exploring sparse reward environments more effectively? (iii) How does parameter space noise exploration compare against evolution strategies for deep policies (Salimans et al., 2017) with respect to sample efficiency?
84
+
85
+ Reference implementations of DQN and DDPG with adaptive parameter space noise are available online.4
86
+
87
+ # 4.1 COMPARING PARAMETER SPACE NOISE TO ACTION SPACE NOISE
88
+
89
+ The added value of parameter space noise over action space noise is measured on both highdimensional discrete-action environments and continuous control tasks. For the discrete environments, comparisons are made using DQN, while DDPG and TRPO are used on the continuous control tasks.
90
+
91
+ Discrete-action environments For discrete-action environments, we use the Arcade Learning Environment (ALE, Bellemare et al. (2013)) benchmark along with a standard DQN implementation. We compare a baseline DQN agent with $\epsilon$ -greedy action noise against a version of DQN with parameter noise. We linearly anneal $\epsilon$ from 1.0 to 0.1 over the first 1 million timesteps. For parameter noise, we adapt the scale using a simple heuristic that increases the scale if the KL divergence between perturbed and non-perturbed policy is less than the KL divergence between greedy and $\epsilon$ -greedy policy and decreases it otherwise (see Section C.1 for details). By using this approach, we achieve a fair comparison between action space noise and parameter space noise since the magnitude of the noise is similar and also avoid the introduction of an additional hyperparameter.
92
+
93
+ For parameter perturbation, we found it useful to reparametrize the network in terms of an explicit policy that represents the greedy policy $\pi$ implied by the $Q$ -values, rather than perturbing the $Q$ - function directly. To represent the policy $\pi ( \bar { a } | s )$ , we add a single fully connected layer after the convolutional part of the network, followed by a softmax output layer. Thus, $\pi$ predicts a discrete probability distribution over actions, given a state. We find that perturbing $\pi$ instead of $Q$ results in more meaningful changes since we now define an explicit behavioral policy. In this setting, the $Q$ -network is trained according to standard DQN practices. The policy $\pi$ is trained by maximizing the probability of outputting the greedy action accordingly to the current $Q$ -network. Essentially, the policy is trained to exhibit the same behavior as running greedy DQN. To rule out this double-headed version of DQN alone exhibits significantly different behavior, we always compare our parameter space noise approach against two baselines, regular DQN and two-headed DQN, both with $\epsilon$ -greedy exploration.
94
+
95
+ We furthermore randomly sample actions for the first 50 thousand timesteps in all cases to fill the replay buffer before starting training. Moreover, we found that parameter space noise performs better if it is combined with a bit of action space noise (we use a $\epsilon$ -greedy behavioral policy with $\epsilon = 0 . 0 1$ for the parameter space noise experiments). Full experimental details are described in Section A.1.
96
+
97
+ We chose 21 games of varying complexity, according to the taxonomy presented by (Bellemare et al., 2016). The learning curves are shown in Figure 1 for a selection of games (see Appendix $\mathrm { D }$ for full results). Each agent is trained for $4 0 \mathrm { M }$ frames. The overall performance is estimated by running each configuration with three different random seeds, and we plot the median return (line) as well as the interquartile range (shaded area). Note that performance is evaluated on the exploratory policy since we are interested in its behavior especially.
98
+
99
+ ![](images/61298c2cec88b6524d9066702f45ad6fdf5ec54531ce7bfda5d16661fe0eaab1.jpg)
100
+ Figure 1: Median DQN returns for several ALE environment plotted over training steps.
101
+
102
+ Overall, our results show that parameter space noise often outperforms action space noise, especially on games that require consistency (e.g. Enduro, Freeway) and performs comparably on the remaining ones. Additionally, learning progress usually starts much sooner when using parameter space noise. Finally, we also compare against a double-headed version of DQN with $\epsilon$ -greedy exploration to ensure that this change in architecture is not responsible for improved exploration, which our results confirm. Full results are available in Appendix D.
103
+
104
+ That being said, parameter space noise is unable to sufficiently explore in extremely challenging games like Montezuma’s Revenge. More sophisticated exploration methods like Bellemare et al. (2016) are likely necessary to successfully learn these games. However, such methods often rely on some form of “inner” exploration method, which is usually traditional action space noise. It would be interesting to evaluate the effect of parameter space noise when combined with exploration methods.
105
+
106
+ On a final note, proposed improvements to DQN like double DQN (Hasselt, 2010), prioritized experience replay (Schaul et al., 2015), and dueling networks (Wang et al., 2015) are orthogonal to our improvements and would therefore likely improve results further. We leave the experimental validation of this theory to future work.
107
+
108
+ Continuous control environments We now compare parameter noise with action noise on the continuous control environments implemented in OpenAI Gym (Brockman et al., 2016). We use DDPG (Lillicrap et al., 2015) as the RL algorithm for all environments with similar hyperparameters as outlined in the original paper except for the fact that layer normalization (Ba et al., 2016) is applied after each layer before the nonlinearity, which we found to be useful in either case and especially important for parameter space noise.
109
+
110
+ We compare the performance of the following configurations: (a) no noise at all, (b) uncorrelated additive Gaussian action space noise $\mathit { \check { \Delta } } ( \sigma \ : = \ : 0 . 2 )$ , (c) correlated additive Gaussian action space noise (Ornstein–Uhlenbeck process (Uhlenbeck & Ornstein, 1930) with $\sigma = 0 . 2$ ), and (d) adaptive parameter space noise. In the case of parameter space noise, we adapt the scale so that the resulting change in action space is comparable to our baselines with uncorrelated Gaussian action space noise (see Section C.2 for full details).
111
+
112
+ We evaluate the performance on several continuous control tasks. Figure 2 depicts the results for three exemplary environments. Each agent is trained for $1 \mathrm { M }$ timesteps, where 1 epoch consists of 10 thousand timesteps. In order to make results comparable between configurations, we evaluate the performance of the agent every 10 thousand steps by using no noise for 20 episodes.
113
+
114
+ On HalfCheetah, parameter space noise achieves significantly higher returns than all other configurations. We find that, in this environment, all other exploration schemes quickly converge to a local optimum (in which the agent learns to flip on its back and then “wiggles” its way forward). Parameter space noise behaves similarly initially but still explores other options and quickly learns to break out of this sub-optimal behavior. Also notice that parameter space noise vastly outperforms correlated action space noise on this environment, clearly indicating that there is a significant difference between the two. On the remaining two environments, parameter space noise performs on par with other exploration strategies. Notice, however, that even if no noise is present, DDPG is capable of learning good policies. We find that this is representative for the remaining environments (see Appendix E for full results), which indicates that these environments do not require a lot of exploration to begin with due to their well-shaped reward function.
115
+
116
+ ![](images/ed5e4dc14f2f4e226edf0f7a744591727c42bad859a813f8b660dc9acbd80f6a.jpg)
117
+ Figure 2: Median DDPG returns for continuous control environments plotted over epochs.
118
+
119
+ ![](images/9885e69cbf6d92a02c4f9106643bd1c3a89e6eea14dded2a98ab49cf4833fa0d.jpg)
120
+ Figure 3: Median TRPO returns for continuous control environments plotted over epochs.
121
+
122
+ The results for TRPO are depicted in Figure 3. Interestingly, in the Walker2D environment, we see that adding parameter noise decreases the performance variance between seeds. This indicates that parameter noise aids in escaping local optima.
123
+
124
+ # 4.2 DOES PARAMETER SPACE NOISE EXPLORE EFFICIENTLY?
125
+
126
+ The environments in the previous section required relatively little exploration. In this section, we evaluate whether parameter noise enables existing RL algorithms to learn on environments with very sparse rewards, where uncorrelated action noise generally fails (Osband et al., 2016a; Achiam & Sastry, 2017).
127
+
128
+ A scalable toy example We first evaluate parameter noise on a well-known toy problem, following the setup described by Osband et al. (2016a) as closely as possible. The environment consists of a chain of $N$ states and the agent always starts in state $s _ { 2 }$ , from where it can either move left or right. In state $s _ { 1 }$ , the agent receives a small reward of $r = 0 . 0 0 1$ and a larger reward $r = 1$ in state $s N$ Obviously, it is much easier to discover the small reward in $s _ { 1 }$ than the large reward in $s _ { N }$ , with increasing difficulty as $N$ grows. The environment is described in greater detail in Section A.3.
129
+
130
+ We compare adaptive parameter space noise DQN, bootstrapped DQN, and $\epsilon$ -greedy DQN. The chain length $N$ is varied and for each $N$ three different seeds are trained and evaluated. After each episode, we evaluate the performance of the current policy by performing a rollout with all noise disabled (in the case of bootstrapped DQN, we perform majority voting over all heads). The problem is considered solved if one hundred subsequent rollouts achieve the optimal return. We plot the median number of episodes before the problem is considered solved (we abort if the problem is still unsolved after 2 thousand episodes). Full experimental details are available in Section A.3.
131
+
132
+ ![](images/208427c53eb21b40688d677cb4a4c368547959526e7427aeda5d613f1a0514c8.jpg)
133
+ Figure 4: Median number of episodes before considered solved for DQN with different exploration strategies. Green indicates that the problem was solved whereas blue indicates that no solution was found within $2 \mathrm { K }$ episodes. Note that less number of episodes before solved is better.
134
+
135
+ Figure 4 shows that parameter space noise clearly outperforms action space noise (which completely fails for moderately large $N$ ) and even outperforms the more computational expensive bootstrapped DQN. However, it is important to note that this environment is extremely simple in the sense that the optimal strategy is to always go right. In a case where the agent needs to select a different optimal action depending on the current state, parameter space noise would likely work less well since weight randomization of the policy is less likely to yield this behavior. Our results thus only highlight the difference in exploration behavior compared to action space noise in this specific case. In the general case, parameter space noise does not guarantee optimal exploration.
136
+
137
+ Continuous control with sparse rewards We now make the continuous control environments more challenging for exploration. Instead of providing a reward at every timestep, we use environments that only yield a non-zero reward after significant progress towards a goal. More concretely, we consider the following environments from rllab5 (Duan et al., 2016), modified according to Houthooft et al. (2016): (a) SparseCartpoleSwingup, which only yields a reward if the paddle is raised above a given threshold, (b) SparseDoublePendulum, which only yields a reward if the agent reaches the upright position, and (c) SparseHalfCheetah, which only yields a reward if the agent crosses a target distance, (d) SparseMountainCar, which only yields a reward if the agent drives up the hill, (e) SwimmerGather, yields a positive or negative reward upon reaching targets. For all tasks, we use a time horizon of $T = 5 0 0$ steps before resetting.
138
+
139
+ ![](images/91903298f12e26c5532e4f7af5f4b44a90388d39284a7f835c28aa0f9717a6a8.jpg)
140
+ Figure 5: Median DDPG returns for environments with sparse rewards plotted over epochs.
141
+
142
+ We consider both DDPG and TRPO to solve these environments (the exact experimental setup is described in Section A.2). Figure 5 shows the performance of DDPG, while the results for TRPO have been moved to Appendix F. The overall performance is estimated by running each configuration with five different random seeds, after which we plot the median return (line) as well as the interquartile range (shaded area).
143
+
144
+ For DDPG, SparseDoublePendulum seems to be easy to solve in general, with even no noise finding a successful policy relatively quickly. The results for SparseCartpoleSwingup and SparseMountainCar are more interesting: Here, only parameter space noise is capable of learning successful policies since all other forms of noise, including correlated action space noise, never find states with nonzero rewards. For SparseHalfCheetah, DDPG at least finds the non-zero reward but never learns a successful policy from that signal. On the challenging SwimmerGather task, all configurations of DDPG fail.
145
+
146
+ Our results clearly show that parameter space noise can be used to improve the exploration behavior of these off-the-shelf algorithms. However, it is important to note that improvements in exploration are not guaranteed for the general case. It is therefore necessary to evaluate the potential benefit of parameter space noise on a case-by-case basis.
147
+
148
+ 4.3 IS RL WITH PARAMETER SPACE NOISE MORE SAMPLE-EFFICIENT THAN ES?
149
+
150
+ Evolution strategies (ES) are closely related to our approach since both explore by introducing noise in the parameter space, which can lead to improved exploration behavior (Salimans et al., 2017).6 However, ES disregards temporal information and uses black-box optimization to train the neural network. By combining parameter space noise with traditional RL algorithms, we can include temporal information as well rely on gradients computed by back-propagation for optimization while still benefiting from improved exploratory behavior. We now compare ES and traditional RL with parameter space noise directly.
151
+
152
+ We compare performance on the 21 ALE games that were used in Section 4.1. The performance is estimated by running 10 episodes for each seed using the final policy with exploration disabled and computing the median returns. For ES, we use the results obtained by Salimans et al. (2017), which were obtained after training on $1 0 0 0 \mathrm { M }$ frames. For DQN, we use the same parameter space noise for exploration that was previously described and train on $4 0 \mathrm { M }$ frames. Even though DQN with parameter space noise has been exposed to 25 times less data, it outperforms ES on 15 out of 21 Atari games (full results are available in Appendix D). Combined with the previously described results, this demonstrates that parameter space noise combines the desirable exploration properties of ES with the sample efficiency of traditional RL.
153
+
154
+ # 5 RELATED WORK
155
+
156
+ The problem of exploration in reinforcement has been studied extensively. A range of algorithms (Kearns & Singh, 2002; Brafman & Tennenholtz, 2002; Auer et al., 2008) have been proposed that guarantee near-optimal solutions after a number of steps that are polynomial in the number of states, number of actions, and the horizon time. However, in many real-world reinforcements learning problems both the state and action space are continuous and high dimensional so that, even with discretization, these algorithms become impractical. In the context of deep reinforcement learning, a large variety of techniques have been proposed to improve exploration (Stadie et al., 2015; Houthooft et al., 2016; Tang et al., 2016; Osband et al., 2016a; Ostrovski et al., 2017; Sukhbaatar et al., 2017; Osband et al., 2016b). However, all are non-trivial to implement and are often computational expensive.
157
+
158
+ The idea of perturbing the parameters of a policy has been proposed by Rückstieß et al. (2008) for policy gradient methods. The authors show that this form of perturbation generally outperforms random exploration and evaluate their exploration strategy with the REINFORCE (Williams, 1992a) and Natural Actor-Critic (Peters & Schaal, 2008) algorithms. However, their policies are relatively lowdimensional compared to modern deep architectures, they use environments with low-dimensional state spaces, and their contribution is strictly limited to the policy gradient case. In contrast, our method is applied and evaluated for both on and off-policy setting, we use high-dimensional policies, and environments with large state spaces.
159
+
160
+ Our work is also closely related to evolution strategies (ES, Rechenberg & Eigen (1973); Schwefel (1977)), and especially neural evolution strategies (NES, Sun et al. (2009a;b); Glasmachers et al. (2010a;b); Schaul et al. (2011); Wierstra et al. (2014)). In the context of policy optimization, our work is closely related to Kober & Peters (2008) and Sehnke et al. (2010). More recently, Salimans et al. (2017) showed that ES can work for high-dimensional environments like Atari and OpenAI Gym continuous control problems. However, ES generally disregards any temporal structure that may be present in trajectories and typically suffers from sample inefficiency.
161
+
162
+ Bootstrapped DQN (Osband et al., 2016a) has been proposed to aid with more directed and consistent exploration by using a network with multiple heads, where one specific head is selected at the beginning of each episode. In contrast, our approach perturbs the parameters of the network directly, thus achieving similar yet simpler (and as shown in Section 4.2, sometimes superior) exploration behavior. Concurrently to our work, Fortunato et al. (2017) have proposed a similar approach that utilizes parameter perturbations for more efficient exploration.
163
+
164
+ # 6 CONCLUSION
165
+
166
+ In this work, we propose parameter space noise as a conceptually simple yet effective replacement for traditional action space noise like $\epsilon$ -greedy and additive Gaussian noise. This work shows that parameter perturbations can successfully be combined with contemporary on- and off-policy deep RL algorithms such as DQN, DDPG, and TRPO and often results in improved performance compared to action noise. Experimental results further demonstrate that using parameter noise allows solving environments with very sparse rewards, in which action noise is unlikely to succeed. Our results indicate that parameter space noise is a viable and interesting alternative to action space noise, which is still the de facto standard in most reinforcement learning applications.
167
+
168
+ # REFERENCES
169
+
170
+ Joshua Achiam and Shankar Sastry. Surprise-based intrinsic motivation for deep reinforcement learning. arXiv preprint arXiv:1703.01732, 2017.
171
+ Peter Auer, Thomas Jaksch, and Ronald Ortner. Near-optimal regret bounds for reinforcement learning. In Advances in Neural Information Processing Systems 21 (NIPS), pp. 89–96, 2008. URL http://papers.nips.cc/paper/ 3401-near-optimal-regret-bounds-for-reinforcement-learning.
172
+ Lei Jimmy Ba, Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016. URL http://arxiv.org/abs/1607.06450.
173
+ Marc G. Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, 2013. doi: 10.1613/jair.3912. URL http://dx.doi.org/10.1613/jair.3912.
174
+ Marc G Bellemare, Sriram Srinivasan, Georg Ostrovski, Tom Schaul, David Saxton, and Remi Munos. Unifying count-based exploration and intrinsic motivation. In Advances in Neural Information Processing Systems 29 (NIPS), pp. 1471–1479, 2016.
175
+ Ronen I. Brafman and Moshe Tennenholtz. R-MAX - A general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research, 3:213–231, 2002. URL http://www. jmlr.org/papers/v3/brafman02a.html.
176
+ Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. OpenAI gym. arXiv preprint arXiv:1606.01540, 2016. URL http://arxiv.org/abs/1606. 01540.
177
+ Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continous control. In Proceedings of the 33rd International Conference on Machine Learning (ICML), pp. 1329–1338, 2016.
178
+ Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. arXiv preprint arXiv:1706.10295, 2017.
179
+
180
+ Tobias Glasmachers, Tom Schaul, and Jürgen Schmidhuber. A natural evolution strategy for multi-objective optimization. In Parallel Problem Solving from Nature - PPSN XI, 11th International Conference, Kraków, Poland, September 11-15, 2010, Proceedings, Part I, pp. 627–636, 2010a. doi: 10.1007/978-3-642-15844-5_ 63. URL https://doi.org/10.1007/978-3-642-15844-5_63.
181
+
182
+ Tobias Glasmachers, Tom Schaul, Yi Sun, Daan Wierstra, and Jürgen Schmidhuber. Exponential natural evolution strategies. In Genetic and Evolutionary Computation Conference, GECCO 2010, Proceedings, Portland, Oregon, USA, July 7-11, 2010, pp. 393–400, 2010b. doi: 10.1145/1830483.1830557. URL http://doi.acm.org/10.1145/1830483.1830557.
183
+
184
+ Hado V Hasselt. Double Q-learning. In Advances in Neural Information Processing Systems 23 (NIPS), pp. 2613–2621, 2010.
185
+
186
+ Rein Houthooft, Xi Chen, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. VIME: Variational information maximizing exploration. In Advances in Neural Information Processing Systems 29 (NIPS), pp. 1109–1117, 2016. URL http://papers.nips.cc/paper/ 6591-vime-variational-information-maximizing-exploration.
187
+
188
+ Sham Kakade. A natural policy gradient. Advances in neural information processing systems, 14:1531–1538, 2001.
189
+
190
+ Michael J. Kearns and Satinder P. Singh. Near-optimal reinforcement learning in polynomial time. Machine Learning, 49(2-3):209–232, 2002. doi: 10.1023/A:1017984413808. URL http://dx.doi.org/10. 1023/A:1017984413808.
191
+
192
+ Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2015.
193
+
194
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
195
+
196
+ Jens Kober and Jan Peters. Policy search for motor primitives in robotics. In Advances in Neural Information Processing Systems 21 (NIPS), pp. 849–856, 2008. URL http://papers.nips.cc/paper/ 3545-policy-search-for-motor-primitives-in-robotics.
197
+
198
+ Timothy P. Lillicrap, Jonathan J. Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. CoRR, abs/1509.02971, 2015. URL http://arxiv.org/abs/1509.02971.
199
+
200
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin A. Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Petersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. doi: 10.1038/nature14236. URL http://dx.doi.org/10.1038/nature14236.
201
+
202
+ Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped DQN. In Advances in Neural Information Processing Systems 29 (NIPS), pp. 4026–4034, 2016a. URL http://papers.nips.cc/paper/6501-deep-exploration-via-bootstrapped-dqn.
203
+
204
+ Ian Osband, Benjamin Van Roy, and Zheng Wen. Generalization and exploration via randomized value functions. In Proceedings of the 33nd International Conference on Machine Learning, ICML, pp. 2377–2386, 2016b. URL http://jmlr.org/proceedings/papers/v48/osband16.html.
205
+
206
+ Georg Ostrovski, Marc G. Bellemare, Aäron van den Oord, and Rémi Munos. Count-based exploration with neural density models. arXiv preprint arXiv:1703.01310, 2017. URL http://arxiv.org/abs/1703. 01310.
207
+
208
+ Deepak Pathak, Pulkit Agrawal, Alexei A. Efros, and Trevor Darrell. Curiosity-driven exploration by selfsupervised prediction. In ICML, 2017.
209
+
210
+ Jan Peters and Stefan Schaal. Natural actor-critic. Neurocomputing, 71(7-9):1180–1190, 2008. doi: 10.1016/j. neucom.2007.11.026. URL http://dx.doi.org/10.1016/j.neucom.2007.11.026.
211
+
212
+ Ananth Ranganathan. The Levenberg-Marquardt algorithm. Tutoral on LM algorithm, pp. 1–5, 2004.
213
+
214
+ Ingo Rechenberg and Manfred Eigen. Evolutionsstrategie: Optimierung technischer Systeme nach Prinzipien der biologishen Evolution. Frommann-Holzboog Stuttgart, 1973.
215
+
216
+ Thomas Rückstieß, Martin Felder, and Jürgen Schmidhuber. State-dependent exploration for policy gradient methods. In Proceedings of the European Conference on Machine Learning and Knowledge Discovery in Databases ECML/PKDD, pp. 234–249, 2008. doi: 10.1007/978-3-540-87481-2_16. URL http: //dx.doi.org/10.1007/978-3-540-87481-2_16.
217
+
218
+ Thomas Rückstieß, Martin Felder, and Jürgen Schmidhuber. State-dependent exploration for policy gradient methods. Machine Learning and Knowledge Discovery in Databases, pp. 234–249, 2008.
219
+
220
+ Tim Salimans, Jonathan Ho, Xi Chen, and Ilya Sutskever. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017. URL http://arxiv.org/abs/1703. 03864.
221
+
222
+ Tom Schaul, Tobias Glasmachers, and Jürgen Schmidhuber. High dimensions and heavy tails for natural evolution strategies. In 13th Annual Genetic and Evolutionary Computation Conference, GECCO 2011, Proceedings, Dublin, Ireland, July 12-16, 2011, pp. 845–852, 2011. doi: 10.1145/2001576.2001692. URL http://doi.acm.org/10.1145/2001576.2001692.
223
+
224
+ Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
225
+
226
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1889–1897, 2015a.
227
+
228
+ John Schulman, Sergey Levine, Pieter Abbeel, Michael I. Jordan, and Philipp Moritz. Trust region policy optimization. In Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, pp. 1889–1897, 2015b. URL http://jmlr.org/proceedings/papers/ v37/schulman15.html.
229
+
230
+ Hans-Paul Schwefel. Numerische Optimierung von Computermodellen mittels der Evolutionsstrategie, volume 1. Birkhäuser, Basel Switzerland, 1977.
231
+
232
+ Frank Sehnke, Christian Osendorfer, Thomas Rückstieß, Alex Graves, Jan Peters, and Jürgen Schmidhuber. Parameter-exploring policy gradients. Neural Networks, 23(4):551–559, 2010. doi: 10.1016/j.neunet.2009.12. 004. URL http://dx.doi.org/10.1016/j.neunet.2009.12.004.
233
+
234
+ Bradly C. Stadie, Sergey Levine, and Pieter Abbeel. Incentivizing exploration in reinforcement learning with deep predictive models. arXiv preprint arXiv:1507.00814, 2015. URL http://arxiv.org/abs/1507. 00814.
235
+
236
+ Sainbayar Sukhbaatar, Ilya Kostrikov, Arthur Szlam, and Rob Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. arXiv preprint arXiv:1703.05407, 2017. URL http://arxiv.org/ abs/1703.05407.
237
+
238
+ Yi Sun, Daan Wierstra, Tom Schaul, and Jürgen Schmidhuber. Stochastic search using the natural gradient. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML 2009, Montreal, Quebec, Canada, June 14-18, 2009, pp. 1161–1168, 2009a. doi: 10.1145/1553374.1553522. URL http: //doi.acm.org/10.1145/1553374.1553522.
239
+
240
+ Yi Sun, Daan Wierstra, Tom Schaul, and Jürgen Schmidhuber. Efficient natural evolution strategies. In Genetic and Evolutionary Computation Conference, GECCO 2009, Proceedings, Montreal, Québec, Canada, July 8-12, 2009, pp. 539–546, 2009b. doi: 10.1145/1569901.1569976. URL http://doi.acm.org/10. 1145/1569901.1569976.
241
+
242
+ Richard S Sutton and Andrew G Barto. Introduction to reinforcement learning, volume 135. MIT Press Cambridge, 1998.
243
+
244
+ Haoran Tang, Rein Houthooft, Davis Foote, Adam Stooke, Xi Chen, Yan Duan, John Schulman, Filip De Turck, and Pieter Abbeel. #Exploration: A study of count-based exploration for deep reinforcement learning. arXiv preprint arXiv:1611.04717, 2016.
245
+
246
+ George E Uhlenbeck and Leonard S Ornstein. On the theory of the brownian motion. Physical review, 36(5): 823, 1930.
247
+
248
+ Ziyu Wang, Tom Schaul, Matteo Hessel, Hado van Hasselt, Marc Lanctot, and Nando de Freitas. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581, 2015.
249
+
250
+ Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jürgen Schmidhuber. Natural evolution strategies. Journal of Machine Learning Research, 15(1):949–980, 2014. URL http://dl.acm.org/ citation.cfm?id $= _ { c } ^ { \prime }$ 2638566.
251
+
252
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992a. doi: 10.1007/BF00992696. URL http://dx.doi.org/10. 1007/BF00992696.
253
+
254
+ Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992b.
255
+
256
+ # A EXPERIMENTAL SETUP
257
+
258
+ # A.1 ARCADE LEARNING ENVIRONMENT (ALE)
259
+
260
+ For ALE (Bellemare et al., 2013), the network architecture as described in Mnih et al. (2015) is used. This consists of 3 convolutional layers (32 filters of size $8 \times 8$ and stride 4, 64 filters of size $4 \times 4$ and stride 2, 64 filters of size $3 \times 3$ and stride 1) followed by 1 hidden layer with 512 units followed by a linear output layer with one unit for each action. ReLUs are used in each layer, while layer normalization (Ba et al., 2016) is used in the fully connected part of the network. For parameter space noise, we also include a second head after the convolutional stack of layers. This head determines a policy network with the same architecture as the $Q$ -value network, except for a softmax output layer. The target networks are updated every $1 0 \mathrm { K }$ timesteps. The $Q$ -value network is trained using the Adam optimizer (Kingma & Ba, 2015) with a learning rate of $1 0 ^ { - 4 }$ and a batch size of 32. The replay buffer can hold $1 \mathrm { M }$ state transitions. For the $\epsilon$ -greedy baseline, we linearly anneal $\epsilon$ from 1 to 0.1 over the first $1 \mathrm { M }$ timesteps. For parameter space noise, we adaptively scale the noise to have a similar effect in action space (see Section C.1 for details), effectively ensuring that the maximum KL divergence between perturbed and non-perturbed $\pi$ is softly enforced. The policy is perturbed at the beginning of each episode and the standard deviation is adapted as described in Appendix C every 50 timesteps. Notice that we only perturb the policy head after the convolutional part of the network (i.e. the fully connected part, which is also why we only include layer normalization in this part of the network). To avoid getting stuck (which can potentially happen for a perturbed policy), we also use $\epsilon$ -greedy action selection with $\epsilon = 0 . 0 1$ . In all cases, we perform $5 0 \mathrm { K }$ random actions to collect initial data for the replay buffer before training starts. We set $\gamma = 0 . 9 9$ , clip rewards to be in $[ - 1 , 1 ]$ , and clip gradients for the output layer of $Q$ to be within $[ - 1 , 1 ]$ . For observations, each frame is down-sampled to $8 4 \times 8 4$ pixels, after which it is converted to grayscale. The actual observation to the network consists of a concatenation of 4 subsequent frames. Additionally, we use up to 30 noop actions at the beginning of the episode. This setup is identical to what is described by Mnih et al. (2015).
261
+
262
+ # A.2 CONTINUOUS CONTROL
263
+
264
+ For DDPG, we use a similar network architecture as described by Lillicrap et al. (2015): both the actor and critic use 2 hidden layers with 64 ReLU units each. For the critic, actions are not included until the second hidden layer. Layer normalization (Ba et al., 2016) is applied to all layers. The target networks are soft-updated with $\tau = 0 . 0 0 1$ . The critic is trained with a learning rate of $1 0 ^ { - 3 }$ while the actor uses a learning rate of $1 0 ^ { - 4 }$ . Both actor and critic are updated using the Adam optimizer (Kingma & Ba, 2015) with batch sizes of 128. The critic is regularized using an $L 2$ penalty with $1 0 ^ { - 2 }$ . The replay buffer holds $1 0 0 \mathrm { K }$ state transitions and $\gamma = 0 . 9 9$ is used. Each observation dimension is normalized by an online estimate of the mean and variance. For parameter space noise with DDPG, we adaptively scale the noise to be comparable to the respective action space noise (see Section C.2). For dense environments, we use action space noise with $\sigma = 0 . 2$ (and a comparable adaptive noise scale). Sparse environments use an action space noise with $\sigma = 0 . 6$ (and a comparable adaptive noise scale).
265
+
266
+ TRPO uses a step size of $\delta _ { \mathrm { K L } } = 0 . 0 1$ , a policy network of 2 hidden layers with 32 tanh units for the nonlocomotion tasks, and 2 hidden layers of 64 tanh units for the locomotion tasks. The Hessian calculation is subsampled with a factor of 0.1, $\gamma = 0 . 9 9$ , and the batch size per epoch is set to $5 \mathrm { K }$ timesteps. The baseline is a learned linear transformation of the observations.
267
+
268
+ The following environments from OpenAI $\mathrm { G y m } ^ { 7 }$ (Brockman et al., 2016) are used:
269
+
270
+ • HalfCheetah $\mathcal { S } \subset \mathbb { R } ^ { 1 7 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 6 }$ ), • Hopper $S \subset \mathbb { R } ^ { 1 1 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 3 }$ ), • InvertedDoublePendulum $( S \subset \mathbb { R } ^ { 1 1 } , \mathcal { A } \subset \mathbb { R } )$ , • InvertedPendulum $( S \subset \mathbb { R } ^ { 4 } , \mathcal { A } \subset \mathbb { R } )$ , • Reacher $\mathcal { S } \subset \mathbb { R } ^ { 1 1 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 2 }$ ), • Swimmer $\mathcal { S } \subset \mathbb { R } ^ { 8 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 2 }$ ), and • Walker2D $S \subset \mathbb { R } ^ { 1 7 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 6 }$ ).
271
+
272
+ For the sparse tasks, we use the following environments from rllab8 (Duan et al., 2016), modified as described by Houthooft et al. (2016):
273
+
274
+ • SparseCartpoleSwingup $\mathcal { S } \subset \mathbb { R } ^ { 4 }$ , ${ \mathcal { A } } \subset \mathbb { R }$ ), which only yields a reward if the paddle is raised above a given threshold,
275
+ • SparseHalfCheetah $( \mathcal { S } \subset \mathbb { R } ^ { 1 7 } , \mathcal { A } \subset \mathbb { R } ^ { 6 } )$ , which only yields a reward if the agent crosses a distance threshold,
276
+ • SparseMountainCar $\mathcal { S } \subset \mathbb { R } ^ { 2 }$ , ${ \mathcal { A } } \subset \mathbb { R }$ ), which only yields a reward if the agent drives up the hill,
277
+ • SparseDoublePendulum $( S \subset \mathbb { R } ^ { 6 } , \mathcal { A } \subset \mathbb { R } )$ , which only yields a reward if the agent reaches the upright position, and
278
+ • SwimmerGather $\mathcal { S } \subset \mathbb { R } ^ { 3 3 }$ , $\mathcal { A } \subset \mathbb { R } ^ { 2 }$ ), which yields a positive or negative reward upon reaching targets.
279
+
280
+ # A.3 CHAIN ENVIRONMENT
281
+
282
+ We follow the state encoding proposed by Osband et al. (2016a) and use $\phi ( s _ { t } ) = ( \mathbb { 1 } \{ x \leq s _ { t } \} )$ as the observation, where 1 denotes the indicator function. DQN is used with a very simple network to approximate the $Q$ -value function that consists of 2 hidden layers with 16 ReLU units. Layer normalization (Ba et al., 2016) is used for all hidden layers before applying the nonlinearity. Each agent is then trained for up to $2 \mathrm { K }$ episodes. The chain length $N$ is varied and for each $N$ three different seeds are trained and evaluated. After each episode, the performance of the current policy is evaluated by sampling a trajectory with noise disabled (in the case of bootstrapped DQN, majority voting over all heads is performed). The problem is considered solved if one hundred subsequent trajectories achieve the optimal episode return. Figure 6 depicts the environment.
283
+
284
+ ![](images/5cc78f484cfabcc31591952238afef3a067b6d32169fc2c1b40242738d1c3213.jpg)
285
+ Figure 6: Simple and scalable environment to test for exploratory behavior (Osband et al., 2016a).
286
+
287
+ We compare adaptive parameter space noise DQN, bootstrapped DQN (Osband et al., 2016a) (with $K = 2 0$ heads and Bernoulli masking with $p = 0 . 5 $ ), and $\epsilon$ -greedy DQN (with $\epsilon$ linearly annealed from 1.0 to 0.1 over the first one hundred episodes). For adaptive parameter space noise, we only use a single head and perturb $Q$ directly, which works well in this setting. Parameter space noise is adaptively scaled so that $\delta \approx 0 . 0 5$ . In all cases, $\gamma = 0 . 9 9 9$ , the replay buffer holds $1 0 0 \mathrm { K }$ state transitions, learning starts after 5 initial episodes, the target network is updated every 100 timesteps, and the network is trained using the Adam optimizer (Kingma & Ba, 2015) with a learning rate of $1 0 ^ { - 3 }$ and a batch size of 32.
288
+
289
+ # B PARAMETER SPACE NOISE FOR ON-POLICY METHODS
290
+
291
+ Policy gradient methods optimize $\mathbb { E } _ { \tau \sim ( \pi , p ) } [ R ( \tau ) ]$ . Given a stochastic policy $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ with $\theta \sim$ $\mathcal { N } ( \phi , \Sigma )$ , the expected return can be expanded using likelihood ratios and the reparametrization trick (Kingma & Welling, 2013) as
292
+
293
+ $$
294
+ \begin{array} { r l } & { \nabla _ { \phi , \Sigma } \mathbb { E } _ { \tau } [ R ( \tau ) ] = \nabla _ { \phi , \Sigma } \mathbb { E } _ { \theta \sim N ( \phi , \Sigma ) } \left[ \displaystyle \sum _ { \tau } p ( \tau | \theta ) R ( \tau ) \right] } \\ & { \qquad = \mathbb { E } _ { \epsilon \sim N ( 0 , I ) } \nabla _ { \phi , \Sigma } \left[ \displaystyle \sum _ { \tau } p ( \tau | \phi + \epsilon \Sigma ^ { \frac { 1 } { 2 } } ) R ( \tau ) \right] } \\ & { \qquad = \mathbb { E } _ { \epsilon \sim N ( 0 , I ) , \tau } \left[ \displaystyle \sum _ { t = 0 } ^ { T - 1 } \nabla _ { \phi , \Sigma } \log \pi ( a _ { t } | s _ { t } ; \phi + \epsilon \Sigma ^ { \frac { 1 } { 2 } } ) R _ { t } ( \tau ) \right] } \\ & { \qquad \approx \displaystyle \frac { 1 } { N } \sum _ { \epsilon \sim \tau ^ { \prime \prime } } \left[ \displaystyle \sum _ { t = 0 } ^ { T - 1 } \nabla _ { \phi , \Sigma } \log \pi ( a _ { t } | s _ { t } ; \phi + \epsilon ^ { i } \Sigma ^ { \frac { 1 } { 2 } } ) R _ { t } ( \tau ^ { i } ) \right] } \end{array}
295
+ $$
296
+
297
+ for $N$ samples $\epsilon ^ { i } \sim \mathcal { N } ( 0 , I )$ and $\tau ^ { i } \sim ( \pi _ { \phi + \epsilon ^ { i } \Sigma ^ { \frac { 1 } { 2 } } } , p )$ , with $\begin{array} { r } { R _ { t } ( \tau ^ { i } ) = \sum _ { t ^ { \prime } = t } ^ { T } \gamma ^ { t ^ { \prime } - t } r _ { t ^ { \prime } } ^ { i } } \end{array}$ . This also allows us to subtract a variance-reducing baseline $b _ { t } ^ { i }$ , leading to
298
+
299
+ $$
300
+ \nabla _ { \phi , \Sigma } \mathbb { E } _ { \tau } [ R ( \tau ) ] \approx \frac { 1 } { N } \sum _ { \epsilon ^ { i } , \tau ^ { i } } \left[ \sum _ { t = 0 } ^ { T - 1 } \nabla _ { \phi , \Sigma } \log \pi ( a _ { t } | s _ { t } ; \phi + \epsilon ^ { i } \Sigma ^ { \frac { 1 } { 2 } } ) ( R _ { t } ( \tau ^ { i } ) - b _ { t } ^ { i } ) \right] .
301
+ $$
302
+
303
+ In our case, we set $\Sigma : = \sigma ^ { 2 } I$ and use our proposed adaption method to re-scale as appropriate.
304
+
305
+ # C ADAPTIVE SCALING
306
+
307
+ Parameter space noise requires us to pick a suitable scale $\sigma$ . This can be problematic since the scale will highly depend on the specific network architecture, and is likely to vary over time as parameters become more sensitive as learning progresses. Additionally, while it is easy to intuitively grasp the scale of action space noise, it is far harder to understand the scale in parameter space.
308
+
309
+ We propose a simple solution that resolves all aforementioned limitations in an easy and straightforward way. This is achieved by adapting the scale of the parameter space noise over time, thus using a time-varying scale $\sigma _ { k }$ . Furthermore, $\sigma _ { k }$ is related to the action space variance that it induces, and updated accordingly. Concretely, we use the following simple heuristic to update $\sigma _ { k }$ every $K$ timesteps:
310
+
311
+ $$
312
+ \sigma _ { k + 1 } = { \left\{ \begin{array} { l l } { \alpha \sigma _ { k } , } & { { \mathrm { i f ~ } } d ( \pi , { \widetilde { \pi } } ) < \delta } \\ { { \frac { 1 } { \alpha } } \sigma _ { k } , } & { { \mathrm { o t h e r w i s e } } , } \end{array} \right. }
313
+ $$
314
+
315
+ where $d ( \cdot , \cdot )$ denotes some distance between the non-perturbed and perturbed policy (thus measuring in action space), $\alpha \in \mathbb { R } _ { > 0 }$ is used to rescale $\sigma _ { k }$ , and $\delta \in \mathbb { R } _ { > 0 }$ denotes some threshold value. This idea is based on the Levenberg-Marquardt heuristic (Ranganathan, 2004). The concrete distance measure and appropriate choice of $\delta$ depends on the policy representation. In the following sections, we outline our choice of $d ( \cdot , \cdot )$ for methods that do (DDPG and TRPO) and do not (DQN) use behavioral policies. In our experiments, we always use $\alpha = 1 . 0 1$ .
316
+
317
+ # C.1 A DISTANCE MEASURE FOR DQN
318
+
319
+ For DQN, the policy is defined implicitly by the $Q$ -value function. Unfortunately, this means that a naïve distance measure between $Q$ and $\widetilde { Q }$ has pitfalls. For example, assume that the perturbed policy has only changed the bias of the final layer, thus adding a constant value to each action’s $Q$ -value. In this case, a naïve distance measure like the norm $\lVert Q - \widetilde { Q } \rVert _ { 2 }$ would be nonzero, although the policies $\pi$ and $\widetilde { \pi }$ (implied by $Q$ and $\widetilde { Q }$ , respectively) are exactly equal. This equally applies to the case where eDQN as two heads, one for $Q$ and one for $\pi$ .
320
+
321
+ We therefore use a probabilistic formulation9 for both the non-perturbed and perturbed policies: $\pi , \widetilde { \pi } : \mathcal { S } \times \mathcal { A } \mapsto [ 0 , 1 ]$ by applying the softmax function over predicted $Q$ values: $\pi ( s ) = \exp Q _ { i } ( s ) / { \sum _ { i } \exp \bar { Q } _ { i } ( \dot { s } ) }$ , where $Q _ { i } ( \cdot )$ denotes the $Q$ -value of the $i$ -th action. $\widetilde { \pi }$ is defined analogously but uses the perturbed $\widetilde { Q }$ instead (or the perturbed head for $\pi$ ). Using this probabilistic formulation of the policies, we can now measure the distance in action space:
322
+
323
+ $$
324
+ d ( \pi , { \widetilde { \pi } } ) = D _ { \mathrm { K L } } ( \pi \parallel { \widetilde { \pi } } ) ,
325
+ $$
326
+
327
+ where $D _ { \mathrm { K L } } ( \cdot \parallel \cdot )$ denotes the Kullback-Leibler (KL) divergence. This formulation effectively normalizes the $Q$ -values and therefore does not suffer from the problem previously outlined.
328
+
329
+ We can further relate this distance measure to $\epsilon$ -greedy action space noise, which allows us to fairly compare the two approaches and also avoids the need to pick an additional hyperparameter $\delta$ . More concretely, the KL divergence between a greedy policy ${ \bar { \pi } } ( s , a ) = 1$ for $a = \mathrm { a r g m a x } _ { a ^ { \prime } } Q ( s , a ^ { \prime } )$ and $\pi ( s , a ) = 0$ otherwise and an $\epsilon$ -greedy policy $\begin{array} { r } { \widehat { \pi } ( s , a ) = 1 - \epsilon + \frac { \epsilon } { | A | } } \end{array}$ for $a = \mathrm { a r g m a x } _ { a ^ { \prime } } Q ( s , a ^ { \prime } )$ and $\textstyle { \widehat { \pi } } ( s , a ) = { \frac { \epsilon } { | { \mathcal { A } } | } }$ otherwise is $\begin{array} { r } { D _ { \mathrm { K L } } ( \pi \parallel \widehat { \pi } ) = - \log \left( 1 - \epsilon + \frac { \epsilon } { | A | } \right) } \end{array}$ , where $| { \cal { A } } |$ denotes the number of actions (this follows immediately from the definition of the KL divergence for discrete probability distributions). We can use this distance measure to relate action space noise and parameter space noise to have similar distances, by adaptively scaling $\sigma$ so that it matches the KL divergence between greedy and $\epsilon$ -greedy policy, thus setting $\begin{array} { r } { \delta : = - \log { ( 1 - \epsilon + \frac { \epsilon } { | A | } ) } } \end{array}$ .
330
+
331
+ # C.2 A DISTANCE MEASURE FOR DDPG
332
+
333
+ For DDPG, we relate noise induced by parameter space perturbations to noise induced by additive Gaussian noise. To do so, we use the following distance measure between the non-perturbed and perturbed policy:
334
+
335
+ $$
336
+ d ( \pi , { \widetilde { \pi } } ) = { \sqrt { { \frac { 1 } { N } } \sum _ { i = 1 } ^ { N } \mathbb { E } _ { s } \left[ { \big ( } \pi ( s ) _ { i } - { \widetilde { \pi } } ( s ) _ { i } { \big ) } ^ { 2 } \right] } } ,
337
+ $$
338
+
339
+ where $\mathbb { E } _ { s } [ \cdot ]$ is estimated from a batch of states from the replay buffer and $N$ denotes the dimension of the action space (i.e. $\mathcal { A } \subset \mathbb { R } ^ { N }$ ). It is easy to show that $d ( \pi , \dot { \pi } + \mathcal { N } ( 0 , \sigma ^ { 2 } I ) ) = \sigma$ . Setting $\delta : = \sigma$ as the adaptive parameter space threshold thus results in effective action space noise that has the same standard deviation as regular Gaussian action space noise.
340
+
341
+ # C.3 A DISTANCE MEASURE FOR TRPO
342
+
343
+ In order to scale the noise for TRPO, we adapt the sampled noise vectors $\epsilon \sigma$ by computing a natural step $H ^ { - 1 } \epsilon \sigma$ . We essentially compute a trust region around the noise direction to ensure that the perturbed policy $\widetilde { \pi }$ remains sufficiently close to the non-perturbed version via
344
+
345
+ $$
346
+ \begin{array} { r } { E _ { s \sim \rho _ { \widetilde { \theta } } } [ D _ { \mathrm { K L } } ( \pi _ { \widetilde { \theta } } ( \cdot | s ) | | \pi _ { \theta } ( \cdot | s ) ) ] \leq \delta _ { \mathrm { K L } } . } \end{array}
347
+ $$
348
+
349
+ Concretely, this is computed through the conjugate gradient algorithm, combined with a line search along the noise direction to ensure constraint conformation, as described in Appendix C of Schulman et al. (2015b).
350
+
351
+ # D ADDITIONAL RESULTS ON ALE
352
+
353
+ Figure 7 provide the learning curves for all 21 Atari games.
354
+
355
+ Table 1 compares the final performance of ES after $1 0 0 0 \mathrm { M }$ frames to the final performance of DQN with $\epsilon$ -greedy exploration and parameter space noise exploration after $4 0 \mathrm { M }$ frames. In all cases, the performance is estimated by running 10 episodes with exploration disabled. We use the numbers reported by Salimans et al. (2017) for ES and report the median return across three seeds for DQN.
356
+
357
+ ![](images/a36375faf74b9b1009d28e6408616c1843c710707084f0688c798c9517b56a5d.jpg)
358
+ Figure 7: Median DQN returns for all ALE environment plotted over training steps.
359
+
360
+ Table 1: Performance comparison between Evolution Strategies (ES) as reported by Salimans et al. (2017), DQN with $\epsilon$ -greedy, and DQN with parameter space noise (this paper). ES was trained on $1 0 0 0 \mathrm { M }$ , while DQN was trained on only $4 0 \mathrm { M }$ frames.
361
+
362
+ <table><tr><td>Game</td><td>ES DQN w/ e-greedy</td><td>DQN w/ param noise</td><td></td></tr><tr><td>Alien</td><td>994.0</td><td>1535.0</td><td>2070.0</td></tr><tr><td>Amidar</td><td>112.0</td><td>281.0</td><td>403.5</td></tr><tr><td>BankHeist</td><td>225.0</td><td>510.0</td><td>805.0</td></tr><tr><td>BeamRider</td><td>744.0</td><td>8184.0</td><td>7884.0</td></tr><tr><td>Breakout</td><td>9.5</td><td>406.0</td><td>390.5</td></tr><tr><td>Enduro</td><td>95.0</td><td>1094</td><td>1672.5</td></tr><tr><td>Freeway</td><td>31.0</td><td>32.0</td><td>31.5</td></tr><tr><td>Frostbite</td><td>370.0</td><td>250.0</td><td>1310.0</td></tr><tr><td>Gravitar</td><td>805.0</td><td>300.0</td><td>250.0</td></tr><tr><td>MontezumaRevenge</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>Pitfall</td><td>0.0</td><td>-73.0</td><td>-100.0</td></tr><tr><td>Pong</td><td>21.0</td><td>21.0</td><td>20.0</td></tr><tr><td>PrivateEye</td><td>100.0</td><td>133.0</td><td>100.0</td></tr><tr><td>Qbert</td><td>147.5</td><td>7625.0</td><td>7525.0</td></tr><tr><td>Seaquest</td><td>1390.0</td><td>8335.0</td><td>8920.0</td></tr><tr><td>Solaris</td><td>2090.0</td><td>720.0</td><td>400.0</td></tr><tr><td>SpaceInvaders</td><td>678.5</td><td>1000.0</td><td>1205.0</td></tr><tr><td>Tutankham</td><td>130.3</td><td>109.5</td><td>181.0</td></tr><tr><td>Venture</td><td>760.0</td><td>0</td><td>0</td></tr><tr><td>WizardOfWor</td><td>3480.0</td><td>2350.0</td><td>1850.0</td></tr><tr><td>Zaxxon</td><td>6380.0</td><td>8100.0</td><td>8050.0</td></tr></table>
363
+
364
+ # E ADDITIONAL RESULTS ON CONTINUOUS CONTROL WITH SHAPED REWARDS
365
+
366
+ For completeness, we provide the plots for all evaluated environments with dense rewards. The results are depicted in Figure 8.
367
+
368
+ ![](images/eceea1288c26a6255041a87cf6149ab0ed62c5d0539461b469aad2d18badd246.jpg)
369
+ Figure 8: Median DDPG returns for all evaluated environments with dense rewards plotted over epochs.
370
+
371
+ The results for InvertedPendulum and InvertedDoublePendulum are very noisy due to the fact that a small change in policy can easily degrade performance significantly, and thus hard to read. Interestingly, adaptive parameter space noise achieves the most stable performance on InvertedDoublePendulum. Overall, performance is comparable to other exploration approaches. Again, no noise in either the action nor the parameter space achieves comparable results, indicating that these environments combined with DDPG are not well-suited to test for exploration.
372
+
373
+ # F ADDITIONAL RESULTS ON CONTINUOUS CONTROL WITH SPARSE REWARDS
374
+
375
+ The performance of TRPO with noise scaled according to the parameter curvature, as defined in Section C.3 is shown in Figure 9. The TRPO baseline uses only action noise by using a policy network that outputs the mean of a Gaussian distribution, while the variance is learned. These results show that adding parameter space noise aids in either learning much more consistently on these challenging sparse environments.
376
+
377
+ ![](images/a1aa594787adef36f0e6c8fed77cae227776d9a490e04329cc45723017eece08.jpg)
378
+ Figure 9: Median TRPO returns with three different environments with sparse rewards plotted over epochs.
parse/train/ByBAl2eAZ/ByBAl2eAZ_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByBAl2eAZ/ByBAl2eAZ_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/ByBAl2eAZ/ByBAl2eAZ_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1kG7GZAW/H1kG7GZAW.md ADDED
@@ -0,0 +1,277 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # VARIATIONAL INFERENCE OF DISENTANGLED LATENTCONCEPTS FROM UNLABELED OBSERVATIONS
2
+
3
+ Abhishek Kumar, Prasanna Sattigeri, Avinash Balakrishnan
4
+
5
+ IBM Research AI
6
+ Yorktown Heights, NY
7
+ {abhishk,psattig,avinash.bala}@us.ibm.com
8
+
9
+ # ABSTRACT
10
+
11
+ Disentangled representations, where the higher level data generative factors are reflected in disjoint latent dimensions, offer several benefits such as ease of deriving invariant representations, transferability to other tasks, interpretability, etc. We consider the problem of unsupervised learning of disentangled representations from large pool of unlabeled observations, and propose a variational inference based approach to infer disentangled latent factors. We introduce a regularizer on the expectation of the approximate posterior over observed data that encourages the disentanglement. We also propose a new disentanglement metric which is better aligned with the qualitative disentanglement observed in the decoder’s output. We empirically observe significant improvement over existing methods in terms of both disentanglement and data likelihood (reconstruction quality).
12
+
13
+ # 1 INTRODUCTION
14
+
15
+ Feature representations of the observed raw data play a crucial role in the success of machine learning algorithms. Effective representations should be able to capture the underlying (abstract or high-level) latent generative factors that are relevant for the end task while ignoring the inconsequential or nuisance factors. Disentangled feature representations have the property that the generative factors are revealed in disjoint subsets of the feature dimensions, such that a change in a single generative factor causes a highly sparse change in the representation. Disentangled representations offer several advantages – (i) Invariance: it is easier to derive representations that are invariant to nuisance factors by simply marginalizing over the corresponding dimensions, (ii) Transferability: they are arguably more suitable for transfer learning as most of the key underlying generative factors appear segregated along feature dimensions, (iii) Interpretability: a human expert may be able to assign meanings to the dimensions, $( i \nu )$ Conditioning and intervention: they allow for interpretable conditioning and/or intervention over a subset of the latents and observe the effects on other nodes in the graph. Indeed, the importance of learning disentangled representations has been argued in several recent works (Bengio et al., 2013; Lake et al., 2016; Ridgeway, 2016).
16
+
17
+ Recognizing the significance of disentangled representations, several attempts have been made in this direction in the past (Ridgeway, 2016). Much of the earlier work assumes some sort of supervision in terms of: (i) partial or full access to the generative factors per instance (Reed et al., 2014; Yang et al., 2015; Kulkarni et al., 2015; Karaletsos et al., 2015), (ii) knowledge about the nature of generative factors (e.g, translation, rotation, etc.) (Hinton et al., 2011; Cohen & Welling, 2014), (iii) knowledge about the changes in the generative factors across observations (e.g., sparse changes in consecutive frames of a Video) (Goroshin et al., 2015; Whitney et al., 2016; Fraccaro et al., 2017; Denton & Birodkar, 2017; Hsu et al., 2017), (iv) knowledge of a complementary signal to infer representations that are conditionally independent of it1 (Cheung et al., 2014; Mathieu et al., 2016; Siddharth et al., 2017). However, in most real scenarios, we only have access to raw observations without any supervision about the generative factors. It is a challenging problem and many of the earlier attempts have not been able to scale well for realistic settings (Schmidhuber, 1992; Desjardins et al., 2012; Cohen & Welling, 2015) (see also, Higgins et al. (2017)).
18
+
19
+ Recently, Chen et al. (2016) proposed an approach to learn a generative model with disentangled factors based on Generative Adversarial Networks (GAN) (Goodfellow et al., 2014), however implicit generative models like GANs lack an effective inference mechanism2, which hinders its applicability to the problem of learning disentangled representations. More recently, Higgins et al. (2017) proposed an approach based on Variational AutoEncoder (VAE) Kingma & Welling (2013) for inferring disentangled factors. The inferred latents using their method (termed as $\beta$ -VAE ) are empirically shown to have better disentangling properties, however the method deviates from the basic principles of variational inference, creating increased tension between observed data likelihood and disentanglement. This in turn leads to poor quality of generated samples as observed in (Higgins et al., 2017).
20
+
21
+ In this work, we propose a principled approach for inference of disentangled latent factors based on the popular and scalable framework of amortized variational inference (Kingma & Welling, 2013; Stuhlmuller et al., 2013; Gershman & Goodman, 2014; Rezende et al., 2014) powered by stochastic ¨ optimization (Hoffman et al., 2013; Kingma & Welling, 2013; Rezende et al., 2014). Disentanglement is encouraged by introducing a regularizer over the induced inferred prior. Unlike $\beta$ -VAE (Higgins et al., 2017), our approach does not introduce any extra conflict between disentanglement of the latents and the observed data likelihood, which is reflected in the overall quality of the generated samples that matches the VAE and is much better than $\beta$ -VAE. This does not come at the cost of higher entanglement and our approach also outperforms $\beta$ -VAE in disentangling the latents as measured by various quantitative metrics. We also propose a new disentanglement metric, called Separated Attribute Predictability or SAP, which is better aligned with the qualitative disentanglement observed in the decoder’s output compared to the existing metrics.
22
+
23
+ # 2 FORMULATION
24
+
25
+ We start with a generative model of the observed data that first samples a latent variable $\mathbf { z } \sim p ( \mathbf { z } )$ , and an observation is generated by sampling from $p _ { \boldsymbol { \theta } } ( \mathbf { x } | \mathbf { z } )$ . The joint density of latents and observations is denoted as $p _ { \theta } ( \mathbf { \bar { x } } , \mathbf { z } ) = p ( \mathbf { \bar { z } } ) p _ { \theta } ( \mathbf { \bar { x } } | \mathbf { z } )$ . The problem of inference is to compute the posterior of the latents conditioned on the observations, i.e., $\begin{array} { r } { p _ { \theta } ( \mathbf { z } | \mathbf { x } ) = \frac { p _ { \theta } ( \mathbf { x } , \mathbf { z } ) } { \int p _ { \theta } ( \mathbf { x } , \mathbf { z } ) d \mathbf { z } } } \end{array}$ . We assume that we are given a finite set of samples (observations) from the true data distribution $p ( \mathbf { x } )$ . In most practical scenarios involving high dimensional and complex data, this computation is intractable and calls for approximate inference. Variational inference takes an optimization based approach to this, positing a family $\mathcal { D }$ of approximate densities over the latents and reducing the approximate inference problem to finding a member density that minimizes the Kullback-Leibler divergence to the true posterior, i.e., $\begin{array} { r } { q _ { \mathbf { x } } ^ { * } = \operatorname* { m i n } _ { \boldsymbol { q } \in \mathcal { D } } \mathrm { K L } ( q ( \mathbf { z } ) \bar { | | } p _ { \boldsymbol { \theta } } ( \mathbf { z } | \mathbf { x } ) ) } \end{array}$ (Blei et al., 2017). The idea of amortized inference (Kingma & Welling, 2013; Stuhlmuller et al., 2013; Gershman & Goodman, 2014; Rezende et al., 2014) is ¨ to explicitly share information across inferences made for each observation. One successful way of achieving this for variational inference is to have a so-called recognition model, parameterized by $\phi$ , that encodes an inverse map from the observations to the approximate posteriors (also referred as variational autoencoder or VAE) (Kingma & Welling, 2013; Rezende et al., 2014). The recognition model parameters are learned by optimizing the problem $\begin{array} { r } { \operatorname* { m i n } _ { \phi } \mathbb { E } _ { \mathbf { x } } \mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) | | p _ { \theta } ( \mathbf { z } | \mathbf { x } ) ) } \end{array}$ , where the outer expectation is over the true data distribution $p ( \mathbf { x } )$ which we have samples from. This can be shown as equivalent to maximizing what is termed as evidence lower bound (ELBO):
26
+
27
+ $$
28
+ \underset { \theta , \phi } { \mathrm { a r g } \mathrm { m i n } } \mathbb { E } _ { \mathbf { x } } \mathbf { K } \mathbf { L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p _ { \theta } ( \mathbf { z } | \mathbf { x } ) ) = \underset { \theta , \phi } { \mathrm { a r g } \mathrm { m a x } } \mathbb { E } _ { \mathbf { x } } \left[ \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } \left[ \log p _ { \theta } ( \mathbf { x } | \mathbf { z } ) \right] - \mathbf { K } \mathbf { L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p ( \mathbf { z } ) ) \right]
29
+ $$
30
+
31
+ The ELBO (the objective at the right side of Eq. 1) lower bounds the log-likelihood of observed data, and the gap vanishes at the global optimum. Often, the density forms of $p ( \mathbf { z } )$ and $q _ { \phi } ( { \bf z } | { \bf x } )$ are chosen such that their KL-divergence can be written analytically in a closed-form expression (e.g., $p ( \mathbf { z } )$ is $N ( 0 , I )$ and $q _ { \phi } ( { \bf z } | { \bf x } )$ is $\bar { N } ( \mu _ { \phi } ( { \bf x } ) , \Sigma _ { \phi } ( { \bf x } ) ) )$ (Kingma & Welling, 2013). In such cases, the ELBO can be efficiently optimized (to a stationary point) using stochastic first order methods where both expectations are estimated using mini-batches. Further, in cases when $q _ { \phi } ( \cdot )$ can be written as a continuous transformation of a fixed base distribution (e.g., the standard normal distribution), a low variance estimate of the gradient over $\phi$ can be obtained by coordinate transformation (also referred as reparametrization) (Fu, 2006; Kingma & Welling, 2013; Rezende et al., 2014).
32
+
33
+ # 2.1 GENERATIVE STORY: DISENTANGLED PRIOR
34
+
35
+ Most VAE based generative models for real datasets (e.g., text, images, etc.) already work with a relatively simple and disentangled prior $p ( \mathbf { z } )$ having no interaction among the latent dimensions (e.g., the standard Gaussian $N ( 0 , I ) ,$ ) (Bowman et al., 2015; Miao et al., 2016; Hou et al., 2017; Zhao et al., 2017). The complexity of the observed data is absorbed in the conditional distribution $p _ { \theta } ( \mathbf { x } | \mathbf { z } )$ which encodes the interactions among the latents. Hence, as far as the generative modeling is concerned, disentangled prior sets us in the right direction.
36
+
37
+ # 2.2 INFERRING DISENTANGLED LATENTS
38
+
39
+ Although the generative model starts with a disentangled prior, our main objective is to infer disentangled latents which are potentially conducive for various goals mentioned in Sec. 1 (e.g., invariance, transferability, interpretability). To this end, we consider the density over the inferred latents induced by the approximate posterior inference mechanism,
40
+
41
+ $$
42
+ q _ { \phi } ( \mathbf { z } ) = \int q _ { \phi } ( \mathbf { z } | \mathbf { x } ) p ( \mathbf { x } ) d \mathbf { x } ,
43
+ $$
44
+
45
+ which we will subsequently refer to as the inferred prior or expected variational posterior ${ \bf \nabla } ( p ( { \bf x } )$ is the true data distribution that we have only samples from). For inferring disentangled factors, this should be factorizable along the dimensions, i.e., $\begin{array} { r } { q _ { \phi } ( \mathbf { z } ) = \prod _ { i } q _ { i } ( z _ { i } ) } \end{array}$ , or equivalently $q _ { i \mid j } ( z _ { i } | z _ { j } ) =$ $q _ { i } ( z _ { i } ) , \forall i , j$ . This can be achieved by minimizing a suitable distance between the inferred prior $q _ { \phi } ( \mathbf { z } )$ and the disentangled generative prior $p ( \mathbf { z } )$ . We can also define expected posterior as $p _ { \boldsymbol { \theta } } ( \mathbf { z } ) =$ $\begin{array} { r } { \int p _ { \theta } ( \mathbf { z } | \mathbf { x } ) p ( \mathbf { x } ) d \mathbf { x } } \end{array}$ . If we take KL-divergence as our choice of distance, by relying on its pairwise convexity (i.e., $\mathrm { K L } ( \lambda p _ { 1 } + ( 1 - \lambda ) p _ { 2 } | | \lambda q _ { 1 } + ( 1 - \lambda ) q _ { 2 } ) \le \lambda \mathrm { K L } ( p _ { 1 } | | q _ { 1 } ) + ( 1 - \lambda ) \mathrm { K L } ( p _ { 2 } | | q _ { 2 } ) )$ (Van Erven & Harremos, 2014), we can show that the distance between $q _ { \phi } ( \mathbf { z } )$ and $p _ { \boldsymbol { \theta } } ( \mathbf { z } )$ is bounded by the objective of the variational inference:
46
+
47
+ $$
48
+ \begin{array} { r } { \mathrm { K L } \big ( q _ { \phi } ( \mathbf { z } ) \| p _ { \theta } ( \mathbf { z } ) \big ) = \mathrm { K L } \big ( \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \big ) \| \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } p _ { \theta } ( \mathbf { z } | \mathbf { x } ) \big ) \leq \mathbb { E } _ { \mathbf { x } \sim p ( \mathbf { x } ) } \mathrm { K L } \big ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p _ { \theta } ( \mathbf { z } | \mathbf { x } ) \big ) . } \end{array}
49
+ $$
50
+
51
+ In general, the prior $p ( \mathbf { z } )$ and expected posterior $p _ { \boldsymbol { \theta } } ( \mathbf { z } )$ will be different, although they may be close (they will be same when $\begin{array} { r } { p _ { \theta } ( \mathbf { x } ) \overset { \cdot } { = } \int p _ { \theta } ( \mathbf { x } | \mathbf { z } ) p ( \mathbf { z } ) d \mathbf { z } } \end{array}$ is equal to $p ( \mathbf { x } ) .$ ). Hence, variational posterior inference of latent variables with disentangled prior naturally encourages inferring factors that are close to being disentangled. We think this is the reason that the original VAE (Eq. (1)) has also been observed to exhibit some disentangling behavior on simple datasets such as MNIST (Kingma $\&$ Welling, 2013). However, this behavior does not carry over to more complex datasets (Aubry et al., 2014; Liu et al., 2015; Higgins et al., 2017), unless extra supervision on the generative factors is provided (Kulkarni et al., 2015; Karaletsos et al., 2015). This can be due to: (i) $p ( \mathbf { x } )$ and $p _ { \theta } ( \mathbf { x } )$ being far apart which in turn causes $p ( \mathbf { z } )$ and $p _ { \boldsymbol { \theta } } ( \mathbf { z } )$ being far apart, and (ii) the non-convexity of the ELBO objective which prevents us from achieving the global minimum of $\mathbb { E } _ { \mathbf { x } } \mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p _ { \theta } ( \mathbf { z } | \mathbf { x } ) )$ (which is 0 and implies $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) | | p _ { \theta } ( \mathbf { z } ) ) = 0 )$ . In other words, maximizing the ELBO (Eq. (1)) might also result in reducing the value of $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ , however, due to the aforementioned reasons, the gap between $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ and $\mathbb { E } _ { \mathbf { x } } \ K \ L ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p _ { \theta } ( \mathbf { z } | \mathbf { x } ) )$ could be large at the stationary point of convergence. Hence, minimizing $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ or any other suitable distance $D ( q _ { \phi } ( \mathbf { z } ) , p ( \mathbf { z } ) )$ explicitly will give us better control on the disentanglement. This motivates us to add $D ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ as part of the objective to encourage disentanglement during inference, i.e.,
52
+
53
+ $$
54
+ \operatorname* { m a x } _ { \theta , \phi } \mathbb { E } _ { \mathbf { x } } \left[ \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } \left[ \log p _ { \theta } ( \mathbf { x } | \mathbf { z } ) \right] - \mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p ( \mathbf { z } ) ) \right] - \lambda D ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) ) ,
55
+ $$
56
+
57
+ where $\lambda$ controls its contribution to the overall objective. We refer to this as DIP-VAE (for Disentangled Inferred Prior) subsequently.
58
+
59
+ Optimizing (4) directly is not tractable if $D ( \cdot , \cdot )$ is taken to be the KL-divergence $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ , which does not have a closed-form expression. One possibility is use the variational formulation of the KL-divergence (Nguyen et al., 2010; Nowozin et al., 2016) that needs only samples from $q _ { \phi } ( \mathbf { z } )$ and $p ( \mathbf { z } )$ to estimate a lower bound to $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ . However, this would involve optimizing for a third set of parameters $\psi$ for the KL-divergence estimator, and would also change the optimization to a saddle-point (min-max) problem which has its own optimization challenges (e.g., gradient vanishing as encountered in training generative adversarial networks with KL or Jensen-Shannon (JS) divergences (Goodfellow et al., 2014; Arjovsky & Bottou, 2017)). Taking $D$ to be another suitable distance between $q _ { \phi } ( \mathbf { z } )$ and $p ( \mathbf { z } )$ (e.g., integral probability metrics like Wasserstein distance (Sriperumbudur et al., 2009)) might alleviate some of these issues (Arjovsky et al., 2017) but will still involve complicating the optimization to a saddle point problem in three set of parameters3. It should also be noted that using these variational forms of the distances will still leave us with an approximation to the actual distance.
60
+
61
+ We adopt a simpler yet effective alternative of matching the moments of the two distributions. Matching the covariance of the two distributions will amount to decorrelating the dimensions of $\mathbf { z } \sim q _ { \phi } ( \mathbf { z } )$ if $p ( \mathbf { z } )$ is $N ( 0 , I )$ . Let us denote $\begin{array} { r } { \mathrm { C o v } _ { q ( \mathbf { z } ) } [ \mathbf { z } ] : = \mathbb { E } _ { q ( \mathbf { z } ) } \left[ ( \mathbf { z } - \mathbb { E } _ { q ( \mathbf { z } ) } [ \mathbf { \breve { z } } ] ) ( \mathbf { z } - \mathbb { E } _ { q [ \mathbf { z } ] } ( \mathbf { z } ) ) ^ { \top } \right] } \end{array}$ . By the law of total covariance, the covariance of $\mathbf { z } \sim q _ { \phi } ( \mathbf { z } )$ is given by
62
+
63
+ $$
64
+ \mathrm { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { z } ] = \mathbb { E } _ { p ( \mathbf { x } ) } \mathrm { C o v } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathbf { z } ] + \mathrm { C o v } _ { p ( \mathbf { x } ) } \left( \mathbb { E } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathbf { z } ] \right) ,
65
+ $$
66
+
67
+ where $\mathbb { E } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathbf { z } ]$ and $\mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathbf { z } ]$ are random variables that are functions of the random variable $\mathbf { x }$ $\mathbf { z }$ is marginalized over). Most existing work on the VAE models uses $q _ { \phi } ( { \bf z } | { \bf x } )$ having the form ${ \cal N } ( { \pmb \mu } _ { \phi } ( { \bf x } ) , { \pmb \Sigma } _ { \phi } ( { \bf x } ) )$ , where $\mu _ { \phi } ( \mathbf { x } )$ and $\Sigma _ { \phi } ( \mathbf { x } )$ are the outputs of a deep neural net parameterized by $\phi$ . In this case Eq. (5) reduces to $\mathrm { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { \bar { z } } ] = \mathbb { E } _ { p ( \mathbf { x } ) } [ \bar { \Sigma } _ { \phi } ( \mathbf { x } ) ] + \mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ , which we want to be close to the Identity matrix. For simplicity, we choose entry-wise squared $\ell _ { 2 }$ -norm as the measure of proximity. Further, $\Sigma _ { \phi } ( \mathbf { x } )$ is commonly taken to be a diagonal matrix which means that cross-correlations (off-diagonals) between the latents are due to only $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ . This suggests two possible options for the disentangling regularizer: (i) regularizing only $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ which we refer as DIP-VAE-I, (ii) regularizing $\mathrm { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { z } ]$ which we refer as DIP-VAE-II. Penalizing just the off-diagonals in both cases will lead to lowering the diagonal entries of $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ as the $i j "$ ’th off-diagonal is really a derived attribute obtained by multiplying the square-roots of $\overrightarrow { \imath } ^ { \prime }$ ’th and $j ^ { ; }$ ’th diagonals (for each example $\mathbf { x } \sim p ( \mathbf { x } )$ , followed by averaging over all examples). This can be compensated in DIP-VAE-I by a regularizer on the diagonal entries of $\mathbf { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ which pulls these towards 1. We opt for two separate hyperparameters controlling the relative importance of the loss on the diagonal and off-diagonal entries as follows:
68
+
69
+ $$
70
+ \operatorname* { m a x } _ { \theta , \phi } \mathrm { E L B O } ( \theta , \phi ) - \lambda _ { o d } \sum _ { i \neq j } \left[ \mathrm { C o v } _ { p ( \mathbf { x } ) } { [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ] } \right] _ { i j } ^ { 2 } - \lambda _ { d } \sum _ { i } \left( \left[ \mathrm { C o v } _ { p ( \mathbf { x } ) } { [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ] } \right] _ { i i } - 1 \right) ^ { 2 } .
71
+ $$
72
+
73
+ The regularization terms involving $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ in the above objective (6) can be efficiently optimized using SGD, where $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ can be estimated using the current minibatch4.
74
+
75
+ For DIP-VAE-II, we have the following optimization problem:
76
+
77
+ $$
78
+ \operatorname* { m a x } _ { \theta , \phi } \mathrm { E L B O } ( \theta , \phi ) - \lambda _ { o d } \sum _ { i \neq j } \left[ \mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { z } ] \right] _ { i j } ^ { 2 } - \lambda _ { d } \sum _ { i } \left( \left[ \mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { z } ] \right] _ { i i } - 1 \right) ^ { 2 } .
79
+ $$
80
+
81
+ As discussed earlier, the term $\mathbb { E } _ { p ( \mathbf { x } ) } \mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathbf { z } ]$ contributes only to the diagonals of $\mathrm { C o v } _ { q _ { \phi } ( \mathbf { z } ) } [ \mathbf { z } ]$ Penalizing the off-diagonals of $\mathrm { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ in the Objective (7) will contribute to reduction in the magnitude of its diagonals as discussed earlier. As the regularizer on the diagonals is not directly on $\mathsf { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ]$ , unlike DIP-VAE-I, it will be not be able to keep $[ \mathbf { C o v } _ { p ( \mathbf { x } ) } [ \bar { \pmb { \mu } } _ { \phi } ( \mathbf { x } ) ] ] _ { i i }$ close to 1: the reduction in $[ \mathbf { C o v } _ { p ( \mathbf { x } ) } [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ] ] _ { i i }$ will be accompanied by increase in $[ \mathbb { E } _ { p ( \mathbf { x } ) } \pmb { \Sigma } _ { \phi } ( \mathbf { x } ) ] _ { i i }$ such that their sum remains close to 1. In datasets where the number of generative factors is less than the latent dimension, DIP-VAE-II is more suitable than DIP-VAE-I as keeping all dimensions active might result in splitting of an attribute across multiple dimensions, hurting the goal of disentanglement.
82
+
83
+ It is also possible to match higher order central moments of $q _ { \phi } ( \mathbf { z } )$ and the prior $p ( \mathbf { z } )$ . In particular, third order central moments (and moments) of the zero mean Gaussian prior are zero, hence $\ell _ { 2 }$ norm of third order central moments of $q _ { \phi } ( \mathbf { z } )$ can be penalized.
84
+
85
+ # 2.3 COMPARISON WITH $\beta$ -VAE
86
+
87
+ Recently proposed $\beta$ -VAE (Higgins et al., 2017) proposes to modify the ELBO by upweighting the $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) \| p ( \mathbf { z } ) )$ term in order to encourage the inference of disentangled factors:
88
+
89
+ $$
90
+ \begin{array} { r l } & { \underset { \theta , \phi } { \operatorname* { m a x } } \ : \mathbb { E } _ { \mathbf { x } } \left[ \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } \left[ \log p _ { \theta } ( \mathbf { x } | \mathbf { z } ) \right] - \beta \mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) | | p ( \mathbf { z } ) ) \right] , } \end{array}
91
+ $$
92
+
93
+ where $\beta$ is taken to be great than 1. Higher $\beta$ is argued to encourage disentanglement at the cost of reconstruction error (the likelihood term in the ELBO). Authors report empirical results with $\beta$ ranging from 4 to 250 depending on the dataset. As already mentioned, most VAE models proposed in the literature, including $\beta$ -VAE, work with ${ \cal N } ( { \bf 0 } , { \bf I } )$ as the prior $p ( \mathbf { z } )$ and ${ \cal N } ( { \pmb \mu } _ { \phi } ( { \bf x } ) , { \pmb \Sigma } _ { \phi } ( { \bf \bar { x } } ) ) ^ { \hat { } }$ with diagonal $\Sigma _ { \phi } ( \mathbf { x } )$ as the approximate posterior $q _ { \phi } ( \mathbf { z } | \mathbf { x } )$ . This reduces the objective (8) to
94
+
95
+ $$
96
+ \operatorname* { m a x } _ { \theta , \phi } \mathbb { E } _ { \mathbf { x } } \left[ \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } \left[ \log p _ { \theta } ( \mathbf { x } | \mathbf { z } ) \right] - \frac { \beta } { 2 } \left( \sum _ { i } \left( \left[ \boldsymbol { \Sigma } _ { \phi } ( \mathbf { x } ) \right] _ { i i } - \ln \left[ \boldsymbol { \Sigma } _ { \phi } ( \mathbf { x } ) \right] _ { i i } \right) + \left\| \mu _ { \phi } ( \mathbf { x } ) \right\| _ { 2 } ^ { 2 } \right) \right] .
97
+ $$
98
+
99
+ For high values of $\beta$ , $\beta$ -VAE would try to pull $\mu _ { \phi } ( \mathbf { x } )$ towards zero and $\Sigma _ { \phi } ( \mathbf { x } )$ towards the identity matrix (as the minimum of $x - \ln x$ for $x > 0$ is at $x = 1$ ), thus making the approximate posterior $q _ { \phi } ( { \bf z } | { \bf x } )$ insensitive to the observations. This is also reflected in the quality of the reconstructed samples which is worse than VAE $\mathcal { B } = 1 \dot { }$ ), particularly for high values of $\beta$ . Our proposed method does not have such increased tension between the likelihood term and the disentanglement objective, and the sample quality with our method is on par with the VAE.
100
+
101
+ Finally, we note that both $\beta$ -VAE and our proposed method encourage disentanglement of inferred factors by pulling $\mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } ) } ( \mathbf { z } )$ in Eq. (5) towards the identity matrix: $\beta$ -VAE attempts to do it by making $\mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } ( \mathbf { z } )$ close to $\mathbf { I }$ and $\mathbb { E } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } ( \mathbf { z } )$ close to 0 individually for all observations $\mathbf { x }$ , while the proposed method directly works on $\mathbf { C o v } _ { q _ { \phi } ( \mathbf { z } ) } ( \mathbf { z } )$ (marginalizing over the observations $\mathbf { x }$ ) which retains the sensitivity of $q _ { \phi } ( \mathbf { z } | \mathbf { x } )$ to the conditioned-upon observation.
102
+
103
+ # 3 QUANTIFYING DISENTANGLEMENT: SAP SCORE
104
+
105
+ Higgins et al. (2017) propose a metric to evaluate the disentanglement performance of the inference mechanism, assuming that the ground truth generative factors are available. It works by first sampling a generative factor $y$ , followed by sampling $L$ pairs of examples such that for each pair, the sampled generative factor takes the same value. Given the inferred ${ \bf z } _ { x } : = \pmb { \mu } _ { \phi } ( { \bf x } )$ for each example $\mathbf { x }$ , they compute the absolute difference of these vectors for each pair, followed by averaging these difference vectors. This average difference vector is assigned the label of $y$ . By sampling $n$ such minibatches of $L$ pairs, we get $n$ such averaged difference vectors for the factor $y$ . This process is repeated for all generative factors. A low capacity multiclass classifier is then trained on these vectors to predict the identities of the corresponding generative factors. Accuracy of this classifier on the difference vectors for test set is taken to be a measure of disentanglement. We evaluate the proposed method on this metric and refer to this as Z-diff score subsequently.
106
+
107
+ We observe in our experiments that the $\boldsymbol { \mathrm Z }$ -diff score (Higgins et al., 2017) is not correlated well with the qualitative disentanglement at the decoder’s output as seen in the latent traversal plots (obtained by varying only one latent while keeping the other latents fixed). It also depends on the multiclass classifier used to obtain the score. We propose a new metric, referred as Separated Attribute Predictability (SAP) score, that is better aligned with the qualitative disentanglement observed in the latent traversals and also does not involve training any classifier. It is computed as follows: (i) We first construct a $d \times k$ score matrix $S$ (for $d$ latents and $k$ generative factors) whose $i j$ ’th entry is the linear regression or classification score (depending on the generative factor type) of predicting $j ^ { ; }$ ’th factor using only $i$ ’th latent $[ \mu _ { \phi } ( \mathbf { x } ) ] _ { i }$ . For regression, we take this to be the $R ^ { 2 }$ score obtained with fitting a line (slope and intercept) that minimizes the linear regression error (for the test examples). The $R ^ { 2 }$ score is given by $\left( \frac { \mathrm { C o v } ( [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ] _ { i } , \mathbf { y } _ { j } ) } { \sigma _ { [ \pmb { \mu } _ { \phi } ( \mathbf { x } ) ] _ { i } } \sigma _ { \mathbf { y } _ { j } } } \right) ^ { \frac { \gamma } { 2 } }$ 2 and ranges from 0 to 1, with a score of 1 indicating that a linear function of the $i$ ’th inferred latent explains all variability in the $j ^ { \dagger }$ ’th generative factor. For classification, we fit one or more thresholds (real numbers) directly on $i$ ’th inferred latents for the test examples that minimize the balanced classification errors, and take $S _ { i } j$ to be the balanced classification accuracy of the $j$ ’th generative factor. For inactive latent dimensions (having $\sigma _ { [ { \pmb \mu } _ { \phi } ( { \bf x } ) ] _ { i } } = [ { \bf C o v } _ { p ( x ) } [ { \pmb \mu } _ { \phi } ( { \bf x } ) ] ] _ { i i }$ close to 0), we take $S _ { i j }$ to be 0. (ii) For each column of the score matrix $S$ which corresponds to a generative factor, we take the difference of top two entries (corresponding to top two most predictive latent dimensions), and then take the mean of these differences as the final SAP score. Considering just the top scoring latent dimension for each generative factor is not enough as it does not rule out the possibility of the factor being captured by other latents. A high SAP score indicates that each generative factor is primarily captured in only one latent dimension. Note that a high SAP score does not rule out one latent dimension capturing two or more generative factors well, however in many cases this would be due to the generative factors themselves being correlated with each other, which can be verified empirically using ground truth values of the generative factors (when available). Further, a low SAP score does not rule out good disentanglement in cases when two (or more) latent dimensions might be correlated strongly with the same generative factor and poorly with other generative factors. The generated examples using single latent traversals may not be realistic for such models, and DIP-VAE discourages this from happening by enforcing decorrelation of the latents. However, the SAP score computation can be adapted to such cases by grouping the latent dimensions based on correlations and getting the score matrix at group level, which can be fed as input to the second step to get the final SAP score.
108
+
109
+ Table $1 \colon Z$ -diff score Higgins et al. (2017), the proposed SAP score and reconstruction error (per pixel) on the test sets for 2D Shapes and CelebA $( \beta _ { 1 } = 4 , \beta _ { 2 } = 6 0 , \lambda = 1 0 , \lambda _ { 1 } = 5 , \lambda _ { 2 } = 5 0 0$ for 2D Shapes; $\beta _ { 1 } = 4 , \beta _ { 2 } = 3 2 , \lambda = 2 , \lambda _ { 1 } = 1 , \lambda _ { 2 } = 8 0$ for CelebA). For the results on a wider range of hyperparameter values, refer to Fig. 1 and Fig. 2.
110
+
111
+ <table><tr><td rowspan="2">Method</td><td colspan="3">2D Shapes</td><td colspan="3">CelebA</td></tr><tr><td>Z-diff</td><td>SAP</td><td>Reconst. error</td><td>Z-diff</td><td>SAP</td><td>Reconst. error</td></tr><tr><td>VAE</td><td>81.3</td><td>0.0417</td><td>0.0017</td><td>7.5</td><td>0.35</td><td>0.0876</td></tr><tr><td>β-VAE(β=β1)</td><td>80.7</td><td>0.0811</td><td>0.0032</td><td>8.1</td><td>0.48</td><td>0.0937</td></tr><tr><td>β-VAE(β=β2)</td><td>95.7</td><td>0.5503</td><td>0.0113</td><td>6.4</td><td>3.72</td><td>0.1572</td></tr><tr><td>DIP-VAE-I (入od = λ)</td><td>98.7</td><td>0.1889</td><td>0.0018</td><td>14.8</td><td>3.69</td><td>0.0904</td></tr><tr><td>DIP-VAE-II (λod = λ1)</td><td>95.3</td><td>0.2188</td><td>0.0023</td><td>7.1</td><td>2.94</td><td>0.0884</td></tr><tr><td>DIP-VAE-II (入od = λ2)</td><td>98.0</td><td>0.5253</td><td>0.0079</td><td>11.5</td><td>3.93</td><td>0.1477</td></tr></table>
112
+
113
+ # 4 EXPERIMENTS
114
+
115
+ We evaluate our proposed method, DIP-VAE, on three datasets – (i) CelebA (Liu et al., 2015): It consists of 202, 599 RGB face images of celebrities. We use $6 4 \times 6 4 \times 3$ cropped images as used in several earlier works, using $9 0 \%$ for training and $1 0 \%$ for test. (ii) 3D Chairs (Aubry et al., 2014): It consists of 1393 chair CAD models, with each model rendered from 31 azimuth angles and 2 elevation angles. Following earlier work (Yang et al., 2015; Dosovitskiy et al., 2015) that ignores near-duplicates, we use a subset of 809 chair models in our experiments. We use the binary masks of the chairs as the observed data in our experiments following (Higgins et al., 2017). First $8 0 \%$ of the models are used for training and the rest are used for test. (iii) 2D Shapes (Matthey et al., 2017): This is a synthetic dataset of binary 2D shapes generated from the Cartesian product of the shape (heart, oval and square), $x$ -position (32 values), $y$ -position (32 values), scale (6 values) and rotation (40 values). We consider two baselines for the task of unsupervised inference of disentangled factors: (i) VAE (Kingma & Welling, 2013; Rezende et al., 2014), and (ii) the recently proposed $\beta$ -VAE (Higgins et al., 2017). To be consistent with the evaluations in (Higgins et al., 2017), we use the same CNN network architectures (for our encoder and decoder), and same latent dimensions as used in (Higgins et al., 2017) for CelebA, 3D Chairs, 2D Shapes datasets.
116
+
117
+ Hyperparameters. For the proposed DIP-VAE-I, in all our experiments we vary $\lambda _ { o d }$ in the set $\{ 1 , 2 , 5 , 1 0 , 2 0 , 5 0 , 1 0 0 , 5 0 0 \}$ while fixing $\lambda _ { d } = 1 0 \lambda _ { o d }$ for 2D Shapes and 3D Chairs, and $\lambda _ { d } =$ $5 0 \lambda _ { o d }$ for CelebA. For DIP-VAE-II, we fix $\lambda _ { o d } = \lambda _ { d }$ for 2D Shapes, and $\lambda _ { o d } = 2 \lambda _ { d }$ for CelebA. Additionally, for DIP-VAE-II we also penalize the $\ell _ { 2 }$ -norm of third order central moments of $q _ { \phi } ( \mathbf { z } )$ with hyperparameter $\lambda _ { 3 } = 2 0 0$ for 2D Shapes data ( $\lambda _ { 3 } = 0$ for CelebA). For $\beta$ -VAE, we experiment with $\beta = \{ 1 , 2 , 4 , 8 , 1 6 , 2 5 , 3 2 , 6 4 , 1 0 0 , 1 2 8 , 2 0 0 , 2 5 6 \}$ (where $\beta = 1$ corresponds to the VAE). We used a batch size of 400 for all 2D Shapes experiments and 100 for all CelebA experiments. For both CelebA and 2D Shapes, we show the results in terms of the $\textsf { Z }$ -diff score Higgins et al. (2017), the
118
+
119
+ ![](images/e32c59a3570dcc2ce5ec55bd6bdb3ead0a11623f13e8fdfb036f26f5234758ac.jpg)
120
+ Figure 1: Proposed Separated Atomic Predictability (SAP) score and the Z-diff disentanglement score (Higgins et al., 2017) as a function of average reconstruction error (per pixel) on the test set of 2D Shapes data for $\beta$ -VAE and the proposed DIP-VAE. The plots are generated by varying $\beta$ for $\beta$ -VAE, and $\lambda _ { o d }$ for DIP-VAE-I and DIP-VAE-II (the number next to each point is the value of these hyperparameters, respectively).
121
+
122
+ Table 2: Attribute classification accuracy on CelebA: A classifier $\begin{array} { r } { \mathbf { w } ^ { k } = \frac { 1 } { | \mathbf { x } _ { i } : y _ { i } ^ { k } = 1 | } \sum _ { \mathbf { x } _ { i } : y _ { i } ^ { k } = 1 } \mu _ { \phi } ( \mathbf { x } _ { i } ) - } \end{array}$ 1|xi:yk=0| Pxi:yki =0 µφ(xi) is computed for every attribute k using the training set and a bias is learned by minimizing the hinge loss. Accuracy on other attributes stays about same across all methods.
123
+
124
+ <table><tr><td>ponlen</td><td>AAaeergperors</td><td>Aeeie</td><td>ssueg</td><td>Jrraerr</td><td>Jrr puilg</td><td>dnarae faaeg</td><td>P</td><td>wndo ngrigr ginnn</td><td>PPed tr</td><td>J gaam</td><td>wr Biaea</td><td>VansiBegeer</td></tr><tr><td>VAE</td><td>71.8</td><td>73.0</td><td>89.8</td><td>78.0</td><td>88.9</td><td>79.6</td><td>83.9</td><td>76.3</td><td>87.3</td><td>70.2</td><td>95.8</td><td>83.0</td></tr><tr><td>β=2</td><td>71.6</td><td>72.6</td><td>90.6</td><td>79.3</td><td>89.1</td><td>79.3</td><td>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>β=4</td><td>71.6</td><td>72.6</td><td>90.0</td><td>76.6</td><td>88.9</td><td>77.8</td><td>82.3</td><td>75.7</td><td>85.3</td><td>66.8</td><td>95.8</td><td>80.6</td></tr><tr><td>β=8</td><td>71.6</td><td>71.7</td><td>90.0</td><td>76.0</td><td>87.2</td><td>76.2</td><td>80.5</td><td>73.1</td><td>85.3</td><td>63.7</td><td>95.8</td><td>79.6</td></tr><tr><td>DIP-VAE-I</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></table>
125
+
126
+ proposed SAP score, and reconstruction error. For 3D Chairs data, only two ground truth generative factors are available and the quantitative scores for these are saturated near the peak values, hence we show only the latent traversal plots which we based on our subjective evaluation of the reconstruction quality and disentanglement (shown in Appendix).
127
+
128
+ Disentanglement scores and reconstruction error. For the Z-diff score (Higgins et al., 2017), in all our experiments we use a one-vs-rest linear SVM with weight on the hinge loss $C$ set to 0.01 and weight on the regularizer set to 1. Table 1 shows the Z-diff scores and the proposed SAP scores along with reconstruction error (which directly corresponds to the data likelihood) for the test sets of CelebA and 2D Shapes data. Further we also show the plots of how the Z-diff score and the proposed SAP score change with the reconstruction error as we vary the hyperparameter for both methods ( $\beta$ and $\lambda _ { o d }$ , respectively) in Fig. 1 (for 2D Shapes data) and Fig. 2 (for CelebA data). The proposed DIP-VAE-I gives much higher Z-diff score at little to no cost on the reconstruction error when compared with VAE $\mathbf { \nabla } \beta = 1 \mathbf { \dot { \varepsilon } } ,$ ) and $\beta$ -VAE, for both 2D Shapes and CelebA datasets. However, we observe in the decoder’s output for single latent traversals (varying a single latent while keeping others fixed, shown in Fig. 3 and Fig. 4) that a high $\mathrm { _ { Z } }$ -diff score is not necessarily a good indicator of disentanglement. Indeed, for 2D Shapes data, DIP-VAE-I has a higher $\mathsf { Z }$ -diff score (98.7) and almost an order of magnitude lower reconstruction error than $\beta$ -VAE for $\beta = 6 0$ , however comparing the latent traversals of $\beta$ -VAE in Fig. 3 and DIP-VAE-I in Fig. 4 indicate a better disentanglement for $\beta$ -VAE for $\beta = 6 0$ (though at the cost of much worse reconstruction where every generated sample looks like a hazy blob). On the other hand, we find the proposed SAP score to be correlated well with the qualitative disentanglement seen in the latent traversal plots. This is reflected in the higher SAP score of $\beta$ -VAE for $\beta = 6 0$ than DIP-VAE-I. We also observe that for 2D Shapes data, DIP-VAE-II gives a much better trade-off between disentanglement (measured by the SAP score) and reconstruction error than both DIP-VAE-I and $\beta$ -VAE, as shown quantitatively in Fig. 1 and qualitatively in the latent traversal plots in Fig. 3. The reason is that DIP-VAE-I enforces $[ \bar { \bf C o v } _ { p ( x ) } [ { \pmb \mu } _ { \phi } ( { \bf x } ) ] ] _ { i i }$ to be close to 1 and this may affect the disentanglement adversely by splitting a generative factor across multiple latents for 2D Shapes where the generative factors are much less than the latent dimension. For real datasets having lots of factors with complex generative processes, such as CelebA, DIP-VAE-I is expected to work well which can be seen in Fig. 2 where DIP-AVE-I yields a much lower reconstruction error with a higher SAP score (as well as higher Z-diff scores).
129
+
130
+ ![](images/e32d0583dabe4e4fd3e9384d62df53f8090518a1b80a73aa17ba4945bff30546.jpg)
131
+ Figure 2: The proposed SAP score and the Z-diff score (Higgins et al., 2017) as a function of average reconstruction error (per pixel) on the test set of CelebA data for $\beta$ -VAE and the proposed DIP-VAE. The plots are generated by varying $\beta$ for $\beta$ -VAE, and $\lambda _ { o d }$ for DIP-VAE-I and DIP-VAE-II (the number next to each point is the value of these hyperparameters, respectively).
132
+
133
+ Binary attribute classification for CelebA. We also experiment with predicting the binary attribute values for each test example in CelebA from the inferred $\mu _ { \phi } ( \mathbf { x } )$ . For each attribute $k$ , we compute the attribute vector $\begin{array} { r } { \mathbf { w } ^ { k } = \frac { 1 } { | \mathbf { x } _ { i } : y _ { i } ^ { k } = 1 | } \sum _ { \mathbf { x } _ { i } : y _ { i } ^ { k } = 1 } \mu _ { \phi } ( \mathbf { x } _ { i } ) - \frac { 1 } { | \mathbf { x } _ { i } : y _ { i } ^ { k } = 0 | } \sum _ { \mathbf { x } _ { i } : y _ { i } ^ { k } = 0 } \mu _ { \phi } ( \mathbf { x } _ { i } ) } \end{array}$ from the training set, and project the $\mu _ { \phi } ( \mathbf { x } )$ along these vectors. A bias is learned on these scalars (by minimizing hinge loss) which is then used for classifying the test examples. Table 2 shows the results for the attribute which show the highest change across various methods (most other attribute accuracies do not change). The proposed DIP-VAE outperforms both VAE and $\beta$ -VAE for most attributes. The performance of $\beta$ -VAE gets worse as $\beta$ is increased further.
134
+
135
+ ![](images/437e87b29b32bae915d73a990e7c22134a58009f8737c562f6e0ec208cc2e828.jpg)
136
+ Figure 3: Qualitative results for disentanglement in 2D Shapes dataset (Matthey et al., 2017). SAP scores, Z-diff scores and reconstruction errors for the methods (rows) can be read from Fig. 1.
137
+
138
+ ![](images/5c33ba502ea8e2247acd94096c32f9c18244bf881f7c34607d4122475048f6da.jpg)
139
+ Figure 4: Qualitative results for disentanglement in 2D Shapes dataset (Matthey et al., 2017) for DIP-VAE-I (SAP score 0.1889).
140
+
141
+ # 5 RELATED WORK
142
+
143
+ Adversarial autoencoder (Makhzani et al., 2015) also matches $q _ { \phi } ( z )$ (which is referred as aggregated posterior in their work) to the prior $p ( z )$ . However, adversarial autoencoder does not have the goal of minimizing $\mathrm { K L } ( q _ { \phi } ( \mathbf { z } | \mathbf { x } ) | | p _ { \theta } ( \mathbf { z } | \mathbf { x } ) )$ which is the primary goal of variational inference. It maximizes $\mathbb { E } _ { \mathbf { x } } \left[ \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } \mid \mathbf { x } ) } \left[ \log p _ { \theta } ( \mathbf { x } \mid \mathbf { z } ) \right] \right] - \lambda D ( q _ { \phi } ( \mathbf { z } ) \| p ( \mathbf { z } ) )$ , where $D$ is the distance induced by a discriminator that tries to classify $\mathbf { z } \sim q _ { \phi } ( \mathbf { z } )$ from $\mathbf { z } \sim p ( \mathbf { z } )$ by optimizing a cross-entropy loss (which induces JS-divergence as $D$ ). This can be contrasted with the objective in (4).
144
+
145
+ Invariance and Equivariance. Disentanglement is closely connected to invariance and equivariance of representations. If $R : { \bf x } { \bf z }$ is a function that maps the observations to the feature representions, equivariance (with respect to $T$ ) implies that a primitive transformation $T$ of the input results in a corresponding transformation $T ^ { \prime }$ of the feature, i.e., $R ( T ( \mathbf { x } ) ) = T ^ { \prime } ( R ( \mathbf { x } ) )$ . Disentanglement requires that $T ^ { \prime }$ acts only on a small subset of dimensions of $R ( \mathbf { x } )$ (a sparse action). In this sense, equivariance is a more general notion encompassing disentanglement as a special case, however this special case carries additional benefits of interpretability, ease of transferrability, etc. Invariance is also a special case of equivariance which requires $T ^ { \prime }$ to be identity for $R$ to be invariant to the action of $T$ on the input observations. However, invariance can obtained more easily from disentangled representations than from equivariant representations by simply marginalizing the appropriate subset of dimensions. There exists a lot of prior work in the literature on equivariant and invariant feature learning, mostly under the supervised setting which assumes the knowledge about the nature of input transformations (e.g., rotations, translations, scaling for images, etc.) (Schmidt & Roth, 2012; Bruna & Mallat, 2013; Anselmi et al., 2014; 2016; Cohen & Welling, 2016; Dieleman et al., 2016; Haasdonk et al., 2005; Mroueh et al., 2015; Raj et al., 2017).
146
+
147
+ # 6 CONCLUDING REMARKS
148
+
149
+ We proposed a principled variational framework to infer disentangled latents from unlabeled observations. Unlike $\beta$ -VAE, our variational objective does not have any conflict between the data log-likelihood and the disentanglement of the inferred latents, which is reflected in the empirical results. We also proposed the SAP disentanglement metric that is much better correlated with the qualitative disentanglement seen in the latent traversals than the Z-diff score Higgins et al. (2017). An interesting direction for future work is to take into account the sampling biases in the generative process, both natural (e.g., sampling the female gender makes it unlikely to sample beard for face images in CelebA) as well as artificial (e.g., a collection of face images that contain much more smiling faces for males than females misleading us to believe $p ( { \mathrm { g e n d e r } } , { \mathrm { s m i l e } } ) \neq p ( { \mathrm { g e n d e r } } ) p ( { \mathrm { s m i l e } } ) )$ , which makes the problem challenging and also somewhat less well defined (at least in the case of natural biases). Effective use of disentangled representations for transfer learning is another interesting direction for future work.
150
+
151
+ # REFERENCES
152
+
153
+ Fabio Anselmi, Joel Z Leibo, Lorenzo Rosasco, Jim Mutch, Andrea Tacchetti, and Tomaso Poggio. Unsupervised learning of invariant representations in hierarchical architectures. arXiv preprint arXiv:1311.4158, 2014.
154
+
155
+ Fabio Anselmi, Lorenzo Rosasco, and Tomaso Poggio. On invariance and selectivity in representation learning. Information and Inference, 2016.
156
+
157
+ Martin Arjovsky and Leon Bottou. Towards principled methods for training generative adversarial ´ networks. In NIPS 2016 Workshop on Adversarial Training. In review for ICLR, volume 2016, 2017.
158
+
159
+ Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017.
160
+
161
+ Mathieu Aubry, Daniel Maturana, Alexei A Efros, Bryan C Russell, and Josef Sivic. Seeing 3d chairs: exemplar part-based 2d-3d alignment using a large dataset of cad models. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3762–3769, 2014.
162
+
163
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
164
+
165
+ David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 2017.
166
+
167
+ Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015.
168
+
169
+ Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. IEEE Trans. Pattern Anal. Mach. Intell., 2013.
170
+
171
+ Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pp. 2172–2180, 2016.
172
+
173
+ Brian Cheung, Jesse A Livezey, Arjun K Bansal, and Bruno A Olshausen. Discovering hidden factors of variation in deep networks. arXiv preprint arXiv:1412.6583, 2014.
174
+
175
+ Taco Cohen and Max Welling. Learning the irreducible representations of commutative lie groups. In International Conference on Machine Learning, pp. 1755–1763, 2014.
176
+
177
+ Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning, 2016.
178
+
179
+ Taco S Cohen and Max Welling. Transformation properties of learned visual representations. In International Conference on Learning Representations, 2015.
180
+
181
+ Emily Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. arXiv preprint arXiv:1705.10915, 2017.
182
+
183
+ Guillaume Desjardins, Aaron Courville, and Yoshua Bengio. Disentangling factors of variation via generative entangling. arXiv preprint arXiv:1210.5474, 2012.
184
+
185
+ Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolu tional neural networks. ICML, 2016.
186
+
187
+ Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. ¨ arXiv preprint arXiv:1605.09782, 2016.
188
+
189
+ Alexey Dosovitskiy, Jost Tobias Springenberg, and Thomas Brox. Learning to generate chairs with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1538–1546, 2015.
190
+
191
+ Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016.
192
+
193
+ Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In Proceedings of the Thirty-First Conference on Uncertainty in Artificial Intelligence, pp. 258–267. AUAI Press, 2015.
194
+
195
+ Marco Fraccaro, Simon Kamronn, Ulrich Paquet, and Ole Winther. A disentangled recognition and nonlinear dynamics model for unsupervised learning. arXiv preprint arXiv:1710.05741, 2017.
196
+
197
+ Michael C Fu. Gradient estimation. Handbooks in operations research and management science, 13: 575–616, 2006.
198
+
199
+ Samuel Gershman and Noah Goodman. Amortized inference in probabilistic reasoning. In Proceedings of the Cognitive Science Society, volume 36, 2014.
200
+
201
+ 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.
202
+
203
+ Ross Goroshin, Michael F Mathieu, and Yann LeCun. Learning to linearize under uncertainty. In Advances in Neural Information Processing Systems, pp. 1234–1242, 2015.
204
+
205
+ Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Scholkopf, and Alexander Smola. A ¨ kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773, 2012.
206
+
207
+ Bernard Haasdonk, A Vossen, and Hans Burkhardt. Invariance in kernel methods by haar-integration kernels. In Scandinavian Conference on Image Analysis, pp. 841–851. Springer, 2005.
208
+
209
+ Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations, 2017.
210
+
211
+ Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks, pp. 44–51. Springer, 2011.
212
+
213
+ Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013.
214
+
215
+ Xianxu Hou, Linlin Shen, Ke Sun, and Guoping Qiu. Deep feature consistent variational autoencoder. In Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pp. 1133–1141. IEEE, 2017.
216
+
217
+ Wei-Ning Hsu, Yu Zhang, and James Glass. Unsupervised learning of disentangled latent representations from sequential data. In Advances in neural information processing systems, 2017.
218
+
219
+ Theofanis Karaletsos, Serge Belongie, and Gunnar Ratsch. Bayesian representation learning with ¨ oracle constraints. arXiv preprint arXiv:1506.05011, 2015.
220
+
221
+ Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
222
+
223
+ Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems, pp. 2539–2547, 2015.
224
+
225
+ Abhishek Kumar, Prasanna Sattigeri, and P Thomas Fletcher. Semi-supervised learning with GANs: Manifold invariance with improved inference. In Advances in Neural Information Processing Systems, 2017.
226
+
227
+ Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. Behavioral and Brain Sciences, pp. 1–101, 2016.
228
+
229
+ Yujia Li, Kevin Swersky, and Rich Zemel. Generative moment matching networks. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1718–1727, 2015.
230
+
231
+ 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.
232
+
233
+ Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
234
+
235
+ Michael F Mathieu, Junbo Jake Zhao, Junbo Zhao, Aditya Ramesh, Pablo Sprechmann, and Yann LeCun. Disentangling factors of variation in deep representation using adversarial training. In Advances in Neural Information Processing Systems, pp. 5040–5048, 2016.
236
+
237
+ Loic Matthey, Irina Higgins, Demis Hassabis, and Alexander Lerchner. dsprites: Disentanglement testing sprites dataset. https://github.com/deepmind/dsprites-dataset/, 2017.
238
+
239
+ Yishu Miao, Lei Yu, and Phil Blunsom. Neural variational inference for text processing. In International Conference on Machine Learning, pp. 1727–1736, 2016.
240
+
241
+ Youssef Mroueh, Stephen Voinea, and Tomaso A Poggio. Learning with group invariant features: A kernel perspective. In Advances in Neural Information Processing Systems, pp. 1558–1566, 2015.
242
+
243
+ XuanLong Nguyen, Martin J Wainwright, and Michael I Jordan. Estimating divergence functionals and the likelihood ratio by convex risk minimization. IEEE Transactions on Information Theory, 56(11):5847–5861, 2010.
244
+
245
+ Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016.
246
+
247
+ Anant Raj, Abhishek Kumar, Youssef Mroueh, P Thomas Fletcher, and Bernhard Schlkopf. Local group invariant representations via orbit embeddings. In AISTATS, 2017.
248
+
249
+ Scott Reed, Kihyuk Sohn, Yuting Zhang, and Honglak Lee. Learning to disentangle factors of variation with manifold interaction. In International Conference on Machine Learning, pp. 1431– 1439, 2014.
250
+
251
+ Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014.
252
+
253
+ Karl Ridgeway. A survey of inductive biases for factorial representation-learning. arXiv preprint arXiv:1612.05299, 2016.
254
+
255
+ Jurgen Schmidhuber. Learning factorial codes by predictability minimization. Neural computation, 4 (6):863–879, 1992.
256
+
257
+ Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, 2012.
258
+
259
+ N Siddharth, Brooks Paige, Van de Meent, Alban Desmaison, Frank Wood, Noah D Goodman, Pushmeet Kohli, Philip HS Torr, et al. Learning disentangled representations with semi-supervised deep generative models. arXiv preprint arXiv:1706.00400, 2017.
260
+
261
+ Bharath K Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Scholkopf, and Gert RG ¨ Lanckriet. On integral probability metrics,\phi-divergences and binary classification. arXiv preprint arXiv:0901.2698, 2009.
262
+
263
+ Andreas Stuhlmuller, Jacob Taylor, and Noah Goodman. Learning stochastic inverses. In ¨ Advances in neural information processing systems, pp. 3048–3056, 2013.
264
+ Tim Van Erven and Peter Harremos. Renyi divergence and kullback-leibler divergence. ´ IEEE Transactions on Information Theory, 60(7):3797–3820, 2014.
265
+ William F Whitney, Michael Chang, Tejas Kulkarni, and Joshua B Tenenbaum. Understanding visual concepts with continuation learning. arXiv preprint arXiv:1602.06822, 2016.
266
+ Jimei Yang, Scott E Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In Advances in Neural Information Processing Systems, pp. 1099–1107, 2015.
267
+ Shengjia Zhao, Jiaming Song, and Stefano Ermon. Towards deeper understanding of variational autoencoding models. arXiv preprint arXiv:1702.08658, 2017.
268
+
269
+ # Appendix
270
+
271
+ # A LATENT TRAVERSALS FOR 2D SHAPES AND CHAIRS DATASET
272
+
273
+ ![](images/8c949aad3501c5661a1b6210c932cabe8e039fbe08187d805d3fd5c79d912e2f.jpg)
274
+ Figure 5: Qualitative results for disentanglement in CelebA dataset.
275
+
276
+ ![](images/50a59c9cf7078fc5c6f29d794697ba9e200a196a325a4ba4e235dc87b8f33e13.jpg)
277
+ Figure 6: Qualitative results for disentanglement in Chairs dataset.
parse/train/H1kG7GZAW/H1kG7GZAW_content_list.json ADDED
@@ -0,0 +1,1485 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "VARIATIONAL INFERENCE OF DISENTANGLED LATENTCONCEPTS FROM UNLABELED OBSERVATIONS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 98,
9
+ 820,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Abhishek Kumar, Prasanna Sattigeri, Avinash Balakrishnan ",
17
+ "bbox": [
18
+ 184,
19
+ 169,
20
+ 604,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "IBM Research AI \nYorktown Heights, NY \n{abhishk,psattig,avinash.bala}@us.ibm.com ",
28
+ "bbox": [
29
+ 184,
30
+ 185,
31
+ 589,
32
+ 226
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 262,
43
+ 544,
44
+ 277
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Disentangled representations, where the higher level data generative factors are reflected in disjoint latent dimensions, offer several benefits such as ease of deriving invariant representations, transferability to other tasks, interpretability, etc. We consider the problem of unsupervised learning of disentangled representations from large pool of unlabeled observations, and propose a variational inference based approach to infer disentangled latent factors. We introduce a regularizer on the expectation of the approximate posterior over observed data that encourages the disentanglement. We also propose a new disentanglement metric which is better aligned with the qualitative disentanglement observed in the decoder’s output. We empirically observe significant improvement over existing methods in terms of both disentanglement and data likelihood (reconstruction quality). ",
51
+ "bbox": [
52
+ 233,
53
+ 295,
54
+ 764,
55
+ 449
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 479,
66
+ 336,
67
+ 496
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Feature representations of the observed raw data play a crucial role in the success of machine learning algorithms. Effective representations should be able to capture the underlying (abstract or high-level) latent generative factors that are relevant for the end task while ignoring the inconsequential or nuisance factors. Disentangled feature representations have the property that the generative factors are revealed in disjoint subsets of the feature dimensions, such that a change in a single generative factor causes a highly sparse change in the representation. Disentangled representations offer several advantages – (i) Invariance: it is easier to derive representations that are invariant to nuisance factors by simply marginalizing over the corresponding dimensions, (ii) Transferability: they are arguably more suitable for transfer learning as most of the key underlying generative factors appear segregated along feature dimensions, (iii) Interpretability: a human expert may be able to assign meanings to the dimensions, $( i \\nu )$ Conditioning and intervention: they allow for interpretable conditioning and/or intervention over a subset of the latents and observe the effects on other nodes in the graph. Indeed, the importance of learning disentangled representations has been argued in several recent works (Bengio et al., 2013; Lake et al., 2016; Ridgeway, 2016). ",
74
+ "bbox": [
75
+ 174,
76
+ 513,
77
+ 825,
78
+ 707
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Recognizing the significance of disentangled representations, several attempts have been made in this direction in the past (Ridgeway, 2016). Much of the earlier work assumes some sort of supervision in terms of: (i) partial or full access to the generative factors per instance (Reed et al., 2014; Yang et al., 2015; Kulkarni et al., 2015; Karaletsos et al., 2015), (ii) knowledge about the nature of generative factors (e.g, translation, rotation, etc.) (Hinton et al., 2011; Cohen & Welling, 2014), (iii) knowledge about the changes in the generative factors across observations (e.g., sparse changes in consecutive frames of a Video) (Goroshin et al., 2015; Whitney et al., 2016; Fraccaro et al., 2017; Denton & Birodkar, 2017; Hsu et al., 2017), (iv) knowledge of a complementary signal to infer representations that are conditionally independent of it1 (Cheung et al., 2014; Mathieu et al., 2016; Siddharth et al., 2017). However, in most real scenarios, we only have access to raw observations without any supervision about the generative factors. It is a challenging problem and many of the earlier attempts have not been able to scale well for realistic settings (Schmidhuber, 1992; Desjardins et al., 2012; Cohen & Welling, 2015) (see also, Higgins et al. (2017)). ",
85
+ "bbox": [
86
+ 174,
87
+ 714,
88
+ 825,
89
+ 895
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Recently, Chen et al. (2016) proposed an approach to learn a generative model with disentangled factors based on Generative Adversarial Networks (GAN) (Goodfellow et al., 2014), however implicit generative models like GANs lack an effective inference mechanism2, which hinders its applicability to the problem of learning disentangled representations. More recently, Higgins et al. (2017) proposed an approach based on Variational AutoEncoder (VAE) Kingma & Welling (2013) for inferring disentangled factors. The inferred latents using their method (termed as $\\beta$ -VAE ) are empirically shown to have better disentangling properties, however the method deviates from the basic principles of variational inference, creating increased tension between observed data likelihood and disentanglement. This in turn leads to poor quality of generated samples as observed in (Higgins et al., 2017). ",
96
+ "bbox": [
97
+ 173,
98
+ 103,
99
+ 825,
100
+ 242
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this work, we propose a principled approach for inference of disentangled latent factors based on the popular and scalable framework of amortized variational inference (Kingma & Welling, 2013; Stuhlmuller et al., 2013; Gershman & Goodman, 2014; Rezende et al., 2014) powered by stochastic ¨ optimization (Hoffman et al., 2013; Kingma & Welling, 2013; Rezende et al., 2014). Disentanglement is encouraged by introducing a regularizer over the induced inferred prior. Unlike $\\beta$ -VAE (Higgins et al., 2017), our approach does not introduce any extra conflict between disentanglement of the latents and the observed data likelihood, which is reflected in the overall quality of the generated samples that matches the VAE and is much better than $\\beta$ -VAE. This does not come at the cost of higher entanglement and our approach also outperforms $\\beta$ -VAE in disentangling the latents as measured by various quantitative metrics. We also propose a new disentanglement metric, called Separated Attribute Predictability or SAP, which is better aligned with the qualitative disentanglement observed in the decoder’s output compared to the existing metrics. ",
107
+ "bbox": [
108
+ 173,
109
+ 250,
110
+ 825,
111
+ 416
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "2 FORMULATION ",
118
+ "text_level": 1,
119
+ "bbox": [
120
+ 176,
121
+ 436,
122
+ 331,
123
+ 452
124
+ ],
125
+ "page_idx": 1
126
+ },
127
+ {
128
+ "type": "text",
129
+ "text": "We start with a generative model of the observed data that first samples a latent variable $\\mathbf { z } \\sim p ( \\mathbf { z } )$ , and an observation is generated by sampling from $p _ { \\boldsymbol { \\theta } } ( \\mathbf { x } | \\mathbf { z } )$ . The joint density of latents and observations is denoted as $p _ { \\theta } ( \\mathbf { \\bar { x } } , \\mathbf { z } ) = p ( \\mathbf { \\bar { z } } ) p _ { \\theta } ( \\mathbf { \\bar { x } } | \\mathbf { z } )$ . The problem of inference is to compute the posterior of the latents conditioned on the observations, i.e., $\\begin{array} { r } { p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) = \\frac { p _ { \\theta } ( \\mathbf { x } , \\mathbf { z } ) } { \\int p _ { \\theta } ( \\mathbf { x } , \\mathbf { z } ) d \\mathbf { z } } } \\end{array}$ . We assume that we are given a finite set of samples (observations) from the true data distribution $p ( \\mathbf { x } )$ . In most practical scenarios involving high dimensional and complex data, this computation is intractable and calls for approximate inference. Variational inference takes an optimization based approach to this, positing a family $\\mathcal { D }$ of approximate densities over the latents and reducing the approximate inference problem to finding a member density that minimizes the Kullback-Leibler divergence to the true posterior, i.e., $\\begin{array} { r } { q _ { \\mathbf { x } } ^ { * } = \\operatorname* { m i n } _ { \\boldsymbol { q } \\in \\mathcal { D } } \\mathrm { K L } ( q ( \\mathbf { z } ) \\bar { | | } p _ { \\boldsymbol { \\theta } } ( \\mathbf { z } | \\mathbf { x } ) ) } \\end{array}$ (Blei et al., 2017). The idea of amortized inference (Kingma & Welling, 2013; Stuhlmuller et al., 2013; Gershman & Goodman, 2014; Rezende et al., 2014) is ¨ to explicitly share information across inferences made for each observation. One successful way of achieving this for variational inference is to have a so-called recognition model, parameterized by $\\phi$ , that encodes an inverse map from the observations to the approximate posteriors (also referred as variational autoencoder or VAE) (Kingma & Welling, 2013; Rezende et al., 2014). The recognition model parameters are learned by optimizing the problem $\\begin{array} { r } { \\operatorname* { m i n } _ { \\phi } \\mathbb { E } _ { \\mathbf { x } } \\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) | | p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) ) } \\end{array}$ , where the outer expectation is over the true data distribution $p ( \\mathbf { x } )$ which we have samples from. This can be shown as equivalent to maximizing what is termed as evidence lower bound (ELBO): ",
130
+ "bbox": [
131
+ 173,
132
+ 467,
133
+ 825,
134
+ 724
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "equation",
140
+ "img_path": "images/ca9df8a49abfa8292364b86791070f0e99923b558ae5b7e136144616f1293d89.jpg",
141
+ "text": "$$\n\\underset { \\theta , \\phi } { \\mathrm { a r g } \\mathrm { m i n } } \\mathbb { E } _ { \\mathbf { x } } \\mathbf { K } \\mathbf { L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) ) = \\underset { \\theta , \\phi } { \\mathrm { a r g } \\mathrm { m a x } } \\mathbb { E } _ { \\mathbf { x } } \\left[ \\mathbb { E } _ { \\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } \\left[ \\log p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } ) \\right] - \\mathbf { K } \\mathbf { L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p ( \\mathbf { z } ) ) \\right]\n$$",
142
+ "text_format": "latex",
143
+ "bbox": [
144
+ 166,
145
+ 729,
146
+ 807,
147
+ 757
148
+ ],
149
+ "page_idx": 1
150
+ },
151
+ {
152
+ "type": "text",
153
+ "text": "The ELBO (the objective at the right side of Eq. 1) lower bounds the log-likelihood of observed data, and the gap vanishes at the global optimum. Often, the density forms of $p ( \\mathbf { z } )$ and $q _ { \\phi } ( { \\bf z } | { \\bf x } )$ are chosen such that their KL-divergence can be written analytically in a closed-form expression (e.g., $p ( \\mathbf { z } )$ is $N ( 0 , I )$ and $q _ { \\phi } ( { \\bf z } | { \\bf x } )$ is $\\bar { N } ( \\mu _ { \\phi } ( { \\bf x } ) , \\Sigma _ { \\phi } ( { \\bf x } ) ) )$ (Kingma & Welling, 2013). In such cases, the ELBO can be efficiently optimized (to a stationary point) using stochastic first order methods where both expectations are estimated using mini-batches. Further, in cases when $q _ { \\phi } ( \\cdot )$ can be written as a continuous transformation of a fixed base distribution (e.g., the standard normal distribution), a low variance estimate of the gradient over $\\phi$ can be obtained by coordinate transformation (also referred as reparametrization) (Fu, 2006; Kingma & Welling, 2013; Rezende et al., 2014). ",
154
+ "bbox": [
155
+ 173,
156
+ 777,
157
+ 825,
158
+ 876
159
+ ],
160
+ "page_idx": 1
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "",
165
+ "bbox": [
166
+ 171,
167
+ 103,
168
+ 825,
169
+ 132
170
+ ],
171
+ "page_idx": 2
172
+ },
173
+ {
174
+ "type": "text",
175
+ "text": "2.1 GENERATIVE STORY: DISENTANGLED PRIOR",
176
+ "text_level": 1,
177
+ "bbox": [
178
+ 174,
179
+ 150,
180
+ 519,
181
+ 164
182
+ ],
183
+ "page_idx": 2
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Most VAE based generative models for real datasets (e.g., text, images, etc.) already work with a relatively simple and disentangled prior $p ( \\mathbf { z } )$ having no interaction among the latent dimensions (e.g., the standard Gaussian $N ( 0 , I ) ,$ ) (Bowman et al., 2015; Miao et al., 2016; Hou et al., 2017; Zhao et al., 2017). The complexity of the observed data is absorbed in the conditional distribution $p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } )$ which encodes the interactions among the latents. Hence, as far as the generative modeling is concerned, disentangled prior sets us in the right direction. ",
188
+ "bbox": [
189
+ 173,
190
+ 174,
191
+ 826,
192
+ 258
193
+ ],
194
+ "page_idx": 2
195
+ },
196
+ {
197
+ "type": "text",
198
+ "text": "2.2 INFERRING DISENTANGLED LATENTS",
199
+ "text_level": 1,
200
+ "bbox": [
201
+ 178,
202
+ 275,
203
+ 472,
204
+ 290
205
+ ],
206
+ "page_idx": 2
207
+ },
208
+ {
209
+ "type": "text",
210
+ "text": "Although the generative model starts with a disentangled prior, our main objective is to infer disentangled latents which are potentially conducive for various goals mentioned in Sec. 1 (e.g., invariance, transferability, interpretability). To this end, we consider the density over the inferred latents induced by the approximate posterior inference mechanism, ",
211
+ "bbox": [
212
+ 173,
213
+ 301,
214
+ 826,
215
+ 357
216
+ ],
217
+ "page_idx": 2
218
+ },
219
+ {
220
+ "type": "equation",
221
+ "img_path": "images/1342d02c4b9cce34714d8b980668dba9dd1eefe3fd0699e77cdd93acd68576b6.jpg",
222
+ "text": "$$\nq _ { \\phi } ( \\mathbf { z } ) = \\int q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) p ( \\mathbf { x } ) d \\mathbf { x } ,\n$$",
223
+ "text_format": "latex",
224
+ "bbox": [
225
+ 405,
226
+ 363,
227
+ 591,
228
+ 396
229
+ ],
230
+ "page_idx": 2
231
+ },
232
+ {
233
+ "type": "text",
234
+ "text": "which we will subsequently refer to as the inferred prior or expected variational posterior ${ \\bf \\nabla } ( p ( { \\bf x } )$ is the true data distribution that we have only samples from). For inferring disentangled factors, this should be factorizable along the dimensions, i.e., $\\begin{array} { r } { q _ { \\phi } ( \\mathbf { z } ) = \\prod _ { i } q _ { i } ( z _ { i } ) } \\end{array}$ , or equivalently $q _ { i \\mid j } ( z _ { i } | z _ { j } ) =$ $q _ { i } ( z _ { i } ) , \\forall i , j$ . This can be achieved by minimizing a suitable distance between the inferred prior $q _ { \\phi } ( \\mathbf { z } )$ and the disentangled generative prior $p ( \\mathbf { z } )$ . We can also define expected posterior as $p _ { \\boldsymbol { \\theta } } ( \\mathbf { z } ) =$ $\\begin{array} { r } { \\int p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) p ( \\mathbf { x } ) d \\mathbf { x } } \\end{array}$ . If we take KL-divergence as our choice of distance, by relying on its pairwise convexity (i.e., $\\mathrm { K L } ( \\lambda p _ { 1 } + ( 1 - \\lambda ) p _ { 2 } | | \\lambda q _ { 1 } + ( 1 - \\lambda ) q _ { 2 } ) \\le \\lambda \\mathrm { K L } ( p _ { 1 } | | q _ { 1 } ) + ( 1 - \\lambda ) \\mathrm { K L } ( p _ { 2 } | | q _ { 2 } ) )$ (Van Erven & Harremos, 2014), we can show that the distance between $q _ { \\phi } ( \\mathbf { z } )$ and $p _ { \\boldsymbol { \\theta } } ( \\mathbf { z } )$ is bounded by the objective of the variational inference: ",
235
+ "bbox": [
236
+ 173,
237
+ 401,
238
+ 825,
239
+ 529
240
+ ],
241
+ "page_idx": 2
242
+ },
243
+ {
244
+ "type": "equation",
245
+ "img_path": "images/02f075d539921ffa7ecf350d503db0de55faadec751edd8efd3523efee7382f7.jpg",
246
+ "text": "$$\n\\begin{array} { r } { \\mathrm { K L } \\big ( q _ { \\phi } ( \\mathbf { z } ) \\| p _ { \\theta } ( \\mathbf { z } ) \\big ) = \\mathrm { K L } \\big ( \\mathbb { E } _ { \\mathbf { x } \\sim p ( \\mathbf { x } ) } q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\big ) \\| \\mathbb { E } _ { \\mathbf { x } \\sim p ( \\mathbf { x } ) } p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) \\big ) \\leq \\mathbb { E } _ { \\mathbf { x } \\sim p ( \\mathbf { x } ) } \\mathrm { K L } \\big ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) \\big ) . } \\end{array}\n$$",
247
+ "text_format": "latex",
248
+ "bbox": [
249
+ 186,
250
+ 534,
251
+ 810,
252
+ 553
253
+ ],
254
+ "page_idx": 2
255
+ },
256
+ {
257
+ "type": "text",
258
+ "text": "In general, the prior $p ( \\mathbf { z } )$ and expected posterior $p _ { \\boldsymbol { \\theta } } ( \\mathbf { z } )$ will be different, although they may be close (they will be same when $\\begin{array} { r } { p _ { \\theta } ( \\mathbf { x } ) \\overset { \\cdot } { = } \\int p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } ) p ( \\mathbf { z } ) d \\mathbf { z } } \\end{array}$ is equal to $p ( \\mathbf { x } ) .$ ). Hence, variational posterior inference of latent variables with disentangled prior naturally encourages inferring factors that are close to being disentangled. We think this is the reason that the original VAE (Eq. (1)) has also been observed to exhibit some disentangling behavior on simple datasets such as MNIST (Kingma $\\&$ Welling, 2013). However, this behavior does not carry over to more complex datasets (Aubry et al., 2014; Liu et al., 2015; Higgins et al., 2017), unless extra supervision on the generative factors is provided (Kulkarni et al., 2015; Karaletsos et al., 2015). This can be due to: (i) $p ( \\mathbf { x } )$ and $p _ { \\theta } ( \\mathbf { x } )$ being far apart which in turn causes $p ( \\mathbf { z } )$ and $p _ { \\boldsymbol { \\theta } } ( \\mathbf { z } )$ being far apart, and (ii) the non-convexity of the ELBO objective which prevents us from achieving the global minimum of $\\mathbb { E } _ { \\mathbf { x } } \\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) )$ (which is 0 and implies $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) | | p _ { \\theta } ( \\mathbf { z } ) ) = 0 )$ . In other words, maximizing the ELBO (Eq. (1)) might also result in reducing the value of $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ , however, due to the aforementioned reasons, the gap between $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ and $\\mathbb { E } _ { \\mathbf { x } } \\ K \\ L ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) )$ could be large at the stationary point of convergence. Hence, minimizing $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ or any other suitable distance $D ( q _ { \\phi } ( \\mathbf { z } ) , p ( \\mathbf { z } ) )$ explicitly will give us better control on the disentanglement. This motivates us to add $D ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ as part of the objective to encourage disentanglement during inference, i.e., ",
259
+ "bbox": [
260
+ 173,
261
+ 573,
262
+ 825,
263
+ 796
264
+ ],
265
+ "page_idx": 2
266
+ },
267
+ {
268
+ "type": "equation",
269
+ "img_path": "images/818908863d9504e7c19063452416911d5597608dcc558010230f221eddc31416.jpg",
270
+ "text": "$$\n\\operatorname* { m a x } _ { \\theta , \\phi } \\mathbb { E } _ { \\mathbf { x } } \\left[ \\mathbb { E } _ { \\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } \\left[ \\log p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } ) \\right] - \\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p ( \\mathbf { z } ) ) \\right] - \\lambda D ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) ) ,\n$$",
271
+ "text_format": "latex",
272
+ "bbox": [
273
+ 240,
274
+ 801,
275
+ 754,
276
+ 827
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "where $\\lambda$ controls its contribution to the overall objective. We refer to this as DIP-VAE (for Disentangled Inferred Prior) subsequently. ",
283
+ "bbox": [
284
+ 174,
285
+ 832,
286
+ 823,
287
+ 861
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "text",
293
+ "text": "Optimizing (4) directly is not tractable if $D ( \\cdot , \\cdot )$ is taken to be the KL-divergence $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ , which does not have a closed-form expression. One possibility is use the variational formulation of the KL-divergence (Nguyen et al., 2010; Nowozin et al., 2016) that needs only samples from $q _ { \\phi } ( \\mathbf { z } )$ and $p ( \\mathbf { z } )$ to estimate a lower bound to $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ . However, this would involve optimizing for a third set of parameters $\\psi$ for the KL-divergence estimator, and would also change the optimization to a saddle-point (min-max) problem which has its own optimization challenges (e.g., gradient vanishing as encountered in training generative adversarial networks with KL or Jensen-Shannon (JS) divergences (Goodfellow et al., 2014; Arjovsky & Bottou, 2017)). Taking $D$ to be another suitable distance between $q _ { \\phi } ( \\mathbf { z } )$ and $p ( \\mathbf { z } )$ (e.g., integral probability metrics like Wasserstein distance (Sriperumbudur et al., 2009)) might alleviate some of these issues (Arjovsky et al., 2017) but will still involve complicating the optimization to a saddle point problem in three set of parameters3. It should also be noted that using these variational forms of the distances will still leave us with an approximation to the actual distance. ",
294
+ "bbox": [
295
+ 174,
296
+ 867,
297
+ 825,
298
+ 925
299
+ ],
300
+ "page_idx": 2
301
+ },
302
+ {
303
+ "type": "text",
304
+ "text": "",
305
+ "bbox": [
306
+ 173,
307
+ 103,
308
+ 825,
309
+ 229
310
+ ],
311
+ "page_idx": 3
312
+ },
313
+ {
314
+ "type": "text",
315
+ "text": "We adopt a simpler yet effective alternative of matching the moments of the two distributions. Matching the covariance of the two distributions will amount to decorrelating the dimensions of $\\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } )$ if $p ( \\mathbf { z } )$ is $N ( 0 , I )$ . Let us denote $\\begin{array} { r } { \\mathrm { C o v } _ { q ( \\mathbf { z } ) } [ \\mathbf { z } ] : = \\mathbb { E } _ { q ( \\mathbf { z } ) } \\left[ ( \\mathbf { z } - \\mathbb { E } _ { q ( \\mathbf { z } ) } [ \\mathbf { \\breve { z } } ] ) ( \\mathbf { z } - \\mathbb { E } _ { q [ \\mathbf { z } ] } ( \\mathbf { z } ) ) ^ { \\top } \\right] } \\end{array}$ . By the law of total covariance, the covariance of $\\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } )$ is given by ",
316
+ "bbox": [
317
+ 174,
318
+ 236,
319
+ 826,
320
+ 294
321
+ ],
322
+ "page_idx": 3
323
+ },
324
+ {
325
+ "type": "equation",
326
+ "img_path": "images/4d7e7ff63e84a0951976eaffb5ef78c9ecf69e6651e0894d17ab84173a5fc92c.jpg",
327
+ "text": "$$\n\\mathrm { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { z } ] = \\mathbb { E } _ { p ( \\mathbf { x } ) } \\mathrm { C o v } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } [ \\mathbf { z } ] + \\mathrm { C o v } _ { p ( \\mathbf { x } ) } \\left( \\mathbb { E } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } [ \\mathbf { z } ] \\right) ,\n$$",
328
+ "text_format": "latex",
329
+ "bbox": [
330
+ 302,
331
+ 297,
332
+ 694,
333
+ 316
334
+ ],
335
+ "page_idx": 3
336
+ },
337
+ {
338
+ "type": "text",
339
+ "text": "where $\\mathbb { E } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } [ \\mathbf { z } ]$ and $\\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } [ \\mathbf { z } ]$ are random variables that are functions of the random variable $\\mathbf { x }$ $\\mathbf { z }$ is marginalized over). Most existing work on the VAE models uses $q _ { \\phi } ( { \\bf z } | { \\bf x } )$ having the form ${ \\cal N } ( { \\pmb \\mu } _ { \\phi } ( { \\bf x } ) , { \\pmb \\Sigma } _ { \\phi } ( { \\bf x } ) )$ , where $\\mu _ { \\phi } ( \\mathbf { x } )$ and $\\Sigma _ { \\phi } ( \\mathbf { x } )$ are the outputs of a deep neural net parameterized by $\\phi$ . In this case Eq. (5) reduces to $\\mathrm { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { \\bar { z } } ] = \\mathbb { E } _ { p ( \\mathbf { x } ) } [ \\bar { \\Sigma } _ { \\phi } ( \\mathbf { x } ) ] + \\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ , which we want to be close to the Identity matrix. For simplicity, we choose entry-wise squared $\\ell _ { 2 }$ -norm as the measure of proximity. Further, $\\Sigma _ { \\phi } ( \\mathbf { x } )$ is commonly taken to be a diagonal matrix which means that cross-correlations (off-diagonals) between the latents are due to only $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ . This suggests two possible options for the disentangling regularizer: (i) regularizing only $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ which we refer as DIP-VAE-I, (ii) regularizing $\\mathrm { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { z } ]$ which we refer as DIP-VAE-II. Penalizing just the off-diagonals in both cases will lead to lowering the diagonal entries of $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ as the $i j \"$ ’th off-diagonal is really a derived attribute obtained by multiplying the square-roots of $\\overrightarrow { \\imath } ^ { \\prime }$ ’th and $j ^ { ; }$ ’th diagonals (for each example $\\mathbf { x } \\sim p ( \\mathbf { x } )$ , followed by averaging over all examples). This can be compensated in DIP-VAE-I by a regularizer on the diagonal entries of $\\mathbf { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ which pulls these towards 1. We opt for two separate hyperparameters controlling the relative importance of the loss on the diagonal and off-diagonal entries as follows: ",
340
+ "bbox": [
341
+ 173,
342
+ 319,
343
+ 825,
344
+ 534
345
+ ],
346
+ "page_idx": 3
347
+ },
348
+ {
349
+ "type": "equation",
350
+ "img_path": "images/b4935586a4a27e9f633b7702178c3dbaf97f6b06712e7294bfdf6177c0a63388.jpg",
351
+ "text": "$$\n\\operatorname* { m a x } _ { \\theta , \\phi } \\mathrm { E L B O } ( \\theta , \\phi ) - \\lambda _ { o d } \\sum _ { i \\neq j } \\left[ \\mathrm { C o v } _ { p ( \\mathbf { x } ) } { [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ] } \\right] _ { i j } ^ { 2 } - \\lambda _ { d } \\sum _ { i } \\left( \\left[ \\mathrm { C o v } _ { p ( \\mathbf { x } ) } { [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ] } \\right] _ { i i } - 1 \\right) ^ { 2 } .\n$$",
352
+ "text_format": "latex",
353
+ "bbox": [
354
+ 199,
355
+ 536,
356
+ 779,
357
+ 571
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "The regularization terms involving $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ in the above objective (6) can be efficiently optimized using SGD, where $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ can be estimated using the current minibatch4. ",
364
+ "bbox": [
365
+ 173,
366
+ 574,
367
+ 830,
368
+ 608
369
+ ],
370
+ "page_idx": 3
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "For DIP-VAE-II, we have the following optimization problem: ",
375
+ "bbox": [
376
+ 173,
377
+ 613,
378
+ 583,
379
+ 627
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "equation",
385
+ "img_path": "images/559b84644fcd01fc0279af45cd24bbed02f81cfe6fd95133fdf6d22bbb298f79.jpg",
386
+ "text": "$$\n\\operatorname* { m a x } _ { \\theta , \\phi } \\mathrm { E L B O } ( \\theta , \\phi ) - \\lambda _ { o d } \\sum _ { i \\neq j } \\left[ \\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { z } ] \\right] _ { i j } ^ { 2 } - \\lambda _ { d } \\sum _ { i } \\left( \\left[ \\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { z } ] \\right] _ { i i } - 1 \\right) ^ { 2 } .\n$$",
387
+ "text_format": "latex",
388
+ "bbox": [
389
+ 235,
390
+ 631,
391
+ 761,
392
+ 670
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "As discussed earlier, the term $\\mathbb { E } _ { p ( \\mathbf { x } ) } \\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } [ \\mathbf { z } ]$ contributes only to the diagonals of $\\mathrm { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } [ \\mathbf { z } ]$ Penalizing the off-diagonals of $\\mathrm { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ in the Objective (7) will contribute to reduction in the magnitude of its diagonals as discussed earlier. As the regularizer on the diagonals is not directly on $\\mathsf { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ]$ , unlike DIP-VAE-I, it will be not be able to keep $[ \\mathbf { C o v } _ { p ( \\mathbf { x } ) } [ \\bar { \\pmb { \\mu } } _ { \\phi } ( \\mathbf { x } ) ] ] _ { i i }$ close to 1: the reduction in $[ \\mathbf { C o v } _ { p ( \\mathbf { x } ) } [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ] ] _ { i i }$ will be accompanied by increase in $[ \\mathbb { E } _ { p ( \\mathbf { x } ) } \\pmb { \\Sigma } _ { \\phi } ( \\mathbf { x } ) ] _ { i i }$ such that their sum remains close to 1. In datasets where the number of generative factors is less than the latent dimension, DIP-VAE-II is more suitable than DIP-VAE-I as keeping all dimensions active might result in splitting of an attribute across multiple dimensions, hurting the goal of disentanglement. ",
399
+ "bbox": [
400
+ 173,
401
+ 671,
402
+ 825,
403
+ 787
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "It is also possible to match higher order central moments of $q _ { \\phi } ( \\mathbf { z } )$ and the prior $p ( \\mathbf { z } )$ . In particular, third order central moments (and moments) of the zero mean Gaussian prior are zero, hence $\\ell _ { 2 }$ norm of third order central moments of $q _ { \\phi } ( \\mathbf { z } )$ can be penalized. ",
410
+ "bbox": [
411
+ 174,
412
+ 794,
413
+ 825,
414
+ 837
415
+ ],
416
+ "page_idx": 3
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "2.3 COMPARISON WITH $\\beta$ -VAE ",
421
+ "text_level": 1,
422
+ "bbox": [
423
+ 176,
424
+ 103,
425
+ 405,
426
+ 118
427
+ ],
428
+ "page_idx": 4
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "Recently proposed $\\beta$ -VAE (Higgins et al., 2017) proposes to modify the ELBO by upweighting the $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) \\| p ( \\mathbf { z } ) )$ term in order to encourage the inference of disentangled factors: ",
433
+ "bbox": [
434
+ 171,
435
+ 128,
436
+ 823,
437
+ 159
438
+ ],
439
+ "page_idx": 4
440
+ },
441
+ {
442
+ "type": "equation",
443
+ "img_path": "images/2ecf7fff76b7ff9323f70aafd16f26b0db4d70189736e93114b679ebe9df768e.jpg",
444
+ "text": "$$\n\\begin{array} { r l } & { \\underset { \\theta , \\phi } { \\operatorname* { m a x } } \\ : \\mathbb { E } _ { \\mathbf { x } } \\left[ \\mathbb { E } _ { \\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } \\left[ \\log p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } ) \\right] - \\beta \\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) | | p ( \\mathbf { z } ) ) \\right] , } \\end{array}\n$$",
445
+ "text_format": "latex",
446
+ "bbox": [
447
+ 300,
448
+ 164,
449
+ 694,
450
+ 189
451
+ ],
452
+ "page_idx": 4
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "where $\\beta$ is taken to be great than 1. Higher $\\beta$ is argued to encourage disentanglement at the cost of reconstruction error (the likelihood term in the ELBO). Authors report empirical results with $\\beta$ ranging from 4 to 250 depending on the dataset. As already mentioned, most VAE models proposed in the literature, including $\\beta$ -VAE, work with ${ \\cal N } ( { \\bf 0 } , { \\bf I } )$ as the prior $p ( \\mathbf { z } )$ and ${ \\cal N } ( { \\pmb \\mu } _ { \\phi } ( { \\bf x } ) , { \\pmb \\Sigma } _ { \\phi } ( { \\bf \\bar { x } } ) ) ^ { \\hat { } }$ with diagonal $\\Sigma _ { \\phi } ( \\mathbf { x } )$ as the approximate posterior $q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } )$ . This reduces the objective (8) to ",
457
+ "bbox": [
458
+ 174,
459
+ 194,
460
+ 823,
461
+ 266
462
+ ],
463
+ "page_idx": 4
464
+ },
465
+ {
466
+ "type": "equation",
467
+ "img_path": "images/093fa857fa272a9a5ec4a391c8fa90682d8d02966c5556e7e21eb1680f122753.jpg",
468
+ "text": "$$\n\\operatorname* { m a x } _ { \\theta , \\phi } \\mathbb { E } _ { \\mathbf { x } } \\left[ \\mathbb { E } _ { \\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } \\left[ \\log p _ { \\theta } ( \\mathbf { x } | \\mathbf { z } ) \\right] - \\frac { \\beta } { 2 } \\left( \\sum _ { i } \\left( \\left[ \\boldsymbol { \\Sigma } _ { \\phi } ( \\mathbf { x } ) \\right] _ { i i } - \\ln \\left[ \\boldsymbol { \\Sigma } _ { \\phi } ( \\mathbf { x } ) \\right] _ { i i } \\right) + \\left\\| \\mu _ { \\phi } ( \\mathbf { x } ) \\right\\| _ { 2 } ^ { 2 } \\right) \\right] .\n$$",
469
+ "text_format": "latex",
470
+ "bbox": [
471
+ 187,
472
+ 270,
473
+ 789,
474
+ 314
475
+ ],
476
+ "page_idx": 4
477
+ },
478
+ {
479
+ "type": "text",
480
+ "text": "For high values of $\\beta$ , $\\beta$ -VAE would try to pull $\\mu _ { \\phi } ( \\mathbf { x } )$ towards zero and $\\Sigma _ { \\phi } ( \\mathbf { x } )$ towards the identity matrix (as the minimum of $x - \\ln x$ for $x > 0$ is at $x = 1$ ), thus making the approximate posterior $q _ { \\phi } ( { \\bf z } | { \\bf x } )$ insensitive to the observations. This is also reflected in the quality of the reconstructed samples which is worse than VAE $\\mathcal { B } = 1 \\dot { }$ ), particularly for high values of $\\beta$ . Our proposed method does not have such increased tension between the likelihood term and the disentanglement objective, and the sample quality with our method is on par with the VAE. ",
481
+ "bbox": [
482
+ 174,
483
+ 318,
484
+ 826,
485
+ 404
486
+ ],
487
+ "page_idx": 4
488
+ },
489
+ {
490
+ "type": "text",
491
+ "text": "Finally, we note that both $\\beta$ -VAE and our proposed method encourage disentanglement of inferred factors by pulling $\\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } ( \\mathbf { z } )$ in Eq. (5) towards the identity matrix: $\\beta$ -VAE attempts to do it by making $\\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } ( \\mathbf { z } )$ close to $\\mathbf { I }$ and $\\mathbb { E } _ { q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) } ( \\mathbf { z } )$ close to 0 individually for all observations $\\mathbf { x }$ , while the proposed method directly works on $\\mathbf { C o v } _ { q _ { \\phi } ( \\mathbf { z } ) } ( \\mathbf { z } )$ (marginalizing over the observations $\\mathbf { x }$ ) which retains the sensitivity of $q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } )$ to the conditioned-upon observation. ",
492
+ "bbox": [
493
+ 173,
494
+ 409,
495
+ 825,
496
+ 484
497
+ ],
498
+ "page_idx": 4
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "3 QUANTIFYING DISENTANGLEMENT: SAP SCORE ",
503
+ "text_level": 1,
504
+ "bbox": [
505
+ 174,
506
+ 503,
507
+ 611,
508
+ 520
509
+ ],
510
+ "page_idx": 4
511
+ },
512
+ {
513
+ "type": "text",
514
+ "text": "Higgins et al. (2017) propose a metric to evaluate the disentanglement performance of the inference mechanism, assuming that the ground truth generative factors are available. It works by first sampling a generative factor $y$ , followed by sampling $L$ pairs of examples such that for each pair, the sampled generative factor takes the same value. Given the inferred ${ \\bf z } _ { x } : = \\pmb { \\mu } _ { \\phi } ( { \\bf x } )$ for each example $\\mathbf { x }$ , they compute the absolute difference of these vectors for each pair, followed by averaging these difference vectors. This average difference vector is assigned the label of $y$ . By sampling $n$ such minibatches of $L$ pairs, we get $n$ such averaged difference vectors for the factor $y$ . This process is repeated for all generative factors. A low capacity multiclass classifier is then trained on these vectors to predict the identities of the corresponding generative factors. Accuracy of this classifier on the difference vectors for test set is taken to be a measure of disentanglement. We evaluate the proposed method on this metric and refer to this as Z-diff score subsequently. ",
515
+ "bbox": [
516
+ 173,
517
+ 535,
518
+ 825,
519
+ 689
520
+ ],
521
+ "page_idx": 4
522
+ },
523
+ {
524
+ "type": "text",
525
+ "text": "We observe in our experiments that the $\\boldsymbol { \\mathrm Z }$ -diff score (Higgins et al., 2017) is not correlated well with the qualitative disentanglement at the decoder’s output as seen in the latent traversal plots (obtained by varying only one latent while keeping the other latents fixed). It also depends on the multiclass classifier used to obtain the score. We propose a new metric, referred as Separated Attribute Predictability (SAP) score, that is better aligned with the qualitative disentanglement observed in the latent traversals and also does not involve training any classifier. It is computed as follows: (i) We first construct a $d \\times k$ score matrix $S$ (for $d$ latents and $k$ generative factors) whose $i j$ ’th entry is the linear regression or classification score (depending on the generative factor type) of predicting $j ^ { ; }$ ’th factor using only $i$ ’th latent $[ \\mu _ { \\phi } ( \\mathbf { x } ) ] _ { i }$ . For regression, we take this to be the $R ^ { 2 }$ score obtained with fitting a line (slope and intercept) that minimizes the linear regression error (for the test examples). The $R ^ { 2 }$ score is given by $\\left( \\frac { \\mathrm { C o v } ( [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ] _ { i } , \\mathbf { y } _ { j } ) } { \\sigma _ { [ \\pmb { \\mu } _ { \\phi } ( \\mathbf { x } ) ] _ { i } } \\sigma _ { \\mathbf { y } _ { j } } } \\right) ^ { \\frac { \\gamma } { 2 } }$ 2 and ranges from 0 to 1, with a score of 1 indicating that a linear function of the $i$ ’th inferred latent explains all variability in the $j ^ { \\dagger }$ ’th generative factor. For classification, we fit one or more thresholds (real numbers) directly on $i$ ’th inferred latents for the test examples that minimize the balanced classification errors, and take $S _ { i } j$ to be the balanced classification accuracy of the $j$ ’th generative factor. For inactive latent dimensions (having $\\sigma _ { [ { \\pmb \\mu } _ { \\phi } ( { \\bf x } ) ] _ { i } } = [ { \\bf C o v } _ { p ( x ) } [ { \\pmb \\mu } _ { \\phi } ( { \\bf x } ) ] ] _ { i i }$ close to 0), we take $S _ { i j }$ to be 0. (ii) For each column of the score matrix $S$ which corresponds to a generative factor, we take the difference of top two entries (corresponding to top two most predictive latent dimensions), and then take the mean of these differences as the final SAP score. Considering just the top scoring latent dimension for each generative factor is not enough as it does not rule out the possibility of the factor being captured by other latents. A high SAP score indicates that each generative factor is primarily captured in only one latent dimension. Note that a high SAP score does not rule out one latent dimension capturing two or more generative factors well, however in many cases this would be due to the generative factors themselves being correlated with each other, which can be verified empirically using ground truth values of the generative factors (when available). Further, a low SAP score does not rule out good disentanglement in cases when two (or more) latent dimensions might be correlated strongly with the same generative factor and poorly with other generative factors. The generated examples using single latent traversals may not be realistic for such models, and DIP-VAE discourages this from happening by enforcing decorrelation of the latents. However, the SAP score computation can be adapted to such cases by grouping the latent dimensions based on correlations and getting the score matrix at group level, which can be fed as input to the second step to get the final SAP score. ",
526
+ "bbox": [
527
+ 173,
528
+ 694,
529
+ 825,
530
+ 924
531
+ ],
532
+ "page_idx": 4
533
+ },
534
+ {
535
+ "type": "table",
536
+ "img_path": "images/081449a5485f9d2282ee426d43a1fded896158f66c543734ea82de9a35483bfd.jpg",
537
+ "table_caption": [
538
+ "Table $1 \\colon Z$ -diff score Higgins et al. (2017), the proposed SAP score and reconstruction error (per pixel) on the test sets for 2D Shapes and CelebA $( \\beta _ { 1 } = 4 , \\beta _ { 2 } = 6 0 , \\lambda = 1 0 , \\lambda _ { 1 } = 5 , \\lambda _ { 2 } = 5 0 0$ for 2D Shapes; $\\beta _ { 1 } = 4 , \\beta _ { 2 } = 3 2 , \\lambda = 2 , \\lambda _ { 1 } = 1 , \\lambda _ { 2 } = 8 0$ for CelebA). For the results on a wider range of hyperparameter values, refer to Fig. 1 and Fig. 2. "
539
+ ],
540
+ "table_footnote": [],
541
+ "table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">2D Shapes</td><td colspan=\"3\">CelebA</td></tr><tr><td>Z-diff</td><td>SAP</td><td>Reconst. error</td><td>Z-diff</td><td>SAP</td><td>Reconst. error</td></tr><tr><td>VAE</td><td>81.3</td><td>0.0417</td><td>0.0017</td><td>7.5</td><td>0.35</td><td>0.0876</td></tr><tr><td>β-VAE(β=β1)</td><td>80.7</td><td>0.0811</td><td>0.0032</td><td>8.1</td><td>0.48</td><td>0.0937</td></tr><tr><td>β-VAE(β=β2)</td><td>95.7</td><td>0.5503</td><td>0.0113</td><td>6.4</td><td>3.72</td><td>0.1572</td></tr><tr><td>DIP-VAE-I (入od = λ)</td><td>98.7</td><td>0.1889</td><td>0.0018</td><td>14.8</td><td>3.69</td><td>0.0904</td></tr><tr><td>DIP-VAE-II (λod = λ1)</td><td>95.3</td><td>0.2188</td><td>0.0023</td><td>7.1</td><td>2.94</td><td>0.0884</td></tr><tr><td>DIP-VAE-II (入od = λ2)</td><td>98.0</td><td>0.5253</td><td>0.0079</td><td>11.5</td><td>3.93</td><td>0.1477</td></tr></table>",
542
+ "bbox": [
543
+ 176,
544
+ 167,
545
+ 818,
546
+ 286
547
+ ],
548
+ "page_idx": 5
549
+ },
550
+ {
551
+ "type": "text",
552
+ "text": "",
553
+ "bbox": [
554
+ 174,
555
+ 315,
556
+ 825,
557
+ 539
558
+ ],
559
+ "page_idx": 5
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "4 EXPERIMENTS ",
564
+ "text_level": 1,
565
+ "bbox": [
566
+ 176,
567
+ 563,
568
+ 326,
569
+ 579
570
+ ],
571
+ "page_idx": 5
572
+ },
573
+ {
574
+ "type": "text",
575
+ "text": "We evaluate our proposed method, DIP-VAE, on three datasets – (i) CelebA (Liu et al., 2015): It consists of 202, 599 RGB face images of celebrities. We use $6 4 \\times 6 4 \\times 3$ cropped images as used in several earlier works, using $9 0 \\%$ for training and $1 0 \\%$ for test. (ii) 3D Chairs (Aubry et al., 2014): It consists of 1393 chair CAD models, with each model rendered from 31 azimuth angles and 2 elevation angles. Following earlier work (Yang et al., 2015; Dosovitskiy et al., 2015) that ignores near-duplicates, we use a subset of 809 chair models in our experiments. We use the binary masks of the chairs as the observed data in our experiments following (Higgins et al., 2017). First $8 0 \\%$ of the models are used for training and the rest are used for test. (iii) 2D Shapes (Matthey et al., 2017): This is a synthetic dataset of binary 2D shapes generated from the Cartesian product of the shape (heart, oval and square), $x$ -position (32 values), $y$ -position (32 values), scale (6 values) and rotation (40 values). We consider two baselines for the task of unsupervised inference of disentangled factors: (i) VAE (Kingma & Welling, 2013; Rezende et al., 2014), and (ii) the recently proposed $\\beta$ -VAE (Higgins et al., 2017). To be consistent with the evaluations in (Higgins et al., 2017), we use the same CNN network architectures (for our encoder and decoder), and same latent dimensions as used in (Higgins et al., 2017) for CelebA, 3D Chairs, 2D Shapes datasets. ",
576
+ "bbox": [
577
+ 174,
578
+ 597,
579
+ 825,
580
+ 805
581
+ ],
582
+ "page_idx": 5
583
+ },
584
+ {
585
+ "type": "text",
586
+ "text": "Hyperparameters. For the proposed DIP-VAE-I, in all our experiments we vary $\\lambda _ { o d }$ in the set $\\{ 1 , 2 , 5 , 1 0 , 2 0 , 5 0 , 1 0 0 , 5 0 0 \\}$ while fixing $\\lambda _ { d } = 1 0 \\lambda _ { o d }$ for 2D Shapes and 3D Chairs, and $\\lambda _ { d } =$ $5 0 \\lambda _ { o d }$ for CelebA. For DIP-VAE-II, we fix $\\lambda _ { o d } = \\lambda _ { d }$ for 2D Shapes, and $\\lambda _ { o d } = 2 \\lambda _ { d }$ for CelebA. Additionally, for DIP-VAE-II we also penalize the $\\ell _ { 2 }$ -norm of third order central moments of $q _ { \\phi } ( \\mathbf { z } )$ with hyperparameter $\\lambda _ { 3 } = 2 0 0$ for 2D Shapes data ( $\\lambda _ { 3 } = 0$ for CelebA). For $\\beta$ -VAE, we experiment with $\\beta = \\{ 1 , 2 , 4 , 8 , 1 6 , 2 5 , 3 2 , 6 4 , 1 0 0 , 1 2 8 , 2 0 0 , 2 5 6 \\}$ (where $\\beta = 1$ corresponds to the VAE). We used a batch size of 400 for all 2D Shapes experiments and 100 for all CelebA experiments. For both CelebA and 2D Shapes, we show the results in terms of the $\\textsf { Z }$ -diff score Higgins et al. (2017), the ",
587
+ "bbox": [
588
+ 174,
589
+ 811,
590
+ 825,
591
+ 924
592
+ ],
593
+ "page_idx": 5
594
+ },
595
+ {
596
+ "type": "image",
597
+ "img_path": "images/e32c59a3570dcc2ce5ec55bd6bdb3ead0a11623f13e8fdfb036f26f5234758ac.jpg",
598
+ "image_caption": [
599
+ "Figure 1: Proposed Separated Atomic Predictability (SAP) score and the Z-diff disentanglement score (Higgins et al., 2017) as a function of average reconstruction error (per pixel) on the test set of 2D Shapes data for $\\beta$ -VAE and the proposed DIP-VAE. The plots are generated by varying $\\beta$ for $\\beta$ -VAE, and $\\lambda _ { o d }$ for DIP-VAE-I and DIP-VAE-II (the number next to each point is the value of these hyperparameters, respectively). "
600
+ ],
601
+ "image_footnote": [],
602
+ "bbox": [
603
+ 200,
604
+ 102,
605
+ 794,
606
+ 443
607
+ ],
608
+ "page_idx": 6
609
+ },
610
+ {
611
+ "type": "text",
612
+ "text": "Table 2: Attribute classification accuracy on CelebA: A classifier $\\begin{array} { r } { \\mathbf { w } ^ { k } = \\frac { 1 } { | \\mathbf { x } _ { i } : y _ { i } ^ { k } = 1 | } \\sum _ { \\mathbf { x } _ { i } : y _ { i } ^ { k } = 1 } \\mu _ { \\phi } ( \\mathbf { x } _ { i } ) - } \\end{array}$ 1|xi:yk=0| Pxi:yki =0 µφ(xi) is computed for every attribute k using the training set and a bias is learned by minimizing the hinge loss. Accuracy on other attributes stays about same across all methods. ",
613
+ "bbox": [
614
+ 173,
615
+ 544,
616
+ 825,
617
+ 598
618
+ ],
619
+ "page_idx": 6
620
+ },
621
+ {
622
+ "type": "table",
623
+ "img_path": "images/5e667bee6843f88481d6031f968a4ed69d9f338d0e2f0aab910556f69399ab74.jpg",
624
+ "table_caption": [],
625
+ "table_footnote": [],
626
+ "table_body": "<table><tr><td>ponlen</td><td>AAaeergperors</td><td>Aeeie</td><td>ssueg</td><td>Jrraerr</td><td>Jrr puilg</td><td>dnarae faaeg</td><td>P</td><td>wndo ngrigr ginnn</td><td>PPed tr</td><td>J gaam</td><td>wr Biaea</td><td>VansiBegeer</td></tr><tr><td>VAE</td><td>71.8</td><td>73.0</td><td>89.8</td><td>78.0</td><td>88.9</td><td>79.6</td><td>83.9</td><td>76.3</td><td>87.3</td><td>70.2</td><td>95.8</td><td>83.0</td></tr><tr><td>β=2</td><td>71.6</td><td>72.6</td><td>90.6</td><td>79.3</td><td>89.1</td><td>79.3</td><td>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>β=4</td><td>71.6</td><td>72.6</td><td>90.0</td><td>76.6</td><td>88.9</td><td>77.8</td><td>82.3</td><td>75.7</td><td>85.3</td><td>66.8</td><td>95.8</td><td>80.6</td></tr><tr><td>β=8</td><td>71.6</td><td>71.7</td><td>90.0</td><td>76.0</td><td>87.2</td><td>76.2</td><td>80.5</td><td>73.1</td><td>85.3</td><td>63.7</td><td>95.8</td><td>79.6</td></tr><tr><td>DIP-VAE-I</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></table>",
627
+ "bbox": [
628
+ 173,
629
+ 609,
630
+ 825,
631
+ 790
632
+ ],
633
+ "page_idx": 6
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "proposed SAP score, and reconstruction error. For 3D Chairs data, only two ground truth generative factors are available and the quantitative scores for these are saturated near the peak values, hence we show only the latent traversal plots which we based on our subjective evaluation of the reconstruction quality and disentanglement (shown in Appendix). ",
638
+ "bbox": [
639
+ 174,
640
+ 818,
641
+ 825,
642
+ 875
643
+ ],
644
+ "page_idx": 6
645
+ },
646
+ {
647
+ "type": "text",
648
+ "text": "Disentanglement scores and reconstruction error. For the Z-diff score (Higgins et al., 2017), in all our experiments we use a one-vs-rest linear SVM with weight on the hinge loss $C$ set to 0.01 and weight on the regularizer set to 1. Table 1 shows the Z-diff scores and the proposed SAP scores along with reconstruction error (which directly corresponds to the data likelihood) for the test sets of CelebA and 2D Shapes data. Further we also show the plots of how the Z-diff score and the proposed SAP score change with the reconstruction error as we vary the hyperparameter for both methods ( $\\beta$ and $\\lambda _ { o d }$ , respectively) in Fig. 1 (for 2D Shapes data) and Fig. 2 (for CelebA data). The proposed DIP-VAE-I gives much higher Z-diff score at little to no cost on the reconstruction error when compared with VAE $\\mathbf { \\nabla } \\beta = 1 \\mathbf { \\dot { \\varepsilon } } ,$ ) and $\\beta$ -VAE, for both 2D Shapes and CelebA datasets. However, we observe in the decoder’s output for single latent traversals (varying a single latent while keeping others fixed, shown in Fig. 3 and Fig. 4) that a high $\\mathrm { _ { Z } }$ -diff score is not necessarily a good indicator of disentanglement. Indeed, for 2D Shapes data, DIP-VAE-I has a higher $\\mathsf { Z }$ -diff score (98.7) and almost an order of magnitude lower reconstruction error than $\\beta$ -VAE for $\\beta = 6 0$ , however comparing the latent traversals of $\\beta$ -VAE in Fig. 3 and DIP-VAE-I in Fig. 4 indicate a better disentanglement for $\\beta$ -VAE for $\\beta = 6 0$ (though at the cost of much worse reconstruction where every generated sample looks like a hazy blob). On the other hand, we find the proposed SAP score to be correlated well with the qualitative disentanglement seen in the latent traversal plots. This is reflected in the higher SAP score of $\\beta$ -VAE for $\\beta = 6 0$ than DIP-VAE-I. We also observe that for 2D Shapes data, DIP-VAE-II gives a much better trade-off between disentanglement (measured by the SAP score) and reconstruction error than both DIP-VAE-I and $\\beta$ -VAE, as shown quantitatively in Fig. 1 and qualitatively in the latent traversal plots in Fig. 3. The reason is that DIP-VAE-I enforces $[ \\bar { \\bf C o v } _ { p ( x ) } [ { \\pmb \\mu } _ { \\phi } ( { \\bf x } ) ] ] _ { i i }$ to be close to 1 and this may affect the disentanglement adversely by splitting a generative factor across multiple latents for 2D Shapes where the generative factors are much less than the latent dimension. For real datasets having lots of factors with complex generative processes, such as CelebA, DIP-VAE-I is expected to work well which can be seen in Fig. 2 where DIP-AVE-I yields a much lower reconstruction error with a higher SAP score (as well as higher Z-diff scores). ",
649
+ "bbox": [
650
+ 174,
651
+ 882,
652
+ 825,
653
+ 924
654
+ ],
655
+ "page_idx": 6
656
+ },
657
+ {
658
+ "type": "image",
659
+ "img_path": "images/e32d0583dabe4e4fd3e9384d62df53f8090518a1b80a73aa17ba4945bff30546.jpg",
660
+ "image_caption": [
661
+ "Figure 2: The proposed SAP score and the Z-diff score (Higgins et al., 2017) as a function of average reconstruction error (per pixel) on the test set of CelebA data for $\\beta$ -VAE and the proposed DIP-VAE. The plots are generated by varying $\\beta$ for $\\beta$ -VAE, and $\\lambda _ { o d }$ for DIP-VAE-I and DIP-VAE-II (the number next to each point is the value of these hyperparameters, respectively). "
662
+ ],
663
+ "image_footnote": [],
664
+ "bbox": [
665
+ 197,
666
+ 102,
667
+ 797,
668
+ 443
669
+ ],
670
+ "page_idx": 7
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "",
675
+ "bbox": [
676
+ 173,
677
+ 553,
678
+ 826,
679
+ 871
680
+ ],
681
+ "page_idx": 7
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "Binary attribute classification for CelebA. We also experiment with predicting the binary attribute values for each test example in CelebA from the inferred $\\mu _ { \\phi } ( \\mathbf { x } )$ . For each attribute $k$ , we compute the attribute vector $\\begin{array} { r } { \\mathbf { w } ^ { k } = \\frac { 1 } { | \\mathbf { x } _ { i } : y _ { i } ^ { k } = 1 | } \\sum _ { \\mathbf { x } _ { i } : y _ { i } ^ { k } = 1 } \\mu _ { \\phi } ( \\mathbf { x } _ { i } ) - \\frac { 1 } { | \\mathbf { x } _ { i } : y _ { i } ^ { k } = 0 | } \\sum _ { \\mathbf { x } _ { i } : y _ { i } ^ { k } = 0 } \\mu _ { \\phi } ( \\mathbf { x } _ { i } ) } \\end{array}$ from the training set, and project the $\\mu _ { \\phi } ( \\mathbf { x } )$ along these vectors. A bias is learned on these scalars (by minimizing hinge loss) which is then used for classifying the test examples. Table 2 shows the results for the attribute which show the highest change across various methods (most other attribute accuracies do not change). The proposed DIP-VAE outperforms both VAE and $\\beta$ -VAE for most attributes. The performance of $\\beta$ -VAE gets worse as $\\beta$ is increased further. ",
686
+ "bbox": [
687
+ 174,
688
+ 878,
689
+ 823,
690
+ 928
691
+ ],
692
+ "page_idx": 7
693
+ },
694
+ {
695
+ "type": "image",
696
+ "img_path": "images/437e87b29b32bae915d73a990e7c22134a58009f8737c562f6e0ec208cc2e828.jpg",
697
+ "image_caption": [
698
+ "Figure 3: Qualitative results for disentanglement in 2D Shapes dataset (Matthey et al., 2017). SAP scores, Z-diff scores and reconstruction errors for the methods (rows) can be read from Fig. 1. "
699
+ ],
700
+ "image_footnote": [],
701
+ "bbox": [
702
+ 148,
703
+ 93,
704
+ 816,
705
+ 877
706
+ ],
707
+ "page_idx": 8
708
+ },
709
+ {
710
+ "type": "image",
711
+ "img_path": "images/5c33ba502ea8e2247acd94096c32f9c18244bf881f7c34607d4122475048f6da.jpg",
712
+ "image_caption": [
713
+ "Figure 4: Qualitative results for disentanglement in 2D Shapes dataset (Matthey et al., 2017) for DIP-VAE-I (SAP score 0.1889). "
714
+ ],
715
+ "image_footnote": [],
716
+ "bbox": [
717
+ 147,
718
+ 102,
719
+ 818,
720
+ 267
721
+ ],
722
+ "page_idx": 9
723
+ },
724
+ {
725
+ "type": "text",
726
+ "text": "",
727
+ "bbox": [
728
+ 174,
729
+ 337,
730
+ 825,
731
+ 406
732
+ ],
733
+ "page_idx": 9
734
+ },
735
+ {
736
+ "type": "text",
737
+ "text": "5 RELATED WORK ",
738
+ "text_level": 1,
739
+ "bbox": [
740
+ 176,
741
+ 426,
742
+ 343,
743
+ 443
744
+ ],
745
+ "page_idx": 9
746
+ },
747
+ {
748
+ "type": "text",
749
+ "text": "Adversarial autoencoder (Makhzani et al., 2015) also matches $q _ { \\phi } ( z )$ (which is referred as aggregated posterior in their work) to the prior $p ( z )$ . However, adversarial autoencoder does not have the goal of minimizing $\\mathrm { K L } ( q _ { \\phi } ( \\mathbf { z } | \\mathbf { x } ) | | p _ { \\theta } ( \\mathbf { z } | \\mathbf { x } ) )$ which is the primary goal of variational inference. It maximizes $\\mathbb { E } _ { \\mathbf { x } } \\left[ \\mathbb { E } _ { \\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } \\mid \\mathbf { x } ) } \\left[ \\log p _ { \\theta } ( \\mathbf { x } \\mid \\mathbf { z } ) \\right] \\right] - \\lambda D ( q _ { \\phi } ( \\mathbf { z } ) \\| p ( \\mathbf { z } ) )$ , where $D$ is the distance induced by a discriminator that tries to classify $\\mathbf { z } \\sim q _ { \\phi } ( \\mathbf { z } )$ from $\\mathbf { z } \\sim p ( \\mathbf { z } )$ by optimizing a cross-entropy loss (which induces JS-divergence as $D$ ). This can be contrasted with the objective in (4). ",
750
+ "bbox": [
751
+ 174,
752
+ 458,
753
+ 825,
754
+ 545
755
+ ],
756
+ "page_idx": 9
757
+ },
758
+ {
759
+ "type": "text",
760
+ "text": "Invariance and Equivariance. Disentanglement is closely connected to invariance and equivariance of representations. If $R : { \\bf x } { \\bf z }$ is a function that maps the observations to the feature representions, equivariance (with respect to $T$ ) implies that a primitive transformation $T$ of the input results in a corresponding transformation $T ^ { \\prime }$ of the feature, i.e., $R ( T ( \\mathbf { x } ) ) = T ^ { \\prime } ( R ( \\mathbf { x } ) )$ . Disentanglement requires that $T ^ { \\prime }$ acts only on a small subset of dimensions of $R ( \\mathbf { x } )$ (a sparse action). In this sense, equivariance is a more general notion encompassing disentanglement as a special case, however this special case carries additional benefits of interpretability, ease of transferrability, etc. Invariance is also a special case of equivariance which requires $T ^ { \\prime }$ to be identity for $R$ to be invariant to the action of $T$ on the input observations. However, invariance can obtained more easily from disentangled representations than from equivariant representations by simply marginalizing the appropriate subset of dimensions. There exists a lot of prior work in the literature on equivariant and invariant feature learning, mostly under the supervised setting which assumes the knowledge about the nature of input transformations (e.g., rotations, translations, scaling for images, etc.) (Schmidt & Roth, 2012; Bruna & Mallat, 2013; Anselmi et al., 2014; 2016; Cohen & Welling, 2016; Dieleman et al., 2016; Haasdonk et al., 2005; Mroueh et al., 2015; Raj et al., 2017). ",
761
+ "bbox": [
762
+ 173,
763
+ 553,
764
+ 825,
765
+ 761
766
+ ],
767
+ "page_idx": 9
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "6 CONCLUDING REMARKS ",
772
+ "text_level": 1,
773
+ "bbox": [
774
+ 176,
775
+ 781,
776
+ 411,
777
+ 796
778
+ ],
779
+ "page_idx": 9
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "We proposed a principled variational framework to infer disentangled latents from unlabeled observations. Unlike $\\beta$ -VAE, our variational objective does not have any conflict between the data log-likelihood and the disentanglement of the inferred latents, which is reflected in the empirical results. We also proposed the SAP disentanglement metric that is much better correlated with the qualitative disentanglement seen in the latent traversals than the Z-diff score Higgins et al. (2017). An interesting direction for future work is to take into account the sampling biases in the generative process, both natural (e.g., sampling the female gender makes it unlikely to sample beard for face images in CelebA) as well as artificial (e.g., a collection of face images that contain much more smiling faces for males than females misleading us to believe $p ( { \\mathrm { g e n d e r } } , { \\mathrm { s m i l e } } ) \\neq p ( { \\mathrm { g e n d e r } } ) p ( { \\mathrm { s m i l e } } ) )$ , which makes the problem challenging and also somewhat less well defined (at least in the case of natural biases). Effective use of disentangled representations for transfer learning is another interesting direction for future work. ",
784
+ "bbox": [
785
+ 174,
786
+ 811,
787
+ 825,
788
+ 924
789
+ ],
790
+ "page_idx": 9
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "",
795
+ "bbox": [
796
+ 174,
797
+ 103,
798
+ 825,
799
+ 159
800
+ ],
801
+ "page_idx": 10
802
+ },
803
+ {
804
+ "type": "text",
805
+ "text": "REFERENCES ",
806
+ "text_level": 1,
807
+ "bbox": [
808
+ 174,
809
+ 181,
810
+ 285,
811
+ 196
812
+ ],
813
+ "page_idx": 10
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "Fabio Anselmi, Joel Z Leibo, Lorenzo Rosasco, Jim Mutch, Andrea Tacchetti, and Tomaso Poggio. Unsupervised learning of invariant representations in hierarchical architectures. arXiv preprint arXiv:1311.4158, 2014. ",
818
+ "bbox": [
819
+ 174,
820
+ 205,
821
+ 823,
822
+ 247
823
+ ],
824
+ "page_idx": 10
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "Fabio Anselmi, Lorenzo Rosasco, and Tomaso Poggio. On invariance and selectivity in representation learning. Information and Inference, 2016. ",
829
+ "bbox": [
830
+ 174,
831
+ 257,
832
+ 821,
833
+ 286
834
+ ],
835
+ "page_idx": 10
836
+ },
837
+ {
838
+ "type": "text",
839
+ "text": "Martin Arjovsky and Leon Bottou. Towards principled methods for training generative adversarial ´ networks. In NIPS 2016 Workshop on Adversarial Training. In review for ICLR, volume 2016, 2017. ",
840
+ "bbox": [
841
+ 174,
842
+ 295,
843
+ 826,
844
+ 338
845
+ ],
846
+ "page_idx": 10
847
+ },
848
+ {
849
+ "type": "text",
850
+ "text": "Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein gan. ´ arXiv preprint arXiv:1701.07875, 2017. ",
851
+ "bbox": [
852
+ 171,
853
+ 348,
854
+ 823,
855
+ 377
856
+ ],
857
+ "page_idx": 10
858
+ },
859
+ {
860
+ "type": "text",
861
+ "text": "Mathieu Aubry, Daniel Maturana, Alexei A Efros, Bryan C Russell, and Josef Sivic. Seeing 3d chairs: exemplar part-based 2d-3d alignment using a large dataset of cad models. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3762–3769, 2014. ",
862
+ "bbox": [
863
+ 171,
864
+ 387,
865
+ 823,
866
+ 430
867
+ ],
868
+ "page_idx": 10
869
+ },
870
+ {
871
+ "type": "text",
872
+ "text": "Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013. ",
873
+ "bbox": [
874
+ 176,
875
+ 439,
876
+ 825,
877
+ 483
878
+ ],
879
+ "page_idx": 10
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American Statistical Association, 2017. ",
884
+ "bbox": [
885
+ 173,
886
+ 492,
887
+ 825,
888
+ 522
889
+ ],
890
+ "page_idx": 10
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "Samuel R Bowman, Luke Vilnis, Oriol Vinyals, Andrew M Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. arXiv preprint arXiv:1511.06349, 2015. ",
895
+ "bbox": [
896
+ 174,
897
+ 531,
898
+ 823,
899
+ 561
900
+ ],
901
+ "page_idx": 10
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Joan Bruna and Stephane Mallat. Invariant scattering convolution networks. IEEE Trans. Pattern Anal. Mach. Intell., 2013. ",
906
+ "bbox": [
907
+ 173,
908
+ 570,
909
+ 823,
910
+ 599
911
+ ],
912
+ "page_idx": 10
913
+ },
914
+ {
915
+ "type": "text",
916
+ "text": "Xi Chen, Yan Duan, Rein Houthooft, John Schulman, Ilya Sutskever, and Pieter Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Advances in Neural Information Processing Systems, pp. 2172–2180, 2016. ",
917
+ "bbox": [
918
+ 174,
919
+ 609,
920
+ 823,
921
+ 652
922
+ ],
923
+ "page_idx": 10
924
+ },
925
+ {
926
+ "type": "text",
927
+ "text": "Brian Cheung, Jesse A Livezey, Arjun K Bansal, and Bruno A Olshausen. Discovering hidden factors of variation in deep networks. arXiv preprint arXiv:1412.6583, 2014. ",
928
+ "bbox": [
929
+ 173,
930
+ 661,
931
+ 823,
932
+ 691
933
+ ],
934
+ "page_idx": 10
935
+ },
936
+ {
937
+ "type": "text",
938
+ "text": "Taco Cohen and Max Welling. Learning the irreducible representations of commutative lie groups. In International Conference on Machine Learning, pp. 1755–1763, 2014. ",
939
+ "bbox": [
940
+ 173,
941
+ 700,
942
+ 825,
943
+ 731
944
+ ],
945
+ "page_idx": 10
946
+ },
947
+ {
948
+ "type": "text",
949
+ "text": "Taco Cohen and Max Welling. Group equivariant convolutional networks. In Proceedings of the 33rd International Conference on Machine Learning, 2016. ",
950
+ "bbox": [
951
+ 173,
952
+ 739,
953
+ 825,
954
+ 770
955
+ ],
956
+ "page_idx": 10
957
+ },
958
+ {
959
+ "type": "text",
960
+ "text": "Taco S Cohen and Max Welling. Transformation properties of learned visual representations. In International Conference on Learning Representations, 2015. ",
961
+ "bbox": [
962
+ 169,
963
+ 779,
964
+ 823,
965
+ 808
966
+ ],
967
+ "page_idx": 10
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "Emily Denton and Vighnesh Birodkar. Unsupervised learning of disentangled representations from video. arXiv preprint arXiv:1705.10915, 2017. ",
972
+ "bbox": [
973
+ 171,
974
+ 816,
975
+ 823,
976
+ 847
977
+ ],
978
+ "page_idx": 10
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "Guillaume Desjardins, Aaron Courville, and Yoshua Bengio. Disentangling factors of variation via generative entangling. arXiv preprint arXiv:1210.5474, 2012. ",
983
+ "bbox": [
984
+ 171,
985
+ 856,
986
+ 823,
987
+ 886
988
+ ],
989
+ "page_idx": 10
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "Sander Dieleman, Jeffrey De Fauw, and Koray Kavukcuoglu. Exploiting cyclic symmetry in convolu tional neural networks. ICML, 2016. ",
994
+ "bbox": [
995
+ 174,
996
+ 895,
997
+ 823,
998
+ 924
999
+ ],
1000
+ "page_idx": 10
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "Jeff Donahue, Philipp Krahenb ¨ uhl, and Trevor Darrell. Adversarial feature learning. ¨ arXiv preprint arXiv:1605.09782, 2016. ",
1005
+ "bbox": [
1006
+ 171,
1007
+ 103,
1008
+ 823,
1009
+ 132
1010
+ ],
1011
+ "page_idx": 11
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "Alexey Dosovitskiy, Jost Tobias Springenberg, and Thomas Brox. Learning to generate chairs with convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1538–1546, 2015. ",
1016
+ "bbox": [
1017
+ 174,
1018
+ 141,
1019
+ 823,
1020
+ 185
1021
+ ],
1022
+ "page_idx": 11
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606.00704, 2016. ",
1027
+ "bbox": [
1028
+ 173,
1029
+ 194,
1030
+ 823,
1031
+ 223
1032
+ ],
1033
+ "page_idx": 11
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. In Proceedings of the Thirty-First Conference on Uncertainty in Artificial Intelligence, pp. 258–267. AUAI Press, 2015. ",
1038
+ "bbox": [
1039
+ 173,
1040
+ 232,
1041
+ 825,
1042
+ 276
1043
+ ],
1044
+ "page_idx": 11
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Marco Fraccaro, Simon Kamronn, Ulrich Paquet, and Ole Winther. A disentangled recognition and nonlinear dynamics model for unsupervised learning. arXiv preprint arXiv:1710.05741, 2017. ",
1049
+ "bbox": [
1050
+ 173,
1051
+ 285,
1052
+ 823,
1053
+ 314
1054
+ ],
1055
+ "page_idx": 11
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Michael C Fu. Gradient estimation. Handbooks in operations research and management science, 13: 575–616, 2006. ",
1060
+ "bbox": [
1061
+ 174,
1062
+ 324,
1063
+ 825,
1064
+ 353
1065
+ ],
1066
+ "page_idx": 11
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Samuel Gershman and Noah Goodman. Amortized inference in probabilistic reasoning. In Proceedings of the Cognitive Science Society, volume 36, 2014. ",
1071
+ "bbox": [
1072
+ 171,
1073
+ 362,
1074
+ 825,
1075
+ 392
1076
+ ],
1077
+ "page_idx": 11
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "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. ",
1082
+ "bbox": [
1083
+ 174,
1084
+ 400,
1085
+ 823,
1086
+ 444
1087
+ ],
1088
+ "page_idx": 11
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Ross Goroshin, Michael F Mathieu, and Yann LeCun. Learning to linearize under uncertainty. In Advances in Neural Information Processing Systems, pp. 1234–1242, 2015. ",
1093
+ "bbox": [
1094
+ 171,
1095
+ 453,
1096
+ 823,
1097
+ 483
1098
+ ],
1099
+ "page_idx": 11
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Arthur Gretton, Karsten M Borgwardt, Malte J Rasch, Bernhard Scholkopf, and Alexander Smola. A ¨ kernel two-sample test. Journal of Machine Learning Research, 13(Mar):723–773, 2012. ",
1104
+ "bbox": [
1105
+ 173,
1106
+ 492,
1107
+ 823,
1108
+ 522
1109
+ ],
1110
+ "page_idx": 11
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Bernard Haasdonk, A Vossen, and Hans Burkhardt. Invariance in kernel methods by haar-integration kernels. In Scandinavian Conference on Image Analysis, pp. 841–851. Springer, 2005. ",
1115
+ "bbox": [
1116
+ 171,
1117
+ 530,
1118
+ 823,
1119
+ 560
1120
+ ],
1121
+ "page_idx": 11
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations, 2017. ",
1126
+ "bbox": [
1127
+ 173,
1128
+ 569,
1129
+ 826,
1130
+ 626
1131
+ ],
1132
+ "page_idx": 11
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Geoffrey E Hinton, Alex Krizhevsky, and Sida D Wang. Transforming auto-encoders. In International Conference on Artificial Neural Networks, pp. 44–51. Springer, 2011. ",
1137
+ "bbox": [
1138
+ 174,
1139
+ 635,
1140
+ 825,
1141
+ 665
1142
+ ],
1143
+ "page_idx": 11
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Matthew D Hoffman, David M Blei, Chong Wang, and John Paisley. Stochastic variational inference. The Journal of Machine Learning Research, 14(1):1303–1347, 2013. ",
1148
+ "bbox": [
1149
+ 174,
1150
+ 674,
1151
+ 825,
1152
+ 704
1153
+ ],
1154
+ "page_idx": 11
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Xianxu Hou, Linlin Shen, Ke Sun, and Guoping Qiu. Deep feature consistent variational autoencoder. In Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pp. 1133–1141. IEEE, 2017. ",
1159
+ "bbox": [
1160
+ 174,
1161
+ 712,
1162
+ 826,
1163
+ 756
1164
+ ],
1165
+ "page_idx": 11
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Wei-Ning Hsu, Yu Zhang, and James Glass. Unsupervised learning of disentangled latent representations from sequential data. In Advances in neural information processing systems, 2017. ",
1170
+ "bbox": [
1171
+ 173,
1172
+ 765,
1173
+ 825,
1174
+ 795
1175
+ ],
1176
+ "page_idx": 11
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Theofanis Karaletsos, Serge Belongie, and Gunnar Ratsch. Bayesian representation learning with ¨ oracle constraints. arXiv preprint arXiv:1506.05011, 2015. ",
1181
+ "bbox": [
1182
+ 171,
1183
+ 804,
1184
+ 823,
1185
+ 833
1186
+ ],
1187
+ "page_idx": 11
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. ",
1192
+ "bbox": [
1193
+ 173,
1194
+ 842,
1195
+ 825,
1196
+ 872
1197
+ ],
1198
+ "page_idx": 11
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems, pp. 2539–2547, 2015. ",
1203
+ "bbox": [
1204
+ 176,
1205
+ 881,
1206
+ 825,
1207
+ 922
1208
+ ],
1209
+ "page_idx": 11
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Abhishek Kumar, Prasanna Sattigeri, and P Thomas Fletcher. Semi-supervised learning with GANs: Manifold invariance with improved inference. In Advances in Neural Information Processing Systems, 2017. ",
1214
+ "bbox": [
1215
+ 174,
1216
+ 103,
1217
+ 821,
1218
+ 146
1219
+ ],
1220
+ "page_idx": 12
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. Behavioral and Brain Sciences, pp. 1–101, 2016. ",
1225
+ "bbox": [
1226
+ 171,
1227
+ 155,
1228
+ 825,
1229
+ 184
1230
+ ],
1231
+ "page_idx": 12
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Yujia Li, Kevin Swersky, and Rich Zemel. Generative moment matching networks. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pp. 1718–1727, 2015. ",
1236
+ "bbox": [
1237
+ 173,
1238
+ 193,
1239
+ 823,
1240
+ 222
1241
+ ],
1242
+ "page_idx": 12
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "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. ",
1247
+ "bbox": [
1248
+ 173,
1249
+ 229,
1250
+ 823,
1251
+ 260
1252
+ ],
1253
+ "page_idx": 12
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015. ",
1258
+ "bbox": [
1259
+ 173,
1260
+ 267,
1261
+ 823,
1262
+ 297
1263
+ ],
1264
+ "page_idx": 12
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Michael F Mathieu, Junbo Jake Zhao, Junbo Zhao, Aditya Ramesh, Pablo Sprechmann, and Yann LeCun. Disentangling factors of variation in deep representation using adversarial training. In Advances in Neural Information Processing Systems, pp. 5040–5048, 2016. ",
1269
+ "bbox": [
1270
+ 176,
1271
+ 306,
1272
+ 823,
1273
+ 349
1274
+ ],
1275
+ "page_idx": 12
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Loic Matthey, Irina Higgins, Demis Hassabis, and Alexander Lerchner. dsprites: Disentanglement testing sprites dataset. https://github.com/deepmind/dsprites-dataset/, 2017. ",
1280
+ "bbox": [
1281
+ 174,
1282
+ 357,
1283
+ 821,
1284
+ 387
1285
+ ],
1286
+ "page_idx": 12
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "Yishu Miao, Lei Yu, and Phil Blunsom. Neural variational inference for text processing. In International Conference on Machine Learning, pp. 1727–1736, 2016. ",
1291
+ "bbox": [
1292
+ 176,
1293
+ 395,
1294
+ 823,
1295
+ 425
1296
+ ],
1297
+ "page_idx": 12
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Youssef Mroueh, Stephen Voinea, and Tomaso A Poggio. Learning with group invariant features: A kernel perspective. In Advances in Neural Information Processing Systems, pp. 1558–1566, 2015. ",
1302
+ "bbox": [
1303
+ 174,
1304
+ 433,
1305
+ 825,
1306
+ 463
1307
+ ],
1308
+ "page_idx": 12
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "XuanLong Nguyen, Martin J Wainwright, and Michael I Jordan. Estimating divergence functionals and the likelihood ratio by convex risk minimization. IEEE Transactions on Information Theory, 56(11):5847–5861, 2010. ",
1313
+ "bbox": [
1314
+ 174,
1315
+ 470,
1316
+ 826,
1317
+ 513
1318
+ ],
1319
+ "page_idx": 12
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016. ",
1324
+ "bbox": [
1325
+ 174,
1326
+ 522,
1327
+ 826,
1328
+ 565
1329
+ ],
1330
+ "page_idx": 12
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Anant Raj, Abhishek Kumar, Youssef Mroueh, P Thomas Fletcher, and Bernhard Schlkopf. Local group invariant representations via orbit embeddings. In AISTATS, 2017. ",
1335
+ "bbox": [
1336
+ 173,
1337
+ 574,
1338
+ 823,
1339
+ 604
1340
+ ],
1341
+ "page_idx": 12
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Scott Reed, Kihyuk Sohn, Yuting Zhang, and Honglak Lee. Learning to disentangle factors of variation with manifold interaction. In International Conference on Machine Learning, pp. 1431– 1439, 2014. ",
1346
+ "bbox": [
1347
+ 174,
1348
+ 612,
1349
+ 825,
1350
+ 655
1351
+ ],
1352
+ "page_idx": 12
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082, 2014. ",
1357
+ "bbox": [
1358
+ 171,
1359
+ 664,
1360
+ 823,
1361
+ 694
1362
+ ],
1363
+ "page_idx": 12
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Karl Ridgeway. A survey of inductive biases for factorial representation-learning. arXiv preprint arXiv:1612.05299, 2016. ",
1368
+ "bbox": [
1369
+ 171,
1370
+ 702,
1371
+ 823,
1372
+ 731
1373
+ ],
1374
+ "page_idx": 12
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Jurgen Schmidhuber. Learning factorial codes by predictability minimization. Neural computation, 4 (6):863–879, 1992. ",
1379
+ "bbox": [
1380
+ 171,
1381
+ 739,
1382
+ 823,
1383
+ 770
1384
+ ],
1385
+ "page_idx": 12
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Uwe Schmidt and Stefan Roth. Learning rotation-aware features: From invariant priors to equivariant descriptors. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, 2012. ",
1390
+ "bbox": [
1391
+ 174,
1392
+ 777,
1393
+ 825,
1394
+ 820
1395
+ ],
1396
+ "page_idx": 12
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "N Siddharth, Brooks Paige, Van de Meent, Alban Desmaison, Frank Wood, Noah D Goodman, Pushmeet Kohli, Philip HS Torr, et al. Learning disentangled representations with semi-supervised deep generative models. arXiv preprint arXiv:1706.00400, 2017. ",
1401
+ "bbox": [
1402
+ 178,
1403
+ 829,
1404
+ 823,
1405
+ 872
1406
+ ],
1407
+ "page_idx": 12
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Bharath K Sriperumbudur, Kenji Fukumizu, Arthur Gretton, Bernhard Scholkopf, and Gert RG ¨ Lanckriet. On integral probability metrics,\\phi-divergences and binary classification. arXiv preprint arXiv:0901.2698, 2009. ",
1412
+ "bbox": [
1413
+ 176,
1414
+ 882,
1415
+ 825,
1416
+ 924
1417
+ ],
1418
+ "page_idx": 12
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "Andreas Stuhlmuller, Jacob Taylor, and Noah Goodman. Learning stochastic inverses. In ¨ Advances in neural information processing systems, pp. 3048–3056, 2013. \nTim Van Erven and Peter Harremos. Renyi divergence and kullback-leibler divergence. ´ IEEE Transactions on Information Theory, 60(7):3797–3820, 2014. \nWilliam F Whitney, Michael Chang, Tejas Kulkarni, and Joshua B Tenenbaum. Understanding visual concepts with continuation learning. arXiv preprint arXiv:1602.06822, 2016. \nJimei Yang, Scott E Reed, Ming-Hsuan Yang, and Honglak Lee. Weakly-supervised disentangling with recurrent transformations for 3d view synthesis. In Advances in Neural Information Processing Systems, pp. 1099–1107, 2015. \nShengjia Zhao, Jiaming Song, and Stefano Ermon. Towards deeper understanding of variational autoencoding models. arXiv preprint arXiv:1702.08658, 2017. ",
1423
+ "bbox": [
1424
+ 171,
1425
+ 101,
1426
+ 826,
1427
+ 299
1428
+ ],
1429
+ "page_idx": 13
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "Appendix ",
1434
+ "text_level": 1,
1435
+ "bbox": [
1436
+ 452,
1437
+ 99,
1438
+ 545,
1439
+ 119
1440
+ ],
1441
+ "page_idx": 14
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "A LATENT TRAVERSALS FOR 2D SHAPES AND CHAIRS DATASET ",
1446
+ "text_level": 1,
1447
+ "bbox": [
1448
+ 176,
1449
+ 137,
1450
+ 722,
1451
+ 155
1452
+ ],
1453
+ "page_idx": 14
1454
+ },
1455
+ {
1456
+ "type": "image",
1457
+ "img_path": "images/8c949aad3501c5661a1b6210c932cabe8e039fbe08187d805d3fd5c79d912e2f.jpg",
1458
+ "image_caption": [
1459
+ "Figure 5: Qualitative results for disentanglement in CelebA dataset. "
1460
+ ],
1461
+ "image_footnote": [],
1462
+ "bbox": [
1463
+ 174,
1464
+ 172,
1465
+ 820,
1466
+ 621
1467
+ ],
1468
+ "page_idx": 14
1469
+ },
1470
+ {
1471
+ "type": "image",
1472
+ "img_path": "images/50a59c9cf7078fc5c6f29d794697ba9e200a196a325a4ba4e235dc87b8f33e13.jpg",
1473
+ "image_caption": [
1474
+ "Figure 6: Qualitative results for disentanglement in Chairs dataset. "
1475
+ ],
1476
+ "image_footnote": [],
1477
+ "bbox": [
1478
+ 176,
1479
+ 275,
1480
+ 818,
1481
+ 717
1482
+ ],
1483
+ "page_idx": 15
1484
+ }
1485
+ ]
parse/train/H1kG7GZAW/H1kG7GZAW_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1kG7GZAW/H1kG7GZAW_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/PxMfDdPnTfV/PxMfDdPnTfV.md ADDED
@@ -0,0 +1,386 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Overparameterization Improves Robustness to Covariate Shift in High Dimensions
2
+
3
+ Nilesh Tripuraneni⇤ U.C. Berkeley† nilesh_tripuraneni@berkeley.edu
4
+
5
+ Ben Adlam⇤ Brain Team, Google Research adlam@google.com
6
+
7
+ Jeffrey Pennington⇤ Brain Team, Google Research jpennin@google.com
8
+
9
+ # Abstract
10
+
11
+ A significant obstacle in the development of robust machine learning models is covariate shift, a form of distribution shift that occurs when the input distributions of the training and test sets differ while the conditional label distributions remain the same. Despite the prevalence of covariate shift in real-world applications, a theoretical understanding in the context of modern machine learning has remained lacking. In this work, we examine the exact high-dimensional asymptotics of random feature regression under covariate shift and present a precise characterization of the limiting test error, bias, and variance in this setting. Our results motivate a natural partial order over covariate shifts that provides a sufficient condition for determining when the shift will harm (or even help) test performance. We find that overparameterized models exhibit enhanced robustness to covariate shift, providing one of the first theoretical explanations for this ubiquitous empirical phenomenon. Additionally, our analysis reveals an exact linear relationship between the in-distribution and out-of-distribution generalization performance, offering an explanation for this surprising recent observation.
12
+
13
+ # 1 Introduction
14
+
15
+ Theoretical justification for almost all machine learning methods relies upon the equality of the distributions from which the training and test data are drawn. Nevertheless, in many real-world applications, this equality is violated—naturally-occurring distribution shift between the training data and the data encountered during deployment is the rule, not the exception [31]. Even non-adversarial changes in distributions can uncover the surprising fragility of modern machine learning models [55, 56, 43, 26, 12, 50]. Such shifts are distinct from adversarial examples, which require explicit poisoning attacks $\pmb { \left[ 2 2 \right] }$ ; rather, they can result from mild corruptions, ranging from changes of camera angle or blur $\pmb { \left. 2 6 \right. }$ , to subtle, unintended changes in data acquisition procedures [56]. Moreover, this fragility limits the application of deep learning in certain safety-critical areas [31]
16
+
17
+ Empirical studies of distribution shift have observed several intriguing phenomena, including linear trends between model performance on shifted and unshifted test distributions [56, 26, 31], dramatic degradation in calibration $\mathbb { \left[ \left. 5 0 \right\| \right. }$ , and surprising spurious inductive biases $\pmb { \mathbb { I } } \pmb { \mathcal { 2 } } \Vert$ . Theoretical understanding of why such patterns occur across a variety of real-world domains is scant. Even basic questions such as what makes a certain distribution shift likely to hurt (or help) a model’s performance, and by how much, are not understood. One reason that these phenomena have eluded theoretical understanding is that there is often a strong coupling between model and distribution, implying that the effect of a given shift cannot usually be understood in a model-agnostic way. Another reason that satisfactory explanations have remained lacking is that the go-to formalism for studying generalization in classical models, namely uniform convergence theory (see e.g. $\begin{array} { r } { \left[ 6 6 \right] ^ { \cdot } } \end{array}$ ), may be insufficient to explain the behavior of modern deep learning methods (even in the absence of distribution shift) [47, 68]. Indeed, classical measures of model complexity, such as various norms of the parameters, have been found to lead to ambiguous conclusions [49].
18
+
19
+ In this paper, we follow a different approach: instead of focusing on worst-case bounds for generic distributions, we study average-case behavior for narrowly specified distributions. While this change in perspective sacrifices generality, it allows us to derive more precise predictions, which we believe are necessary to fully capture the relevant phenomenology. We study a specific type of distribution shift called covariate shift, in which the distributions of the training and test covariates differ, while the conditional distribution of the labels given the covariates remains fixed. Using random matrix theory, we perform an asymptotically exact computation of the generalization error of random feature regression under covariate shift. The random feature model provides a useful testbed to (1) investigate the interplay between various factors such as model complexity, label noise, bias, variance, and covariate shift; (2) rigorously define a model-agnostic notion for the strength of covariate shift; and (3) provide a theoretical explanation for the linear relationships recently observed between in-distribution and out-of-distribution generalization performance [55, 56, 27].
20
+
21
+ # 1.1 Contributions
22
+
23
+ Our primary contributions are to:
24
+
25
+ 1. Provide a model-agnostic partial order over covariate shifts that is sufficient to determine when a shift will increase or decrease the test error in random feature regression (see Def. 4.1)
26
+ 2. Compute the test error, bias, and variance of random feature regression for general multivariate Gaussian covariates under covariate shift in the high-dimensional limit (see Sec. 5.1);
27
+ 3. Prove that overparameterization enhances robustness to covariate shift, and that the error, bias, and variance are nonincreasing functions of the number of excess parameters (see Sec. 5.3);
28
+ 4. Deduce an exact linear relationship between in-distribution and out-of-distribution generalization performance, offering an explanation for this surprising recent empirical observation (see Sec. 5.4).
29
+
30
+ # 1.2 Related work
31
+
32
+ There is extensive literature on the empirical analysis of distribution shift in all of its myriad forms, ranging from domain adaptation $[ \overline { { { \left\| 6 2 \right\| } } } , \overline { { { \left\| 2 0 \right\| } } } , \overline { { { \left\| 8 \right\| } } } , \overline { { { \left. 7 0 \right\| } } } , \overline { { { \left. 6 9 \right\| } } } , \overline { { { \left. 3 7 \right\| } } } , \overline { { { \left. 3 6 \right\| } } } ]$ to defenses against adversarial attacks $\bar { \mathbb { B 9 } } \bar { \mathbb { 6 0 } }$ to distributionally robust optimization [59, 15, 16], among many others. Interestingly, for naturally occurring distribution shifts $[ \sqrt { 3 1 } , \sqrt { 2 6 } ]$ , standard robustness interventions provide little protection $[ \overline { { 1 5 6 } } , \overline { { 6 3 } } ]$ . Indeed, empirical risk minimization on clean, unshifted training data often performs better on out-of-distribution benchmarks than more sophisticated methods $\bar { \bigtriangledown } 3 \bar { \bigtriangledown }$ . One of the most striking observations in the context of natural distribution shifts is that model robustness improves with the classifier’s accuracy [56, 63, 26, 43]. For example, if a classifier’s accuracy increases by $1 . 0 \%$ on the unshifted CIFAR-10 test set, this tends to increase its accuracy by $1 . 7 \%$ on the CIFAR-10.1 dataset (a dataset with natural distribution shift) $\mathbb { \boldsymbol { 6 } }$ . Moreover, such linear trends between the unshifted and shifted measures of error have now been observed in several contexts [56, 63, 43, 40, 44].
33
+
34
+ The number of theoretical works studying the impact of distribution shift on generalization is far smaller. One pioneering work provides VC-dimension-based error bounds for classification that are augmented by a discrepancy measure between source and target domains $\mathbb { I m }$ , while another demonstrates a similar class of uniform convergence-based results in the setting of kernel regression $\mathbb { m }$ . Recent work shows that learning domain-invariant features is insufficient to guarantee generalization when the class-conditional distributions of features may shift $\lVert \overline { { 6 9 } } \rVert$ . When the source domain gradually shifts toward the target domain, non-vacuous margin-based bounds for self-training can be established $\lVert \overline { { 3 2 } } \rVert$ . In $\mathbb { H O }$ , assumptions based on model similarity are used to help explain why classifiers exhibit linear trends between their accuracies on shifted and unshifted test sets [56, 43].
35
+
36
+ Our technical tools build on a series of works that have studied the exact high-dimensional limit of the test error for a growing class of model families and data distributions. In the context of linear models, recent work analyzes ridge regression for general covariances and a general non-isotropic source condition on the parameters which generate the targets $ { \mathbb { I } } ^ { { \left[ 5 7 \right] } }$ , extending earlier work studying minimum-norm interpolated least squares and ridge regression in the random design setting [9, 14, 24]. The non-isotropy of source parameter effectively induces a shift on the bias term of this model, but the phenomenon is distinct from the covariate shifts we study here. Beyond linear regression, random feature models provide a rich but tractable class of models to gain further insight into generalization phenomena [2, 3, 41, 35]. These methods are of particular interest because of their connection to neural networks, with the number of random features corresponding to the network width (or model complexity) [48, 33, 29], and because they serve as a practical method for data analysis in their own right $\pm \sqrt { 5 4 } \sqrt { 6 1 }$ . In this context, a precise characterization of the gaps between uniform convergence and the (asymptotic) exact test error as a function of the sample size and number of random features can be derived $[ \bar { 1 6 8 } ]$ . Since this paper’s publication, we released follow-up work considering unequal scales in the training and test distributions and optimal regularization $\dot { \left[ 6 4 \right] }$ . From the technical perspective, our analytic techniques build upon these works and a series of recent results stemming from the literature on random matrix theory and free probability [53, 52, 1, 2, 38, 51, 19, 45].
37
+
38
+ # 2 Preliminaries
39
+
40
+ # 2.1 Problem setup and notation
41
+
42
+ As in prior work studying random feature regression [24, 41, 2, 1], we compute the test error in the high-dimensional, proportional asymptotics where the dataset size $m$ , input feature dimension $n _ { 0 }$ , and hidden layer size $n _ { 1 }$ all tend to infinity at the same rate, with $\phi : = n _ { 0 } / m$ and $\psi : = n _ { 0 } / n _ { 1 }$ held fixed. We refer to $\phi / \psi$ as the overparameterization ratio, which is the limit of $n _ { 1 } / m$ and characterizes the normalized complexity of the (random) feature model.
43
+
44
+ Interestingly, in this high-dimensional limit, the conditional distribution of a linear labeling function is asymptotically equivalent to a wide class of nonlinear teacher functions (see [41, 2] for more details). With this in mind, we consider the task of learning an unknown function from $m$ i.i.d. samples $( \mathbf { x } _ { i } , y _ { i } ) \in \mathbb { R } ^ { n _ { 0 } } \times \mathbb { R }$ for $i \in \{ 1 , \ldots , m \}$ , where the covariates are Gaussian, $\mathbf { x } _ { i } \sim \mathcal { N } ( 0 , \Sigma )$ with positive definite covariance matrix $\Sigma$ , and the labels are generated by a linear function parameterized by $\beta \in \mathbb { R } ^ { n _ { 0 } }$ , drawn from $\mathcal { N } ( 0 , I _ { n _ { 0 } } )$ . In particular
45
+
46
+ $$
47
+ y ( \mathbf { x } _ { i } ) = { \boldsymbol { \beta } } ^ { \top } \mathbf { x } _ { i } / \sqrt { n _ { 0 } } + \epsilon _ { i } ,
48
+ $$
49
+
50
+ where $\epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma _ { \epsilon } ^ { 2 } )$ is additive label noise on the training points.
51
+
52
+ We study the class of prediction models defined by kernel ridge regression using unstructured random feature maps $\pmb { \Vert 5 4 \Vert }$ . The random features are given by a single-layer, fully-connected neural network with random weights. Given a set of training data $X = [ \mathbf { x } _ { 1 } , \ldots \mathbf { , x } _ { m } ]$ and a prospective test point $\mathbf { x }$ the random features embeddings of the training and test data are given by
53
+
54
+ $$
55
+ F : = \sigma ( W X / \sqrt { n _ { 0 } } ) \quad \mathrm { a n d } \quad f : = \sigma ( W \mathbf { x } / \sqrt { n _ { 0 } } ) ,
56
+ $$
57
+
58
+ for a random weight matrix $W \in \mathbb { R } ^ { n _ { 1 } \times n _ { 0 } }$ with i.i.d. standard Gaussian entries and an activation function $\sigma : \mathbb { R } \mathbb { R }$ applied elementwise. The induced kernel is
59
+
60
+ $$
61
+ K ( \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } ) : = \frac { 1 } { n _ { 1 } } \sigma ( W \mathbf { x } _ { 1 } / \sqrt { n _ { 0 } } ) ^ { \top } \sigma ( W \mathbf { x } _ { 2 } / \sqrt { n _ { 0 } } ) ,
62
+ $$
63
+
64
+ and the model’s predictions are given by $\hat { y } ( \mathbf x ) = Y K ^ { - 1 } K _ { \mathbf x }$ , where $Y : = [ y ( \mathbf { x } _ { 1 } ) , \dots , y ( \mathbf { x } _ { m } ) ]$ , $K : = K ( X , X ) \bar { + } \gamma I _ { m } , K _ { \mathbf { x } } : = K \bar { ( } X , \mathbf { x ) }$ , and $\gamma \geq 0$ is a ridge regularization constant1. Owing to the implicit regularization effect of the nonlinear feature maps $\bar { \bigtriangledown } \bar { \bigtriangledown }$ , in low noise settings the optimal value of $\gamma$ can sometimes be negative $\textcircled { \lvert 3 0 \rvert }$ . For simplicity, we nevertheless make the standard assumption that $\gamma \geq 0$ , though we emphasize our techniques readily accommodate negative values.
65
+
66
+ Our central object of study is the expected test loss for a datapoint $\mathbf { x } \sim \mathcal { N } ( 0 , \Sigma ^ { * } )$ where $\Sigma ^ { * }$ may be different from the training covariance $\Sigma$ . The test error (without label noise on the test point) is
67
+
68
+ $$
69
+ \begin{array} { r l } & { E _ { \Sigma ^ { * } } = \mathbb { E } [ ( \beta ^ { \top } { \mathbf x } / \sqrt { n _ { 0 } } - Y K ^ { - 1 } K _ { \mathbf x } ) ^ { 2 } ] } \\ & { \qquad = \underbrace { \mathbb { E } _ { \mathbf { x } , \beta } [ ( \mathbb { E } [ \hat { y } ( { \mathbf x } ) ] - y ( { \mathbf x } ) ) ^ { 2 } ] } _ { B _ { \Sigma ^ { * } } } + \underbrace { \mathbb { E } _ { \mathbf { x } , \beta } [ \mathbb { V } [ \hat { y } ( { \mathbf x } ) ] ] } _ { V _ { \Sigma ^ { * } } } , } \end{array}
70
+ $$
71
+
72
+ where the inner expectations defining the bias and variance are comdecompose the training and test covariance matrices into eigenbases as $W , X$ nd an $Y$ $\begin{array} { r } { \dot { \boldsymbol { \Sigma } } = \sum _ { i = 1 } ^ { n _ { 0 } } \lambda _ { i } \mathbf { v } _ { i } \mathbf { v } _ { i } ^ { \top } } \end{array}$ $\Sigma ^ { * } =$ ${ \textstyle \sum } _ { i = 1 } ^ { n _ { 0 } } \lambda _ { i } ^ { * } \mathbf { v } _ { i } ^ { * } \mathbf { v } _ { i } ^ { * } { } ^ { \top }$ e eigenvalues are in nondecreasing magnitude, i.e. . We define the overlap coefficients $\lambda _ { 1 } \leq \lambda _ { 2 } \leq . . . \leq \lambda _ { n _ { 0 } }$ $\lambda _ { 1 } ^ { * } \leq \lambda _ { 2 } ^ { * } \leq . . . \leq \lambda _ { n _ { 0 } } ^ { * }$
73
+
74
+ $$
75
+ r _ { i } : = \mathbf { v } _ { i } ^ { \top } \Sigma ^ { * } \mathbf { v } _ { i } = \sum _ { j = 1 } ^ { n _ { 0 } } ( \mathbf { v } _ { j } ^ { * } \cdot \mathbf { v } _ { i } ) ^ { 2 } \lambda _ { j } ^ { * }
76
+ $$
77
+
78
+ to measure the alignment of $\Sigma ^ { * }$ with the $i$ th eigendirection of $\Sigma$ . In particular, $r _ { i }$ is the induced norm of $\mathbf { v } _ { i }$ with respect to $\Sigma ^ { * }$ . We use $\bar { \mathrm { t r } }$ to denote the dimension-normalized trace: for a matrix $A \in \mathbb { R } ^ { n \times n }$ , $\textstyle { \bar { \operatorname { t r } } } ( A ) = { \frac { 1 } { n } } \operatorname { t r } ( A )$ . We use $\| A \| _ { \infty }$ and $\| A \| _ { F }$ to denote the operator norm and Frobenius norm of matrix $A$ respectively. Finally, we use $\delta _ { \mathbf { x } }$ to denote the Dirac delta function centered at $\mathbf { x }$ .
79
+
80
+ # 2.2 Assumptions
81
+
82
+ Regularity assumptions on the spectra of $\Sigma$ and $\Sigma ^ { * }$ are necessary to state the limiting behavior of this system. As in $\dot { \left. \overline { { { \left. 6 \overline { { { 7 } } } } } } \\right.right. }$ , it is not sufficient to consider the spectra of these matrices individually; they must be considered jointly. We do this in an eigenbasis of $\Sigma$ .
83
+
84
+ Assumption 1. We define the empirical joint spectral distribution (EJSD) as
85
+
86
+ $$
87
+ \mu _ { n _ { 0 } } : = \frac { 1 } { n _ { 0 } } \sum _ { i = 1 } ^ { n _ { 0 } } \delta _ { ( \lambda _ { i } , r _ { i } ) }
88
+ $$
89
+
90
+ and assume it converges in distribution to some $\mu _ { ; }$ , a distribution on $\mathbb { R } _ { + } ^ { 2 }$ as $n _ { 0 } \infty$ . We refer to $\mu$ as the limiting joint spectral distribution (LJSD), and emphasize that this defines the relevant limiting properties of the train and test distributions2. Additionally, we require that $\begin{array} { r } { \operatorname* { l i m } \operatorname* { s u p } _ { n _ { 0 } } \operatorname* { m a x } ( \| \Sigma \| _ { \infty } , \| \Sigma ^ { * } \| _ { \infty } ) \leq C } \end{array}$ for a constant $C$ .
91
+
92
+ Often we use $( \lambda , r )$ for random variables sampled jointly from $\mu$ and denote the marginal of $\lambda$ under $\mu$ with $\mu _ { \mathrm { { t r a i n } } }$ . The conditional expectation $\mathbb { E } [ r | \lambda ]$ is an important object in our study. We frequently overload the notation $\mathbb { E } [ r | \lambda ]$ to view it as a function of $\lambda$ , and we assume the following for simplicity.
93
+
94
+ Assumption 2. $\mu$ is either absolutely continuous or a finite sum of delta masses. Moreover, the expectations of $\lambda$ and $r$ are finite.
95
+
96
+ When the eigenspaces of $\Sigma$ and $\Sigma ^ { * }$ are aligned and $r _ { i } = \lambda _ { i } ^ { * } = \Phi ( \lambda _ { i } )$ for some smooth function $\Phi$ , the support of the LJSD degenerates. Here, Assump. $\perp$ is essentially equivalent to assuming the empirical spectral distribution of $\Sigma$ converges in distribution to some $\mu _ { \mathrm { { t r a i n } } }$ , which is a standard assumption in the regression literature [14, 41]. One special case of note is when there is no shift, i.e. $\Phi$ is the identity, in which case the LJSD degenerates to $\mu _ { \emptyset }$ defined by
97
+
98
+ $$
99
+ \mu _ { \emptyset } ( \lambda , r ) : = \mu _ { \operatorname { t r a i n } } ( \lambda ) \delta _ { \lambda } ( r ) , \quad i . e . \quad ( \lambda , \lambda ) \sim \mu _ { \emptyset } \mathrm { f o r } \lambda \sim \mu _ { \operatorname { t r a i n } } .
100
+ $$
101
+
102
+ As our analysis will eventually take place in the high-dimensional limit, we further define the asymptotic scales of the training and test covariances as $s : = \operatorname* { l i m } _ { n _ { 0 } \to \infty } \operatorname { t r } ( \Sigma ) = \mathbb { E } _ { \mu } [ \lambda ]$ and $s _ { * } : = \bar { \operatorname* { l i m } _ { n _ { 0 } \to \infty } \operatorname { t r } ( \Sigma ^ { * } ) } = \mathbb { E } _ { \mu } [ r ]$ under the limiting behavior specified in Assump. 1.
103
+
104
+ Throughout this paper, we also enforce the following standard regularity assumptions on the activation functions to ensure the existence of the moments and derivatives we compute.
105
+
106
+ Assumption 3. The activation function $\sigma : \mathbb { R } \mathbb { R }$ is assumed to be differentiable almost everywhere.
107
+ We assume that, $| \sigma ( x ) | , | \sigma ^ { \prime } ( x ) | \leq c _ { 0 } \exp ( c _ { 1 } x )$ for constants $c _ { 0 } , c _ { 1 }$ .
108
+
109
+ # 2.3 A simple family of diatomic distributions
110
+
111
+ As the above assumptions allow such a general class of covariance structures, it is useful to consider our results in the context of a simple family of distributions that readily admits a simple interpretation.
112
+
113
+ Definition 2.1. For $\alpha \geq 1$ and $\theta \in \mathbb { R } ,$ , we define the family of $( \alpha , \theta )$ -diatomic LJSDs with $\theta$ -powerlaw shifts as
114
+
115
+ $$
116
+ \mu _ { \alpha , \theta } ^ { d i a t o m i c } : = \frac { 1 } { \alpha + 1 } \delta _ { ( \alpha , C \alpha ^ { \theta } ) } + \frac { \alpha } { \alpha + 1 } \delta _ { ( \alpha ^ { - 1 } , C \alpha ^ { - \theta } ) } ,
117
+ $$
118
+
119
+ where $C$ is a normalization constant chosen so that $\mathbb { E } _ { \mu _ { \alpha , \theta } ^ { d i a t o m i c } } [ r ] = 1$ . Note that $\mu _ { \alpha , \theta } ^ { d i a t o m i c }$ is the limit of
120
+
121
+ $$
122
+ \Sigma _ { i j } : = \left\{ \begin{array} { l l } { \alpha } & { i f i = j a n d i \leq \left\lfloor \frac { n _ { 0 } } { 1 + \alpha } \right\rfloor } \\ { \alpha ^ { - 1 } } & { i f i = j a n d i > \left\lfloor \frac { n _ { 0 } } { 1 + \alpha } \right\rfloor } \\ { 0 } & { i f i \neq j } \end{array} \right. \qquad a n d \quad \Sigma ^ { * } : = \frac { 1 } { \overline { { \operatorname { t r } } } \left( \Sigma ^ { \theta } \right) } \Sigma ^ { \theta } .
123
+ $$
124
+
125
+ This simple two-parameter family of distributions captures the fast eigenvalue decay observed in many datasets in machine learning, for which the covariance spectra are often dominated by several large eigenvalues and exhibit a long tail of many small eigenvalues $\textcircled { 1 3 4 } \textcircled { 1 }$ . Note that the trivial case of $\alpha = 1$ yields an identity covariance with no shift. For the nontrivial setting $\alpha > 1$ , the exponent $\theta$ parameterizes the strength of the shift in an intuitive way: when $\theta = 1$ , there is no shift; when $\theta < 1$ , $\overset { \cdot } { \alpha } { } ^ { \theta } < \alpha$ , so the large eigendirections of the training distribution are suppressed in the test distribution, suggesting that the shift makes learning harder; when $\theta > 1$ , $\alpha ^ { \theta } > \alpha$ , so the large eigendirections of the training distribution are further emphasized in the test distribution, suggesting that the shift makes learning easier. We will return to the notion of shift strength in Secs. 3 and 4.
126
+
127
+ # 3 Motivating example: linear regression
128
+
129
+ We first consider the relatively simple case of ridgeless linear regression (LR), which will help build some intuition for the more general analysis of random feature regression in Sec. 5.1. Assuming the labels are generated by the linear model defined above, i.e. $y _ { i } = { \beta ^ { \top } } { \bf { x } } _ { i } / { \sqrt { n _ { 0 } } } + \varepsilon _ { i }$ , the estimator is given by ${ \hat { \beta } } = ( X X ^ { \top } ) ^ { - 1 } X Y$ , and the test risk (see Eq. $( 4 ) \dot { }$ ) has the following simple form.
130
+
131
+ Proposition 3.1. For fixed dimension $n _ { 0 }$ and sample size $m > n _ { 0 } + 1$ , the test error of $L R$ is given by
132
+
133
+ $$
134
+ E _ { \Sigma ^ { * } } ^ { L R } = \sigma _ { \epsilon } ^ { 2 } \frac { n _ { 0 } } { m - n _ { 0 } - 1 } \bar { \mathrm { t r } } \bigl ( \Sigma ^ { * } \Sigma ^ { - 1 } \bigr ) = \sigma _ { \epsilon } ^ { 2 } \frac { n _ { 0 } } { m - n _ { 0 } - 1 } \frac { 1 } { n _ { 0 } } \sum _ { i = 1 } ^ { n _ { 0 } } \frac { r _ { i } } { \lambda _ { i } } .
135
+ $$
136
+
137
+ Under Assump. 1, as $n _ { 0 } , m \infty$ with $\phi = n _ { 0 } / m$ fixed, $E _ { \Sigma ^ { * } } ^ { L R } \to E _ { \mu } ^ { L R } = \sigma _ { \epsilon } ^ { 2 } \phi / ( 1 - \phi ) \mathbb { E } _ { \mu } [ r / \lambda ] .$
138
+
139
+ One immediate question is whether a given shift will increase or decrease the test error relative to $E _ { \Sigma } ^ { \mathrm { L R } }$ . While the precise answer is of course determined by the value of $\bar { \mathrm { t r } } ( \Sigma ^ { * } \Sigma ^ { - 1 } )$ , it useful for the subsequent analysis to develop an understanding of the individual contributions to this term. Similar decompositions of the test error into eigenspaces have proved useful in a variety of other contexts, e.g. [42, 4]. We begin with a specific example in the setting of the finite-dimensional analog of Def. 2.1.
140
+
141
+ Example 3.1. For the finite form of the $( \alpha , \theta )$ -diatomic density defined in Eq. $( 1 0 )$ , the test error of $L R$ is given by
142
+
143
+ $$
144
+ E _ { \Sigma ^ { * } } ^ { L R } = \sigma _ { \epsilon } ^ { 2 } { \frac { n _ { 0 } } { m - n _ { 0 } - 1 } } { \frac { \alpha + w ( \alpha ^ { 2 \theta - 1 } - \alpha ) } { 1 + w ( \alpha ^ { 2 \theta } - 1 ) } } \quad f o r \quad w = { \frac { 1 } { n _ { 0 } } } \left\lfloor { \frac { n _ { 0 } } { 1 + \alpha } } \right\rfloor ,
145
+ $$
146
+
147
+ and so $\begin{array} { r } { \frac { \partial } { \partial \theta } E _ { \Sigma ^ { * } } ^ { L R } = \sigma _ { \epsilon } ^ { 2 } \frac { n _ { 0 } } { m - n _ { 0 } - 1 } \frac { 2 ( 1 - w ) w \alpha ^ { 2 \theta - 1 } ( 1 - \alpha ^ { 2 } ) \log ( \alpha ) } { ( 1 + w ( \alpha ^ { 2 \theta } - 1 ) ) ^ { 2 } } \leq 0 } \end{array}$ , which implies $E _ { \Sigma _ { 1 } ^ { * } } ^ { L R } \leq E _ { \Sigma _ { 2 } ^ { * } } ^ { L R }$ whenever $\theta _ { 1 } \geq \theta _ { 2 }$ , in accordance with the discussion in Sec. 2.3. It follows from Eq. $\underline { { \lVert \boldsymbol { 0 } \rVert } }$ that the condition $\theta _ { 1 } \geq \theta _ { 2 }$ not only implies $\bar { \mathrm { t r } } ( \Sigma _ { 1 } ^ { * } \Sigma ^ { - 1 } ) \le \bar { \mathrm { t r } } ( \Sigma _ { 2 } ^ { * } \Sigma ^ { - 1 } )$ , but also that the ratios of overlap coefficients $r _ { i , 1 } / r _ { i , 2 }$ form a nondecreasing sequence. It is this condition involving all the eigendirections that will generalize to the nonlinear random feature setting in Sec. 4.
148
+
149
+ The following proposition captures the essence of these considerations in the context of linear regression. See Sec. $\boxed { \mathbf { A } 4 }$ for the proof.
150
+
151
+ Proposition 3.2. Let ${ \boldsymbol { r } } _ { i , 1 }$ and ${ r } _ { i , 2 }$ denote the overlap coefficients3 of $\Sigma _ { 1 } ^ { * }$ and $\Sigma _ { 2 } ^ { * }$ relative to $\Sigma$ . If $\mathrm { t r } ( \bar { \Sigma } _ { 2 } ^ { * } ) \geq \mathrm { t r } ( \Sigma _ { 1 } ^ { * } )$ and the ratios $r _ { i , 1 } / r _ { i , 2 }$ form a nondecreasing sequence, then in the setting of Prop. 3.1 , $E _ { \Sigma _ { 2 } ^ { * } } ^ { L R } \geq E _ { \Sigma _ { 1 } ^ { * } } ^ { L R }$ .
152
+
153
+ Whereas the $( \alpha , \theta )$ -diatomic LJSDs explicitly enforce the trace normalizations $\mathrm { t r } ( \Sigma ) = \mathrm { t r } ( \Sigma _ { 1 } ^ { * } ) = \mathrm { t r } ( \Sigma _ { 2 } ^ { * } ) = 1$ , Prop. $3 . 2$ provides sufficient conditions for the ordering of test errors for non-unit traces. The fact that $E _ { \Sigma ^ { * } } ^ { \mathrm { L R } }$ scales linearly with the overall scale of $\Sigma ^ { * }$ is a unique feature of linear regression and does not generalize to the nonlinear random feature setting. We return to this issue in Sec. 4.
154
+
155
+ # 4 Definition of shift strength
156
+
157
+ Deriving conditions on whether a shift will hurt or help a model’s performance is crucial to building an understanding of covariate shift. Motivated in part by the above results for linear regression, and in part by the results for random feature regression that we present in $\mathrm { S e c . } \underline { { \bar { 5 . 3 } } }$ we introduce the following definition of shift strength, which is a direct generalization of the conditions of Prop. 3.2:
158
+
159
+ Definition 4.1. Let $\mu _ { 1 }$ and $\mu _ { 2 }$ be LJSDs with the same marginal distribution of $\lambda ,$ , denoted $\mu _ { t r a i n }$ . If the asymptotic overlap coefficients are such that $\mathbb { E } _ { \mu _ { 1 } } [ r | \lambda ] / \mathbb { E } _ { \mu _ { 2 } } [ r | \lambda ]$ is nondecreasing as a function of $\lambda$ on the support of $\mu _ { t r a i n }$ and $\mathbb { E } _ { \mu _ { 1 } } [ r ] \le \mathbb { E } _ { \mu _ { 2 } } [ r ]$ , we say $\mu _ { 1 }$ is easier than $\mu _ { 2 }$ (or $\mu _ { 2 }$ is harder than $\mu _ { 1 . }$ ), and write $\mu _ { 1 } \leq \mu _ { 2 }$ . Comparing against the case of no shift $\mu _ { \emptyset }$ , we say $\mu _ { 1 }$ is easy when $\mu _ { 1 } \leq \mu _ { \emptyset }$ and hard when µ1 µ .
160
+
161
+ A priori, there is little reason to hope that such a model-independent definition of shift strength would adequately characterize a shift’s impact on the total error, bias, or variance of a given model. Even for the relatively simple case of random feature kernel regression, the nonlinear feature maps of Eq. $\mathbb { Q } )$ would seem to inextricably couple the covariance distribution to the model.
162
+
163
+ Nevertheless, as we show in $\mathrm { S e c . } \big | 5 . 1 \big | ,$ the coupling between model and shift simplifies considerably in the high-dimensional proportional asymptotics. It is characterized by a handful of constants that depend solely on the overall covariance scale $\mathbb { E } _ { \mu } [ r ]$ and a collection of functionals of $\mu$ , whose magnitudes can be bounded in terms of the ratio $\dot { { \mathbb E } } _ { \mu } [ r | \lambda ] / { \mathbb E } _ { \mu _ { \emptyset } } [ r | \lambda ]$ . The conditions that Def. 4.1 places on $\mathbb { E } _ { \mu } [ r ]$ and $\mathbb { E } _ { \mu } [ r | \lambda ] / \mathbb { E } _ { \mu _ { \emptyset } } [ r | \lambda ]$ can be augmented by various constraints on the model to derive bounds on how the total error and bias will respond to a shift of a given strength. This perspective introduces considerable complexity and we present the details of this analysis elsewhere.
164
+
165
+ In this work, we focus on a simpler, surprising result: by merely normalizing the scales of the covariate distributions (i.e. enforcing $s = s _ { * }$ ), Def. $\boxed { 4 . 1 }$ provides a model-independent definition of shift strength that determines how random feature models respond to shifts of different strength. This observation motivates the following assumption.
166
+
167
+ Assumption 4. The training and test covariance scales are equal, $\mathbb { E } _ { \mu } [ \lambda ] = \mathbb { E } _ { \mu } [ r ]$ , i.e. $s = s _ { \ast }$
168
+
169
+ We emphasize that Assump. 4 reflects common practice for many models and data modalities, as preprocessing techniques such as standardization are ubiquitous and many architectural components such as layer- or batch-normalization achieve a similar effect [21, 28, 46].
170
+
171
+ # 5 Covariate shift in random feature kernel regression
172
+
173
+ # 5.1 Main results
174
+
175
+ Our main results characterize the high-dimensional limits of the test error, bias, and variance of the nonlinear random feature model of Sec. $2 .$ Before stating them, we first introduce some additional constants that capture the effect of the nonlinearity $\sigma$ . For $z \sim \mathcal { N } ( 0 , s )$ , define
176
+
177
+ $$
178
+ \begin{array} { r } { \eta : = \mathbb { V } [ \sigma ( z ) ] \ : , \ : \ : \rho : = ( \frac { 1 } { s } \mathbb { E } [ z \sigma ( z ) ] ) ^ { 2 } \ : , \ : \ : \zeta : = s \rho \ : , \ : \ : \ : \mathrm { ~ a n d ~ } \ : \ : \ : \omega : = s ( \eta / \zeta - 1 ) \ : . } \end{array}
179
+ $$
180
+
181
+ Our results also depend on the covariance spectra through two sets of functionals of $\mu$ ,
182
+
183
+ $$
184
+ \begin{array} { r } { \mathcal { T } _ { a , b } \left( x \right) : = \phi \mathbb { E } _ { \mu } \left( \lambda ^ { a } \left( \phi + x \lambda \right) ^ { - b } \right) \quad \mathrm { ~ a n d ~ } \quad \mathcal { T } _ { a , b } ^ { * } \left( x \right) : = \phi \mathbb { E } _ { \mu } \left( r \lambda ^ { a - 1 } \left( \phi + x \lambda \right) ^ { - b } \right) . } \end{array}
185
+ $$
186
+
187
+ ![](images/16406aa9c54eafbda06548093a3ffd192be3f07da1d914556ff9fecc446814d9.jpg)
188
+ Figure 1: The asymptotic predictions of Thm. $\boxed { 5 . 1 }$ as a function of the overparameterization ratio $( \phi / \psi = n _ { 1 } / m )$ and the shift power $\left( \theta \right)$ for the $( { \bar { 2 } } , \theta )$ -diatomic LJSD (Eq. $\textcircled { 9 }$ ) with $\phi = n _ { 0 } / m = 0 . 5$ , $\sigma = \mathrm { R e L U }$ , $\gamma = 0 . 0 0 1$ , and $\stackrel { \cdot } { \sigma } _ { \varepsilon } ^ { 2 } = 0 . 1$ . (a) The test error exhibits the characteristic double descent behavior for all shift powers. (b) The bias is a nonincreasing function of $\phi / \psi$ for all shift powers, as in Prop. $\overline { { 5 . 2 } } \Vert$ (c) The variance is the source of the double-descent peak, and is a nonincreasing function of ${ \overline { { \phi / } } } \psi$ for all shift powers in the overparameterized regime, as in Prop. $5 . 3 .$ In (a,b), the total error and bias are nonincreasing functions of $\theta$ , as in Prop. 5.1. (d) 1D horizontal slices of (a,b,c) demonstrate the monotonicity in $\phi / \psi$ predicted by Props. $5 . 2 \AA$ and $\boxed { 5 . 3 }$ (e) 1D vertical slices of (a,b,c) demonstrate the monotonicity in $\theta$ predicted by Prop. 5.1 (the variance also appears monotonic, but it need not be in general). (f) The generalization gap between the error on shifted and unshifted distributions is a nonincreasing function of $\phi / \psi$ in the overparameterized regime, as in Prop. 5.4. Markers in (d,e,f) show simulations for $n _ { 0 } = 5 1 2$ and agree well with the asymptotic predictions.
189
+
190
+ Theorem 5.1. Under Assumps. $\mathbb { Z } , \perp , \perp a n d \perp ,$ as $n _ { 0 } , n _ { 1 } , m \infty$ the test error $E _ { \Sigma ^ { * } }$ converges to $E _ { \mu } = B _ { \mu } + V _ { \mu }$ , with the bias $B _ { \mu }$ and variance $V _ { \mu }$ given by
191
+
192
+ $$
193
+ \begin{array} { l } { { \displaystyle B _ { \mu } = \phi \mathcal { T } _ { 1 , 2 } ^ { * } } } \\ { { \displaystyle V _ { \mu } = - \rho \frac { \psi } { \phi } \frac { \partial x } { \partial \gamma } \bigg ( \mathcal { T } _ { 1 , 1 } ( \omega + \phi \mathcal { T } _ { 1 , 2 } ) ( \omega + \mathcal { T } _ { 1 , 1 } ^ { * } ) + \frac { \phi ^ { 2 } } { \psi } \gamma \bar { \tau } \mathcal { T } _ { 1 , 2 } \mathcal { T } _ { 2 , 2 } ^ { * } } } \\ { { \displaystyle \quad \quad + \gamma \tau \mathcal { T } _ { 2 , 2 } ( \omega + \phi \mathcal { T } _ { 1 , 2 } ^ { * } ) + \sigma _ { \varepsilon } ^ { 2 } \Big ( ( \omega + \phi \mathcal { T } _ { 1 , 2 } ) ( \omega + \mathcal { T } _ { 1 , 1 } ^ { * } ) + \frac { \phi } { \psi } \gamma \bar { \tau } \mathcal { T } _ { 2 , 2 } ^ { * } \Big ) \bigg ) , } } \end{array}
194
+ $$
195
+
196
+ where x is the unique nonnegative real root of x = 1⌧!+I1,1 , @x@ $\begin{array} { r } { \frac { 1 - \gamma \tau } { \omega + \mathcal { T } _ { 1 , 1 } } , \frac { \partial x } { \partial \gamma } = - \frac { x } { \gamma + \rho \gamma ( \tau \psi / \phi + \bar { \tau } ) ( \omega + \phi \mathcal { T } _ { 1 , 2 } ) } } \end{array}$ , and
197
+
198
+ $$
199
+ \tau = \frac { \sqrt { ( \psi - \phi ) ^ { 2 } + 4 x \psi \phi \gamma / \rho } + \psi - \phi } { 2 \psi \gamma } a n d \bar { \tau } = \frac { 1 } { \gamma } + \frac { \psi } { \phi } \bigl ( \tau - \frac { 1 } { \gamma } \bigr ) .
200
+ $$
201
+
202
+ Numerical predictions from Thm. $\underline { { \boldsymbol { \mathsf { F . 1 } } } }$ can be obtained by first solving the self-consistent equation for $x$ by fixed-point iteration, $\begin{array} { r } { x \mapsto \frac { 1 - \gamma \tau } { \omega + \mathcal { T } _ { 1 , 1 } } } \end{array}$ , and then plugging the result into the remaining terms. Fig. 1 shows excellent agreement between these asymptotic predictions and finite-size simulations.
203
+
204
+ At times we will find it convenient to consider the ridgeless limit of Thm. $5 . 1 .$ By carefully expanding $x$ and $\tau$ for small $\gamma$ , it is straightforward to obtain the following corollary.
205
+
206
+ Corollary 5.1. In the setting of Thm. $\underline { { \boldsymbol { \sqrt { 5 . I } } } }$ as the ridge regularization constant $\gamma 0$ , $E _ { \mu } = B _ { \mu } + V _ { \mu }$ with $B _ { \mu }$ given in Eq. $( 1 5 )$ and $V _ { \mu }$ given by
207
+
208
+ $$
209
+ V _ { \mu } = \frac { \psi } { \left| \phi - \psi \right| } x ( \sigma _ { \varepsilon } ^ { 2 } + \mathcal { T } _ { 1 , 1 } ) ( \omega + \mathcal { T } _ { 1 , 1 } ^ { * } ) + \left\{ \begin{array} { l l } { x \Big ( 1 - \frac { x ( \omega - \sigma _ { \varepsilon } ^ { 2 } ) } { 1 - x ^ { 2 } \mathcal { T } _ { 2 , 2 } } \Big ) \mathcal { T } _ { 2 , 2 } ^ { * } } & { \phi \geq \psi } \\ { \frac { x ^ { 2 } \psi \mathcal { T } _ { 2 , 2 } } { \phi - x ^ { 2 } \psi \mathcal { T } _ { 2 , 2 } } \big ( \omega + \phi \mathcal { T } _ { 1 , 2 } ^ { * } \big ) } & { \phi < \psi } \end{array} \right. ,
210
+ $$
211
+
212
+ where x is the unique positive real root of $\begin{array} { r } { x = \frac { \operatorname* { m i n } ( 1 , \phi / \psi ) } { \omega + { \mathcal { T } _ { 1 , 1 } } } } \end{array}$ .
213
+
214
+ Taking $\sigma ( x ) = x$ and $\psi \to 0$ in Cor. $5 . 1$ yields an expression for the test error of ridgeless linear regression that agrees with $\pm \pmb { \Vert 2 4 \Vert }$ and with the asymptotic form of Prop. 3.1 (see Sec. A4.2).
215
+
216
+ # 5.2 Harder shifts increase the bias and test error
217
+
218
+ The bias and variance in Thm. 5.1 depend on the covariate shift exclusively through $\mathcal { T } _ { a , b } ^ { * }$ — all other terms such as $x , \tau , \bar { \tau }$ , and $\mathcal { T } _ { a , b }$ only depend on the marginal of $\lambda$ under $\mu$ . The functionals $\mathcal { T } _ { a , b } ^ { * }$ generalize the simple ratio of overlap coefficients to eigenvalues, $\mathbb { E } _ { \mu } [ r / \lambda ]$ , that characterizes the error for linear regression (indeed, $\mathcal { T } _ { 0 , 0 } ^ { * } = \tilde { \phi } \mathbb { E } _ { \mu } [ r / \lambda ] \mathrm { , }$ ). In contrast, the error in the random feature setting is a combination of multiple such terms. Nevertheless, Def. $4 . 1$ enables comparisons of the individual $\mathcal { T } _ { a , b } ^ { * }$ functionals, which provide sufficient conditions to order the error and bias.
219
+
220
+ Proposition 5.1. Consider two LJSDs such that $\mu _ { 1 } \leq \mu _ { 2 }$ (see Def. 4.1) Then, in the setting of Thm. 5.1, $B _ { \mu _ { 1 } } \leq B _ { \mu _ { 2 } }$ and, if $\sigma _ { \varepsilon } ^ { 2 } \leq \omega$ , $E _ { \mu _ { 1 } } \leq E _ { \mu _ { 2 } }$ .
221
+
222
+ Prop. 5.1 shows that Def. $\boxed { 4 . 1 }$ provides an essentially model-independent condition to determine the impact of covariate shift on the test error4. Interestingly, both the bias (which arises from both regularization and model misspecification) and the total error (which has additional variance contributions from the randomness induced by $W$ , $X$ , and $\epsilon$ ) respond to shifts in tandem in the regime of small label noise. (For large label noise, the variance can dominate the error and cause violations of monotonicity; see $\sec . { 5 . 5 } .$ Prop. $5 . 1$ is illustrated for the $( \alpha , \theta )$ -diatomic LJSD in Fig. 1: following the vertical lines upward in (a), (b), or the $\mathbf { X }$ -axis rightward in (e) yields easier shifts and a corresponding decrease in the bias and total error.
223
+
224
+ # 5.3 The benefit of overparameterization
225
+
226
+ While Prop. 5.1 shows that harder shifts increase the error, it is natural to wonder whether this increase can be mitigated by judicious model selection. In practice, empirical investigations have shown that the performance of large, overparameterized models tends to deteriorate less under distribution shift than their smaller counterparts $\overline { { \lVert \mathscr { Q } \boldsymbol { 6 } \rVert } }$ . We obtain a number of theoretical results that formally prove the benefit of overparameterization in our random feature setting.
227
+
228
+ First, we show that the bias decreases (or stays constant) when additional random features are added, which increases the model capacity and accords with the intuition of the bias as a measure of the model’s ability to fit the data.
229
+
230
+ Proposition 5.2. In the setting of Thm. $\boxed { 5 . I }$ the bias $B _ { \mu }$ is a nonincreasing function of the overparameterization ratio $\phi / \psi$ .
231
+
232
+ In contrast to the bias, which is monotonic for all overparameterization ratios, the variance can exhibit nonmonotonic behavior in the underparameterized regime. On the other hand, the following proposition shows that in the overparameterized regime, the variance is also nonincreasing. Note that our proof requires the setting of ridgeless regression $( \gamma = 0$ ), but numerical investigation suggests this condition may not be necessary (see Fig. 1).
233
+
234
+ Proposition 5.3. In the setting of Cor. $\boxed { 5 . I }$ and in the overparameterized regime (i.e. $\psi < \phi ,$ ), the variance $V _ { \mu }$ is a nonincreasing function of the overparameterization ratio $\phi / \psi$ .
235
+
236
+ The explosion of variance at the interpolation threshold and then its subsequent decay have been demonstrated in previous exact asymptotic studies of random feature regression in the absence of covariate shift, in stark contrast to what classical theory would suggest [2, 41]. Prop. 5.3 confirms the existence of analogous behavior under covariate shift.
237
+
238
+ Taken together, Props. $\boldsymbol { \left. 5 . 2 \right. }$ and $5 . 3$ imply that some of the benefits of overparameterization extend to models evaluated out-of-distribution. An additional benefit is that overparameterized models are more robust: the difference in error between unshifted and shifted test distributions is smaller for larger models. A formal statement of this enhanced robustness is given in the following result.
239
+
240
+ Proposition 5.4. Consider two LJSDs such that $\mu _ { 1 } \leq \mu _ { 2 }$ (see Def. $\boxed { 4 . 7 }$ . Then, in the setting of Cor. 5.1 and in the overparameterized regime (i.e. $\psi < \phi ,$ ), the generalization gap $E _ { \mu _ { 2 } } - E _ { \mu _ { 1 } }$ is a nonincreasing function of the overparameterization ratio $\phi / \psi$ .
241
+
242
+ ![](images/bad57c16e13135a0864dec947190c2dd836185bfe52474affd98050f435e79e4.jpg)
243
+ Figure 2: Linear relationship between in-distribution and out-of-distribution generalization error. (a) Asymptotic predictions for shifted versus unshifted error for models with varying degrees of overparameterization $\phi / \psi > 1$ , obtained via Cor. 5.1 for the $( 3 , \theta )$ -diatomic LJSD (Eq. $( { \bar { 9 } } )$ ) with $\phi = \overline { { n _ { 0 } / m } } = 0 . 5$ , $\sigma = \mathrm { R e L U }$ , $\sigma _ { \varepsilon } ^ { 2 } = 0 . 0 1$ and two different values of the shift-power $\theta$ . Markers represent simulations for $n _ { 0 } = 5 1 2$ . The negated errors are plotted so that performance improves left to right and bottom to top, in order to match the behavior of the accuracy metric. (b) Reproduction of the empirical results of $\mathbb { B } 6 \mathbb { K } \mathbb { 3 } \mathbb { I }$ , showing the relationship between the classification accuracy of various models on the original ImageNet test set and two shifted ImageNet datasets: a “hard" dataset with greyscale corruptions, Grey, and an “easy" dataset with high inter-annotator agreement, TopImgs. In both (a) and $\mathbf { ( b ) }$ , the slope is greater than one for the hard shift and less than one for the easy shift, in accordance with Prop. 5.5.
244
+
245
+ In Fig. 1, Props. 5.2, 5.3 and $\underline { { \boldsymbol { \mathsf { F . 4 } } } }$ are illustrated. Following the horizontal lines rightward in (a), (b), and (c) or the $\mathbf { X }$ -axis rightward in (d) and (f) leads to models with more parameters. The monotonicity of the bias across the whole range of parameterization is evident, as is the necessity of considering the monotonicity of the variance and generalization gap only when $\phi > \psi$ .
246
+
247
+ # 5.4 Linear trends between in-distribution and out-of-distribution generalization
248
+
249
+ We have discussed how overparameterization yields improvements on both unshifted and shifted test distributions, which hints that these two quantities are positively correlated. Indeed, recent work has suggested increasing model size as a path to increased robustness $\pmb { \mathbb { D } 6 }$ . Additional empirical studies have further refined this observation by discovering a linear relationship between the performance of models of varying complexity on unshifted and shifted data $\mathbb { 1 5 6 , 6 3 }$ . In the context of ridgeless random feature regression, we provide a formal proof of this linear relationship.
250
+
251
+ Proposition 5.5. In the setting of Cor. 5.1 and in the overparameterized regime (i.e. $\psi < \phi ,$ ),
252
+
253
+ $$
254
+ E _ { \mu } = E _ { 0 } + \underbrace { \left( { \frac { \omega + { \mathcal { T } } _ { 1 , 1 } ^ { * } } { \omega + { \mathcal { T } } _ { 1 , 1 } } } \right) } _ { \mathrm { S L O P E } } E _ { \mu _ { \emptyset } } ,
255
+ $$
256
+
257
+ parametrically in the overparameterization ratio $\phi / \psi$ , where $E _ { 0 }$ and SLOPE are constants independent of $\phi / \psi$ , and $E _ { \mu _ { \emptyset } }$ is the error on the unshifted distribution. Moreover, SLOPE $\geq 1$ when $\mu$ is hard and SLOPE $\leq 1$ when $\mu$ is easy.
258
+
259
+ Eq. $( 1 9 )$ implies a parametrically linear relationship between $E _ { \mu }$ and $E _ { \mu _ { \emptyset } }$ by varying $\phi / \psi$ . Prop. 5.5 also makes the nontrivial prediction that an improvement on the unshifted distribution leads to a relatively greater improvement on the shifted distribution when the shift is hard, and to a relatively smaller improvement when the shift is easy. This prediction is corroborated qualitatively in the data from $\boxed { 5 5 } \boxed { 5 6 } \boxed { 4 3 }$ . We plot this linear behavior in Fig. $^ { 2 , }$ where (a) shows the random feature model and (b) shows an example of data from $\pm \pm \boxed { 5 6 } \boxed { 6 3 } \parallel$ . The striking similarity in these plots is evident.
260
+
261
+ # 5.5 Importance of assumptions
262
+
263
+ Props. 5.1, 5.2, 5.3, 5.4 and $5 . 5$ rely on a number of assumptions and conditions; here we show the necessity of some of these prerequisites for our results.
264
+
265
+ ![](images/1b700469dd6c39a82f40cf037ce3fac94f07b3ef7c43cc915e15b892f6e01e07.jpg)
266
+ Figure 3: Relaxing the assumptions and conditions can lead to counterexamples to the propositions. (a) Asymptotic predictions (solid lines) and simulations with $n _ { 0 } = 4 0 9 6$ (markers) for the total error, bias, and variance for the $( 4 , \theta )$ -diatomic LJSD with $\phi = 4$ , $\psi = 0 . 2 5$ , $\gamma = 1 0 ^ { - 4 }$ , and $\sigma = \mathrm { R e L U }$ (implying $\begin{array} { r } { \omega = 1 - \frac { 2 } { \pi } \approx \dot { 0 } . 3 6 ) } \end{array}$ as a function of increasing shift power $\theta$ . When $\sigma _ { \varepsilon } ^ { 2 } < \omega$ (dashed curves), the bias and total error are nonincreasing, as predicted by Prop. $\underline { { \boldsymbol { \mathsf { F . 1 } } } } \big \|$ though the variance is not. When $\sigma _ { \varepsilon } ^ { 2 } > \omega$ (solid curves), the total error is no longer nonincreasing. $\mathbf { ( b ) }$ Asymptotic predictions (solid lines) and simulations with $n _ { 0 } = 2 5 6$ (markers) for the total error with $\phi = 0 . 5$ , $\gamma = 0 . 1$ , $\sigma = \mathrm { R e L U }$ and $\sigma _ { \varepsilon } ^ { 2 } = 0 . 0 1$ as a function of the overparameterization ratio $\phi / \psi$ for four different LJSDs $\mu _ { 1 } , \ldots , \mu _ { 4 }$ , chosen such that the only comparable pairs of LJSDs under the partial order in Def. $\boxed { 4 . 1 }$ are $\mu _ { 1 } \geq \mu _ { 4 }$ and $\mu _ { 2 } \geq \mu _ { 4 }$ , and the strict ordering of the error for those pairs is seen for all values of $\phi / \psi$ . The orange $\left( \mu _ { 2 } \right)$ and green $\left( \mu _ { 3 } \right)$ curves cross one another, illustrating how nonmonotonicity of overlap ratios in Def. $\boxed { 4 . 1 }$ can induce model-dependence in the ordering of the error. (c) Asymptotic predictions (solid lines) and simulations for $n _ { 0 } = 5 1 2$ (markers) for shifted versus unshifted error for models with varying values of the overparameterization ratio $\phi / \psi$ , obtained via Thm. 5.1 for the $( 3 , - 1 / 2 )$ -diatomic LJSD with $\phi = 0 . 5$ , $\sigma = \mathrm { R e L U }$ , $\sigma _ { \varepsilon } ^ { 2 } = 0 . 0 1$ , and $\gamma = 0 . 0 0 5$ . While the relationship is nearly linear in the overparameterized regime, it is markedly nonlinear in the underparameterized regime, highlighting the importance of overparameterization in Prop. 5.5.
267
+
268
+ Prop. 5.1 relies on a small label-noise condition $( \sigma _ { \varepsilon } ^ { 2 } \leq \omega )$ ) to ensure that the total error is ordered with respect to shift strength. The reason this condition is necessary is that the variance can actually increase as shifts become easier. While Fig. $\bigstar$ presented a configuration for which the bias, variance, and error all decrease for easier shifts, Fig. $\textcircled { 3 ( \mathrm { a } ) }$ shows that a decrease is not guaranteed for the variance, and that it can increase even under the small label-noise condition. Moreover, while the bias continues to decrease for large label noise $( \sigma _ { \epsilon } ^ { 2 } > \omega )$ ), the variance can become so large that bias can no longer offset it, causing the error itself to increase, as seen in Fig. 3(a).
269
+
270
+ The strict ordering of overlap coefficients in Def. $^ { 4 . 1 }$ are also necessary to guarantee a complete decoupling of the model and the shift strength. In the absence of these conditions, Fig. $\overline { { | 3 } } ( { \mathsf { b } } )$ shows how even a single out-of-order overlap coefficient induces a violation of the monotonicity with respect to shift strength suggested by Prop. $\boxed { 5 . 1 }$ (this example is detailed further in Sec. A8)
271
+
272
+ Finally, we note that the exact linear relationship between in-distribution and out-of-distribution generalization characterized by Prop. $5 . 5$ in Eq. $\textcircled { 1 9 }$ relies crucially on the overparameterization condition, $\psi < \phi$ , as evidenced in Fig. 3(c), which shows marked nonlinearity in the underparameterized regime. This observation is perhaps unsurprising, as severely underparameterized models tend towards chance predictions, which produce comparable errors on shifted and unshifted data. Indeed, similar nonlinear behavior is seen in the low-accuracy regime for realistic models [56, Figure 17].
273
+
274
+ # 6 Conclusion
275
+
276
+ We have presented an exact, asymptotic calculation of the test error, bias, and variance for random feature kernel regression in the presence of covariate shift. After defining a partial order over covariate shifts (motivated by the setting of linear regression), we have proved that harder shifts imply increased error. Our results capture many empirical phenomena such as the fact that overparameterization is beneficial even under covariate shift and that a linear relationship exists between the generalization error on shifted and unshifted data. Future directions include extending our results to the nonasymptotic regime, accommodating feature learning and more general neural network models, and investigating the impact of covariate shift for other loss functions.
277
+
278
+ # Acknowledgments and Disclosure of Funding
279
+
280
+ The authors would like to thank Rodolphe Jenatton, Horia Mania, Ludwig Schmidt, D. Sculley, Vaishaal Shankar, Lechao Xiao, and Steve Yadlowsky for valuable discussions.
281
+
282
+ This work was performed at and funded by Google. No third party funding was used.
283
+
284
+ # References
285
+
286
+ [1] B. Adlam, J. Levinson, and J. Pennington. A random matrix perspective on mixtures of nonlinearities for deep learning. arXiv preprint arXiv:1912.00827, 2019.
287
+ [2] B. Adlam and J. Pennington. The neural tangent kernel in high dimensions: Triple descent and a multi-scale theory of generalization. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 74–84. PMLR, 2020.
288
+ [3] B. Adlam and J. Pennington. Understanding double descent requires a fine-grained bias-variance decomposition. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 11022–11032. Curran Associates, Inc., 2020.
289
+ [4] M. S. Advani, A. M. Saxe, and H. Sompolinsky. High-dimensional dynamics of generalization error in neural networks. Neural Networks, 132:428–446, 2020.
290
+ [5] M. Banna, F. Merlevède, and M. Peligrad. On the limiting spectral distribution for a large class of symmetric random matrices with correlated entries. Stochastic Processes and their Applications, 125(7):2700–2726, 2015.
291
+ [6] M. Banna, J. Najim, and J. Yao. A CLT for linear spectral statistics of large random informationplus-noise matrices. Stochastic Processes and their Applications, 130(4):2250–2281, 2020.
292
+ [7] P. L. Bartlett, A. Montanari, and A. Rakhlin. Deep learning: a statistical viewpoint, 2021.
293
+ [8] C. J. Becker, C. M. Christoudias, and P. Fua. Non-linear domain adaptation with boosting. In C. J. C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems, volume 26. Curran Associates, Inc., 2013.
294
+ [9] M. Belkin, D. Hsu, S. Ma, and S. Mandal. Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849–15854, 2019.
295
+ [10] S. Ben-David, J. Blitzer, K. Crammer, and F. Pereira. Analysis of representations for domain adaptation. In B. Schölkopf, J. Platt, and T. Hoffman, editors, Advances in Neural Information Processing Systems, volume 19. MIT Press, 2007.
296
+ [11] C. Cortes and M. Mohri. Domain adaptation and sample bias correction theory and algorithm for regression. Theor. Comput. Sci., 519:103–126, 2014.
297
+ [12] A. D’Amour, K. Heller, D. Moldovan, B. Adlam, B. Alipanahi, A. Beutel, C. Chen, J. Deaton, J. Eisenstein, M. D. Hoffman, et al. Underspecification presents challenges for credibility in modern machine learning. arXiv preprint arXiv:2011.03395, 2020.
298
+ [13] Y. Deshpande and A. Montanari. Sparse pca via covariance thresholding. Journal of Machine Learning Research, 17(141):1–41, 2016.
299
+ [14] E. Dobriban and S. Wager. High-dimensional asymptotics of prediction: Ridge regression and classification. The Annals of Statistics, 46(1):247 – 279, 2018.
300
+ [15] J. Duchi, T. Hashimoto, and H. Namkoong. Distributionally robust losses for latent covariate mixtures, 2020.
301
+ [16] J. C. Duchi and H. Namkoong. Learning models with uniform performance via distributionally robust optimization. The Annals of Statistics, 49(3):1378 – 1406, 2021.
302
+
303
+ [17] L. Erdos. The matrix dyson equation and its applications for random matrices. arXiv preprint arXiv:1903.10060, 2019.
304
+
305
+ [18] L. Erdos, H.-T. Yau, and J. Yin. Bulk universality for generalized wigner matrices. ˝ Probability Theory and Related Fields, 154(1-2):341–407, 2012.
306
+
307
+ [19] R. R. Far, T. Oraby, W. Bryc, and R. Speicher. Spectra of large block matrices. arXiv preprint cs/0610045, 2006.
308
+
309
+ [20] X. Glorot, A. Bordes, and Y. Bengio. Domain adaptation for large-scale sentiment classification: A deep learning approach. In Proceedings of the 28th International Conference on International Conference on Machine Learning, ICML’11, page 513–520, Madison, WI, USA, 2011. Omnipress.
310
+
311
+ [21] I. Goodfellow, Y. Bengio, and A. Courville. Deep learning. MIT press, 2016.
312
+
313
+ [22] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In Y. Bengio and Y. LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
314
+
315
+ [23] G. Grimmett. Percolation. In Percolation, pages 1–31. Springer, 1999.
316
+
317
+ [24] T. Hastie, A. Montanari, S. Rosset, and R. J. Tibshirani. Surprises in high-dimensional ridgeless least squares interpolation. arXiv preprint arXiv:1903.08560, 2019.
318
+
319
+ [25] J. W. Helton, T. Mai, and R. Speicher. Applications of realizations (aka linearizations) to free probability. Journal of Functional Analysis, 274(1):1–79, 2018.
320
+
321
+ [26] D. Hendrycks, S. Basart, N. Mu, S. Kadavath, F. Wang, E. Dorundo, R. Desai, T. Zhu, S. Parajuli, M. Guo, D. Song, J. Steinhardt, and J. Gilmer. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8340–8349, October 2021.
322
+
323
+ [27] D. Hendrycks and T. G. Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
324
+
325
+ [28] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on International Conference on Machine Learning - Volume 37, ICML’15, page 448–456. JMLR.org, 2015.
326
+
327
+ [29] A. Jacot, F. Gabriel, and C. Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, NIPS’18, page 8580–8589, Red Hook, NY, USA, 2018. Curran Associates Inc.
328
+
329
+ [30] D. Kobak, J. Lomond, and B. Sanchez. The optimal ridge penalty for real-world highdimensional data can be zero or negative due to the implicit ridge regularization. Journal of Machine Learning Research, 21(169):1–16, 2020.
330
+
331
+ [31] P. W. Koh, S. Sagawa, H. Marklund, S. M. Xie, M. Zhang, A. Balsubramani, W. Hu, M. Yasunaga, R. L. Phillips, I. Gao, T. Lee, E. David, I. Stavness, W. Guo, B. Earnshaw, I. Haque, S. M. Beery, J. Leskovec, A. Kundaje, E. Pierson, S. Levine, C. Finn, and P. Liang. Wilds: A benchmark of in-the-wild distribution shifts. In M. Meila and T. Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 5637–5664. PMLR, 18–24 Jul 2021.
332
+
333
+ [32] A. Kumar, T. Ma, and P. Liang. Understanding self-training for gradual domain adaptation. In H. D. III and A. Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5468–5479. PMLR, 13–18 Jul 2020.
334
+
335
+ [33] J. Lee, Y. Bahri, R. Novak, S. S. Schoenholz, J. Pennington, and J. Sohl-Dickstein. Deep neural networks as gaussian processes. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
336
+
337
+ [34] J. Lee, S. Schoenholz, J. Pennington, B. Adlam, L. Xiao, R. Novak, and J. Sohl-Dickstein. Finite versus infinite neural networks: an empirical study. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 15156–15172. Curran Associates, Inc., 2020.
338
+
339
+ [35] Z. Liao, R. Couillet, and M. W. Mahoney. A random matrix analysis of random fourier features: beyond the gaussian kernel, a precise phase transition, and the corresponding double descent. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 13939–13950. Curran Associates, Inc., 2020.
340
+
341
+ [36] M. Long, H. Zhu, J. Wang, and M. I. Jordan. Unsupervised domain adaptation with residual transfer networks. In Proceedings of the 30th International Conference on Neural Information Processing Systems, NIPS’16, page 136–144, Red Hook, NY, USA, 2016. Curran Associates Inc.
342
+
343
+ [37] M. Long, H. Zhu, J. Wang, and M. I. Jordan. Deep transfer learning with joint adaptation networks. In D. Precup and Y. W. Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 2208– 2217, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR.
344
+
345
+ [38] C. Louart, Z. Liao, R. Couillet, et al. A random matrix approach to neural networks. The Annals of Applied Probability, 28(2):1190–1248, 2018.
346
+
347
+ [39] A. Madry, A. Makelov, L. Schmidt, D. Tsipras, and A. Vladu. Towards deep learning models resistant to adversarial attacks. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
348
+
349
+ [40] H. Mania and S. Sra. Why do classifier accuracies show linear trends under distribution shift?, 2021.
350
+
351
+ [41] S. Mei and A. Montanari. The generalization error of random features regression: Precise asymptotics and the double descent curve. Communications on Pure and Applied Mathematics, 06 2021.
352
+
353
+ [42] G. Mel and S. Ganguli. A theory of high dimensional regression with arbitrary correlations between input features and target functions: sample complexity, multiple descent curves and a hierarchy of phase transitions. In M. Meila and T. Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 7578–7587. PMLR, 18–24 Jul 2021.
354
+
355
+ [43] J. Miller, K. Krauth, B. Recht, and L. Schmidt. The effect of natural distribution shift on question answering models. In H. D. III and A. Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 6905–6916. PMLR, 13–18 Jul 2020.
356
+
357
+ [44] J. P. Miller, R. Taori, A. Raghunathan, S. Sagawa, P. W. Koh, V. Shankar, P. Liang, Y. Carmon, and L. Schmidt. Accuracy on the line: on the strong correlation between out-of-distribution and in-distribution generalization. In M. Meila and T. Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 7721–7735. PMLR, 18–24 Jul 2021.
358
+
359
+ [45] J. A. Mingo and R. Speicher. Free probability and random matrices, volume 35. Springer, 2017.
360
+
361
+ [46] Z. Nado, S. Padhy, D. Sculley, A. D’Amour, B. Lakshminarayanan, and J. Snoek. Evaluating prediction-time batch normalization for robustness under covariate shift. arXiv preprint arXiv:2006.10963, 2020.
362
+
363
+ [47] V. Nagarajan and J. Z. Kolter. Uniform convergence may be unable to explain generalization in deep learning. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
364
+ [48] R. M. Neal. Priors for infinite networks. In Bayesian Learning for Neural Networks, pages 29–53. Springer, 1996.
365
+ [49] B. Neyshabur, S. Bhojanapalli, D. Mcallester, and N. Srebro. Exploring generalization in deep learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
366
+ [50] Y. Ovadia, E. Fertig, J. Ren, Z. Nado, D. Sculley, S. Nowozin, J. Dillon, B. Lakshminarayanan, and J. Snoek. Can you trust your models uncertainty? evaluating predictive uncertainty under dataset shift. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
367
+ [51] S. Péché et al. A note on the pennington-worah distribution. Electronic Communications in Probability, 24, 2019.
368
+ [52] J. Pennington and P. Worah. Nonlinear random matrix theory for deep learning. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
369
+ [53] J. Pennington and P. Worah. The spectrum of the fisher information matrix of a single-hiddenlayer neural network. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
370
+ [54] A. Rahimi and B. Recht. Random features for large-scale kernel machines. In J. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems, volume 20. Curran Associates, Inc., 2008.
371
+ [55] B. Recht, R. Roelofs, L. Schmidt, and V. Shankar. Do cifar-10 classifiers generalize to cifar-10? arXiv preprint arXiv:1806.00451, 2018.
372
+ [56] B. Recht, R. Roelofs, L. Schmidt, and V. Shankar. Do imagenet classifiers generalize to imagenet? In K. Chaudhuri and R. Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 5389–5400. PMLR, 2019.
373
+ [57] D. Richards, J. Mourtada, and L. Rosasco. Asymptotics of ridge(less) regression under general source condition. In A. Banerjee and K. Fukumizu, editors, Proceedings of The 24th International Conference on Artificial Intelligence and Statistics, volume 130 of Proceedings of Machine Learning Research, pages 3889–3897. PMLR, 13–15 Apr 2021.
374
+ [58] D. V. Rosen. On moments of the inverted wishart distribution. Statistics, 30(3):259–278, 1997.
375
+ [59] S. Sagawa, P. W. Koh, T. B. Hashimoto, and P. Liang. Distributionally robust neural networks. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
376
+ [60] L. Schmidt, S. Santurkar, D. Tsipras, K. Talwar, and A. Madry. Adversarially robust generalization requires more data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
377
+ [61] V. Shankar, A. Fang, W. Guo, S. Fridovich-Keil, J. Ragan-Kelley, L. Schmidt, and B. Recht. Neural kernels without tangents. In H. D. III and A. Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 8614–8623. PMLR, 13–18 Jul 2020.
378
+ [62] M. Sugiyama, M. Krauledat, and K.-R. Müller. Covariate shift adaptation by importance weighted cross validation. Journal of Machine Learning Research, 8(35):985–1005, 2007.
379
+ [63] R. Taori, A. Dave, V. Shankar, N. Carlini, B. Recht, and L. Schmidt. Measuring robustness to natural distribution shifts in image classification. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 18583–18599. Curran Associates, Inc., 2020.
380
+ [64] N. Tripuraneni, B. Adlam, and J. Pennington. Covariate shift in high-dimensional random feature regression. arXiv preprint arXiv:2111.08234, 2021.
381
+ [65] R. Vershynin. High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2018.
382
+ [66] M. J. Wainwright. High-Dimensional Statistics: A Non-Asymptotic Viewpoint. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2019.
383
+ [67] D. Wu and J. Xu. On the optimal weighted $\ell _ { 2 }$ regularization in overparameterized linear regression. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 10112–10123. Curran Associates, Inc., 2020.
384
+ [68] Z. Yang, Y. Bai, and S. Mei. Exact gap between generalization error and uniform convergence in random feature models. In M. Meila and T. Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 11704–11715. PMLR, 2021.
385
+ [69] H. Zhao, R. T. D. Combes, K. Zhang, and G. Gordon. On learning invariant representations for domain adaptation. In K. Chaudhuri and R. Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 7523–7532. PMLR, 09–15 Jun 2019.
386
+ [70] H. Zhao, S. Zhang, G. Wu, J. M. F. Moura, J. P. Costeira, and G. J. Gordon. Adversarial multiple source domain adaptation. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
parse/train/PxMfDdPnTfV/PxMfDdPnTfV_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/PxMfDdPnTfV/PxMfDdPnTfV_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/PxMfDdPnTfV/PxMfDdPnTfV_model.json ADDED
The diff for this file is too large to render. See raw diff